Skip to content

Commit

Permalink
Merge pull request #611 from MokhaLeee/trapreview
Browse files Browse the repository at this point in the history
review bmtrap
  • Loading branch information
RevoSucks authored May 13, 2024
2 parents bd2c54f + 2ef68bf commit 7a68410
Show file tree
Hide file tree
Showing 6 changed files with 135 additions and 144 deletions.
25 changes: 12 additions & 13 deletions include/bmtrap.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,28 +12,27 @@ struct TrapData {
/* 05 */ u8 turn;
} __attribute__((packed));

struct UnknownBMTrapProc {
struct ProcBmTrap {
/* 00 */ PROC_HEADER;

/* 29 */ u8 _pad_29[0x50-0x29];
STRUCT_PAD(0x29, 0x50);

/* 50 */ s16 post_exec_type;

/* 50 */ s16 unk_50;
/* 52 */ s8 unk_52;
/* 53 */ s8 unk_53;
/* 54 */ struct Unit* unit;
};

void sub_80374F4(struct UnknownBMTrapProc * proc);
void sub_8037510(struct UnknownBMTrapProc * proc);
void sub_8037528(struct UnknownBMTrapProc * proc);
void sub_8037540(struct UnknownBMTrapProc * proc);
void sub_80375A0(struct UnknownBMTrapProc * proc);
void RegisterTrapDeathBWL(struct ProcBmTrap * proc);
void ExecFireTileTrapAnim1(struct ProcBmTrap * proc);
void ExecFireTileTrapAnim2(struct ProcBmTrap * proc);
void ApplyTrapDamageAnim(struct ProcBmTrap * proc);
void ApplyTrapDamageReal(struct ProcBmTrap * proc);
int GetPickTrapType(struct Unit * unit);
int ExecTrap(ProcPtr proc, struct Unit * unit, int param_3);
bool HandlePostActionTraps(ProcPtr);
bool sub_80377CC(ProcPtr proc);
bool sub_80377F0(ProcPtr proc, struct Unit * unit);
bool sub_8037830(ProcPtr proc, struct Unit * unit);
bool ExecTrapAfterWarp(ProcPtr proc);
bool ExecTrapAfterDropAction(ProcPtr proc, struct Unit * unit);
bool ExecTrapAfterDeathDrop(ProcPtr proc, struct Unit * unit);
void LoadTrapData(const struct TrapData * data);
void LoadChapterTraps(void);
void AddGorgonEggTrap(s8 x, s8 y, u8 turnsToHatch, u8 level, u8 unk_05);
Expand Down
3 changes: 3 additions & 0 deletions include/bmtrick.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ enum
TRAP_MINE = 11,
TRAP_GORGON_EGG = 12, // TODO: figure out
TRAP_LIGHT_RUNE = 13,
TRAP_14 = 14,
TRAP_FIRE_THIEF = 15,
TRAP_MINE_ASSASSIN = 16,
};

enum
Expand Down
2 changes: 1 addition & 1 deletion include/bmusemind.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ void ExecRestore(ProcPtr proc);
void ExecBarrierStaff(ProcPtr proc);
void GetRescueStaffeePosition(struct Unit* unit, struct Unit* target, int* xOut, int* yOut);
void ExecRescueStaff(ProcPtr proc);
int sub_802EF70(ProcPtr proc);
int PostWarpStaff_ExecTrap(ProcPtr proc);
int sub_802EF80();
void ExecWarpStaff(ProcPtr proc);
void ExecStatusStaff(ProcPtr proc);
Expand Down
8 changes: 4 additions & 4 deletions src/bmmind.c
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ s8 ActionRescue(ProcPtr proc) {

//! FE8U = 0x080321B8
int AfterDrop_CheckTrapAfterDropMaybe(struct AfterDropActionProc* proc) {
return sub_80377F0(proc, proc->unit);
return ExecTrapAfterDropAction(proc, proc->unit);
}

//! FE8U = 0x080321C8
Expand Down Expand Up @@ -455,9 +455,9 @@ void DeathDropSpriteAnim_Loop(struct DeathDropAnimProc* proc) {
}

//! FE8U = 0x08032658
void DeathDropSpriteAnim_ExecAnyTrap(struct DeathDropAnimProc* proc) {
sub_8037830(proc, proc->unit);
return;
void DeathDropSpriteAnim_ExecAnyTrap(struct DeathDropAnimProc * proc)
{
ExecTrapAfterDeathDrop(proc, proc->unit);
}

//! FE8U = 0x08032664
Expand Down
Loading

0 comments on commit 7a68410

Please sign in to comment.