Remove camdraw code

This commit is contained in:
Ryan Dwyer 2022-10-22 20:26:12 +10:00
parent 2995dc4a88
commit c9f4fef2d6
10 changed files with 4 additions and 108 deletions

View File

@ -181,7 +181,6 @@
build/ROMID/game/wallhit.o (section); \
build/ROMID/game/bondview.o (section); \
build/ROMID/game/splat.o (section); \
build/ROMID/game/camdraw.o (section); \
build/ROMID/game/shards.o (section); \
build/ROMID/game/options.o (section); \
build/ROMID/game/game_152fa0.o (section); \

View File

@ -397,8 +397,6 @@ char *cheatGetNameIfUnlocked(struct menuitem *item)
s32 cheatMenuHandleDialog(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data)
{
if (operation == MENUOP_OPEN) {
func0f14a52c();
if (gbpakIsAnyPerfectDark()) {
gamefileSetFlag(GAMEFILEFLAG_USED_TRANSFERPAK);
}
@ -432,8 +430,6 @@ s32 cheatMenuHandleDialog(s32 operation, struct menudialogdef *dialogdef, union
if (gbpakIsAnyPerfectDark()) {
gamefileSetFlag(GAMEFILEFLAG_USED_TRANSFERPAK);
}
func0f14a560();
}
return 0;

View File

@ -334,54 +334,5 @@ void pheadFreeTextures(s32 playernum)
struct textureconfig *pheadGetTexture(s32 playernum, s32 fileid, u16 deviceserial)
{
s32 i;
s32 freeslot = -1;
s32 indextouse = -1;
for (i = 0; i < 16; i++) {
if (g_Menus[playernum].fm.headtextures->fileguids[i].fileid == fileid
&& g_Menus[playernum].fm.headtextures->fileguids[i].deviceserial == deviceserial) {
indextouse = i;
break;
}
if (g_Menus[playernum].fm.headtextures->fileguids[i].fileid == 0) {
if (g_Menus[playernum].fm.headtextures->fileguids[i].deviceserial == 0) {
freeslot = i;
}
}
}
if (indextouse == -1) {
s8 device = pakFindBySerial(deviceserial);
if (device < 0) {
return NULL;
}
if (freeslot == -1) {
return NULL;
}
if (g_Vars.thisframestart240 - g_Menus[playernum].fm.headtextures->lastupdated240 < 20) {
return NULL;
}
g_Menus[playernum].fm.headtextures->lastupdated240 = g_Vars.thisframestart240;
func0f15015c(device, fileid, g_Menus[playernum].fm.headtextures->unk000[freeslot]);
g_Menus[playernum].fm.headtextures->fileguids[freeslot].fileid = fileid;
g_Menus[playernum].fm.headtextures->fileguids[freeslot].deviceserial = deviceserial;
indextouse = freeslot;
}
if (indextouse == -1) {
return NULL;
}
g_Menus[playernum].fm.headtextures->selectedtexture.textureptr = g_Menus[playernum].fm.headtextures->unk000[indextouse];
return &g_Menus[playernum].fm.headtextures->selectedtexture;
return NULL;
}

View File

@ -457,10 +457,6 @@ void lvReset(s32 stagenum)
fmbReset();
}
if (IS8MB()) {
pheadReset();
}
modelmgrSetLvResetting(false);
var80084018 = 1;
schedResetArtifacts();

View File

@ -1785,10 +1785,6 @@ Gfx *menuRenderModels(Gfx *gdl, struct menu840 *thing, s32 arg2)
if (mpheadnum < mpGetNumHeads2()) {
headnum = mpGetHeadId(mpheadnum);
} else {
headnum = func0f14a9f8(mpheadnum - mpGetNumHeads2());
headnum = mpGetBeauHeadId(headnum);
thing->unk5b0 = (mpheadnum - mpGetNumHeads2()) & 0xff;
}
}

View File

