Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
9b9f76c
mario: marioCreviceWallChk takes its Vec by value
jlwilley Nov 9, 2026
9bd9101
animdrv: animPoseDisp_MakeExtTexture's image out-parameter is a void**
jlwilley Nov 9, 2026
537a8a6
envdrv: envGlareFilter takes its rectangle as s16
jlwilley Nov 9, 2026
86abc9b
battle: BattlePartyAnimeLoad returns animEffectAsync's result
jlwilley Nov 9, 2026
7dd2383
mri_16, tik_00: ss_check reads its argument through an args pointer
jlwilley Nov 9, 2026
0adda12
gor_01: the retail cook_chk and cook_chk2 store the item id from a local
jlwilley Nov 9, 2026
3c3f4a7
sdk: entryToPath reads the string table through a FstStringStart local
jlwilley Nov 9, 2026
f4c4ac7
mario: mario_kemuri returns early instead of nesting
jlwilley Nov 9, 2026
36eed84
battle: _get_msg reads its argument through an args pointer, no dead …
jlwilley Nov 9, 2026
9dfa704
party_yoshi: L_getStick passes the ride angle to marioGetMoveRate
jlwilley Nov 9, 2026
296efbd
party_move: partyMoveBehindMario3 takes the direction its callers pass
jlwilley Nov 9, 2026
e9072a5
eff_splash: effSplashGetCol calls GXPeekARGB through the SDK prototype
jlwilley Nov 9, 2026
748ac61
eff_mahojin: effMahojinDisp sorts and draws without the idx alias
jlwilley Nov 9, 2026
361a813
eff_sleep: effSleepDisp is plain C, without the pragma or sleepPos
jlwilley Nov 9, 2026
5350f59
mapdrv: mapEntry takes its MapWork from mapGetWork
jlwilley Nov 9, 2026
2be9f78
mapdrv: bmapLoad takes the battle MapWork from mapGetWork
jlwilley Nov 9, 2026
c42a5c1
casedrv: caseEntry's search sets i and entry in the for init
jlwilley Nov 9, 2026
dd84e12
evtmgr: evtEntry takes an s32 priority
jlwilley Nov 9, 2026
d9e6b26
lightdrv: lightGetNearObj takes its position by pointer
jlwilley Nov 9, 2026
715444f
mobjdrv: mobjHitEntry takes the box extents through fabs
jlwilley Nov 9, 2026
c321637
mario_pouch: the HP, FP and AP setters and max getters use s32
jlwilley Nov 9, 2026
a6f7f86
win_mario: US winMarioDisp written out without the float-shaping temps
jlwilley Nov 9, 2026
671dc3b
lightdrv: lightEntry takes the spot angles before attenType and flags
jlwilley Nov 9, 2026
4c5ab5b
npcdrv: npcSetTalkPose and npcSetStayPose build without the pragmas
jlwilley Nov 9, 2026
e4f5b94
npcdrv: fbatEncountCheck reads the camera yaw in each facing test
jlwilley Nov 9, 2026
558b9e5
battle: the status functions take the status id as s8
jlwilley Nov 9, 2026
7be3dd9
battle: BattleAudience_GetEscapeChangeOK returns u8
jlwilley Nov 9, 2026
656a8dd
battle: ac_power_gauge actionCommandDisp calls the icon functions dir…
jlwilley Nov 9, 2026
537760c
battle: ac_power_gauge_lv2 actionCommandDisp calls the icon functions…
jlwilley Nov 9, 2026
4147c2c
battle: ac_monosiri_target actionCommandDisp calls the icon functions…
jlwilley Nov 9, 2026
ef5a22d
battle: BattleAcDrawGauge takes the fill ratio before the width
jlwilley Nov 9, 2026
67da1be
battle: ac_repeatedly_lv actionCommandDisp calls the gauge and icon f…
jlwilley Nov 9, 2026
a1b2e5f
battle: BtlUnit_snd_se takes the pitch as s16
jlwilley Nov 9, 2026
ffde0aa
icon: iconDispGxCol takes its flags as u16
jlwilley Nov 9, 2026
edb091a
battle: BtlUnit_ControlPoseSoundMain matches without opt_propagation off
jlwilley Nov 9, 2026
58ec746
battle: _btlcmd_MakeMultiItemTable matches without opt_propagation off
jlwilley Nov 9, 2026
8161e06
battle: BattleAudienceCtrlProcessKinopioWait matches without its pragmas
jlwilley Nov 9, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 8 additions & 53 deletions docs/FAKES.md

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions docs/KNOWN_GAME_BUGS.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ Each entry names the file and the function (or script) that holds the bug, with
| `rels/tik/src/tik_06.c`, script `evt_kanban2` (`GSW(GSW_JON_STAR_PIECES_FOUND)`) | all | The Pit of 100 Trials sign prints GSW 34 as a Star Piece count out of 100, but nothing in the game writes GSW 34, so the count is always 0. |
| `src/driver/msgdrv.c`, `msgAnalize` (the `<R>` / `</r>` ruby tags) | all | The closing ruby tag test compares one character with the two-character constant `'/r'` (the fontmgr bug again), so only `<R...>` tags are handled there. |
| `src/manager/evtmgr_cmd.c`, `evt_readf_n` (`READ_FLOAT_INDEXED`, `entry->readAddr[offset]`) | all | The indexed float read takes the word through the integer view of the read pointer and converts it, so a float table entry comes out as the integer value of its bits; `READ_FLOAT` to `READ_FLOAT4` read floats correctly. |
| `src/party/party_move.c`, `partyMoveBehindMario3` (the `party_set_behind_dir` call) | all | `party_set_behind_dir` takes a direction, but the call passes none, so the partner's home direction is whatever is left in the first float register. |
| `src/party/party_yoshi.c`, `L_getStick` (inlined into `yoshi_use`, the `marioGetMoveRate` calls) | JP, US and PAL (the demo passes the angle) | `marioGetMoveRate` takes a direction, but both calls pass none, so it reads the angle just stored, which is left in the first float register. |
| `rels/las/src/las_05.c`, `_kurokaron_run_away` (`result`) | all | With no candidate position and the current distance not smaller than the next one, `result` is never set and the function returns whatever its register held. |
| `rels/rsh/src/rsh.c`, `rsh_window_tev` (`x0`..`y1`) | all | When no parent map object has flag 0x10, the screen rectangle `x0`, `y0`, `x1`, `y1` is never set and is read uninitialised. |
| `src/battle/battle_disp.c`, `btlDispMain` (`part->animFlags &= ~PART_ANIM_RESTART` in an `if`) | all | `&=` where `&` was meant: the test clears PART_ANIM_RESTART and checks the flags that are left, so the pose restarts whenever another flag (normally PART_ANIM_MANUAL_POSE) is set. Only Hooktail sets PART_ANIM_RESTART, and gets the restart anyway: no visible effect. |
Expand Down
2 changes: 1 addition & 1 deletion include/battle/battle.h
Original file line number Diff line number Diff line change
Expand Up @@ -365,4 +365,4 @@ void BattleStatusWindowAPRecoveryOn(void);
void BattleStatusWindowEventOff(void);
u8 BattleMajinaiCheck(void);
BOOL BattleStatusWindowCheck(void);
void BattlePartyAnimeLoad(s32 partyId);
BOOL BattlePartyAnimeLoad(s32 partyId);
2 changes: 1 addition & 1 deletion include/battle/battle_ac.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,4 @@ void BattleAcGaugeSeUpdate(f32 value);
void BattleAcGaugeSeDelete(void);
s32 BattleActionCommandCheckDefence(BattleUnit* unit, BattleWeapon* weapon);
u16 BattleACGetButtonIcon(s32 button, s32 pressed);
void BattleAcDrawGauge(s32 x, s32 y, s32 width, f32 ratio, s32 level, s32 a, s32 b, s32 c, s32 flags);
void BattleAcDrawGauge(s32 x, s32 y, f32 ratio, s32 width, s32 level, s32 a, s32 b, s32 c, s32 flags);
2 changes: 1 addition & 1 deletion include/battle/battle_audience.h
Original file line number Diff line number Diff line change
Expand Up @@ -414,4 +414,4 @@ void BattleAudience_Case_FirstAttack_Bad(void);
s32 BattleAudienceAddAudienceNum(s32 num);
void BattleAudienceSoundSetVol(s32 index, u8 a2, s32 a3);
s32 BattleAudienceSoundCheck(s32 index);
BOOL BattleAudience_GetEscapeChangeOK(s32 index);
u8 BattleAudience_GetEscapeChangeOK(s32 index);
11 changes: 6 additions & 5 deletions include/battle/battle_unit.h
Original file line number Diff line number Diff line change
Expand Up @@ -1018,11 +1018,12 @@ void BtlUnit_SetMoveSpeed(BattleUnit* unit, f32 moveSpeedXZ);
void BtlUnit_SetPartsMoveSpeed(BattleUnitPart* part, f32 moveSpeedXZ);
void BtlUnit_SetJumpSpeed(BattleUnit* unit, f32 moveSpeedY);
s8 BtlUnit_GetBelong(BattleUnit* unit);
void BtlUnit_GetStatus(BattleUnit* unit, StatusEffectType type, s8* turns, s8* strength);
BOOL BtlUnit_SetStatus(BattleUnit* unit, StatusEffectType type, s8 turns, s8 strength);
// The status functions take the StatusEffectType as s8, so callers sign-extend a variable id.
void BtlUnit_GetStatus(BattleUnit* unit, s8 type, s8* turns, s8* strength);
BOOL BtlUnit_SetStatus(BattleUnit* unit, s8 type, s8 turns, s8 strength);
void BtlUnit_ClearStatus(BattleUnit* unit);
BOOL BtlUnit_CheckRecoveryStatus(BattleUnit* unit, StatusEffectType type);
BOOL BtlUnit_CheckStatus(BattleUnit* unit, StatusEffectType type);
BOOL BtlUnit_CheckRecoveryStatus(BattleUnit* unit, s8 type);
BOOL BtlUnit_CheckStatus(BattleUnit* unit, s8 type);
s32 BtlUnit_CheckStatusFlag(BattleUnit* unit, s32 flags);
void BtlUnit_OnStatusFlag(BattleUnit* unit, s32 flags);
void BtlUnit_OffStatusFlag(BattleUnit* unit, s32 flags);
Expand Down Expand Up @@ -1050,7 +1051,7 @@ BOOL BtlUnit_CheckData(BattleUnit* unit, s32 tag);
BOOL BtlUnit_GetEnemyBelong(BattleUnit* unit);
void BtlUnit_ReviseHpFp(BattleUnit* unit);
void BtlUnit_SetParamFromPouch(BattleUnit* unit);
s32 BtlUnit_snd_se(BattleUnit* unit, const char* sfxName, s32 volume, s32 pan);
s32 BtlUnit_snd_se(BattleUnit* unit, const char* sfxName, s32 volume, s16 pitch);
s32 BtlUnit_snd_se_pos(BattleUnit* unit, const char* sfxName, s32 volume, s16 pitch, Vec* pos);
BattleUnit* BtlUnit_GetGuardKouraPtr(BattleUnit* unit);

