<feed xmlns='http://www.w3.org/2005/Atom'>
<title>SpaghettiKart/src/replays.h, branch Caladius-patch-1</title>
<subtitle>SpaghettiKart: Mario Kart 64 PC port</subtitle>
<link rel='alternate' type='text/html' href='https://git.dog6.net/SpaghettiKart/'/>
<entry>
<title>Mechanical compiler warning cleanup across the game C code (#691, 2 of 3) (#736)</title>
<updated>2026-09-16T13:26:27+00:00</updated>
<author>
<name>quarrel07</name>
<email>178681861+quarrel07@users.noreply.github.com</email>
</author>
<published>2026-09-16T13:26:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/SpaghettiKart/commit/?id=8fb42e50d70356300050048b57def3123e6d4552'/>
<id>8fb42e50d70356300050048b57def3123e6d4552</id>
<content type='text'>
* spawn_players: cast player flag combinations to s16 explicitly

The PLAYER_* flag defines OR into values with bit 15 set; assigning
them to s16 fields wraps to the intended negative value. The casts make
that explicit (82 warnings, no behavior change).

Co-Authored-By: Claude Fable 5 &lt;noreply@anthropic.com&gt;

* render_objects: mechanical warning cleanup

uintptr_t casts for display list macro args, u8* casts for asset name
pointers, UNUSED on decomp-preserved dead locals and params, one loop
index sign fix. 75 warnings, no behavior change.

Co-Authored-By: Claude Fable 5 &lt;noreply@anthropic.com&gt;

* update_objects: mechanical warning cleanup (42 warnings, casts and UNUSED)

Co-Authored-By: Claude Fable 5 &lt;noreply@anthropic.com&gt;

* menu_items: mechanical warning cleanup (50 warnings, casts and UNUSED)

Co-Authored-By: Claude Fable 5 &lt;noreply@anthropic.com&gt;

* stubs, kart_dma: mechanical warning cleanup (43 warnings)

Co-Authored-By: Claude Fable 5 &lt;noreply@anthropic.com&gt;

* code_80057C60, audio/external: mechanical warning cleanup (113 warnings)

Includes two decomp artifacts worth noting: a comma operator inside an
array index ([0, soundIndex] indexed only soundIndex) and a no-op for
init clause, both formerly needed for byte-matching.

Co-Authored-By: Claude Fable 5 &lt;noreply@anthropic.com&gt;

* some_data, actors, code_8006E9C0, code_80005FD0, main, render_player, mixer, skybox, load: mechanical warning cleanup (111 warnings)

Co-Authored-By: Claude Fable 5 &lt;noreply@anthropic.com&gt;

* Remaining game C files: mechanical warning cleanup to zero

Co-Authored-By: Claude Fable 5 &lt;noreply@anthropic.com&gt;

* Format the changed lines per .clang-format

Co-Authored-By: Claude Fable 5 &lt;noreply@anthropic.com&gt;

* ending: fix the bcopy shim reversing its arguments

The port shimmed bcopy to memcpy, but bcopy takes (src, dst) and memcpy
takes (dst, src), so every call through the shim copied backwards. The one
call site is the debug character switch in the ceremony cutscene, which is
meant to reset gCharacterIdByGPOverallRank to defaultCharacterIds. Instead
it overwrote the default table with the current standings, so the reset
never happened and the defaults were clobbered for later use.

Reachable only with gEnableDebugMode on and all D-pad plus C buttons held.

Co-Authored-By: Claude Fable 5 &lt;noreply@anthropic.com&gt;

* Address review: delete dead port helper, widen D_8015F718, comment out size lookup

get_texture2 was port-added and has no callers, so it goes away rather
than wearing the decomp UNUSED tag. D_8015F718 holds pointers, so it is
uintptr_t now. The kart_dma size lookup is commented out instead of
annotated.

Co-Authored-By: Claude Fable 5 &lt;noreply@anthropic.com&gt;

* menu_items: replace func_80097274 with the matched decomp version

Straight copy of the matched function; the NON_MATCHING guard and
GLOBAL_ASM fallback go away with it. The matched body also uses the
(u32) comparison forms, which keeps it warning-clean.

Co-Authored-By: Claude Fable 5 &lt;noreply@anthropic.com&gt;

* Update menu_items.c

* Address review round 2: audio loop form, cast collapse, dead code removal

func_800C3478 takes the while form; the (s8*)(u8*) stacks collapse to
one cast (40 sites); func_800BA8B0 and clamp32 go away (no callers);
gCourseOutlineTextures is const char* so its casts vanish; the podium
test line and render_screens matrix line are gone; set_screen keeps
its refactoring breadcrumbs commented out; the display-list walker is
reverted to the vanilla form as requested, which brings its one
shift-negative warning back; gCurrentlyLoadedTrackAddr defaults to 0.

Co-Authored-By: Claude Fable 5 &lt;noreply@anthropic.com&gt;

* Address review round 3: endianness.h byteswap, size_t indices, stub pragma

BSWAP16 now comes from libultraship's endianness.h on little-endian
targets, whose builtin returns u16 and needs no casts at the data.c
initializers. The intrinsic pragmas leave the repo. Actor and save
loops index with size_t instead of casting their bounds. stubs.c
silences unused parameters once for the file instead of tagging every
signature. spawn_player takes s32 and casts once inside, dropping 82
call-site casts. The item window arrays are const char* end to end,
race_begin_viewport loses its unused mode argument, mio0encode takes
uintptr_t, and the neon TLUT math is written in bytes.

Co-Authored-By: Claude Fable 5 &lt;noreply@anthropic.com&gt;

* data.c: use BOMSWAP16_CONST in the static envelope initializer

MSVC's _byteswap_ushort is a function call, not a constant expression,
so the plain BSWAP16 broke every Windows build at this initializer.
The _CONST variant is the manual shift form on MSVC and the same
builtin everywhere else.

Co-Authored-By: Claude Fable 5 &lt;noreply@anthropic.com&gt;

* Address review round 4: single BSWAP16 home, mixer arg refactor, stragglers

effects.h includes macros.h instead of carrying its own BSWAP16 copy.
mixer.c drops its unused arguments and locals outright, with the ABI
macros absorbing the removed parameters the same way they already
absorb pkt. func_8028EC98 takes no argument, the fourth intrinsic
pragma leaves math_util_2.c, the backup checksum loop joins its
siblings on size_t, and two leftover casts and an UNUSED go away.

Co-Authored-By: Claude Fable 5 &lt;noreply@anthropic.com&gt;

* ending: back out the debug-print cast for #745

The int-to-pointer warning it silenced returns until #745 reworks
this code.

Co-Authored-By: Claude Fable 5 &lt;noreply@anthropic.com&gt;

* effects.h: drop the include annotation

Co-Authored-By: Claude Fable 5 &lt;noreply@anthropic.com&gt;

* Retrigger CI after runner disconnect

* mixer: restore the Impl signatures and suppress the unused-parameter warning instead

* Clean up unused variables in code_80005FD0.c

Removed unused variables and assignments in CPU behaviour code.

* Remove unused camera variable from function

Remove unused camera variable in look_behind_toggle function.

* Update comment for bcopy and memcpy clarification

Clarified comment about bcopy and memcpy usage.

---------

Co-authored-by: Claude Fable 5 &lt;noreply@anthropic.com&gt;
Co-authored-by: MegaMech &lt;MegaMech@users.noreply.github.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* spawn_players: cast player flag combinations to s16 explicitly

The PLAYER_* flag defines OR into values with bit 15 set; assigning
them to s16 fields wraps to the intended negative value. The casts make
that explicit (82 warnings, no behavior change).

Co-Authored-By: Claude Fable 5 &lt;noreply@anthropic.com&gt;

* render_objects: mechanical warning cleanup

uintptr_t casts for display list macro args, u8* casts for asset name
pointers, UNUSED on decomp-preserved dead locals and params, one loop
index sign fix. 75 warnings, no behavior change.

Co-Authored-By: Claude Fable 5 &lt;noreply@anthropic.com&gt;

* update_objects: mechanical warning cleanup (42 warnings, casts and UNUSED)

Co-Authored-By: Claude Fable 5 &lt;noreply@anthropic.com&gt;

* menu_items: mechanical warning cleanup (50 warnings, casts and UNUSED)

Co-Authored-By: Claude Fable 5 &lt;noreply@anthropic.com&gt;

* stubs, kart_dma: mechanical warning cleanup (43 warnings)

Co-Authored-By: Claude Fable 5 &lt;noreply@anthropic.com&gt;

* code_80057C60, audio/external: mechanical warning cleanup (113 warnings)

Includes two decomp artifacts worth noting: a comma operator inside an
array index ([0, soundIndex] indexed only soundIndex) and a no-op for
init clause, both formerly needed for byte-matching.

Co-Authored-By: Claude Fable 5 &lt;noreply@anthropic.com&gt;

* some_data, actors, code_8006E9C0, code_80005FD0, main, render_player, mixer, skybox, load: mechanical warning cleanup (111 warnings)

Co-Authored-By: Claude Fable 5 &lt;noreply@anthropic.com&gt;

* Remaining game C files: mechanical warning cleanup to zero

Co-Authored-By: Claude Fable 5 &lt;noreply@anthropic.com&gt;

* Format the changed lines per .clang-format

Co-Authored-By: Claude Fable 5 &lt;noreply@anthropic.com&gt;

* ending: fix the bcopy shim reversing its arguments

The port shimmed bcopy to memcpy, but bcopy takes (src, dst) and memcpy
takes (dst, src), so every call through the shim copied backwards. The one
call site is the debug character switch in the ceremony cutscene, which is
meant to reset gCharacterIdByGPOverallRank to defaultCharacterIds. Instead
it overwrote the default table with the current standings, so the reset
never happened and the defaults were clobbered for later use.

Reachable only with gEnableDebugMode on and all D-pad plus C buttons held.

Co-Authored-By: Claude Fable 5 &lt;noreply@anthropic.com&gt;

* Address review: delete dead port helper, widen D_8015F718, comment out size lookup

get_texture2 was port-added and has no callers, so it goes away rather
than wearing the decomp UNUSED tag. D_8015F718 holds pointers, so it is
uintptr_t now. The kart_dma size lookup is commented out instead of
annotated.

Co-Authored-By: Claude Fable 5 &lt;noreply@anthropic.com&gt;

* menu_items: replace func_80097274 with the matched decomp version

Straight copy of the matched function; the NON_MATCHING guard and
GLOBAL_ASM fallback go away with it. The matched body also uses the
(u32) comparison forms, which keeps it warning-clean.

Co-Authored-By: Claude Fable 5 &lt;noreply@anthropic.com&gt;

* Update menu_items.c

* Address review round 2: audio loop form, cast collapse, dead code removal

func_800C3478 takes the while form; the (s8*)(u8*) stacks collapse to
one cast (40 sites); func_800BA8B0 and clamp32 go away (no callers);
gCourseOutlineTextures is const char* so its casts vanish; the podium
test line and render_screens matrix line are gone; set_screen keeps
its refactoring breadcrumbs commented out; the display-list walker is
reverted to the vanilla form as requested, which brings its one
shift-negative warning back; gCurrentlyLoadedTrackAddr defaults to 0.

Co-Authored-By: Claude Fable 5 &lt;noreply@anthropic.com&gt;

* Address review round 3: endianness.h byteswap, size_t indices, stub pragma

BSWAP16 now comes from libultraship's endianness.h on little-endian
targets, whose builtin returns u16 and needs no casts at the data.c
initializers. The intrinsic pragmas leave the repo. Actor and save
loops index with size_t instead of casting their bounds. stubs.c
silences unused parameters once for the file instead of tagging every
signature. spawn_player takes s32 and casts once inside, dropping 82
call-site casts. The item window arrays are const char* end to end,
race_begin_viewport loses its unused mode argument, mio0encode takes
uintptr_t, and the neon TLUT math is written in bytes.

Co-Authored-By: Claude Fable 5 &lt;noreply@anthropic.com&gt;

* data.c: use BOMSWAP16_CONST in the static envelope initializer

MSVC's _byteswap_ushort is a function call, not a constant expression,
so the plain BSWAP16 broke every Windows build at this initializer.
The _CONST variant is the manual shift form on MSVC and the same
builtin everywhere else.

Co-Authored-By: Claude Fable 5 &lt;noreply@anthropic.com&gt;

* Address review round 4: single BSWAP16 home, mixer arg refactor, stragglers

effects.h includes macros.h instead of carrying its own BSWAP16 copy.
mixer.c drops its unused arguments and locals outright, with the ABI
macros absorbing the removed parameters the same way they already
absorb pkt. func_8028EC98 takes no argument, the fourth intrinsic
pragma leaves math_util_2.c, the backup checksum loop joins its
siblings on size_t, and two leftover casts and an UNUSED go away.

Co-Authored-By: Claude Fable 5 &lt;noreply@anthropic.com&gt;

* ending: back out the debug-print cast for #745

The int-to-pointer warning it silenced returns until #745 reworks
this code.

Co-Authored-By: Claude Fable 5 &lt;noreply@anthropic.com&gt;

* effects.h: drop the include annotation

Co-Authored-By: Claude Fable 5 &lt;noreply@anthropic.com&gt;

* Retrigger CI after runner disconnect

* mixer: restore the Impl signatures and suppress the unused-parameter warning instead

* Clean up unused variables in code_80005FD0.c

Removed unused variables and assignments in CPU behaviour code.

* Remove unused camera variable from function

Remove unused camera variable in look_behind_toggle function.

* Update comment for bcopy and memcpy clarification

Clarified comment about bcopy and memcpy usage.

---------

Co-authored-by: Claude Fable 5 &lt;noreply@anthropic.com&gt;
Co-authored-by: MegaMech &lt;MegaMech@users.noreply.github.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>port pr 730 from the decomp (#445)</title>
<updated>2025-07-10T23:11:36+00:00</updated>
<author>
<name>coco875</name>
<email>59367621+coco875@users.noreply.github.com</email>
</author>
<published>2025-07-10T23:11:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/SpaghettiKart/commit/?id=6a8baf89369374a4e3bbccb5b45d5de36eb7e843'/>
<id>6a8baf89369374a4e3bbccb5b45d5de36eb7e843</id>
<content type='text'>
* port pr 730 from the decomp

Co-Authored-By: Jed Grabman &lt;7600154+jedgrabman@users.noreply.github.com&gt;

* rename file

* small fix

* finish fix time trial

---------

Co-authored-by: Jed Grabman &lt;7600154+jedgrabman@users.noreply.github.com&gt;
Co-authored-by: MegaMech &lt;MegaMech@users.noreply.github.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* port pr 730 from the decomp

Co-Authored-By: Jed Grabman &lt;7600154+jedgrabman@users.noreply.github.com&gt;

* rename file

* small fix

* finish fix time trial

---------

Co-authored-by: Jed Grabman &lt;7600154+jedgrabman@users.noreply.github.com&gt;
Co-authored-by: MegaMech &lt;MegaMech@users.noreply.github.com&gt;</pre>
</div>
</content>
</entry>
</feed>
