mirror of
https://gitlab.com/ryandwyer/perfect-dark
synced 2026-06-27 01:35:07 -04:00
Juggle memory so Rescue works on co-op
This commit is contained in:
+4
-2
@@ -543,6 +543,8 @@ void lightsReset(void)
|
||||
func0f004c6c();
|
||||
}
|
||||
|
||||
extern struct rend_vidat *g_ViBackData;
|
||||
|
||||
void func0f001c0c(void)
|
||||
{
|
||||
s32 i;
|
||||
@@ -576,7 +578,7 @@ void func0f001c0c(void)
|
||||
table4size = ALIGN16((u32)var8009cae0 * (u32)var8009cae0);
|
||||
sp68 = ALIGN16(g_Vars.roomcount * 8);
|
||||
|
||||
ptr = mblurGetAllocation();
|
||||
ptr = (void *) g_ViBackData->fb;
|
||||
|
||||
var80061434 = (f32 *)ptr;
|
||||
ptr += table1size;
|
||||
@@ -590,7 +592,7 @@ void func0f001c0c(void)
|
||||
sp48 = (u8 *)ptr;
|
||||
ptr += table4size;
|
||||
|
||||
s5 = (u8 *)ptr;
|
||||
s5 = (u8 *) mblurGetAllocation();
|
||||
|
||||
var80061420 = mempAlloc(sp68, MEMPOOL_STAGE);
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ void mblurReset(s32 stagenum)
|
||||
|
||||
static void mblurAllocate(void)
|
||||
{
|
||||
var800844f0 = mempAlloc(640 * 220 * 2 + 0x40, MEMPOOL_STAGE);
|
||||
var800844f0 = mempAlloc(320 * 220 * 2 + 0x40, MEMPOOL_STAGE);
|
||||
var800844f0 = (void *)(((u32) var800844f0 + 0x3f) & ~0x3f);
|
||||
}
|
||||
|
||||
|
||||
@@ -385,6 +385,10 @@ static void mainLoop(void)
|
||||
|
||||
g_MainMemaHeapSize = g_StageAllocations8Mb[index].ma * 1024;
|
||||
|
||||
if (g_StageNum == STAGE_RESCUE && g_NumPlayers >= 2) {
|
||||
g_MainMemaHeapSize = 0;
|
||||
}
|
||||
|
||||
memaReset(mempAlloc(g_MainMemaHeapSize, MEMPOOL_STAGE), g_MainMemaHeapSize);
|
||||
langReset(g_StageNum);
|
||||
playermgrReset();
|
||||
|
||||
Reference in New Issue
Block a user