Commit Graph
55 Commits
Author SHA1 Message Date
Jonas Volman 1953e26037 Keep unproven profile slots opaque 2026-08-20 22:08:16 -07:00
Jonas Volman a3a3549b49 Recover exact profile section helpers 2026-08-20 21:36:28 -07:00
Jonas Volman 3263e9484e Recover stack walk function offset accessor 2026-08-20 16:19:22 -07:00
Jonas Volman 3b285f4794 Guard profile dump file close 2026-08-20 15:25:56 -07:00
Jonas Volman 6fb0a3d8fe Recover profile exact checkpoint 2026-08-20 14:27:48 -07:00
Jonas Volman 0d252d46ed Advance debug memory reconstruction 2026-08-20 11:52:49 -07:00
Jonas Volman 1a7023b624 Match errors object
Recover the exact error-buffer publication shape, preserve Berth declaration formatting, admit the 10/10 translation unit, and retire only the stale _error compiler-tie park.
2026-08-20 09:28:39 -07:00
Jonas VolmanandClaude Opus 5 3328df1847 Match cseries sort object
Byte-exact, all four functions, whole object.  Source was a pure skeleton with
no code; status MISSING work now NonMatching -> Matching.

An iterative quicksort for 2-byte and 4-byte elements with a 30-deep bounds
stack and a selection-sort cutoff at 8.  The two code_* symbols are the
selection sorts and take hi in EAX under VC7's custom convention for statics.
The comparator takes values, not pointers, and the zero-extension in the target
pins the 2-byte element type to word rather than short.

Five source-shape findings, each read off the disassembly:

- the swap loads both elements then stores to *best first, which is
  temp = *best; *best = *hi; *hi = temp - the mirror of the natural form.  That
  alone made both selection sorts exact.
- element_count and size are unsigned: the target uses jb, ja and shr where
  signed types give jl, jg and sar.
- the source writes lo+1 < j, not the algebraically identical lo < j-1, which
  reverses the lea and cmp operands.
- the larger-partition test compares raw byte differences.  On word pointers
  every element-count form makes MSVC emit two sars or cancel them and mask,
  costing 16 bytes; only an explicit byte-basis comparison gives the plain dec.
  j-1-lo >= hi-i, j-lo > hi-i and the byte form are integer-identical and only
  the last matches.
- depth = 0 is assigned before hi; the reverse order swaps the two stores.

