removes unused functions, adds ignored functions to report

This commit is contained in:
Jeff Harris 2025-07-05 21:46:45 +12:00
parent 10a9a8bded
commit 53f326fc82
6 changed files with 210 additions and 1356 deletions

58
cmake/reccmp.cmake Normal file
View File

@ -0,0 +1,58 @@
function(reccmp_find_project RESULT)
set(curdir "${CMAKE_CURRENT_SOURCE_DIR}")
while(1)
if(EXISTS "${curdir}/reccmp-project.yml")
break()
endif()
get_filename_component(nextdir "${curdir}" DIRECTORY)
if(nextdir STREQUAL curdir)
set(curdir "${RESULT}-NOTFOUND")
break()
endif()
set(curdir "${nextdir}")
endwhile()
set("${RESULT}" "${curdir}" PARENT_SCOPE)
endfunction()
function(reccmp_add_target TARGET)
cmake_parse_arguments(ARGS "" "ID" "" ${ARGN})
if(NOT ARGS_ID)
message(FATAL_ERROR "Missing ID argument")
endif()
set_property(TARGET ${TARGET} PROPERTY INTERFACE_RECCMP_ID "${ARGS_ID}")
set_property(GLOBAL APPEND PROPERTY RECCMP_TARGETS ${TARGET})
endfunction()
function(reccmp_configure)
cmake_parse_arguments(ARGS "COPY_TO_SOURCE_FOLDER" "DIR" "" ${ARGN})
set(binary_dir "${CMAKE_BINARY_DIR}")
if(ARGS_DIR)
set(binary_dir "${ARGS_DIR}")
endif()
reccmp_find_project(reccmp_project_dir)
if(NOT reccmp_project_dir)
message(FATAL_ERROR "Cannot find reccmp-project.yml")
endif()
if(CMAKE_CONFIGURATION_TYPES)
set(outputdir "${binary_dir}/$<CONFIG>")
else()
set(outputdir "${binary_dir}")
endif()
set(build_yml_txt "project: '${reccmp_project_dir}'\ntargets:\n")
get_property(RECCMP_TARGETS GLOBAL PROPERTY RECCMP_TARGETS)
foreach(target ${RECCMP_TARGETS})
get_property(id TARGET "${target}" PROPERTY INTERFACE_RECCMP_ID)
string(APPEND build_yml_txt " ${id}:\n")
string(APPEND build_yml_txt " path: '$<TARGET_FILE:${target}>'\n")
if(WIN32 AND MSVC)
string(APPEND build_yml_txt " pdb: '$<TARGET_PDB_FILE:${target}>'\n")
endif()
endforeach()
file(GENERATE OUTPUT "${outputdir}/reccmp-build.yml" CONTENT "${build_yml_txt}")
if(ARGS_COPY_TO_SOURCE_FOLDER)
file(GENERATE OUTPUT "${CMAKE_SOURCE_DIR}/reccmp-build.yml" CONTENT "${build_yml_txt}" CONDITION $<CONFIG:Release>)
endif()
endfunction()

@ -1 +1 @@
Subproject commit b13fe1a204ce68b90c784ba45a433e43a705d53b
Subproject commit 9ef1c4a8b234a19bc0719761b77ba024f38b6350

150
reccmp-project.yml Normal file
View File

