HarbourMasters / HarbourMasters/SpaghettiKart

support 32-bit

Open
#545 4 comments 0 reactions 0 assignees View on GitHub
bug enhancement
Dominant language
C
Stars
2.3k
Forks
143
Avg merge
7d 15h
Merged PRs (30d)
1

Description

Hello,
while testing my local build I experienced a freeze on koopa troopa beach course.
After some logging and debugging I found out the issue was in animation.c function render_armature.
the animation command sequence for the seagull contained garbled data, making it run an endless loop.
apparently the issue is caused by the structure "Armature" in animation.h

```c
typedef struct {
/* 0x00 */ s64 type;
/* 0x04 */ s64 size;
/* 0x08 */ s64 always_zero_never_used;
/* 0x0C */ Gfx* model;
/* 0x10 */ s64 pos[3];
} Armature;
```

those s64 fields are probably supposed to be s32, as also the offsets at their sides suggest.
the structure is supposed to host data coming from uintptr_t d_course_koopa_troopa_beach_unk4[] in \courses\koopa_troopa_beach\course_offsets.c
In any case I have tried to change the fields to s32 and it resolved the freeze (and seagull animation played correctly)
Thank you

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the Armature definition in animation.h and inspect how render_armature in animation.c reads the structure. Compare its field offsets with d_course_koopa_troopa_beach_unk4[] in courses/koopa_troopa_beach/course_offsets.c, then verify a 32-bit build on Koopa Troopa Beach no longer freezes and the seagull animation plays correctly.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
game-dev
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.