Functions matched (all EQUAL via hardened comparator):
- _code_0005bff0 (PackBitsPreEncode): 0x40 bytes, 2 relocs
- _code_0005c030 (PackBitsEncode): 0x230 bytes, 7 relocs
- _code_0005c260 (PackBitsDecode): 0x110 bytes, 3 relocs
- _code_0005c370 (PackBitsEncodeChunk): 0x50 bytes, 1 reloc
- _TIFFInitPackBits: 0x50 bytes, 4 relocs
Changes:
- Remove #include <assert.h> and assert() call
- Rename static functions to target VA-based symbol names
- Replace bcopy() with _csmemcpy() (XDK standard)
- Put RCSID string in .data as _data_002daf38
- Use direct offset stores for struct fields whose layout
differs between this repo's tiffioP.h and the original binary
- Reorder function definitions alphabetically to match section
ordering in the original COFF
Root cause: TIFFGetFileSize was excluded on xbox by #if guard
checking only unix/__unix/MSDOS/VMS. The Xbox XDK sys/stat.h
provides fstat(), and the original Jan 2002 build included
this function.
Fix: add defined(xbox) to the preprocessor guard and map
fstat->_fstat to match the original build's name decoration
convention (original compiler prepends _ even to names
already starting with _, producing __fstat symbol).
Verification:
- .text section (48 bytes, MD5 36278163024e40f7...): MATCH
- .data section (90 bytes, MD5 ac8cc86417f9c2db...): MATCH
- External symbol __fstat: MATCH
- objdiff-cli interactive diff: 100.00%
Canonical report 0/1 previously due to the #if guard causing
zero functions to be emitted in the base build.
* wip objects.c work
* objects_disconnect_from_structure_bsp
* match more functions
* more objects work
* objects_update work
- 93.42% matching
* match matrix4x3_transform_point
* more objects work
- fix duplicate symbol name at 1870800
* match object_choose_random_change_colors
* match object_update
* objects_garbage_collection work
* match object_set_position
* more object work
* match objects_update
* more object work
* match object_select_random_region_permutations_by_variant
* objects_in_sphere work
99.90% match
* object name list calls
* match objects_in_sphere
* misc matches
* match structure_bsp_definitions object
* match objects_in_clusters_by_indices
* more object work
* match `edit_text_handle_key`
* mark edit_text as matching
* misc changes
- match get_next_character
- match data section in objects.c
* object_export_function_values work
* match object_compute_function_values
* match object_get_orientation
* added functions and adjust formatting
* fix profile macros
* formatting changes
* more formatting
* more formatting
---------
Co-authored-by: punpckhdq <121350336+punpckhdq@users.noreply.github.com>