@ -0,0 +1,150 @@
targets:
CARM95:
filename: carm95.exe
source_root: src
hash:
sha256: c6040203856b71e6a22d2a29053a1eadd1a2ab41bce97b6031d745079bc07bdf
report:
ignore_functions: [
"BrActorToActorMatrix34",
"BrActorRelink",
"BrPixelmapAllocateSub",
"BrPixelmapFree",
"BrPixelmapMatch",
"BrPixelmapFill",
"BrPixelmapRectangleCopy",
"BrPixelmapRectangleFill",
"BrPixelmapPixelSet",
"BrPixelmapLine",
"BrPixelmapText",
"BrPixelmapTextF",
"BrPixelmapTextWidth",
"BrPixelmapLoadMany",
"BrPixelmapLoad",
"BrPixelmapSave",
"BrPixelmapAllocate",
"BrMatrix34Copy",
"BrMatrix34Mul",
"BrMatrix34Identity",
"BrMatrix34RotateY",
"BrMatrix34Rotate",
"BrMatrix34Scale",
"BrMatrix34Inverse",
"BrMatrix34LPInverse",
"BrMatrix34LPNormalise",
"BrMatrix34RollingBall",
"BrMatrix34ApplyP",
"BrMatrix34ApplyV",
"BrMatrix34TApplyV",
"BrMatrix34Pre",
"BrMatrix34Post",
"BrMatrix34PreRotateX",
"BrMatrix34PreRotateY",
"BrMatrix34PreRotateZ",
"BrMatrix34PreRotate",
"BrMatrix34PreTranslate",
"BrMatrix34PostTranslate",
"BrMatrix34PreScale",
"BrMatrix34PostScale",
"BrMatrix34PreShearX",
"BrMatrix34PostShearX",
"BrMatrix34PostShearY",
"BrMatrix34PostShearZ",
"BrTransformToMatrix34",
"BrMatrix34PreTransform",
"BrTransformToTransform",
"BrVector3SetFloat",
"BrMatrix23Copy",
"BrMatrix23Mul",
"BrMatrix23Identity",
"BrMatrix4Copy",
"BrMatrix4Mul",
"BrMatrix4Scale",
"BrMatrix4Inverse",
"BrMatrix4Perspective",
"BrMatrix4ApplyP",
"BrMatrix4TApply",
"BrEulerToMatrix34",
"BrMemSet",
"BrStrCpy",
"BrAbort",
"BrVSprintf",
"BrModelAdd",
"BrModelRemove",
"BrModelFindHook",
"BrModelAddMany",
"BrMaterialAdd",
"BrMaterialRemove",
"BrMaterialFind",
"BrMaterialFindHook",
"BrMaterialAddMany",
"BrMaterialEnum",
"BrMapAdd",
"BrMapRemove",
"BrMapFind",
"BrMapFindHook",
"BrMapAddMany",
"BrTableAdd",
"BrTableRemove",
"BrTableFind",
"BrTableFindHook",
"BrTableEnum",
"BrModelFree",
"BrModelAllocate",
"BrActorEnum",
"BrActorAdd",
"BrActorRemove",
"BrActorAllocate",
"BrActorFree",
"BrActorToBounds",
"BrModelUpdate",
"BrModelClear",
"BrMaterialAllocate",
"BrMaterialFree",
"BrMaterialUpdate",
"BrMaterialClear",
"BrDbModelRender",
"BrOnScreenCheck",
"BrZbSceneRenderBegin",
"BrZbSceneRenderAdd",
"BrZbSceneRenderEnd",
"BrZbModelRender",
"BrModelLoadMany",
"BrModelSaveMany",
"BrActorLoadMany",
"BrMaterialLoadMany",
"BrModelLoad",
"BrMaterialLoad",
"BrActorLoad",
"BrActorSave",
"BrZbBegin",
"BrV1dbBeginWrapper_Float",
"BrClipPlaneEnable",
"BrClipPlaneDisable",
"BrEnvironmentSet",
"BrTableUpdate",
"BrFailure",
"BrFatal",
"BrMemAllocate",
"BrMemFree",
"BrMemCalloc",
"BrResAllocate",
"BrResFree",
"BrResRemove",
"BrStrDup",
"BrMemSet2",
"BrSwap32",
"BrDiagHandlerSet",
"BrFilesystemSet",
"BrAllocatorSet",
"BrResClassAdd",
"BrScratchAllocate",
"BrScratchFree",
"BrRegistryAdd",
"BrRegistryRemove",
"BrRegistryEnum",
"BrSimpleRemove",
"BrQsort",
"BrFileRead",
]

View File

@ -22,7 +22,7 @@
#include <stdlib.h>
// GLOBAL: CARM95 0x005070d0
br_actor* gOppo_path_actor;
br_actor* gOppo_path_actor = NULL;
// GLOBAL: CARM95 0x005070d4
br_model* gOppo_path_model;

File diff suppressed because it is too large Load Diff

