Skip to content

Commit

Permalink
review done
Browse files Browse the repository at this point in the history
  • Loading branch information
MokhaLeee committed Jul 11, 2024
1 parent 61b2def commit 451cbcd
Show file tree
Hide file tree
Showing 43 changed files with 451 additions and 577 deletions.
8 changes: 4 additions & 4 deletions include/bmudisp.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@ int ApplyUnitSpriteUiImage16x16(int, u32);
int ApplyUnitSpriteImage16x16(int, u32);
int ApplyUnitSpriteImage16x32(int, u32);
int ApplyUnitSpriteImage32x32(int, u32);
void TornOutUnitSprite(struct Unit*, int);
void TornOutUnitSprite(struct Unit * unit, int time);
void SyncUnitSpriteSheet(void);
void ForceSyncUnitSpriteSheet(void);
void sub_8026FF4(int id, u8* ptr);
void sub_8027068(int id, u8* ptr);
void sub_80270DC(int frameId, u8* dst);
void SetStandingMuFacing(int id, u8* ptr);
void SetStandingMuFacingWM(int frameId, u8* dst);
int GetUnitDisplayedSpritePalette(const struct Unit * unit);
int GetUnitSpritePalette(const struct Unit* unit);
void RefreshUnitSprites(void);
struct SMSHandle* AddUnitSprite(int);
struct SMSHandle * AddUnitSprite(int);
void PutUnitSpritesOam(void);
// ??? PutChapterMarkedTileIconOam(???);
void PutUnitSpriteIconsOam(void);
Expand Down
2 changes: 1 addition & 1 deletion include/bmunit.h
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ struct Unit
/* 3A */ u8 _u3A;
/* 3B */ u8 _u3B;

/* 3C */ struct SMSHandle* pMapSpriteHandle;
/* 3C */ struct SMSHandle * pMapSpriteHandle;