@ -3138,21 +3138,7 @@ Gfx *menuitemCarouselRender(Gfx *gdl, struct menurendercontext *context)
// Right arrow
gdl = menugfxDrawCarouselChevron(gdl, context->x + context->width, context->y + context->height / 2, 8, 3, -1, colour);
// This part of the function is unused because param2 is always zero.
// Setting it to 0x7b causes a crash.
// 0x7c and 0x7d don't do anything with the option value, so it's probable
// that the original source has a commented function call in that block.
if (context->item->param2 == 0x7b && context->item->handler) {
union handlerdata data;
s32 headorbodynum = 0;
context->item->handler(MENUOP_GETSELECTEDINDEX, context->item, &data);
headorbodynum += data.carousel.value;
gdl = func0f14f07c(gdl, headorbodynum,
context->x + context->width / 2 - 32, context->y,
context->x + context->width / 2 + 32, context->y + 64);
} else if ((context->item->param2 == 0x7c || context->item->param2 == 0x7d) && context->item->handler) {
if ((context->item->param2 == 0x7c || context->item->param2 == 0x7d) && context->item->handler) {
union handlerdata data;
context->item->handler(MENUOP_GETSELECTEDINDEX, context->item, &data);
}

View File

@ -4979,11 +4979,7 @@ void mpplayerfileSaveWad(s32 playernum, struct savebuffer *buffer)
savebufferOr(buffer, g_PlayerConfigsArray[playernum].base.mpheadnum, 7);
savebufferOr(buffer, g_PlayerConfigsArray[playernum].base.mpbodynum, 7);
if (g_PlayerConfigsArray[playernum].base.mpheadnum >= mpGetNumHeads2()) {
struct fileguid guid;
phGetGuid(g_PlayerConfigsArray[playernum].base.mpheadnum - mpGetNumHeads2(), &guid);
savebufferWriteGuid(buffer, &guid);
} else {
{
struct fileguid guid;
guid.deviceserial = 0;
guid.fileid = 0;

View File

@ -1892,12 +1892,6 @@ s32 mpCharacterHeadMenuHandler(s32 operation, struct menuitem *item, union handl
g_Menus[g_MpPlayerNum].unk840.unk00c = g_HeadsAndBodies[headnum].filenum;
g_Menus[g_MpPlayerNum].unk840.unk5b1_01 = false;
} else {
headnum = mpGetBeauHeadId(func0f14a9f8(mpheadnum - mpGetNumHeads2()));
g_Menus[g_MpPlayerNum].unk840.unk00c = g_HeadsAndBodies[headnum].filenum;
g_Menus[g_MpPlayerNum].unk840.unk5b1_01 = true;
g_Menus[g_MpPlayerNum].unk840.unk5b0 = mpheadnum - mpGetNumHeads2();
}
g_Menus[g_MpPlayerNum].unk840.unk574 = 0;

View File

@ -5118,7 +5118,7 @@ bool gbpak0f11cef8(s8 device)
if (pak->unk2b9);
pak0f11d118(sp2c, pak->unk2b9, func0f14aa70());
pak0f11d118(sp2c, pak->unk2b9, 0);
pak0f11d174(device, sp2c);
sp2c[0] |= 1;
@ -5177,17 +5177,6 @@ void pak0f11d118(u8 *arg0, u8 arg1, u32 arg2)
void pak0f11d174(s8 device, u8 *arg1)
{
u8 tmp1;
s32 tmp2;
pak0f11d118(arg1, g_Paks[device].unk2b9, func0f14aa70());
tmp1 = func0f14ad38(device);
tmp2 = func0f14ad14(device);
arg1[1] = (arg1[1] & 0xe0) + tmp1;
arg1[2] = (tmp2 >> 8) & 0xff;
arg1[3] = tmp2;
}
void pak0f11d214(u8 *arg0, u32 arg1)
@ -5718,7 +5707,6 @@ void pak0f11df94(s8 device)
menuSetBanner(-1, true);
#endif
func0f14aed0(device);
break;
case PAK010_02:
#if VERSION >= VERSION_NTSC_1_0
@ -5730,7 +5718,6 @@ void pak0f11df94(s8 device)
#else
pak0f114dd4nb(device);
#endif
func0f14aed0(device);
break;
case PAK010_03:
#if VERSION >= VERSION_NTSC_1_0
@ -5794,9 +5781,6 @@ void pak0f11df94(s8 device)
g_Paks[device].unk010 = PAK010_11;
break;
case PAK010_08:
if (func0f14aea0(device)) {
g_Paks[device].unk010 = PAK010_09;
}
break;
case PAK010_09:
#if VERSION >= VERSION_NTSC_1_0

View File

@ -557,9 +557,7 @@ void mainInit(void)
stub0f000910();
stub0f000840();
mpInit();
pheadInit();
paksInit();
pheadInit2();
animsInit();
racesInit();
bodiesInit();