diff options
Diffstat (limited to '')
-rw-r--r-- | kamek_pal.x | 2 | ||||
-rw-r--r-- | src/bossPlayerClown.cpp | 8 | ||||
-rw-r--r-- | src/challengeStar.cpp | 2 |
3 files changed, 11 insertions, 1 deletions
diff --git a/kamek_pal.x b/kamek_pal.x index 1b35358..a8bc58a 100644 --- a/kamek_pal.x +++ b/kamek_pal.x @@ -16,6 +16,8 @@ SECTIONS { PClownCarDraw = 0x80810B90; PClownCarMove = 0x80811E70; + sAllocatorFunc__FrmHeap = 0x8042E5B0; + /* Back to other shit I didn't want to scroll for */ diff --git a/src/bossPlayerClown.cpp b/src/bossPlayerClown.cpp index eb67db3..522314e 100644 --- a/src/bossPlayerClown.cpp +++ b/src/bossPlayerClown.cpp @@ -126,7 +126,15 @@ extern "C" void __dt__Q23m3d5mdl_cFv(m3d::mdl_c *mdl, u32 willDelete); extern "C" void __dt__16mHeapAllocator_cFv(mHeapAllocator_c *al, u32 willDelete); extern "C" void __dt__20daJrClownForPlayer_cFv(dEn_c *clown, u32 willDelete); +extern "C" u32 sAllocatorFunc__FrmHeap; + void newClownDtor(dEn_c *clown, u32 willDelete) { + void **al = (void **)(((u32)clown) + 0x524); + if (*al != &sAllocatorFunc__FrmHeap) { + OSReport("oh no! bad allocator %p\n", *al); + *al = &sAllocatorFunc__FrmHeap; + } + __dt__Q23m3d5mdl_cFv(cModel, 0xFFFFFFFF); __dt__16mHeapAllocator_cFv(cAllocator, 0xFFFFFFFF); __dt__20daJrClownForPlayer_cFv(clown, willDelete); diff --git a/src/challengeStar.cpp b/src/challengeStar.cpp index 03b4089..ec863f1 100644 --- a/src/challengeStar.cpp +++ b/src/challengeStar.cpp @@ -72,7 +72,7 @@ dChallengeStar *dChallengeStar::build() { int dChallengeStar::onCreate() { char die = this->settings & 0xF; - if (GetSpecificPlayerActor(die) == 0) { this->Delete(1); return; } + if (GetSpecificPlayerActor(die) == 0) { this->Delete(1); return 2; } GlobalStarsCollected++; |