ProcessEnemyPowerBombInteraction - R18 overwritten by death routine
This commit is contained in:
@@ -365,6 +365,10 @@ uint32 PatchBugs(uint32 mode, uint32 addr) {
|
|||||||
WORD(g_ram[22]) = 1; // MotherBrain_Instr_SpawnLaserEproj doesn't set R22
|
WORD(g_ram[22]) = 1; // MotherBrain_Instr_SpawnLaserEproj doesn't set R22
|
||||||
} else if (FixBugHook(0x94A85B)) {
|
} else if (FixBugHook(0x94A85B)) {
|
||||||
memset(g_ram + 0xd82, 0, 8); // grapple_beam_tmpD82 not cleared in BlockCollGrappleBeam
|
memset(g_ram + 0xd82, 0, 8); // grapple_beam_tmpD82 not cleared in BlockCollGrappleBeam
|
||||||
|
} else if (FixBugHook(0xA0A35C)) {
|
||||||
|
// ProcessEnemyPowerBombInteraction - R18 may get overwritten by the enemy death routine
|
||||||
|
REMOVED_R18 = HIBYTE(power_bomb_explosion_radius);
|
||||||
|
REMOVED_R20 = (REMOVED_R18 + (REMOVED_R18 >> 1)) >> 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
@@ -18,6 +18,9 @@ static inline void SetHiLo(uint16 *hi, uint16 *lo, uint32 t) {
|
|||||||
|
|
||||||
extern int32 *cur_coll_amt32;
|
extern int32 *cur_coll_amt32;
|
||||||
|
|
||||||
|
// Not used anymore
|
||||||
|
#define REMOVED_R18 *(uint16*)(g_ram + 18)
|
||||||
|
#define REMOVED_R20 *(uint16*)(g_ram + 20)
|
||||||
|
|
||||||
#define INT16_SHL8(x) ((int16)(x) << 8)
|
#define INT16_SHL8(x) ((int16)(x) << 8)
|
||||||
#define INT16_SHL16(x) ((int16)(x) << 16)
|
#define INT16_SHL16(x) ((int16)(x) << 16)
|
||||||
|
|||||||
Reference in New Issue
Block a user