/* 40 */ u16 ai_config; // a bitmask
/* 42 */ u8 ai1; // enum to gAi1ScriptTable
Expand Down
2 changes: 1 addition & 1 deletion include/eventcall.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ struct ProcUnitTornOut {
PROC_HEADER;
STRUCT_PAD(0x29, 0x4C);

/* 4C */ s16 counter;
/* 4C */ s16 timer;

STRUCT_PAD(0x4E, 0x54);

Expand Down
16 changes: 8 additions & 8 deletions include/mu.h
Original file line number Diff line number Diff line change
Expand Up @@ -251,19 +251,19 @@ void Mu_OnStateNone(struct MuProc * proc);
void Mu_OnStateDoNothing(struct MuProc * proc);
void Mu_OnStateMovement(struct MuProc * proc);
void UpdateMuStepSounds(struct MuProc * proc);
void MU_OnLoop(struct MuProc * proc);
void Mu_OnLoop(struct MuProc * proc);
void MU_OnEnd(struct MuProc * proc);
void MU_EndAll(void);
void MU_End(struct MuProc * proc);
void MU_EndInternal(struct MuProc * proc);
void EndAllMus(void);
void EndMu(struct MuProc * proc);
void EndMuExt(struct MuProc * proc);
void HaltMu(struct MuProc * proc);
void MU_AllDisable(void);
void MU_AllEnable(void);
void LockMus(void);
void ReleaseMus(void);
void ApplyMoveScriptToCoordinates(int * xOut, int * yOut, const u8 * commands);
s8 CanStartMu(void);
void ResetMuAnims(void);
static struct MuConfig * GetDefaultMuConfig(int objTileId, u8 * outIndex);
static struct MuConfig * GetNewMuConfig(int objTileId, u8 * outIndex);
struct MuConfig * GetDefaultMuConfig(int objTileId, u8 * outIndex);
struct MuConfig * GetNewMuConfig(int objTileId, u8 * outIndex);
u8 GetMuDisplayPosition(struct MuProc * proc, struct Vec2 * out);
void PutMuSMS(struct MuProc * proc);
void PutMu(struct MuProc * proc);
Expand Down
2 changes: 1 addition & 1 deletion include/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ enum

struct SMSHandle
{
/* 00 */ struct SMSHandle* pNext;
/* 00 */ struct SMSHandle * pNext;

/* 04 */ short xDisplay;
/* 06 */ short yDisplay;
Expand Down
2 changes: 1 addition & 1 deletion src/banim-efxmagic-healstaves.c
Original file line number Diff line number Diff line change
Expand Up @@ -1687,7 +1687,7 @@ void efxRest_Loop_Main(struct ProcEfx * proc)

RefreshEntityBmMaps();
RefreshUnitSprites();
MU_EndAll();
EndAllMus();
}

SetUnitEfxDebuff(anim, 0);
Expand Down
2 changes: 1 addition & 1 deletion src/banim-efxstatusunit.c
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ void EfxStatusUnitMain(struct ProcEfxStatusUnit *proc)

RefreshEntityBmMaps();
RefreshUnitSprites();
MU_EndAll();
EndAllMus();
break;

case UNIT_STATUS_SILENCED:
Expand Down
2 changes: 1 addition & 1 deletion src/banim-ekrbattlestarting.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ void ekrBaStart_SreenFailIn(struct ProcEkrBattleStarting *proc)
SetWin0Box(0, 0, 0xF0, 0xA0);
EfxPalBlackInOut(gPaletteBuffer, 0x6, 0xA, 0x4);
EnablePaletteSync();
MU_EndAll();
EndAllMus();
Proc_Break(proc);
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/bmbattle.c
Original file line number Diff line number Diff line change
Expand Up @@ -2033,7 +2033,7 @@ void BeginBattleAnimations(void) {
SetBanimLinkArenaFlag(0);
BeginAnimsOnBattleAnimations();
} else {
MU_EndAll();
EndAllMus();
RenderBmMap();
BeginBattleMapAnims();

Expand Down
2 changes: 1 addition & 1 deletion src/bmdifficulty.c
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ struct ProcCmd CONST_DATA sProcScr_DisplayDungeonRecord_AfterDungeonClear[] = {
PROC_CALL(StartMidFadeToBlack),
PROC_REPEAT(WaitForFade),
PROC_CALL(BMapDispSuspend),
PROC_CALL(MU_EndAll),
PROC_CALL(EndAllMus),
PROC_SLEEP(0),
PROC_CALL(sub_8038230),
PROC_CALL(SetupDungeonRecordUi),
Expand Down
4 changes: 2 additions & 2 deletions src/bmmenu.c
Original file line number Diff line number Diff line change
Expand Up @@ -2202,7 +2202,7 @@ u8 RideCommandEffect(struct MenuProc* menu, struct MenuItemProc* menuItem) {
gActionData.unitActionType = UNIT_ACTION_RIDE_BALLISTA;
RideBallista(gActiveUnit);

MU_EndAll();
EndAllMus();
StartMu(gActiveUnit);

return MENU_ACT_SKIPCURSOR | MENU_ACT_END | MENU_ACT_SND6A | MENU_ACT_CLEAR;
Expand All @@ -2225,7 +2225,7 @@ u8 ExitCommandEffect(struct MenuProc* menu, struct MenuItemProc* menuItem) {
gActionData.unitActionType = UNIT_ACTION_EXIT_BALLISTA;
TryRemoveUnitFromBallista(gActiveUnit);

MU_EndAll();
EndAllMus();
StartMu(gActiveUnit);

return MENU_ACT_SKIPCURSOR | MENU_ACT_END | MENU_ACT_SND6A | MENU_ACT_CLEAR;
Expand Down
8 changes: 4 additions & 4 deletions src/bmmind.c
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ s8 ActionSteal(ProcPtr proc) {
gBattleTarget.weapon = item;
BattleApplyMiscAction(proc);

MU_EndAll();
EndAllMus();
BeginMapAnimForSteal();

return 0;
Expand All @@ -411,7 +411,7 @@ s8 ActionSummon(ProcPtr proc) {
InitBattleUnit(&gBattleActor, gActiveUnit);

BattleApplyMiscAction(proc);
MU_EndAll();
EndAllMus();
BeginMapAnimForSummon();

return 0;
Expand All @@ -422,7 +422,7 @@ s8 ActionSummonDK(ProcPtr proc) {
InitBattleUnit(&gBattleActor, gActiveUnit);

BattleApplyMiscAction(proc);
MU_EndAll();
EndAllMus();
BeginMapAnimForSummonDK();

return 0;
Expand Down Expand Up @@ -594,7 +594,7 @@ void BATTLE_PostCombatDeathFades(struct CombatActionProc* proc) {

//! FE8U = 0x08032860
void BATTLE_DeleteLinkedMOVEUNIT(struct CombatActionProc* proc) {
MU_End(proc->unk_54);
EndMu(proc->unk_54);
return;
}

Expand Down
8 changes: 4 additions & 4 deletions src/bmtrap.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,17 +78,17 @@ void ApplyTrapDamageAnim(struct ProcBmTrap * proc)

switch (proc->post_exec_type) {
case 0:
MU_EndAll();
EndAllMus();
break;

case 1:
MU_EndAll();
EndAllMus();
StartMu(gActiveUnit);
SetAutoMuDefaultFacing();
break;

case 2:
MU_End(GetUnitMu(unit));
EndMu(GetUnitMu(unit));
break;
}

Expand Down Expand Up @@ -226,7 +226,7 @@ bool ExecTrapAfterWarp(ProcPtr proc)
bool ExecTrapAfterDropAction(ProcPtr proc, struct Unit * unit)
{
if (!GetPickTrapType(unit)) {
MU_End(GetUnitMu(unit));
EndMu(GetUnitMu(unit));
RenderBmMap();
RefreshEntityBmMaps();
ForceSyncUnitSpriteSheet();
Expand Down
Loading

0 comments on commit 451cbcd

Please sign in to comment.