Expand Down
2 changes: 1 addition & 1 deletion include/driver/animdrv.h
Original file line number Diff line number Diff line change
Expand Up @@ -433,4 +433,4 @@ void L_animPoseWorldPositionEvalOff(s32 poseId);
void animPoseDrawShape(s32 poseId, s32 shapeId);
void animPoseSetDispCallBack(s32 poseId, void* callback, void* userData);
void animPoseVivianMain(s32 poseId, Vec* pos);
void animPoseDisp_MakeExtTexture(const char* group, const char* anim, f32 frame, f32 scale, GXTexObj* obj, struct smartEntry** image, s32* x0, s32* y0, s32* x1, s32* y1);
void animPoseDisp_MakeExtTexture(const char* group, const char* anim, f32 frame, f32 scale, GXTexObj* obj, void** image, s32* x0, s32* y0, s32* x1, s32* y1);
2 changes: 1 addition & 1 deletion include/driver/envdrv.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ void envBlurOff(void);
struct MapTevCallbackInfo;
void envSetWater(struct MapTevCallbackInfo* info);

void envGlareFilter(s32 type, s32 y0, s32 x0, s32 y1, s32 x1);
void envGlareFilter(s32 type, s16 y0, s16 x0, s16 y1, s16 x1);
void envGlareFilterZ(f32 zscale);
void envAddTev(s32 type, MapTevCallbackInfo* info);
void envSetYamiView(Mtx view);
Expand Down
2 changes: 1 addition & 1 deletion include/driver/extdrv.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ typedef struct ExtdrvPose {
} ExtdrvPose;

