Adjust addresses of g_GfxSizesByPlayerCount and g_VtxSizesByPlayerCount

This commit is contained in:
Ryan Dwyer
2021-01-01 23:41:03 +10:00
parent 48498eb313
commit f575e378f1
2 changed files with 12 additions and 11 deletions
+4 -3
View File
@@ -4763,21 +4763,22 @@ void *filetable[] = {
/*0x07de*/ &_filenamesSegmentRomStart,
};
u32 var80083fdc = 0;
u32 g_GfxSizesByPlayerCount[] = {
0x00000000,
0x00010000,
0x00018000,
0x00020000,
0x00028000,
};
u32 g_VtxSizesByPlayerCount[] = {
0x00028000,
0x00010000,
0x00018000,
0x00020000,
0x00028000,
};
u32 var80083ffc = 0x00028000;
s32 g_GfxNumSwapsPerBuffer[2] = {0, 1};
u32 g_GfxNumSwaps = 0x00000002;
u32 var8008400c = 0x00000000;
+8 -8
View File
@@ -74,23 +74,23 @@ void gfxInitMemory(void)
// ******** Original Amount required = %dK ber buffer\n
// ******** Extra Amount required = %dK ber buffer\n
// ******** Total of %dK (Double Buffered)\n
g_GfxSizesByPlayerCount[PLAYERCOUNT()] = gfx + gfxtra;
g_GfxSizesByPlayerCount[PLAYERCOUNT() - 1] = gfx + gfxtra;
}
if (func00013010(1, "-mvtx")) {
// Argument specified mtxvtx_size\n
g_VtxSizesByPlayerCount[PLAYERCOUNT()] = func00013408(func00013010(1, "-mvtx"), NULL, 0) * 1024;
g_VtxSizesByPlayerCount[PLAYERCOUNT() - 1] = func00013408(func00013010(1, "-mvtx"), NULL, 0) * 1024;
}
// %d Players : Allocating %d bytes for master dl's\n
g_GfxBuffers[0] = malloc(g_GfxSizesByPlayerCount[PLAYERCOUNT()] * 2, 4);
g_GfxBuffers[1] = g_GfxBuffers[0] + g_GfxSizesByPlayerCount[PLAYERCOUNT()];
g_GfxBuffers[2] = g_GfxBuffers[1] + g_GfxSizesByPlayerCount[PLAYERCOUNT()];
g_GfxBuffers[0] = malloc(g_GfxSizesByPlayerCount[PLAYERCOUNT() - 1] * 2, 4);
g_GfxBuffers[1] = g_GfxBuffers[0] + g_GfxSizesByPlayerCount[PLAYERCOUNT() - 1];
g_GfxBuffers[2] = g_GfxBuffers[1] + g_GfxSizesByPlayerCount[PLAYERCOUNT() - 1];
// Allocating %d bytes for mtxvtx space\n
g_VtxBuffers[0] = malloc(g_VtxSizesByPlayerCount[PLAYERCOUNT()] * 2, 4);
g_VtxBuffers[1] = g_VtxBuffers[0] + g_VtxSizesByPlayerCount[PLAYERCOUNT()];
g_VtxBuffers[2] = g_VtxBuffers[1] + g_VtxSizesByPlayerCount[PLAYERCOUNT()];
g_VtxBuffers[0] = malloc(g_VtxSizesByPlayerCount[PLAYERCOUNT() - 1] * 2, 4);
g_VtxBuffers[1] = g_VtxBuffers[0] + g_VtxSizesByPlayerCount[PLAYERCOUNT() - 1];
g_VtxBuffers[2] = g_VtxBuffers[1] + g_VtxSizesByPlayerCount[PLAYERCOUNT() - 1];
g_GfxActiveBufferIndex = 0;
g_GfxRequestedDisplayList = false;