Rom crash fix and puppycam volume fix

A hasty fix so built roms can actually work
This commit is contained in:
Fazana
2021-08-16 12:36:03 +01:00
parent f0971b9cb8
commit c294980de2
2 changed files with 13 additions and 4 deletions

View File

@@ -302,11 +302,7 @@ SECTIONS
END_SEG(behavior)
/* 0x8016F000 21D7D0-255EC0 [386F0] */
#ifdef PRELIMINARY
BEGIN_SEG(goddard, RAM_END - GODDARD_SIZE)
#else
BEGIN_SEG(goddard, 0x80345678)
#endif
{
KEEP(BUILD_DIR/src/menu*.o(.text));
KEEP(BUILD_DIR/src/menu*.o(.data*));

View File

@@ -28,6 +28,7 @@
#include "level_table.h"
#include "course_table.h"
#include "rumble_init.h"
#include "puppycam2.h"
#include "config.h"
@@ -640,6 +641,18 @@ void initiate_warp(s16 destLevel, s16 destArea, s16 destWarpNode, s32 arg3) {
sWarpDest.areaIdx = destArea;
sWarpDest.nodeId = destWarpNode;
sWarpDest.arg = arg3;
#ifdef PUPPYCAM
s32 i = 0;
if (sWarpDest.type != WARP_TYPE_SAME_AREA)
{
for (i = 0; i < gPuppyVolumeCount; i++)
{
mem_pool_free(gPuppyMemoryPool, sPuppyVolumeStack[i]);
}
gPuppyVolumeCount = 0;
}
#endif
}
// From Surface 0xD3 to 0xFC