typedef struct ExtdrvTex {
void** image; // 0x0
void* image; // 0x0
GXTexObj obj; // 0x4
GXTexRegion region; // 0x24
} ExtdrvTex;
Expand Down
2 changes: 1 addition & 1 deletion include/driver/icondrv.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ void iconChange(const char* name, u16 iconId);
void iconDispGxAlpha(Vec* position, s16 flags, u16 iconId, u8 alpha, f32 scale);
void iconDispGx(Vec* position, s16 flags, u16 iconId, f32 scale);
void iconDispGx2(Mtx mtx, s16 flags, u16 iconId);
void iconDispGxCol(Mtx pos, s16 flags, u16 iconId, GXColor color);
void iconDispGxCol(Mtx pos, u16 flags, u16 iconId, GXColor color);
#if VERSION >= VERSION_US
void iconGetTexObj(GXTexObj* texObj, s32 iconId);
#else
Expand Down
4 changes: 2 additions & 2 deletions include/driver/lightdrv.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@ typedef struct LightWork {
void lightInit(void);
void lightReInit(void);
void lightMain(void);
s32 lightEntry(const char* name, s32 type, Vec* position, Vec* rotation, GXColor color, s32 attenType, s32 flags, f32 spotAngle, f32 attenAngle);
s32 lightEntry(const char* name, s32 type, Vec* position, Vec* rotation, GXColor color, f32 spotAngle, f32 attenAngle, s32 attenType, s32 flags);
LightEntry* lightNameToPtr(const char* name);
LightEntry* lightNumberToPtr(s32 index);
LightEntry* lightGetPaperCraft(void);
s32 lightGetEntryNum(void);
LightEntry* lightGetAmbient(void);
s32 lightGetNearObj(Vec position, LightEntry** out, s32 count, LightEntryFlags flags);
s32 lightGetNearObj(Vec* position, LightEntry** out, s32 count, LightEntryFlags flags);

LightEntry* lightGetCharaAmbient(void);
s32 lightCheckCharaLight(void);
Expand Down
2 changes: 1 addition & 1 deletion include/manager/evtmgr.h
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ typedef struct EventWork {
EventWork* evtGetWork(void);
void evtmgrInit(void);
void evtmgrReInit(void);
EventEntry* evtEntry(void* evtCode, u8 priority, u8 flags);
EventEntry* evtEntry(void* evtCode, s32 priority, u8 flags);
EventEntry* evtEntryType(void* evtCode, u8 priority, u8 flags, u8 type);
EventEntry* evtChildEntry(EventEntry* parent, void* evtCode, u8 flags);
EventEntry* evtBrotherEntry(EventEntry* brother, void* evtCode, u8 flags);
Expand Down
12 changes: 6 additions & 6 deletions include/mario/mario_pouch.h
Original file line number Diff line number Diff line change
Expand Up @@ -471,19 +471,19 @@ s32 pouchGetStarPiece(void);
s16 pouchAddStarPiece(s16 count);
s16 pouchAddHP(s32 points);
s32 pouchGetHP(void);
s16 pouchGetMaxHP(void);
void pouchSetHP(s16 points);
s32 pouchGetMaxHP(void);
void pouchSetHP(s32 points);
void pouchSetMaxHP(s16 points);
s32 pouchGetPartyHP(PartyId partnerId);
void pouchSetPartyHP(s32 partnerId, s32 points);
s32 pouchGetFP(void);
s16 pouchGetMaxFP(void);
void pouchSetFP(s16 points);
s32 pouchGetMaxFP(void);
void pouchSetFP(s32 points);
void pouchSetMaxFP(s16 points);
s32 pouchGetAP(void);
void pouchAddAP(s32 points);
void pouchSetAP(s16 points);
s16 pouchGetMaxAP(void);
void pouchSetAP(s32 points);
s32 pouchGetMaxAP(void);
f32 pouchGetAudienceNum(void);
void pouchSetAudienceNum(f32 num);
s32 pouchGetJumpLv(void);
Expand Down
2 changes: 1 addition & 1 deletion include/mot/mot_slit.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ BOOL marioChkSlitEnd(void);
BOOL marioChkSlitThrouh(void);
BOOL marioGetMotSlitCancel3(void);

BOOL marioCreviceWallChk(const Vec* p);
BOOL marioCreviceWallChk(Vec pos);
void marioSlitReenter(void);
void N_marioSlitSetAfterLand(void);
BOOL marioSlitKeyDisable(void);
Expand Down
2 changes: 1 addition & 1 deletion include/party/party_move.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ BOOL partyChkNoStandMobj(struct HitEntry* hit);
void partyChgMoveMode(PartyEntry* party, s32 mode);
void partySetDir(PartyEntry* party, f32 x, f32 z);
void partyMoveBehindMario(PartyEntry* party, s32 arg);
void partyMoveBehindMario3(PartyEntry* party, s32 arg);
void partyMoveBehindMario3(PartyEntry* party, s32 arg, f32 dir);
void partyMoveBesideMario(PartyEntry* party, s32 arg);
void partyMoveCheckWall(PartyEntry* party);
void partyChkWall(PartyEntry* party);
Expand Down
4 changes: 1 addition & 3 deletions rels/eki/src/eki_03.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@
#include "evt/evt_story.h"

static smartEntry* ind_lp;
// FAKE: eki_03.c calls envGlareFilter through this prototype (the types it was compiled with) instead of the one in driver/envdrv.h; same registers, behaviour-identical.
typedef void (*EnvGlareFilterS16Fn)(s32, s16, s16, s16, s16);

static USER_FUNC(test_glare);
static void sun_tev(MapTevCallbackInfo* info);
Expand Down Expand Up @@ -565,7 +563,7 @@ static USER_FUNC(test_glare) {
} else if (rect[0] == 0 && rect[1] == 0 && rect[2] == 0 && rect[3] == 0) {
envGlareFilter(0, 0, 0, 0, 0);
} else {
((EnvGlareFilterS16Fn)envGlareFilter)(1, rect[1] - 50, rect[0] - 50, rect[3] + 50, rect[2] + 50);
envGlareFilter(1, rect[1] - 50, rect[0] - 50, rect[3] + 50, rect[2] + 50);
#if VERSION <= VERSION_DEMO_JP
envGlareFilterZ(0.998f);
#else
Expand Down
38 changes: 21 additions & 17 deletions rels/gor/src/gor_01.c
Original file line number Diff line number Diff line change
Expand Up @@ -7376,7 +7376,7 @@ static USER_FUNC(cook_chk) {
}
parsePop();
fileFree(file);
// FAKE: volatile casts, see the retail cook_chk.
// FAKE: the (volatile u32) casts order the args[n] loads after the inlined itemNameToID as in the target.
evtSetValue(event, (volatile u32)args[1], itemNameToID(result));
evtSetValue(event, (volatile u32)args[2], itemNameToID(result2));
return EVT_RETURN_DONE;
Expand All @@ -7401,7 +7401,7 @@ static USER_FUNC(cook_chk2) {

if (item1 == 163 || item2 == 163) {
item2 = naniga_okorukana_cook();
// FAKE: volatile cast, see the retail cook_chk.
// FAKE: volatile cast, as in cook_chk above.
evtSetValue(event, (volatile u32)args[2], item2);
return EVT_RETURN_DONE;
}
Expand Down Expand Up @@ -7433,7 +7433,7 @@ static USER_FUNC(cook_chk2) {
}
parsePop();
fileFree(file);
// FAKE: volatile cast, see the retail cook_chk.
// FAKE: volatile cast, as in cook_chk above.
evtSetValue(event, (volatile u32)args[2], itemNameToID(out));
return EVT_RETURN_DONE;
}
Expand All @@ -7447,21 +7447,23 @@ static USER_FUNC(cook_chk2) {
static USER_FUNC(cook_chk) {
EvtWord* args = event->args;
s32 item = evtGetValue(event, args[0]);
s32 cook;
ItemData* data = &itemDataTable[item];
u32 i;
ItemType id;

if (item == 163) {
item = naniga_okorukana_cook();
evtSetValue(event, args[1], item);
evtSetValue(event, args[2], item);
cook = naniga_okorukana_cook();
evtSetValue(event, args[1], cook);
evtSetValue(event, args[2], cook);
return EVT_RETURN_DONE;
}
for (i = 0; i < 26; i++) {
if (strcmp(data->id, R_simple_recipe_table[i].ingredient) == 0) {
// FAKE: the (volatile u32) casts order the args[n] loads after the inlined itemNameToID as in the target
// (tried: a result local, a u32 cast of the result, event->args[n]).
evtSetValue(event, (volatile u32)args[1], itemNameToID(R_simple_recipe_table[i].result));
evtSetValue(event, (volatile u32)args[2], itemNameToID(R_simple_recipe_table[i].result2));
id = itemNameToID(R_simple_recipe_table[i].result);
evtSetValue(event, args[1], id);
id = itemNameToID(R_simple_recipe_table[i].result2);
evtSetValue(event, args[2], id);
return EVT_RETURN_DONE;
}
}
Expand All @@ -7482,23 +7484,25 @@ static USER_FUNC(cook_chk2) {
s32 item2 = evtGetValue(event, args[1]);
ItemData* data1 = &itemDataTable[item1];
ItemData* data2 = &itemDataTable[item2];
CookRecipe* recipe;
u32 i;
ItemType id;

if (item1 == 163 || item2 == 163) {
item2 = naniga_okorukana_cook();
// FAKE: volatile cast, see cook_chk.
evtSetValue(event, (volatile u32)args[2], item2);
id = naniga_okorukana_cook();
evtSetValue(event, args[2], id);
return EVT_RETURN_DONE;
}
#if VERSION >= VERSION_US
for (i = 0; i < 292; i++) {
#else
for (i = 0; i < 289; i++) {
#endif
if ((strcmp(data1->id, R_cookbook_recipe_table[i].a) == 0 && strcmp(data2->id, R_cookbook_recipe_table[i].b) == 0) ||
(strcmp(data2->id, R_cookbook_recipe_table[i].a) == 0 && strcmp(data1->id, R_cookbook_recipe_table[i].b) == 0)) {
// FAKE: volatile cast, see cook_chk.
evtSetValue(event, (volatile u32)args[2], itemNameToID(R_cookbook_recipe_table[i].out));
recipe = &R_cookbook_recipe_table[i];
if ((strcmp(data1->id, recipe->a) == 0 && strcmp(data2->id, recipe->b) == 0) ||
(strcmp(data2->id, recipe->a) == 0 && strcmp(data1->id, recipe->b) == 0)) {
id = itemNameToID(R_cookbook_recipe_table[i].out);
evtSetValue(event, args[2], id);
return EVT_RETURN_DONE;
}
}
Expand Down
4 changes: 1 addition & 3 deletions rels/hom/src/hom_00.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@
#include "version.h"
#include "evt/evt_story.h"
#include "driver/casedrv.h"
// FAKE: hom_00.c calls envGlareFilter through this prototype (the types it was compiled with) instead of the one in driver/envdrv.h; same registers, behaviour-identical.
typedef void (*EnvGlareFilterS16Fn)(s32, s16, s16, s16, s16);

static smartEntry* ind_lp;

Expand Down Expand Up @@ -989,7 +987,7 @@ static USER_FUNC(test_glare) {
envGlareFilter(0, 0, 0, 0, 0);
} else {
// The glare box is the sun's screen rectangle grown by 50 on each side.
((EnvGlareFilterS16Fn)envGlareFilter)(1, rect[1] - 50, rect[0] - 50, rect[3] + 50, rect[2] + 50);
envGlareFilter(1, rect[1] - 50, rect[0] - 50, rect[3] + 50, rect[2] + 50);
}
return EVT_RETURN_BLOCK;
}
Expand Down
6 changes: 2 additions & 4 deletions rels/jin/src/unit/unit_faker_mario.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ enum {
UW_FAKER_MARIO_HP_50 = 2, // 50% of his max HP: below it he complains (stg4_jin_26_01)
UW_FAKER_MARIO_HP_25 = 3, // 25% of his max HP: below it he is nearly beaten (stg4_jin_26_02)
};
// FAKE: unit_faker_mario.c calls BattlePartyAnimeLoad through this prototype (the types it was compiled with) instead of the one in battle/battle.h; same registers, behaviour-identical.
typedef BOOL (*BattlePartyAnimeLoadRetBoolFn)(s32);

typedef struct FakerStatus {
s16 data[15];
Expand Down Expand Up @@ -110,7 +108,7 @@ static USER_FUNC(_anime_load_wait) {
anime = UNIT_YOSHI;
break;
}
if (((BattlePartyAnimeLoadRetBoolFn)BattlePartyAnimeLoad)(anime)) {
if (BattlePartyAnimeLoad(anime)) {
return EVT_RETURN_DONE;
}
return EVT_RETURN_BLOCK;
Expand Down Expand Up @@ -142,7 +140,7 @@ static USER_FUNC(_anime_load) {
anime = UNIT_YOSHI;
break;
}
((BattlePartyAnimeLoadRetBoolFn)BattlePartyAnimeLoad)(anime);
BattlePartyAnimeLoad(anime);
return EVT_RETURN_DONE;
}

Expand Down
2 changes: 1 addition & 1 deletion rels/mri/include/driver/punidrv.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ typedef struct PunidrvPose {
} PunidrvPose;

typedef struct PunidrvTex {
void** image; // 0x0
void* image; // 0x0
GXTexObj obj; // 0x4
GXTexRegion region; // 0x24
} PunidrvTex;
Expand Down
4 changes: 1 addition & 3 deletions rels/mri/src/driver/punidrv.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
#include "libc_decls.h"

static void puniMakeTexture(CameraId camId, void* param);
// FAKE: punidrv.c calls animPoseDisp_MakeExtTexture through this prototype (the types it was compiled with) instead of the one in driver/animdrv.h; same registers, behaviour-identical.
typedef void (*AnimPoseDisp_MakeExtTextureLocalFn)(const char*, const char*, f32, f32, GXTexObj*, void***, s32*, s32*, s32*, s32*);

static f32 camGetRy(void);
static s32 compare(const void* a, const void* b);
Expand Down Expand Up @@ -175,7 +173,7 @@ static void puniMakeTexture(CameraId camId, void* param) {
anim_ext_tex_size = 0;
for (i = 0; i < wp->texNum; i++, info++, tex++) {
n = i * 12;
((AnimPoseDisp_MakeExtTextureLocalFn)animPoseDisp_MakeExtTexture)(info->group, info->anim, info->frame, 5.84f, &tex->obj, &tex->image, &x0, &y0, &x1, &y1);
animPoseDisp_MakeExtTexture(info->group, info->anim, info->frame, 5.84f, &tex->obj, &tex->image, &x0, &y0, &x1, &y1);
wp->vtx[n++] = x0 * scale;
wp->vtx[n++] = -y0 * scale;
wp->vtx[n++] = 0.0f;
Expand Down
11 changes: 2 additions & 9 deletions rels/mri/src/mri_16.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,18 +38,11 @@ static HitDamageReturn hitDmgRetPoints[5];
/**
* Reads the bar-switch state ssf for the script:
* returns it as a float in args[0] (0 idle, 1 Mario is riding the bar switch, 2 he left it).
* The odd extra statements only keep the compiled order of the original.
*/
static USER_FUNC(ss_check) {
s32 dest;
s32 notSet;
EvtWord* args = event->args;
s32 dest = *args++;

// FAKE: the dead condition moves the ssf load ahead of event->args; casts, temps and u32 index variants do not
// reproduce it
dest = event->args[0];
notSet = !ssf;
if ((notSet && !ssf) != 0) {
}
evtSetFloat(event, dest, ssf);
return EVT_RETURN_DONE;
}
Expand Down
14 changes: 4 additions & 10 deletions rels/tik/src/tik_00.c
Original file line number Diff line number Diff line change
Expand Up @@ -486,16 +486,10 @@ static USER_FUNC(setmertn) {

/** Script helper. Stores the module-level flag ssf (set by ss_set) into the variable args[0]. */
static USER_FUNC(ss_check) {
s32 a;
s32 z;

// FAKE: the dead condition moves the ssf load ahead of event->args; casts, temps and
// u32 index variants do not reproduce it
a = event->args[0];
z = !ssf;
if ((z && !ssf) != 0) {
}
evtSetFloat(event, a, ssf);
EvtWord* args = event->args;
s32 dest = *args++;

evtSetFloat(event, dest, ssf);
return EVT_RETURN_DONE;
}

Expand Down
2 changes: 1 addition & 1 deletion src/battle/ac/ac_air_gauge.c
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ static void actionCommandDisp(f32 x, f32 y) {
disp->gaugeRatio = ratio;
}
}
BattleAcDrawGauge((s32)x, (s32)y, 0xB2, disp->gaugeRatio, ac->params[2], ac->params[3], ac->params[4],
BattleAcDrawGauge((s32)x, (s32)y, disp->gaugeRatio, 0xB2, ac->params[2], ac->params[3], ac->params[4],
ac->params[5], 0);
if (pw->flag) {
Vec pos = {0.0f, 0.0f, 0.0f};
Expand Down
Loading