View File

@ -1,42 +1,14 @@
// LIBRARY: CARM95 0x00455730
// iswxdigit
// LIBRARY: CARM95 0x004a61ca
// WinMain@16
// LIBRARY: CARM95 0x004ea660
// strtok
// LIBRARY: CARM95 0x004ea8a0
// asin
// LIBRARY: CARM95 0x004ea8aa
// acos
// LIBRARY: CARM95 0x004ea8b1
// atan
// LIBRARY: CARM95 0x004ea8b8
// atan2
// LIBRARY: CARM95 0x004ea8f0
// sprintf
// LIBRARY: CARM95 0x004eaa10
// memcpy
// LIBRARY: CARM95 0x004eab60
// pow
// LIBRARY: CARM95 0x004eab6a
// log
// LIBRARY: CARM95 0x004eab74
// log10
// LIBRARY: CARM95 0x004eab7b
// exp
// LIBRARY: CARM95 0x004eabe0
// fclose
@ -46,24 +18,9 @@
// LIBRARY: CARM95 0x004ead80
// qsort
// LIBRARY: CARM95 0x004eafe0
// shortsort
// LIBRARY: CARM95 0x004eb070
// swap
// LIBRARY: CARM95 0x004eb0d0
// ldexp
// LIBRARY: CARM95 0x004eb3e0
// rand
// LIBRARY: CARM95 0x004eb430
// floor
// LIBRARY: CARM95 0x004eb5a0
// ceil
// LIBRARY: CARM95 0x004eb710
// fread
@ -100,9 +57,6 @@
// LIBRARY: CARM95 0x004ec490
// fgetc
// LIBRARY: CARM95 0x004ec510
// fmod
// LIBRARY: CARM95 0x004ec550
// fputs
@ -127,12 +81,6 @@
// LIBRARY: CARM95 0x004ecb00
// malloc
// LIBRARY: CARM95 0x004ecfc0
// realloc_help
// LIBRARY: CARM95 0x004ed9a0
// CheckBytes
// LIBRARY: CARM95 0x004ee4a0
// memchr
@ -145,24 +93,15 @@
// LIBRARY: CARM95 0x004ee680
// strtol
// LIBRARY: CARM95 0x004ee6b0
// strtoxl
// LIBRARY: CARM95 0x004eea40
// strtoul
// LIBRARY: CARM95 0x004eee80
// CrtMessageWindow
// LIBRARY: CARM95 0x004ef1b0
// ftell
// LIBRARY: CARM95 0x004ef4b0
// exit
// LIBRARY: CARM95 0x004ef4f0
// doexit
// LIBRARY: CARM95 0x004ef630
// rename
@ -184,108 +123,15 @@
// LIBRARY: CARM95 0x004efd40
// vsprintf
// LIBRARY: CARM95 0x004f0717
// rtforsqrtinf
// LIBRARY: CARM95 0x004f071c
// rtforsqrtzero
// LIBRARY: CARM95 0x004f09f5
// rtforatn20
// LIBRARY: CARM95 0x004f0a11
// rtforatn200
// LIBRARY: CARM95 0x004f0a18
// rtforatnby0
// LIBRARY: CARM95 0x004f0a1e
// rtsignpiby2
// LIBRARY: CARM95 0x004f1a60
// write_char
// LIBRARY: CARM95 0x004f1ae0
// write_multi_char
// LIBRARY: CARM95 0x004f1b30
// write_string
// LIBRARY: CARM95 0x004f1b90
// get_int_arg
// LIBRARY: CARM95 0x004f1bb0
// get_int64_arg
// LIBRARY: CARM95 0x004f1be0
// get_short_arg
// LIBRARY: CARM95 0x004f1c6e
// rtfor0to0
// LIBRARY: CARM95 0x004f1ca4
// rtforln0
// LIBRARY: CARM95 0x004f1cb4
// rtforloginf
// LIBRARY: CARM95 0x004f1cc8
// rtforyto0
// LIBRARY: CARM95 0x004f1ccd
// rtfor0tox
// LIBRARY: CARM95 0x004f1ce8
// rtfor0toneg
// LIBRARY: CARM95 0x004f1d32
// expbigret
// LIBRARY: CARM95 0x004f1d51
// rtforexpinf
// LIBRARY: CARM95 0x004f1da1
// isintTOS
// LIBRARY: CARM95 0x004f1dc6
// isintTOSret
// LIBRARY: CARM95 0x004f1dd5
// usepowhlp
// LIBRARY: CARM95 0x004f1fe0
// fflush
// LIBRARY: CARM95 0x004f2140
// flsall
// LIBRARY: CARM95 0x004f3b90
// memcpy_0
// LIBRARY: CARM95 0x004f55f0
// strlen
// LIBRARY: CARM95 0x004f606f
// tossnan1
// LIBRARY: CARM95 0x004f609d
// tossnan2
// LIBRARY: CARM95 0x004f60a4
// tosnan2ret
// LIBRARY: CARM95 0x004f60dc
// snan2
// LIBRARY: CARM95 0x004f60e3
// nan2ret
// LIBRARY: CARM95 0x004f7040
// asctime
// LIBRARY: CARM95 0x004f71a0
// store_dt
// LIBRARY: CARM95 0x004f71e0
// localtime
@ -295,9 +141,6 @@
// LIBRARY: CARM95 0x004f8e80
// toupper
// LIBRARY: CARM95 0x004f9020
// xtoa
// LIBRARY: CARM95 0x004f90e0
// strcpy
@ -307,63 +150,6 @@
// LIBRARY: CARM95 0x004f93b0
// raise
// LIBRARY: CARM95 0x004f95d0
// siglookup
// LIBRARY: CARM95 0x004f9b00
// strncnt
// LIBRARY: CARM95 0x004f9b7c
// gu_return
// LIBRARY: CARM95 0x004f9ba5
// uh_return
// LIBRARY: CARM95 0x004f9bc3
// lu_top
// LIBRARY: CARM95 0x004f9c00
// lu_done
// LIBRARY: CARM95 0x004f9c30
// at_done
// LIBRARY: CARM95 0x004f9e60
// xcptlookup
// LIBRARY: CARM95 0x004f9ef0
// x_ismbbtype
// LIBRARY: CARM95 0x004fa170
// parse_cmdline
// LIBRARY: CARM95 0x004faac0
// getSystemCP
// LIBRARY: CARM95 0x004fab50
// CPtoLCID
// LIBRARY: CARM95 0x004fabf0
// setSBCS
// LIBRARY: CARM95 0x004facc3
// lh_top
// LIBRARY: CARM95 0x004fad17
// lh_continue
// LIBRARY: CARM95 0x004fad22
// lh_dismiss
// LIBRARY: CARM95 0x004fad29
// lh_bagit
// LIBRARY: CARM95 0x004fad30
// lh_unwinding
// LIBRARY: CARM95 0x004fad45
// lh_return
// LIBRARY: CARM95 0x004fc210
// wctomb
@ -373,27 +159,12 @@
// LIBRARY: CARM95 0x004fcda0
// isspace
// LIBRARY: CARM95 0x004fdae0
// cvtdate
// LIBRARY: CARM95 0x004fdcf0
// gmtime
// LIBRARY: CARM95 0x004fdfa0
// wcslen
// LIBRARY: CARM95 0x004fe450
// strncnt_0
// LIBRARY: CARM95 0x004fe830
// findenv
// LIBRARY: CARM95 0x004fe8d0
// copy_environ
// LIBRARY: CARM95 0x004ff930
// $I10_OUTPUT
// LIBRARY: CARM95 0x00500120
// atol
@ -402,21 +173,3 @@
// LIBRARY: CARM95 0x005002d0
// wcstombs
// LIBRARY: CARM95 0x00500630
// wcsncnt
// LIBRARY: CARM95 0x00502f60
// feof
// LIBRARY: CARM95 0x00503140
// longjmp
// LIBRARY: CARM95 0x0050315b
// lj_local_unwind
// LIBRARY: CARM95 0x00503183
// lj_old_unwind
// LIBRARY: CARM95 0x00503190
// lj_no_unwind