Both qsort bodies went exact from the same five fixes, which is good evidence
the shapes are right rather than coincidental.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-13 04:33:37 -07:00
Jonas Volman 74c9dc0936 Correct error buffer publication order 2026-07-18 15:30:29 -07:00
Jonas Volman 2d267de83c Match shared math and color global ownership 2026-07-18 14:38:26 -07:00
Jonas Volman 2fc59b8c1b Reconstruct debug memory allocation foundation 2026-07-18 09:29:26 -07:00
Jonas Volman be57025a3b Match debug memory validation 2026-07-18 08:56:35 -07:00
Jonas Volman 47cbb163bc Reconstruct debug memory foundation 2026-07-18 00:09:20 -07:00
Jonas Volman b42c48a550 Reconstruct central error handler and owned state 2026-07-17 20:54:01 -07:00
Jonas Volman 132f7bf7f8 Match cseries Windows exception handling 2026-07-15 23:42:39 -07:00
Jonas Volman 8f13d99b02 Match Xbox cseries platform wrappers 2026-07-15 21:14:34 -07:00
Jonas Volman e4188cb7d5 Match errors subsystem leaf functions 2026-07-15 21:08:45 -07:00
Jonas Volman bd21f69ea8 Match XDK texture encoding table 2026-07-14 23:52:48 -07:00
Jonas Volman 1371090615 Correct debug realloc ABI 2026-07-14 17:55:49 -07:00
Jonas Volman e5852f80db Reconstruct csstrcasecmp (nonmatching) 2026-07-14 17:02:37 -07:00
Jonas Volman 8977ee86d6 Match progress_update 2026-07-14 15:15:33 -07:00
Jonas Volman 3fe71299eb Match progress_new 2026-07-14 15:15:33 -07:00
Jonas Volman c803347ad9 Fix cseries string case prototypes 2026-07-14 14:23:18 -07:00
Jonas Volman f1a3b3cc63 Match stristr 2026-07-14 14:20:02 -07:00
Jonas Volman b67d41cf67 Match strnlen 2026-07-14 14:19:53 -07:00
Berthalamew 37e96a1c2f ai_debug work (#37) 2026-07-13 14:34:27 +01:00
Berthalamew bc6663de55 unit additions (#34)
- add unit functions and associated dependencies
2026-07-01 00:15:19 +01:00
LWSSandpunpckhdq 95e6477328 work on breakable_surfaces.c (#28)
* work on breakable_surfaces.c

* squashme asdf

* word

* more

* Correctness changes

Move types definitions to where we know they are, fix includes and formatting, fix bad defines

* Missed this include

* Scoped if

* More

* MAXIMUM_NUMBER_OF_MATERIAL_TYPES

* Enum correctness

---------

Co-authored-by: punpckhdq <121350336+punpckhdq@users.noreply.github.com>
2026-06-17 13:53:13 +01:00
punpckhdq fb0d814535 Declare .comm data in TUs instead of headers (#26)
* Declare .comm data in TUs instead of headers

* Update files.h

* Include
2026-06-16 12:49:22 +01:00
punpckhdq a40783e4f5 render_frame_pregame: 99%
`progress` doesn't exist on the stack by itself. mystery inlined and deduped static function?
2026-06-08 16:27:33 +01:00
punpckhdq cce8ecb1f2 Use space before equals (#21) 2026-06-08 02:44:47 +01:00
Berthalamew 52a0dc4c28 add tag definitions and misc function prototypes (#19)
* misc changes

- add function prototypes and change types
- add profile_initialize

* add tag definitions and prototypes

- real math changes
2026-05-05 18:56:06 +01:00
punpckhdq bc68b04094 shaders.c numeric_countdown 2026-03-12 18:14:54 +00:00
Berthalamew 7f38d9e94f add rasterizer light globals (#18)
* add rasterizer light globals

* add profile globals

* requested changes
2026-02-17 17:02:17 +00:00
Berthalamewandpunpckhdq eb93ce635e wip objects.c work (#12)
* 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>
2026-02-15 01:05:45 +00:00
Haydn Triggandpunpckhdq 10bcbbce16 various cseries functions (#17)
* various cseries functions

* Match most of cseries

Formatting and correctness

* csstrlen returns unsigned long

---------

Co-authored-by: punpckhdq <121350336+punpckhdq@users.noreply.github.com>
2026-01-23 20:30:53 +00:00
Haydn Triggandpunpckhdq 5a89849d4c stack_walk_windows various 100% (#15)
* stack_walk_windows various 100%

* Formatting and correctness

---------

Co-authored-by: punpckhdq <121350336+punpckhdq@users.noreply.github.com>
2026-01-17 23:49:46 +00:00
punpckhdq 10b70b51d2 render_detail_objects.c
Super big deal
2026-01-08 21:43:04 +00:00
Berthalamewandpunpckhdq 4817ee1995 console/terminal related work (#8)
* misc changes and additions

formatting changes and add structs/constants for terminal work

* match write_to_error_file and add error_global_data

* console work

* requested changes

* terminal work

100% match all terminal functions

* Formatting

---------

Co-authored-by: punpckhdq <121350336+punpckhdq@users.noreply.github.com>
2026-01-06 23:30:12 +00:00
punpckhdq e61214bd44 Some attract_mode.c functions 2026-01-04 17:34:50 +00:00
punpckhdq 92c32ba2ba debug_keys.c cleanup 2026-01-03 13:29:37 +00:00
Berthalamew f949140d5a add global colors (#6) 2026-01-03 04:05:35 +00:00
Berthalamew 405cc6472c integer math work (#5)
* integer math work

* requested changes

* forgot to add SHORT_FIXED_TO_LONG in cseries

- update bitvector macros

* add adjust rectangle enum
2026-01-03 02:29:06 +00:00
Berthalamewandpunpckhdq 3df3e671df debug_keys work (#3)
* debug_keys work

* requested changes

* prototypes and mark debug_keys as matching

* Formatting

---------

Co-authored-by: punpckhdq <121350336+punpckhdq@users.noreply.github.com>
2026-01-02 23:39:06 +00:00
punpckhdq 0d612899c5 Fix malloc macros 2025-12-29 16:31:20 +00:00
punpckhdq 58b6d3a2da Include stdarg.h in cseries.h 2025-12-14 15:11:49 +00:00
punpckhdq 0be9b6f7df debug_memory.c prototypes 2025-12-13 16:48:13 +00:00
punpckhdq 2d2b573c02 Fix return type of csstrlen 2025-12-13 15:44:15 +00:00
punpckhdq 969aa991b5 Int correctness 2025-11-28 14:23:14 +00:00
punpckhdq 60fab4e77e Match placeholder_definitions.c 2025-11-27 16:51:41 +00:00