Introduce uintptr_t

This commit is contained in:
Ryan Dwyer
2022-12-07 21:00:03 +10:00
parent 45524f06b2
commit ba11c5634b
95 changed files with 3297 additions and 3285 deletions
+2 -2
View File
@@ -74,7 +74,7 @@ void amOpenPickTarget(void)
}
}
s32 amPickTargetMenuList(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult amPickTargetMenuList(s32 operation, struct menuitem *item, union handlerdata *data)
{
static u32 teamcolours[] = {
0xff666600,
@@ -200,7 +200,7 @@ s32 amPickTargetMenuList(s32 operation, struct menuitem *item, union handlerdata
return 0;
}
s32 amPickTargetMenuDialog(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data)
MenuDialogHandlerResult amPickTargetMenuDialog(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data)
{
switch (operation) {
case MENUOP_OPEN:
+54 -54
View File
@@ -1140,7 +1140,7 @@ Gfx *bg0f1598b4(Gfx *gdl, Gfx *gdl2, struct gfxvtx *vertices, s16 arg3[3])
s32 index = gdl2->bytes[1] & 0xf;
s32 numvertices = (((u32)gdl2->bytes[1] >> 4)) + 1;
s32 offset = (gdl2->words.w1 & 0xffffff);
struct gfxvtx *vtx = (struct gfxvtx *)((u32)vertices + offset);
struct gfxvtx *vtx = (struct gfxvtx *)((uintptr_t)vertices + offset);
u32 stack[4];
for (i = 0; i < numvertices; i++) {
@@ -1692,7 +1692,7 @@ s32 stageGetIndex2(s32 stagenum)
f32 portal0f15b274(s32 portalnum)
{
struct portalvertices *pvertices = (struct portalvertices *)((u32)g_BgPortals + g_BgPortals[portalnum].verticesoffset);
struct portalvertices *pvertices = (struct portalvertices *)((uintptr_t)g_BgPortals + g_BgPortals[portalnum].verticesoffset);
s32 count = pvertices->count;
s32 i;
s32 j;
@@ -1720,7 +1720,7 @@ f32 portal0f15b274(s32 portalnum)
void func0f15b3e4(s32 portalnum, struct coord *a, struct coord *b, struct coord *c, struct coord *d)
{
struct portalvertices *pvertices;
pvertices = (struct portalvertices *)((u32)g_BgPortals + g_BgPortals[portalnum].verticesoffset);
pvertices = (struct portalvertices *)((uintptr_t)g_BgPortals + g_BgPortals[portalnum].verticesoffset);
a->x = pvertices->vertices[0].x;
a->y = pvertices->vertices[0].y;
@@ -1911,7 +1911,7 @@ void bgReset(s32 stagenum)
}
// Copy section 1 header to stack and parse into variables
header = (u8 *)ALIGN16((u32)headerbuffer);
header = (u8 *)ALIGN16((uintptr_t)headerbuffer);
bgLoadFile(header, 0, 0x40);
inflatedsize = *(u32 *)&header[0];
section1compsize = *(u32 *)&header[4];
@@ -1925,7 +1925,7 @@ void bgReset(s32 stagenum)
g_BgPrimaryData = mempAlloc(ALIGN16(inflatedsize + 0x8010), MEMPOOL_STAGE);
// Set up pointer to scratch space
scratch = (u32) g_BgPrimaryData + inflatedsize - primcompsize;
scratch = (uintptr_t) g_BgPrimaryData + inflatedsize - primcompsize;
scratch = ALIGN16(scratch + 0x8000);
g_LoadType = LOADTYPE_BG;
@@ -1955,13 +1955,13 @@ void bgReset(s32 stagenum)
// in the docs folder of this project.
#ifdef AVOID_UB
section2 = mempAlloc(inflatedsize + section2compsize, MEMPOOL_STAGE);
scratch = (u32) section2 + inflatedsize;
scratch = (uintptr_t) section2 + inflatedsize;
#elif VERSION >= VERSION_NTSC_FINAL
section2 = mempAlloc(inflatedsize + 0x8000, MEMPOOL_STAGE);
scratch = (u32) section2 + 0x8000;
scratch = (uintptr_t) section2 + 0x8000;
#else
section2 = mempAlloc(inflatedsize + 0x800, MEMPOOL_STAGE);
scratch = (u32) section2 + 0x800;
scratch = (uintptr_t) section2 + 0x800;
#endif
// Load compressed data from ROM to scratch
@@ -2129,7 +2129,7 @@ void bgBuildTables(s32 stagenum)
}
}
pvertices = (struct portalvertices *)((u32)g_BgPortals + offset);
pvertices = (struct portalvertices *)((uintptr_t)g_BgPortals + offset);
if (pvertices->count <= 0) {
break;
@@ -2230,7 +2230,7 @@ void bgBuildTables(s32 stagenum)
tmp2.coord.y = 0.0f;
tmp2.coord.z = 0.0f;
pvertices = (struct portalvertices *)((u32)g_BgPortals + g_BgPortals[i].verticesoffset);
pvertices = (struct portalvertices *)((uintptr_t)g_BgPortals + g_BgPortals[i].verticesoffset);
for (j = 0; j < pvertices->count; j++) {
struct coord *next = &pvertices->vertices[(j + 1) % pvertices->count];
@@ -2276,7 +2276,7 @@ void bgBuildTables(s32 stagenum)
if (g_BgCommands != NULL) {
for (i = 0; g_BgCommands[i].type != BGCMD_END; i++) {
if (g_BgCommands[i].type == BGCMD_PORTALARG) {
g_BgCommands[i].param = portalFindNumByVertices((void *)(g_BgCommands[i].param + (u32)g_BgPrimaryData + 0xf1000000));
g_BgCommands[i].param = portalFindNumByVertices((void *)(g_BgCommands[i].param + (uintptr_t)g_BgPrimaryData + 0xf1000000));
}
}
}
@@ -2309,7 +2309,7 @@ void bgBuildTables(s32 stagenum)
// the section 3 allocation is resized to 0, effectively freeing it.
// Load and read the header
header = (u8 *)ALIGN16((u32)headerbuffer);
header = (u8 *)ALIGN16((uintptr_t)headerbuffer);
bgLoadFile(header, g_BgSection3, 0x40);
inflatedsize = (*(u16 *)&header[0] & 0x7fff) - 1;
section3compsize = *(u16 *)&header[2];
@@ -2931,7 +2931,7 @@ s32 portalFindNumByVertices(struct portalvertices *arg0)
struct bgportal *portal = g_BgPortals;
for (i = 0; portal[i].verticesoffset != 0; i++) {
struct portalvertices *pvertices = (struct portalvertices *)((u32)portal + portal[i].verticesoffset);
struct portalvertices *pvertices = (struct portalvertices *)((uintptr_t)portal + portal[i].verticesoffset);
if (pvertices == arg0) {
return i;
@@ -3080,9 +3080,9 @@ Gfx *roomGetNextGdlInLayer(s32 roomnum, Gfx *start, u32 types)
struct gfxvtx *roomFindVerticesForGdl(s32 roomnum, Gfx *gdl)
{
struct roomblock *block = g_Rooms[roomnum].gfxdata->blocks;
u32 end = (u32)g_Rooms[roomnum].gfxdata->vertices;
uintptr_t end = (uintptr_t)g_Rooms[roomnum].gfxdata->vertices;
while ((u32)(block + 1) <= end) {
while ((uintptr_t)(block + 1) <= end) {
switch (block->type) {
case ROOMBLOCKTYPE_LEAF:
if (gdl == block->gdl) {
@@ -3090,8 +3090,8 @@ struct gfxvtx *roomFindVerticesForGdl(s32 roomnum, Gfx *gdl)
}
break;
case ROOMBLOCKTYPE_PARENT:
if ((u32)block->unk0c < end) {
end = (u32)block->unk0c;
if ((uintptr_t)block->unk0c < end) {
end = (uintptr_t)block->unk0c;
}
break;
}
@@ -4285,9 +4285,9 @@ void bgLoadRoom(s32 roomnum)
u8 *vtxblocks[50]; // 140
u8 *sp78[50];
s32 len;
u32 end1;
uintptr_t end1;
s32 i; // 6c
u32 end2;
uintptr_t end2;
s32 prev;
s32 v1;
@@ -4352,56 +4352,56 @@ void bgLoadRoom(s32 roomnum)
// Promote offsets to pointers in the gfxdata header
if (g_Rooms[roomnum].gfxdata->vertices) {
g_Rooms[roomnum].gfxdata->vertices = (struct gfxvtx *)((u32)g_Rooms[roomnum].gfxdata->vertices - g_BgRooms[roomnum].unk00 + (u32)allocation);
g_Rooms[roomnum].gfxdata->vertices = (struct gfxvtx *)((uintptr_t)g_Rooms[roomnum].gfxdata->vertices - g_BgRooms[roomnum].unk00 + (uintptr_t)allocation);
}
if (g_Rooms[roomnum].gfxdata->colours) {
g_Rooms[roomnum].gfxdata->colours = (u32 *)((u32)g_Rooms[roomnum].gfxdata->colours - g_BgRooms[roomnum].unk00 + (u32)allocation);
g_Rooms[roomnum].gfxdata->colours = (u32 *)((uintptr_t)g_Rooms[roomnum].gfxdata->colours - g_BgRooms[roomnum].unk00 + (uintptr_t)allocation);
}
if (g_Rooms[roomnum].gfxdata->opablocks) {
g_Rooms[roomnum].gfxdata->opablocks = (struct roomblock *)((u32)g_Rooms[roomnum].gfxdata->opablocks - g_BgRooms[roomnum].unk00 + (u32)allocation);
g_Rooms[roomnum].gfxdata->opablocks = (struct roomblock *)((uintptr_t)g_Rooms[roomnum].gfxdata->opablocks - g_BgRooms[roomnum].unk00 + (uintptr_t)allocation);
}
if (g_Rooms[roomnum].gfxdata->xlublocks) {
g_Rooms[roomnum].gfxdata->xlublocks = (struct roomblock *)((u32)g_Rooms[roomnum].gfxdata->xlublocks - g_BgRooms[roomnum].unk00 + (u32)allocation);
g_Rooms[roomnum].gfxdata->xlublocks = (struct roomblock *)((uintptr_t)g_Rooms[roomnum].gfxdata->xlublocks - g_BgRooms[roomnum].unk00 + (uintptr_t)allocation);
}
// Promote offsets to pointers in each gfxdata block
block1 = g_Rooms[roomnum].gfxdata->blocks;
end1 = (u32)g_Rooms[roomnum].gfxdata->vertices;
end1 = (uintptr_t)g_Rooms[roomnum].gfxdata->vertices;
while ((s32) (block1 + 1) <= end1) {
while ((intptr_t) (block1 + 1) <= end1) {
switch (block1->type) {
case ROOMBLOCKTYPE_LEAF:
if (block1->next != NULL) {
block1->next = (struct roomblock *)((u32)block1->next - g_BgRooms[roomnum].unk00 + (u32)allocation);
block1->next = (struct roomblock *)((uintptr_t)block1->next - g_BgRooms[roomnum].unk00 + (uintptr_t)allocation);
}
if (block1->gdl != 0) {
block1->gdl = (Gfx *)((u32)block1->gdl - g_BgRooms[roomnum].unk00 + (u32)allocation);
block1->gdl = (Gfx *)((uintptr_t)block1->gdl - g_BgRooms[roomnum].unk00 + (uintptr_t)allocation);
}
if (block1->vertices != 0) {
block1->vertices = (struct gfxvtx *)((u32)block1->vertices - g_BgRooms[roomnum].unk00 + (u32)allocation);
block1->vertices = (struct gfxvtx *)((uintptr_t)block1->vertices - g_BgRooms[roomnum].unk00 + (uintptr_t)allocation);
}
if (block1->colours != 0) {
block1->colours = (u32 *)((u32)block1->colours - g_BgRooms[roomnum].unk00 + (u32)allocation);
block1->colours = (u32 *)((uintptr_t)block1->colours - g_BgRooms[roomnum].unk00 + (uintptr_t)allocation);
}
break;
case ROOMBLOCKTYPE_PARENT:
if (block1->next != NULL) {
block1->next = (struct roomblock *)((u32)block1->next - g_BgRooms[roomnum].unk00 + (u32)allocation);
block1->next = (struct roomblock *)((uintptr_t)block1->next - g_BgRooms[roomnum].unk00 + (uintptr_t)allocation);
}
if (block1->gdl != 0) {
block1->gdl = (Gfx *)((u32)block1->gdl - g_BgRooms[roomnum].unk00 + (u32)allocation);
block1->gdl = (Gfx *)((uintptr_t)block1->gdl - g_BgRooms[roomnum].unk00 + (uintptr_t)allocation);
}
if (block1->vertices != 0) {
block1->vertices = (struct gfxvtx *)((u32)block1->vertices - g_BgRooms[roomnum].unk00 + (u32)allocation);
block1->vertices = (struct gfxvtx *)((uintptr_t)block1->vertices - g_BgRooms[roomnum].unk00 + (uintptr_t)allocation);
}
if (block1->colours != 0) {
block1->colours = (u32 *)((u32)block1->colours - g_BgRooms[roomnum].unk00 + (u32)allocation);
block1->colours = (u32 *)((uintptr_t)block1->colours - g_BgRooms[roomnum].unk00 + (uintptr_t)allocation);
}
if ((u32)block1->vertices < end1) {
end1 = (u32)block1->vertices;
if ((uintptr_t)block1->vertices < end1) {
end1 = (uintptr_t)block1->vertices;
}
break;
}
@@ -4410,8 +4410,8 @@ void bgLoadRoom(s32 roomnum)
}
// Calculate the number of vertices and colours
g_Rooms[roomnum].gfxdata->numvertices = ((u32)g_Rooms[roomnum].gfxdata->colours - (u32)g_Rooms[roomnum].gfxdata->vertices) / sizeof(struct gfxvtx);
g_Rooms[roomnum].gfxdata->numcolours = ((u32)roomGetNextGdlInLayer(roomnum, 0, VTXBATCHTYPE_OPA | VTXBATCHTYPE_XLU) - (u32)g_Rooms[roomnum].gfxdata->colours) / sizeof(u32);
g_Rooms[roomnum].gfxdata->numvertices = ((uintptr_t)g_Rooms[roomnum].gfxdata->colours - (uintptr_t)g_Rooms[roomnum].gfxdata->vertices) / sizeof(struct gfxvtx);
g_Rooms[roomnum].gfxdata->numcolours = ((uintptr_t)roomGetNextGdlInLayer(roomnum, 0, VTXBATCHTYPE_OPA | VTXBATCHTYPE_XLU) - (uintptr_t)g_Rooms[roomnum].gfxdata->colours) / sizeof(u32);
// Build arrays of pointers to gfx blocks and vtx blocks
len = 0;
@@ -4450,7 +4450,7 @@ void bgLoadRoom(s32 roomnum)
s32 byteswritten = texLoadFromGdl((void *) sp78[i], gfxblocks[i + 1] - gfxblocks[i], (void *) a2, NULL, vtxblocks[i]);
sp78[i] = a2;
a2 += byteswritten;
a2 = (u8 *) ALIGN8((s32) a2);
a2 = (u8 *) ALIGN8((intptr_t) a2);
}
sp78[len] = a2;
@@ -4469,15 +4469,15 @@ void bgLoadRoom(s32 roomnum)
g_Rooms[roomnum].loaded240 = 1;
if (g_Rooms[roomnum].gfxdatalen != size) {
memaRealloc((s32) allocation, size, g_Rooms[roomnum].gfxdatalen);
memaRealloc((intptr_t) allocation, size, g_Rooms[roomnum].gfxdatalen);
}
// Update gdl pointers in the gfxdata so they point to the ones
// that have been processed by the texture decompressor.
block2 = g_Rooms[roomnum].gfxdata->blocks; // a1 =
end2 = (u32) g_Rooms[roomnum].gfxdata->vertices; // a3 =
end2 = (uintptr_t) g_Rooms[roomnum].gfxdata->vertices; // a3 =
while ((s32) (block2 + 1) <= end2) {
while ((intptr_t) (block2 + 1) <= end2) {
switch (block2->type) {
case ROOMBLOCKTYPE_LEAF:
if (block2->gdl) {
@@ -4492,8 +4492,8 @@ void bgLoadRoom(s32 roomnum)
}
break;
case ROOMBLOCKTYPE_PARENT:
if ((u32) block2->unk0c < end2) {
end2 = (u32) block2->unk0c;
if ((uintptr_t) block2->unk0c < end2) {
end2 = (uintptr_t) block2->unk0c;
}
break;
}
@@ -4681,7 +4681,7 @@ void bgTickRooms(void)
Gfx *bgRenderRoomPass(Gfx *gdl, s32 roomnum, struct roomblock *block, bool arg3)
{
u32 v0;
uintptr_t v0;
if (block == NULL) {
return gdl;
@@ -4697,13 +4697,13 @@ Gfx *bgRenderRoomPass(Gfx *gdl, s32 roomnum, struct roomblock *block, bool arg3)
roomHighlight(roomnum);
v0 = (u32)g_Rooms[roomnum].colours;
v0 = (uintptr_t)g_Rooms[roomnum].colours;
if (v0 != NULL) {
s32 addr = ALIGN8((u32)&g_Rooms[roomnum].gfxdata->vertices[g_Rooms[roomnum].gfxdata->numvertices]);
v0 += (((s32)block->colours - addr) >> 2) * 4;
s32 addr = ALIGN8((uintptr_t)&g_Rooms[roomnum].gfxdata->vertices[g_Rooms[roomnum].gfxdata->numvertices]);
v0 += (((intptr_t)block->colours - addr) >> 2) * 4;
} else {
v0 = (u32)block->colours;
v0 = (uintptr_t)block->colours;
}
gSPSegment(gdl++, SPSEGMENT_BG_COL, OS_PHYSICAL_TO_K0(v0));
@@ -4826,7 +4826,7 @@ s32 bgPopulateVtxBatchType(s32 roomnum, struct vtxbatch *batches, Gfx *gdl, s32
}
numvertices = (((u32)gdl[i].bytes[1] >> 4) & 0xf) + 1;
batchvertices = (struct gfxvtx *)((u32)vertices + (gdl[i].words.w1 & 0xffffff));
batchvertices = (struct gfxvtx *)((uintptr_t)vertices + (gdl[i].words.w1 & 0xffffff));
for (j = 0; j < numvertices; j++) {
f32 x = batchvertices[j].x;
@@ -5137,7 +5137,7 @@ bool bgTestHitOnObj(struct coord *arg0, struct coord *arg1, struct coord *arg2,
count = gdl->bytes[1] & 0xf;
offset = (gdl->words.w1 & 0xffffff);
numvertices = (((u32)gdl->bytes[1] >> 4) & 0xf) + 1;
vtx = (struct gfxvtx *)((u32)vertices + offset);
vtx = (struct gfxvtx *)((uintptr_t)vertices + offset);
vtx -= count;
ptr[0] = vtx->x;
@@ -5438,7 +5438,7 @@ bool bgTestHitOnChr(struct model *model, struct coord *arg1, struct coord *arg2,
count = (gdl->bytes[1] & 0xf);
word = gdl->words.w1 & 0xffffff;
numvertices = ((u32)gdl->bytes[1] >> 4) + 1;
vtx = (struct gfxvtx *)((u32)vertices + word);
vtx = (struct gfxvtx *)((uintptr_t)vertices + word);
if (count < spdc) {
spdc = count;
@@ -7480,7 +7480,7 @@ void bgExpandRoomToPortals(s32 roomnum)
for (i = 0; i < g_Rooms[roomnum].numportals; i++) {
s32 portalnum = g_RoomPortals[g_Rooms[roomnum].roomportallistoffset + i];
struct portalvertices *pvertices = (struct portalvertices *)((u32)g_BgPortals + g_BgPortals[portalnum].verticesoffset);
struct portalvertices *pvertices = (struct portalvertices *)((uintptr_t)g_BgPortals + g_BgPortals[portalnum].verticesoffset);
for (j = 0; j < pvertices->count; j++) {
for (k = 0; k < 3; k++) {
@@ -7619,7 +7619,7 @@ void room0f164c64(s32 roomnum)
continue;
}
pvertices = (struct portalvertices *)((u32)g_BgPortals + g_BgPortals[portalnum2].verticesoffset);
pvertices = (struct portalvertices *)((uintptr_t)g_BgPortals + g_BgPortals[portalnum2].verticesoffset);
for (k = 0; k < pvertices->count; k++) {
tmp = thing.coord.f[0] * pvertices->vertices[k].f[0]
@@ -7708,7 +7708,7 @@ void portalFindBbox(s32 portalnum, struct coord *bbmin, struct coord *bbmax)
bbmax->y = MINFLOAT;
bbmax->z = MINFLOAT;
pvertices = (struct portalvertices *)((u32)g_BgPortals + g_BgPortals[portalnum].verticesoffset);
pvertices = (struct portalvertices *)((uintptr_t)g_BgPortals + g_BgPortals[portalnum].verticesoffset);
for (i = 0; i < pvertices->count; i++) {
for (j = 0; j < 3; j++) {
+19 -19
View File
@@ -3829,7 +3829,7 @@ void bgunTickGunLoad(void)
// Tidy up the model
modelPromoteTypeToPointer(modeldef);
modelPromoteOffsetsToPointers(modeldef, 0x05000000, (u32)modeldef);
modelPromoteOffsetsToPointers(modeldef, 0x05000000, (uintptr_t)modeldef);
*player->gunctrl.loadtomodeldef = modeldef;
@@ -6474,7 +6474,7 @@ s32 bgunCreateModelCmdList(struct model *model, struct modelnode *nodearg, s32 *
rwdata = modelGetNodeRwData(model, node);
rwdata->dl.vertices = rodata->dl.vertices;
rwdata->dl.gdl = rodata->dl.opagdl;
rwdata->dl.colours = (void *)ALIGN8((u32)&rodata->dl.vertices[rodata->dl.numvertices]);
rwdata->dl.colours = (void *)ALIGN8((uintptr_t)&rodata->dl.vertices[rodata->dl.numvertices]);
ptr[0] = 5;
ptr[1] = (s32)rwdata;
ptr[2] = (s32)rwdata->dl.vertices;
@@ -6784,9 +6784,9 @@ void bgunUpdateLasersight(struct hand *hand, struct modeldef *modeldef, s32 hand
if (node) {
mtxindex = modelFindNodeMtxIndex(node, 0);
beamnear.x = ((Mtxf *)((u32)allocation + mtxindex * sizeof(Mtxf)))->m[3][0];
beamnear.y = ((Mtxf *)((u32)allocation + mtxindex * sizeof(Mtxf)))->m[3][1];
beamnear.z = ((Mtxf *)((u32)allocation + mtxindex * sizeof(Mtxf)))->m[3][2];
beamnear.x = ((Mtxf *)((uintptr_t)allocation + mtxindex * sizeof(Mtxf)))->m[3][0];
beamnear.y = ((Mtxf *)((uintptr_t)allocation + mtxindex * sizeof(Mtxf)))->m[3][1];
beamnear.z = ((Mtxf *)((uintptr_t)allocation + mtxindex * sizeof(Mtxf)))->m[3][2];
mtx4TransformVecInPlace(camGetProjectionMtxF(), &beamnear);
@@ -6836,7 +6836,7 @@ void bgunUpdateLasersight(struct hand *hand, struct modeldef *modeldef, s32 hand
beamfar.y = 0.0f;
beamfar.z = 500.0f;
mtx4TransformVecInPlace((Mtxf *)((u32)allocation + mtxindex * sizeof(Mtxf)), &beamfar);
mtx4TransformVecInPlace((Mtxf *)((uintptr_t)allocation + mtxindex * sizeof(Mtxf)), &beamfar);
} else {
cam0f0b4c3c(g_Vars.currentplayer->crosspos, &beamfar, 1);
@@ -6994,11 +6994,11 @@ void bgunUpdateSniperRifle(struct modeldef *modeldef, u8 *allocation)
sp70.y = 0.0f;
sp70.z = sp88[i];
mtx4RotateVecInPlace((Mtxf *)((u32)allocation + mtxindex * sizeof(Mtxf)), &sp70);
mtx4RotateVecInPlace((Mtxf *)((uintptr_t)allocation + mtxindex * sizeof(Mtxf)), &sp70);
((Mtxf *)((u32)allocation + mtxindex * sizeof(Mtxf)))->m[3][0] += sp70.x;
((Mtxf *)((u32)allocation + mtxindex * sizeof(Mtxf)))->m[3][1] += sp70.y;
((Mtxf *)((u32)allocation + mtxindex * sizeof(Mtxf)))->m[3][2] += sp70.z;
((Mtxf *)((uintptr_t)allocation + mtxindex * sizeof(Mtxf)))->m[3][0] += sp70.x;
((Mtxf *)((uintptr_t)allocation + mtxindex * sizeof(Mtxf)))->m[3][1] += sp70.y;
((Mtxf *)((uintptr_t)allocation + mtxindex * sizeof(Mtxf)))->m[3][2] += sp70.z;
}
}
}
@@ -7024,11 +7024,11 @@ void bgunUpdateDevastator(struct hand *hand, u8 *allocation, struct modeldef *mo
sp24.y = 0.0f;
sp24.z = 0.0f;
mtx4RotateVecInPlace((Mtxf *)((u32)allocation + mtxindex * sizeof(Mtxf)), &sp24);
mtx4RotateVecInPlace((Mtxf *)((uintptr_t)allocation + mtxindex * sizeof(Mtxf)), &sp24);
((Mtxf *)((u32)allocation + mtxindex * sizeof(Mtxf)))->m[3][0] += sp24.x;
((Mtxf *)((u32)allocation + mtxindex * sizeof(Mtxf)))->m[3][1] += sp24.y;
((Mtxf *)((u32)allocation + mtxindex * sizeof(Mtxf)))->m[3][2] += sp24.z;
((Mtxf *)((uintptr_t)allocation + mtxindex * sizeof(Mtxf)))->m[3][0] += sp24.x;
((Mtxf *)((uintptr_t)allocation + mtxindex * sizeof(Mtxf)))->m[3][1] += sp24.y;
((Mtxf *)((uintptr_t)allocation + mtxindex * sizeof(Mtxf)))->m[3][2] += sp24.z;
}
}
@@ -7063,9 +7063,9 @@ void bgunUpdateShotgun(struct hand *hand, u8 *allocation, bool *arg2, struct mod
if (node) {
sp34 = modelFindNodeMtxIndex(node, 0);
mtx00015ea8((1.0f - hand->matmot1) * 8.0f + 0.5f, (Mtxf *)((u32)allocation + sp34 * sizeof(Mtxf)));
mtx00015df0((1.0f - hand->matmot1) * 3.0f + 1.0f, (Mtxf *)((u32)allocation + sp34 * sizeof(Mtxf)));
mtx00015e4c((1.0f - hand->matmot1) * 3.0f + 1.0f, (Mtxf *)((u32)allocation + sp34 * sizeof(Mtxf)));
mtx00015ea8((1.0f - hand->matmot1) * 8.0f + 0.5f, (Mtxf *)((uintptr_t)allocation + sp34 * sizeof(Mtxf)));
mtx00015df0((1.0f - hand->matmot1) * 3.0f + 1.0f, (Mtxf *)((uintptr_t)allocation + sp34 * sizeof(Mtxf)));
mtx00015e4c((1.0f - hand->matmot1) * 3.0f + 1.0f, (Mtxf *)((uintptr_t)allocation + sp34 * sizeof(Mtxf)));
}
}
}
@@ -7932,7 +7932,7 @@ void bgun0f0a5550(s32 handnum)
mtx4Copy(mtx, &hand->muzzlemat);
mtx4TransformVecInPlace(camGetProjectionMtxF(), &hand->muzzlepos);
hand->muzzlez = -((Mtxf *)((u32)mtxallocation + sp6c * sizeof(Mtxf)))->m[3][2];
hand->muzzlez = -((Mtxf *)((uintptr_t)mtxallocation + sp6c * sizeof(Mtxf)))->m[3][2];
if (hand->flashon && sp1e0 > 0 && weaponnum != WEAPON_SHOTGUN && g_Vars.lvupdate240 != 0) {
bgun0f0a4e44(hand, weapondef, modeldef, funcdef, sp1e0, mtxallocation, weaponnum, sp1e4, sp6c, &sp234, &sp1f4);
@@ -7954,7 +7954,7 @@ void bgun0f0a5550(s32 handnum)
mtx4Copy(mtx, &hand->muzzlemat);
mtx4TransformVecInPlace(camGetProjectionMtxF(), &hand->muzzlepos);
hand->muzzlez = -((Mtxf *)((u32)mtxallocation + sp6c * sizeof(Mtxf)))->m[3][2];
hand->muzzlez = -((Mtxf *)((uintptr_t)mtxallocation + sp6c * sizeof(Mtxf)))->m[3][2];
} else {
hand->muzzlepos.x = hand->posmtx.m[3][0];
hand->muzzlepos.y = hand->posmtx.m[3][1];
+4 -4
View File
@@ -97,7 +97,7 @@ Gfx *bview0f141a20(Gfx *gdl, s32 top, s32 height, s32 left, s32 width)
Gfx *bviewCopyPixels(Gfx *gdl, u16 *fb, s32 top, u32 tile, s32 arg4, f32 arg5, s32 left, s32 width)
{
u32 image;
uintptr_t image;
s32 width2;
s32 numparts;
s32 lrs[1];
@@ -106,7 +106,7 @@ Gfx *bviewCopyPixels(Gfx *gdl, u16 *fb, s32 top, u32 tile, s32 arg4, f32 arg5, s
numparts = 2;
lrs[0] = width / numparts;
image = (u32) &fb[viGetWidth() * top + left] & 0x00ffffff;
image = (uintptr_t) &fb[viGetWidth() * top + left] & 0x00ffffff;
gDPSetTextureImage(gdl++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 320, image);
gDPLoadBlock(gdl++, tile, 0, 0, width / numparts - 1, 0);
@@ -123,7 +123,7 @@ Gfx *bviewCopyPixels(Gfx *gdl, u16 *fb, s32 top, u32 tile, s32 arg4, f32 arg5, s
left += lrs[0];
image = (u32) &fb[viGetWidth() * top + left] & 0x00ffffff;
image = (uintptr_t) &fb[viGetWidth() * top + left] & 0x00ffffff;
gDPSetTextureImage(gdl++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 320, image);
gDPLoadBlock(gdl++, tile, 0, 0, lrs[0] - 1, 0);
@@ -141,7 +141,7 @@ Gfx *bviewCopyPixels(Gfx *gdl, u16 *fb, s32 top, u32 tile, s32 arg4, f32 arg5, s
} else {
width2 = width;
image = (u32) &fb[viGetWidth() * top + left] & 0x00ffffff;
image = (uintptr_t) &fb[viGetWidth() * top + left] & 0x00ffffff;
gDPSetTextureImage(gdl++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 320, image);
gDPLoadBlock(gdl++, tile, 0, 0, width2 - 1, 0);
+7 -14
View File
@@ -47,13 +47,13 @@ struct texpool var800a45a8;
u32 var800a45b8;
u32 var800a45bc;
const char var7f1b6050[] = "Init";
const char var7f1b6058[] = "Start Header Read";
const char var7f1b606c[] = "Header Read Done";
const char var7f1b6080[] = "Null";
const char var7f1b6088[] = "Exit 1";
const char var7f1b6090[] = "Exit 2";
const char var7f1b6098[] = "Exit 3";
char *var8007f8c0 = "Init";
char *var8007f8c4 = "Start Header Read";
char *var8007f8c8 = "Header Read Done";
char *var8007f8cc = "Null";
char *var8007f8d0 = "Exit 1";
char *var8007f8d4 = "Exit 2";
char *var8007f8d8 = "Exit 3";
const u32 var7f1b60a0[][2] = {
{ 0, 0 },
@@ -189,13 +189,6 @@ const u32 var7f1b639c[] = {0x0c1857ff};
const char var7f1b63a0[] = "RWI : Cam Alloc : Guid=%d -> Total = %u (%d at %s)\n";
u32 var8007f8c0 = (u32)&var7f1b6050;
u32 var8007f8c4 = (u32)&var7f1b6058;
u32 var8007f8c8 = (u32)&var7f1b606c;
u32 var8007f8cc = (u32)&var7f1b6080;
u32 var8007f8d0 = (u32)&var7f1b6088;
u32 var8007f8d4 = (u32)&var7f1b6090;
u32 var8007f8d8 = (u32)&var7f1b6098;
struct var8007f8dc *var8007f8dc = NULL;
struct var8007f8e0 *var8007f8e0 = NULL;
u32 var8007f8e4 = 0x00000000;
+51 -51
View File
@@ -294,7 +294,7 @@ void cheatsReset(void)
}
}
s32 cheatCheckboxMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult cheatCheckboxMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data)
{
switch (operation) {
case MENUOP_GET:
@@ -345,7 +345,7 @@ s32 cheatCheckboxMenuHandler(s32 operation, struct menuitem *item, union handler
return 0;
}
s32 cheatMenuHandleBuddyCheckbox(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult cheatMenuHandleBuddyCheckbox(s32 operation, struct menuitem *item, union handlerdata *data)
{
switch (operation) {
case MENUOP_GET:
@@ -395,7 +395,7 @@ char *cheatGetNameIfUnlocked(struct menuitem *item)
return langGet(L_MPWEAPONS_074); // "----------"
}
s32 cheatMenuHandleDialog(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data)
MenuDialogHandlerResult cheatMenuHandleDialog(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data)
{
if (operation == MENUOP_OPEN) {
func0f14a52c();
@@ -802,7 +802,7 @@ char *cheatGetMarquee(struct menuitem *arg0)
return langGet(L_MPWEAPONS_142); // "Select cheat for information"
}
s32 cheatMenuHandleTurnOffAllCheats(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult cheatMenuHandleTurnOffAllCheats(s32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_SET) {
g_CheatsEnabledBank0 = 0;
@@ -864,7 +864,7 @@ struct menuitem g_CheatsFunMenuItems[] = {
MENUITEMTYPE_CHECKBOX,
CHEAT_DKMODE,
0,
(u32)&cheatGetNameIfUnlocked,
(uintptr_t)&cheatGetNameIfUnlocked,
0,
cheatCheckboxMenuHandler,
},
@@ -872,7 +872,7 @@ struct menuitem g_CheatsFunMenuItems[] = {
MENUITEMTYPE_CHECKBOX,
CHEAT_SMALLJO,
0,
(u32)&cheatGetNameIfUnlocked,
(uintptr_t)&cheatGetNameIfUnlocked,
0,
cheatCheckboxMenuHandler,
},
@@ -880,7 +880,7 @@ struct menuitem g_CheatsFunMenuItems[] = {
MENUITEMTYPE_CHECKBOX,
CHEAT_SMALLCHARACTERS,
0,
(u32)&cheatGetNameIfUnlocked,
(uintptr_t)&cheatGetNameIfUnlocked,
0,
cheatCheckboxMenuHandler,
},
@@ -888,7 +888,7 @@ struct menuitem g_CheatsFunMenuItems[] = {
MENUITEMTYPE_CHECKBOX,
CHEAT_TEAMHEADSONLY,
0,
(u32)&cheatGetNameIfUnlocked,
(uintptr_t)&cheatGetNameIfUnlocked,
0,
cheatCheckboxMenuHandler,
},
@@ -896,7 +896,7 @@ struct menuitem g_CheatsFunMenuItems[] = {
MENUITEMTYPE_CHECKBOX,
CHEAT_PLAYASELVIS,
0,
(u32)&cheatGetNameIfUnlocked,
(uintptr_t)&cheatGetNameIfUnlocked,
0,
cheatCheckboxMenuHandler,
},
@@ -904,7 +904,7 @@ struct menuitem g_CheatsFunMenuItems[] = {
MENUITEMTYPE_CHECKBOX,
CHEAT_SLOMO,
0,
(u32)&cheatGetNameIfUnlocked,
(uintptr_t)&cheatGetNameIfUnlocked,
0,
cheatCheckboxMenuHandler,
},
@@ -920,7 +920,7 @@ struct menuitem g_CheatsFunMenuItems[] = {
MENUITEMTYPE_MARQUEE,
0,
MENUITEMFLAG_SMALLFONT | MENUITEMFLAG_MARQUEE_FADEBOTHSIDES,
(u32)&cheatGetMarquee,
(uintptr_t)&cheatGetMarquee,
0,
NULL,
},
@@ -957,7 +957,7 @@ struct menuitem g_CheatsGameplayMenuItems[] = {
MENUITEMTYPE_CHECKBOX,
CHEAT_INVINCIBLE,
0,
(u32)&cheatGetNameIfUnlocked,
(uintptr_t)&cheatGetNameIfUnlocked,
0,
cheatCheckboxMenuHandler,
},
@@ -965,7 +965,7 @@ struct menuitem g_CheatsGameplayMenuItems[] = {
MENUITEMTYPE_CHECKBOX,
CHEAT_CLOAKINGDEVICE,
0,
(u32)&cheatGetNameIfUnlocked,
(uintptr_t)&cheatGetNameIfUnlocked,
0,
cheatCheckboxMenuHandler,
},
@@ -973,7 +973,7 @@ struct menuitem g_CheatsGameplayMenuItems[] = {
MENUITEMTYPE_CHECKBOX,
CHEAT_MARQUIS,
0,
(u32)&cheatGetNameIfUnlocked,
(uintptr_t)&cheatGetNameIfUnlocked,
0,
cheatCheckboxMenuHandler,
},
@@ -981,7 +981,7 @@ struct menuitem g_CheatsGameplayMenuItems[] = {
MENUITEMTYPE_CHECKBOX,
CHEAT_JOSHIELD,
0,
(u32)&cheatGetNameIfUnlocked,
(uintptr_t)&cheatGetNameIfUnlocked,
0,
cheatCheckboxMenuHandler,
},
@@ -989,7 +989,7 @@ struct menuitem g_CheatsGameplayMenuItems[] = {
MENUITEMTYPE_CHECKBOX,
CHEAT_SUPERSHIELD,
0,
(u32)&cheatGetNameIfUnlocked,
(uintptr_t)&cheatGetNameIfUnlocked,
0,
cheatCheckboxMenuHandler,
},
@@ -997,7 +997,7 @@ struct menuitem g_CheatsGameplayMenuItems[] = {
MENUITEMTYPE_CHECKBOX,
CHEAT_ENEMYSHIELDS,
0,
(u32)&cheatGetNameIfUnlocked,
(uintptr_t)&cheatGetNameIfUnlocked,
0,
cheatCheckboxMenuHandler,
},
@@ -1005,7 +1005,7 @@ struct menuitem g_CheatsGameplayMenuItems[] = {
MENUITEMTYPE_CHECKBOX,
CHEAT_ENEMYROCKETS,
0,
(u32)&cheatGetNameIfUnlocked,
(uintptr_t)&cheatGetNameIfUnlocked,
0,
cheatCheckboxMenuHandler,
},
@@ -1013,7 +1013,7 @@ struct menuitem g_CheatsGameplayMenuItems[] = {
MENUITEMTYPE_CHECKBOX,
CHEAT_PERFECTDARKNESS,
0,
(u32)&cheatGetNameIfUnlocked,
(uintptr_t)&cheatGetNameIfUnlocked,
0,
cheatCheckboxMenuHandler,
},
@@ -1029,7 +1029,7 @@ struct menuitem g_CheatsGameplayMenuItems[] = {
MENUITEMTYPE_MARQUEE,
0,
MENUITEMFLAG_SMALLFONT | MENUITEMFLAG_MARQUEE_FADEBOTHSIDES,
(u32)&cheatGetMarquee,
(uintptr_t)&cheatGetMarquee,
0,
NULL,
},
@@ -1066,7 +1066,7 @@ struct menuitem g_CheatsSoloWeaponsMenuItems[] = {
MENUITEMTYPE_CHECKBOX,
CHEAT_ROCKETLAUNCHER,
0,
(u32)&cheatGetNameIfUnlocked,
(uintptr_t)&cheatGetNameIfUnlocked,
0,
cheatCheckboxMenuHandler,
},
@@ -1074,7 +1074,7 @@ struct menuitem g_CheatsSoloWeaponsMenuItems[] = {
MENUITEMTYPE_CHECKBOX,
CHEAT_SNIPERRIFLE,
0,
(u32)&cheatGetNameIfUnlocked,
(uintptr_t)&cheatGetNameIfUnlocked,
0,
cheatCheckboxMenuHandler,
},
@@ -1082,7 +1082,7 @@ struct menuitem g_CheatsSoloWeaponsMenuItems[] = {
MENUITEMTYPE_CHECKBOX,
CHEAT_SUPERDRAGON,
0,
(u32)&cheatGetNameIfUnlocked,
(uintptr_t)&cheatGetNameIfUnlocked,
0,
cheatCheckboxMenuHandler,
},
@@ -1090,7 +1090,7 @@ struct menuitem g_CheatsSoloWeaponsMenuItems[] = {
MENUITEMTYPE_CHECKBOX,
CHEAT_LAPTOPGUN,
0,
(u32)&cheatGetNameIfUnlocked,
(uintptr_t)&cheatGetNameIfUnlocked,
0,
cheatCheckboxMenuHandler,
},
@@ -1098,7 +1098,7 @@ struct menuitem g_CheatsSoloWeaponsMenuItems[] = {
MENUITEMTYPE_CHECKBOX,
CHEAT_PHOENIX,
0,
(u32)&cheatGetNameIfUnlocked,
(uintptr_t)&cheatGetNameIfUnlocked,
0,
cheatCheckboxMenuHandler,
},
@@ -1106,7 +1106,7 @@ struct menuitem g_CheatsSoloWeaponsMenuItems[] = {
MENUITEMTYPE_CHECKBOX,
CHEAT_PSYCHOSISGUN,
0,
(u32)&cheatGetNameIfUnlocked,
(uintptr_t)&cheatGetNameIfUnlocked,
0,
cheatCheckboxMenuHandler,
},
@@ -1114,7 +1114,7 @@ struct menuitem g_CheatsSoloWeaponsMenuItems[] = {
MENUITEMTYPE_CHECKBOX,
CHEAT_TRENTSMAGNUM,
0,
(u32)&cheatGetNameIfUnlocked,
(uintptr_t)&cheatGetNameIfUnlocked,
0,
cheatCheckboxMenuHandler,
},
@@ -1122,7 +1122,7 @@ struct menuitem g_CheatsSoloWeaponsMenuItems[] = {
MENUITEMTYPE_CHECKBOX,
CHEAT_FARSIGHT,
0,
(u32)&cheatGetNameIfUnlocked,
(uintptr_t)&cheatGetNameIfUnlocked,
0,
cheatCheckboxMenuHandler,
},
@@ -1138,7 +1138,7 @@ struct menuitem g_CheatsSoloWeaponsMenuItems[] = {
MENUITEMTYPE_MARQUEE,
0,
MENUITEMFLAG_SMALLFONT | MENUITEMFLAG_MARQUEE_FADEBOTHSIDES,
(u32)&cheatGetMarquee,
(uintptr_t)&cheatGetMarquee,
0,
NULL,
},
@@ -1175,7 +1175,7 @@ struct menuitem g_CheatsClassicWeaponsMenuItems[] = {
MENUITEMTYPE_CHECKBOX,
CHEAT_PP9I,
0,
(u32)&cheatGetNameIfUnlocked,
(uintptr_t)&cheatGetNameIfUnlocked,
0,
cheatCheckboxMenuHandler,
},
@@ -1183,7 +1183,7 @@ struct menuitem g_CheatsClassicWeaponsMenuItems[] = {
MENUITEMTYPE_CHECKBOX,
CHEAT_CC13,
0,
(u32)&cheatGetNameIfUnlocked,
(uintptr_t)&cheatGetNameIfUnlocked,
0,
cheatCheckboxMenuHandler,
},
@@ -1191,7 +1191,7 @@ struct menuitem g_CheatsClassicWeaponsMenuItems[] = {
MENUITEMTYPE_CHECKBOX,
CHEAT_KL01313,
0,
(u32)&cheatGetNameIfUnlocked,
(uintptr_t)&cheatGetNameIfUnlocked,
0,
cheatCheckboxMenuHandler,
},
@@ -1199,7 +1199,7 @@ struct menuitem g_CheatsClassicWeaponsMenuItems[] = {
MENUITEMTYPE_CHECKBOX,
CHEAT_KF7SPECIAL,
0,
(u32)&cheatGetNameIfUnlocked,
(uintptr_t)&cheatGetNameIfUnlocked,
0,
cheatCheckboxMenuHandler,
},
@@ -1207,7 +1207,7 @@ struct menuitem g_CheatsClassicWeaponsMenuItems[] = {
MENUITEMTYPE_CHECKBOX,
CHEAT_ZZT,
0,
(u32)&cheatGetNameIfUnlocked,
(uintptr_t)&cheatGetNameIfUnlocked,
0,
cheatCheckboxMenuHandler,
},
@@ -1215,7 +1215,7 @@ struct menuitem g_CheatsClassicWeaponsMenuItems[] = {
MENUITEMTYPE_CHECKBOX,
CHEAT_DMC,
0,
(u32)&cheatGetNameIfUnlocked,
(uintptr_t)&cheatGetNameIfUnlocked,
0,
cheatCheckboxMenuHandler,
},
@@ -1223,7 +1223,7 @@ struct menuitem g_CheatsClassicWeaponsMenuItems[] = {
MENUITEMTYPE_CHECKBOX,
CHEAT_AR53,
0,
(u32)&cheatGetNameIfUnlocked,
(uintptr_t)&cheatGetNameIfUnlocked,
0,
cheatCheckboxMenuHandler,
},
@@ -1231,7 +1231,7 @@ struct menuitem g_CheatsClassicWeaponsMenuItems[] = {
MENUITEMTYPE_CHECKBOX,
CHEAT_RCP45,
0,
(u32)&cheatGetNameIfUnlocked,
(uintptr_t)&cheatGetNameIfUnlocked,
0,
cheatCheckboxMenuHandler,
},
@@ -1284,7 +1284,7 @@ struct menuitem g_CheatsWeaponsMenuItems[] = {
MENUITEMTYPE_CHECKBOX,
CHEAT_CLASSICSIGHT,
0,
(u32)&cheatGetNameIfUnlocked,
(uintptr_t)&cheatGetNameIfUnlocked,
0,
cheatCheckboxMenuHandler,
},
@@ -1292,7 +1292,7 @@ struct menuitem g_CheatsWeaponsMenuItems[] = {
MENUITEMTYPE_CHECKBOX,
CHEAT_UNLIMITEDAMMOLAPTOP,
0,
(u32)&cheatGetNameIfUnlocked,
(uintptr_t)&cheatGetNameIfUnlocked,
0,
cheatCheckboxMenuHandler,
},
@@ -1300,7 +1300,7 @@ struct menuitem g_CheatsWeaponsMenuItems[] = {
MENUITEMTYPE_CHECKBOX,
CHEAT_HURRICANEFISTS,
0,
(u32)&cheatGetNameIfUnlocked,
(uintptr_t)&cheatGetNameIfUnlocked,
0,
cheatCheckboxMenuHandler,
},
@@ -1308,7 +1308,7 @@ struct menuitem g_CheatsWeaponsMenuItems[] = {
MENUITEMTYPE_CHECKBOX,
CHEAT_UNLIMITEDAMMO,
0,
(u32)&cheatGetNameIfUnlocked,
(uintptr_t)&cheatGetNameIfUnlocked,
0,
cheatCheckboxMenuHandler,
},
@@ -1316,7 +1316,7 @@ struct menuitem g_CheatsWeaponsMenuItems[] = {
MENUITEMTYPE_CHECKBOX,
CHEAT_UNLIMITEDAMMONORELOADS,
0,
(u32)&cheatGetNameIfUnlocked,
(uintptr_t)&cheatGetNameIfUnlocked,
0,
cheatCheckboxMenuHandler,
},
@@ -1324,7 +1324,7 @@ struct menuitem g_CheatsWeaponsMenuItems[] = {
MENUITEMTYPE_CHECKBOX,
CHEAT_XRAYSCANNER,
0,
(u32)&cheatGetNameIfUnlocked,
(uintptr_t)&cheatGetNameIfUnlocked,
0,
cheatCheckboxMenuHandler,
},
@@ -1332,7 +1332,7 @@ struct menuitem g_CheatsWeaponsMenuItems[] = {
MENUITEMTYPE_CHECKBOX,
CHEAT_RTRACKER,
0,
(u32)&cheatGetNameIfUnlocked,
(uintptr_t)&cheatGetNameIfUnlocked,
0,
cheatCheckboxMenuHandler,
},
@@ -1340,7 +1340,7 @@ struct menuitem g_CheatsWeaponsMenuItems[] = {
MENUITEMTYPE_CHECKBOX,
CHEAT_ALLGUNS,
0,
(u32)&cheatGetNameIfUnlocked,
(uintptr_t)&cheatGetNameIfUnlocked,
0,
cheatCheckboxMenuHandler,
},
@@ -1356,7 +1356,7 @@ struct menuitem g_CheatsWeaponsMenuItems[] = {
MENUITEMTYPE_MARQUEE,
0,
MENUITEMFLAG_SMALLFONT | MENUITEMFLAG_MARQUEE_FADEBOTHSIDES,
(u32)&cheatGetMarquee,
(uintptr_t)&cheatGetMarquee,
0,
NULL,
},
@@ -1401,7 +1401,7 @@ struct menuitem g_CheatsBuddiesMenuItems[] = {
MENUITEMTYPE_CHECKBOX,
CHEAT_PUGILIST,
0,
(u32)&cheatGetNameIfUnlocked,
(uintptr_t)&cheatGetNameIfUnlocked,
0,
cheatMenuHandleBuddyCheckbox,
},
@@ -1409,7 +1409,7 @@ struct menuitem g_CheatsBuddiesMenuItems[] = {
MENUITEMTYPE_CHECKBOX,
CHEAT_HOTSHOT,
0,
(u32)&cheatGetNameIfUnlocked,
(uintptr_t)&cheatGetNameIfUnlocked,
0,
cheatMenuHandleBuddyCheckbox,
},
@@ -1417,7 +1417,7 @@ struct menuitem g_CheatsBuddiesMenuItems[] = {
MENUITEMTYPE_CHECKBOX,
CHEAT_HITANDRUN,
0,
(u32)&cheatGetNameIfUnlocked,
(uintptr_t)&cheatGetNameIfUnlocked,
0,
cheatMenuHandleBuddyCheckbox,
},
@@ -1425,7 +1425,7 @@ struct menuitem g_CheatsBuddiesMenuItems[] = {
MENUITEMTYPE_CHECKBOX,
CHEAT_ALIEN,
0,
(u32)&cheatGetNameIfUnlocked,
(uintptr_t)&cheatGetNameIfUnlocked,
0,
cheatMenuHandleBuddyCheckbox,
},
@@ -1441,7 +1441,7 @@ struct menuitem g_CheatsBuddiesMenuItems[] = {
MENUITEMTYPE_MARQUEE,
0,
MENUITEMFLAG_SMALLFONT | MENUITEMFLAG_MARQUEE_FADEBOTHSIDES,
(u32)&cheatGetMarquee,
(uintptr_t)&cheatGetMarquee,
0,
NULL,
},
+26 -26
View File
@@ -4290,13 +4290,13 @@ void chr0f0260c4(struct model *model, s32 hitpart, struct modelnode *node, struc
// use the space... after the model definition's colour table?
// Let's hope that's not being used by other instances...
if (rwdata->gdl == rodata->opagdl) {
gdlptr = (Gfx *)((u32)rodata->colourtable + ((u32)rodata->opagdl & 0xffffff));
gdlptr = (Gfx *)((uintptr_t)rodata->colourtable + ((uintptr_t)rodata->opagdl & 0xffffff));
} else {
gdlptr = rwdata->gdl;
}
if (rodata->xlugdl) {
gdlptr2 = (Gfx *)((u32)rodata->colourtable + ((u32)rodata->xlugdl & 0xffffff));
gdlptr2 = (Gfx *)((uintptr_t)rodata->colourtable + ((uintptr_t)rodata->xlugdl & 0xffffff));
} else {
gdlptr2 = NULL;
}
@@ -4324,7 +4324,7 @@ void chr0f0260c4(struct model *model, s32 hitpart, struct modelnode *node, struc
s32 numverts;
s32 i;
vertices = (struct gfxvtx *)((u32)rodata->vertices + word);
vertices = (struct gfxvtx *)((uintptr_t)rodata->vertices + word);
numverts = (u32)ptr[1] / 16 + 1;
if (posnode) {
@@ -4409,13 +4409,13 @@ void chr0f0260c4(struct model *model, s32 hitpart, struct modelnode *node, struc
}
if (rwdata->gdl == rodata->opagdl) {
gdlptr = (Gfx *)((u32)rodata->colourtable + ((u32)rodata->opagdl & 0xffffff));
gdlptr = (Gfx *)((uintptr_t)rodata->colourtable + ((u32)rodata->opagdl & 0xffffff));
} else {
gdlptr = rwdata->gdl;
}
if (rodata->xlugdl) {
gdlptr2 = (Gfx *)((u32)rodata->colourtable + ((u32)rodata->xlugdl & 0xffffff));
gdlptr2 = (Gfx *)((uintptr_t)rodata->colourtable + ((u32)rodata->xlugdl & 0xffffff));
} else {
gdlptr2 = NULL;
}
@@ -4438,7 +4438,7 @@ void chr0f0260c4(struct model *model, s32 hitpart, struct modelnode *node, struc
if (op == G_VTX) {
u8 *ptr = (u8 *)&gdlptr->words.w0;
u32 word = gdlptr->words.w1 & 0xffffff;
struct gfxvtx *vertices = (struct gfxvtx *)((u32)rodata->vertices + word);
struct gfxvtx *vertices = (struct gfxvtx *)((uintptr_t)rodata->vertices + word);
s32 numverts = (u32)ptr[1] / 16 + 1;
s32 i;
@@ -4449,9 +4449,9 @@ void chr0f0260c4(struct model *model, s32 hitpart, struct modelnode *node, struc
s32 z = vertices[i].z + (s32)spd4.f[2];
if (x == bestcoords[0] && y == bestcoords[1] && z == bestcoords[2]) {
u32 tmp = ALIGN8((u32)&rodata->vertices[(u32)rodata->numvertices]); // u32 0xc
u32 tmp = ALIGN8((uintptr_t)&rodata->vertices[(u32)rodata->numvertices]); // u32 0xc
if ((u32)rwdata->colours == tmp) {
if ((uintptr_t)rwdata->colours == tmp) {
struct colour *colours = vtxstoreAllocate(rodata->numcolours, VTXSTORETYPE_CHRCOL, 0, 0);
s32 j;
@@ -4462,15 +4462,15 @@ void chr0f0260c4(struct model *model, s32 hitpart, struct modelnode *node, struc
rwdata->colours = colours;
tmp = ALIGN8((s32)&rodata->vertices[rodata->numvertices]); // s32 0xc
tmp = ALIGN8((intptr_t)&rodata->vertices[rodata->numvertices]); // s32 0xc
} else {
tmp = ALIGN8((s32)&rodata->vertices[rodata->numvertices]); // s32 0xc
tmp = ALIGN8((intptr_t)&rodata->vertices[rodata->numvertices]); // s32 0xc
}
}
if ((u32)rwdata->colours != tmp) {
if ((uintptr_t)rwdata->colours != tmp) {
u32 offset = rwdata->vertices[word / 12u + i].colour >> 2; // u32 0xc (both divide and mult)
struct colour *colours = (struct colour *) ((u32)rwdata->colours + spac);
struct colour *colours = (struct colour *) ((uintptr_t)rwdata->colours + spac);
colours[offset].a = alpha;
}
@@ -4570,13 +4570,13 @@ void chrBruise(struct model *model, s32 hitpart, struct modelnode *node, struct
// use the space... after the model definition's colour table?
// Let's hope that's not being used by other instances...
if (rwdata->gdl == rodata->opagdl) {
gdlptr = (Gfx *)((u32)rodata->colourtable + ((u32)rodata->opagdl & 0xffffff));
gdlptr = (Gfx *)((uintptr_t)rodata->colourtable + ((u32)rodata->opagdl & 0xffffff));
} else {
gdlptr = rwdata->gdl;
}
if (rodata->xlugdl) {
gdlptr2 = (Gfx *)((u32)rodata->colourtable + ((u32)rodata->xlugdl & 0xffffff));
gdlptr2 = (Gfx *)((uintptr_t)rodata->colourtable + ((u32)rodata->xlugdl & 0xffffff));
} else {
gdlptr2 = NULL;
}
@@ -4604,7 +4604,7 @@ void chrBruise(struct model *model, s32 hitpart, struct modelnode *node, struct
s32 numverts;
s32 i;
vertices = (struct gfxvtx *)((u32)rodata->vertices + word);
vertices = (struct gfxvtx *)((uintptr_t)rodata->vertices + word);
numverts = (u32)ptr[1] / 16 + 1;
if (posnode) {
@@ -4708,13 +4708,13 @@ void chrBruise(struct model *model, s32 hitpart, struct modelnode *node, struct
}
if (rwdata->gdl == rodata->opagdl) {
gdlptr = (Gfx *)((u32)rodata->colourtable + ((u32)rodata->opagdl & 0xffffff));
gdlptr = (Gfx *)((uintptr_t)rodata->colourtable + ((u32)rodata->opagdl & 0xffffff));
} else {
gdlptr = rwdata->gdl;
}
if (rodata->xlugdl) {
gdlptr2 = (Gfx *)((u32)rodata->colourtable + ((u32)rodata->xlugdl & 0xffffff));
gdlptr2 = (Gfx *)((uintptr_t)rodata->colourtable + ((u32)rodata->xlugdl & 0xffffff));
} else {
gdlptr2 = NULL;
}
@@ -4737,7 +4737,7 @@ void chrBruise(struct model *model, s32 hitpart, struct modelnode *node, struct
if (op == G_VTX) {
u8 *ptr = (u8 *)&gdlptr->words.w0;
u32 word = gdlptr->words.w1 & 0xffffff;
struct gfxvtx *vertices = (struct gfxvtx *)((u32)rodata->vertices + word);
struct gfxvtx *vertices = (struct gfxvtx *)((uintptr_t)rodata->vertices + word);
s32 numverts = (u32)ptr[1] / 16 + 1;
s32 i;
@@ -4752,7 +4752,7 @@ void chrBruise(struct model *model, s32 hitpart, struct modelnode *node, struct
coordinate = vertices[i].z + (s32)spd4.f[2];
if (coordinate == bestcoords[2]) {
if ((u32)rwdata->colours == ALIGN8((u32)rodata->vertices + rodata->numvertices * sizeof(struct gfxvtx))) {
if ((uintptr_t)rwdata->colours == ALIGN8((u32)rodata->vertices + rodata->numvertices * sizeof(struct gfxvtx))) {
struct colour *colours = vtxstoreAllocate(rodata->numcolours, VTXSTORETYPE_CHRCOL, 0, 0);
s32 j;
@@ -4765,9 +4765,9 @@ void chrBruise(struct model *model, s32 hitpart, struct modelnode *node, struct
}
}
if ((u32)rwdata->colours != ALIGN8((u32)rodata->vertices + rodata->numvertices * sizeof(struct gfxvtx))) {
if ((uintptr_t)rwdata->colours != ALIGN8((uintptr_t)rodata->vertices + rodata->numvertices * sizeof(struct gfxvtx))) {
s32 offset = rwdata->vertices[word / sizeof(struct gfxvtx) + i].colour >> 2;
struct colour *colours = (struct colour *) ((u32)rwdata->colours + spac);
struct colour *colours = (struct colour *) ((uintptr_t)rwdata->colours + spac);
colours[offset].a = alpha;
}
@@ -4882,7 +4882,7 @@ void chrDisfigure(struct chrdata *chr, struct coord *exppos, f32 damageradius)
}
// Copy the colours from the modeldef to the vtxstore
if ((u32)rwdata->colours == ALIGN8((u32)&rodata->vertices[rodata->numvertices])) {
if ((uintptr_t)rwdata->colours == ALIGN8((uintptr_t)&rodata->vertices[rodata->numvertices])) {
colours = vtxstoreAllocate(rodata->numcolours, VTXSTORETYPE_CHRCOL, 0, 0);
if (colours) {
@@ -4897,15 +4897,15 @@ void chrDisfigure(struct chrdata *chr, struct coord *exppos, f32 damageradius)
// Iterate the node's primary and secondary DLs, looking for
// MTX and VTX pointers
if (rwdata->vertices != rodata->vertices
&& (u32)rwdata->colours != ALIGN8((u32)&rodata->vertices[rodata->numvertices])) {
&& (uintptr_t)rwdata->colours != ALIGN8((uintptr_t)&rodata->vertices[rodata->numvertices])) {
if (rwdata->gdl == rodata->opagdl) {
gdlptr = (Gfx *)((u32)rodata->colourtable + ((s32)rodata->opagdl & 0xffffff));
gdlptr = (Gfx *)((uintptr_t)rodata->colourtable + ((s32)rodata->opagdl & 0xffffff));
} else {
gdlptr = rwdata->gdl;
}
if (rodata->xlugdl) {
gdlptr2 = (Gfx *)((u32)rodata->colourtable + ((s32)rodata->xlugdl & 0xffffff));
gdlptr2 = (Gfx *)((uintptr_t)rodata->colourtable + ((s32)rodata->xlugdl & 0xffffff));
} else {
gdlptr2 = NULL;
}
@@ -4932,7 +4932,7 @@ void chrDisfigure(struct chrdata *chr, struct coord *exppos, f32 damageradius)
s32 word = gdlptr->words.w1 & 0xffffff;
s32 numverts;
vertices = (struct gfxvtx *)((u32)rwdata->vertices + word);
vertices = (struct gfxvtx *)((uintptr_t)rwdata->vertices + word);
numverts = (u32)ptr[1] / 16 + 1;
if (posnode) {
+1 -1
View File
@@ -729,7 +729,7 @@ void chraiExecute(void *entity, s32 proptype)
if (g_Vars.chrdata->aishootingatmelist >= 0
&& ailistFindById(g_Vars.chrdata->aishootingatmelist) != g_Vars.chrdata->ailist
&& g_Vars.chrdata->dodgerating > (u32)random() % 100
&& g_Vars.chrdata->dodgerating > random() % 100
&& chrHasFlag(g_Vars.chrdata, CHRFLAG1_INDARKROOM, BANK_1) == 0
&& chrHasFlag(g_Vars.chrdata, CHRFLAG0_AIVSAI, BANK_0) == 0
&& ailistFindById(g_Vars.chrdata->aishootingatmelist) != g_Vars.chrdata->ailist
+2 -2
View File
@@ -2206,8 +2206,8 @@ void roomHighlight(s32 roomnum)
g_Rooms[roomnum].colours = dst;
extra = g_Rooms[roomnum].unk52;
src = (struct colour *)((u32)g_Rooms[roomnum].gfxdata->vertices + g_Rooms[roomnum].gfxdata->numvertices * sizeof(struct gfxvtx));
src = (struct colour *)ALIGN8((s32)src);
src = (struct colour *)((uintptr_t)g_Rooms[roomnum].gfxdata->vertices + g_Rooms[roomnum].gfxdata->numvertices * sizeof(struct gfxvtx));
src = (struct colour *)ALIGN8((uintptr_t)src);
if (g_Rooms[roomnum].flags & ROOMFLAG_RENDERALWAYS) {
g_Rooms[roomnum].colours = src;
+52 -52
View File
@@ -31,7 +31,7 @@
#include "data.h"
#include "types.h"
s32 endscreenHandleDeclineMission(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult endscreenHandleDeclineMission(s32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_SET) {
menuPopDialog();
@@ -41,7 +41,7 @@ s32 endscreenHandleDeclineMission(s32 operation, struct menuitem *item, union ha
return 0;
}
s32 endscreenHandleRetryMission(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data)
MenuDialogHandlerResult endscreenHandleRetryMission(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data)
{
switch (operation) {
case MENUOP_TICK:
@@ -129,7 +129,7 @@ char *endscreenMenuTitleNextMission(struct menudialogdef *dialogdef)
return g_StringPointer;
}
s32 endscreenHandleReplayPreviousMission(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult endscreenHandleReplayPreviousMission(s32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_SET) {
g_MissionConfig.stageindex--;
@@ -169,7 +169,7 @@ struct menuitem g_RetryMissionMenuItems[] = {
struct menudialogdef g_RetryMissionMenuDialog = {
MENUDIALOGTYPE_DEFAULT,
(u32)&endscreenMenuTitleRetryMission,
(uintptr_t)&endscreenMenuTitleRetryMission,
g_RetryMissionMenuItems,
endscreenHandleRetryMission,
MENUDIALOGFLAG_STARTSELECTS | MENUDIALOGFLAG_DISABLEITEMSCROLL,
@@ -222,7 +222,7 @@ struct menuitem g_NextMissionMenuItems[] = {
struct menudialogdef g_NextMissionMenuDialog = {
MENUDIALOGTYPE_DEFAULT,
(u32)&endscreenMenuTitleNextMission,
(uintptr_t)&endscreenMenuTitleNextMission,
g_NextMissionMenuItems,
endscreenHandleRetryMission,
MENUDIALOGFLAG_STARTSELECTS | MENUDIALOGFLAG_DISABLEITEMSCROLL,
@@ -448,7 +448,7 @@ void endscreen0f10d770(void)
}
#if VERSION >= VERSION_NTSC_1_0
s32 endscreenHandleReplayLastLevel(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult endscreenHandleReplayLastLevel(s32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_SET) {
g_MissionConfig.stagenum = g_StageNames[g_MissionConfig.stageindex].stagenum;
@@ -555,7 +555,7 @@ struct menudialogdef g_2PMissionEndscreenObjectivesCompletedVMenuDialog = {
/**
* Displayed after Defense and Skedar Ruins completion screens.
*/
s32 endscreenHandleContinueMission(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult endscreenHandleContinueMission(s32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_SET) {
endscreenContinue(2);
@@ -588,7 +588,7 @@ struct menuitem g_MissionContinueOrReplyMenuItems[] = {
struct menudialogdef g_MissionContinueOrReplyMenuDialog = {
MENUDIALOGTYPE_DEFAULT,
(u32)&endscreenMenuTextCurrentStageName3,
(uintptr_t)&endscreenMenuTextCurrentStageName3,
g_MissionContinueOrReplyMenuItems,
NULL,
MENUDIALOGFLAG_STARTSELECTS,
@@ -700,7 +700,7 @@ void endscreenContinue(s32 context)
}
#endif
s32 endscreenHandle2PCompleted(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data)
MenuDialogHandlerResult endscreenHandle2PCompleted(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data)
{
if (operation == MENUOP_OPEN) {
g_Menus[g_MpPlayerNum].endscreen.unke1c = 0;
@@ -761,7 +761,7 @@ s32 endscreenHandle2PCompleted(s32 operation, struct menudialogdef *dialogdef, u
return 0;
}
s32 endscreenHandle2PFailed(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data)
MenuDialogHandlerResult endscreenHandle2PFailed(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data)
{
if (operation == MENUOP_OPEN) {
g_Menus[g_MpPlayerNum].endscreen.unke1c = 0;
@@ -816,7 +816,7 @@ struct menuitem g_2PMissionEndscreenVMenuItems[] = {
MENUITEMTYPE_LABEL,
0,
MENUITEMFLAG_SELECTABLE_CENTRE,
(u32)&endscreenMenuTextMissionStatus,
(uintptr_t)&endscreenMenuTextMissionStatus,
0,
NULL,
},
@@ -832,7 +832,7 @@ struct menuitem g_2PMissionEndscreenVMenuItems[] = {
MENUITEMTYPE_LABEL,
0,
MENUITEMFLAG_SELECTABLE_CENTRE,
(u32)&endscreenMenuTextAgentStatus,
(uintptr_t)&endscreenMenuTextAgentStatus,
0,
NULL,
},
@@ -848,7 +848,7 @@ struct menuitem g_2PMissionEndscreenVMenuItems[] = {
MENUITEMTYPE_LABEL,
0,
MENUITEMFLAG_SELECTABLE_CENTRE,
(u32)&endscreenMenuTextMissionTime,
(uintptr_t)&endscreenMenuTextMissionTime,
0,
NULL,
},
@@ -864,7 +864,7 @@ struct menuitem g_2PMissionEndscreenVMenuItems[] = {
MENUITEMTYPE_LABEL,
0,
MENUITEMFLAG_SELECTABLE_CENTRE,
(u32)soloMenuTextDifficulty,
(uintptr_t)soloMenuTextDifficulty,
0,
NULL,
},
@@ -888,7 +888,7 @@ struct menuitem g_2PMissionEndscreenVMenuItems[] = {
MENUITEMTYPE_LABEL,
0,
MENUITEMFLAG_SELECTABLE_CENTRE,
(u32)&mpMenuTextWeaponOfChoiceName,
(uintptr_t)&mpMenuTextWeaponOfChoiceName,
0,
NULL,
},
@@ -905,7 +905,7 @@ struct menuitem g_2PMissionEndscreenVMenuItems[] = {
0,
0,
L_OPTIONS_282, // "Kills:"
(u32)&endscreenMenuTextNumKills,
(uintptr_t)&endscreenMenuTextNumKills,
NULL,
},
{
@@ -913,7 +913,7 @@ struct menuitem g_2PMissionEndscreenVMenuItems[] = {
0,
0,
L_OPTIONS_283, // "Accuracy:"
(u32)&endscreenMenuTextAccuracy,
(uintptr_t)&endscreenMenuTextAccuracy,
NULL,
},
{
@@ -929,7 +929,7 @@ struct menuitem g_2PMissionEndscreenVMenuItems[] = {
0,
0,
L_OPTIONS_284, // "Shot Total:"
(u32)&endscreenMenuTextNumShots,
(uintptr_t)&endscreenMenuTextNumShots,
NULL,
},
{
@@ -937,7 +937,7 @@ struct menuitem g_2PMissionEndscreenVMenuItems[] = {
0,
MENUITEMFLAG_SMALLFONT,
L_OPTIONS_285, // "Head Shots:"
(u32)&endscreenMenuTextNumHeadShots,
(uintptr_t)&endscreenMenuTextNumHeadShots,
NULL,
},
{
@@ -945,7 +945,7 @@ struct menuitem g_2PMissionEndscreenVMenuItems[] = {
0,
MENUITEMFLAG_SMALLFONT,
L_OPTIONS_286, // "Body Shots:"
(u32)&endscreenMenuTextNumBodyShots,
(uintptr_t)&endscreenMenuTextNumBodyShots,
NULL,
},
{
@@ -953,7 +953,7 @@ struct menuitem g_2PMissionEndscreenVMenuItems[] = {
0,
MENUITEMFLAG_SMALLFONT,
L_OPTIONS_287, // "Limb Shots:"
(u32)&endscreenMenuTextNumLimbShots,
(uintptr_t)&endscreenMenuTextNumLimbShots,
NULL,
},
{
@@ -961,7 +961,7 @@ struct menuitem g_2PMissionEndscreenVMenuItems[] = {
0,
MENUITEMFLAG_SMALLFONT,
L_OPTIONS_288, // "Others:"
(u32)&endscreenMenuTextNumOtherShots,
(uintptr_t)&endscreenMenuTextNumOtherShots,
NULL,
},
{
@@ -996,7 +996,7 @@ struct menuitem g_2PMissionEndscreenVMenuItems[] = {
* 5 = timed cheat name
* 6 = limb shots
*/
s32 endscreenHandleCheatInfo(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult endscreenHandleCheatInfo(s32 operation, struct menuitem *item, union handlerdata *data)
{
static u32 cheatcolour = 0xff7f7fff;
@@ -1067,7 +1067,7 @@ struct menuitem g_MissionEndscreenMenuItems[] = {
0,
0,
L_OPTIONS_278, // "Mission Status:"
(u32)&endscreenMenuTextMissionStatus,
(uintptr_t)&endscreenMenuTextMissionStatus,
NULL,
},
{
@@ -1075,7 +1075,7 @@ struct menuitem g_MissionEndscreenMenuItems[] = {
0,
0,
L_OPTIONS_279, // "Agent Status:"
(u32)&endscreenMenuTextAgentStatus,
(uintptr_t)&endscreenMenuTextAgentStatus,
NULL,
},
#if VERSION >= VERSION_NTSC_1_0
@@ -1084,7 +1084,7 @@ struct menuitem g_MissionEndscreenMenuItems[] = {
0,
MENUITEMFLAG_LABEL_CUSTOMCOLOUR,
L_OPTIONS_280, // "Mission Time:"
(u32)&endscreenMenuTextMissionTime,
(uintptr_t)&endscreenMenuTextMissionTime,
endscreenHandleCheatInfo,
},
{
@@ -1092,7 +1092,7 @@ struct menuitem g_MissionEndscreenMenuItems[] = {
1,
MENUITEMFLAG_LABEL_CUSTOMCOLOUR,
L_MPWEAPONS_242, // "Target Time:"
(u32)&endscreenMenuTextTargetTime,
(uintptr_t)&endscreenMenuTextTargetTime,
endscreenHandleCheatInfo,
},
{
@@ -1100,7 +1100,7 @@ struct menuitem g_MissionEndscreenMenuItems[] = {
0,
0,
L_MPWEAPONS_129, // "Difficulty:"
(u32)&soloMenuTextDifficulty,
(uintptr_t)&soloMenuTextDifficulty,
NULL,
},
{
@@ -1123,7 +1123,7 @@ struct menuitem g_MissionEndscreenMenuItems[] = {
MENUITEMTYPE_LABEL,
3,
MENUITEMFLAG_SELECTABLE_CENTRE | MENUITEMFLAG_LABEL_CUSTOMCOLOUR,
(u32)&endscreenMenuTextTimedCheatName,
(uintptr_t)&endscreenMenuTextTimedCheatName,
0,
endscreenHandleCheatInfo,
},
@@ -1131,7 +1131,7 @@ struct menuitem g_MissionEndscreenMenuItems[] = {
MENUITEMTYPE_LABEL,
5,
MENUITEMFLAG_SELECTABLE_CENTRE | MENUITEMFLAG_LABEL_CUSTOMCOLOUR,
(u32)&endscreenMenuTextCompletionCheatName,
(uintptr_t)&endscreenMenuTextCompletionCheatName,
0,
endscreenHandleCheatInfo,
},
@@ -1148,7 +1148,7 @@ struct menuitem g_MissionEndscreenMenuItems[] = {
0,
0,
L_OPTIONS_281, // "Weapon of Choice:"
(u32)&mpMenuTextWeaponOfChoiceName,
(uintptr_t)&mpMenuTextWeaponOfChoiceName,
NULL,
},
{
@@ -1156,7 +1156,7 @@ struct menuitem g_MissionEndscreenMenuItems[] = {
0,
0,
L_OPTIONS_282, // "Kills:"
(u32)&endscreenMenuTextNumKills,
(uintptr_t)&endscreenMenuTextNumKills,
NULL,
},
{
@@ -1164,7 +1164,7 @@ struct menuitem g_MissionEndscreenMenuItems[] = {
0,
0,
L_OPTIONS_283, // "Accuracy:"
(u32)&endscreenMenuTextAccuracy,
(uintptr_t)&endscreenMenuTextAccuracy,
NULL,
},
{
@@ -1180,7 +1180,7 @@ struct menuitem g_MissionEndscreenMenuItems[] = {
0,
0,
L_OPTIONS_284, // "Shot Total:"
(u32)&endscreenMenuTextNumShots,
(uintptr_t)&endscreenMenuTextNumShots,
NULL,
},
{
@@ -1188,7 +1188,7 @@ struct menuitem g_MissionEndscreenMenuItems[] = {
0,
0,
L_OPTIONS_285, // "Head Shots:"
(u32)&endscreenMenuTextNumHeadShots,
(uintptr_t)&endscreenMenuTextNumHeadShots,
NULL,
},
{
@@ -1196,7 +1196,7 @@ struct menuitem g_MissionEndscreenMenuItems[] = {
0,
0,
L_OPTIONS_286, // "Body Shots:"
(u32)&endscreenMenuTextNumBodyShots,
(uintptr_t)&endscreenMenuTextNumBodyShots,
NULL,
},
{
@@ -1204,7 +1204,7 @@ struct menuitem g_MissionEndscreenMenuItems[] = {
6,
0,
L_OPTIONS_287, // "Limb Shots:"
(u32)&endscreenMenuTextNumLimbShots,
(uintptr_t)&endscreenMenuTextNumLimbShots,
endscreenHandleCheatInfo,
},
{
@@ -1212,7 +1212,7 @@ struct menuitem g_MissionEndscreenMenuItems[] = {
4,
0,
L_OPTIONS_288, // "Others:"
(u32)&endscreenMenuTextNumOtherShots,
(uintptr_t)&endscreenMenuTextNumOtherShots,
endscreenHandleCheatInfo,
},
#else
@@ -1222,7 +1222,7 @@ struct menuitem g_MissionEndscreenMenuItems[] = {
0,
0,
L_OPTIONS_280, // "Mission Time:"
(u32)&endscreenMenuTextMissionTime,
(uintptr_t)&endscreenMenuTextMissionTime,
NULL,
},
{
@@ -1230,7 +1230,7 @@ struct menuitem g_MissionEndscreenMenuItems[] = {
0,
0,
L_MPWEAPONS_129, // "Difficulty:"
(u32)&soloMenuTextDifficulty,
(uintptr_t)&soloMenuTextDifficulty,
NULL,
},
{
@@ -1246,7 +1246,7 @@ struct menuitem g_MissionEndscreenMenuItems[] = {
0,
0,
L_OPTIONS_281, // "Weapon of Choice:"
(u32)&mpMenuTextWeaponOfChoiceName,
(uintptr_t)&mpMenuTextWeaponOfChoiceName,
NULL,
},
{
@@ -1254,7 +1254,7 @@ struct menuitem g_MissionEndscreenMenuItems[] = {
0,
0,
L_OPTIONS_282, // "Kills:"
(u32)&endscreenMenuTextNumKills,
(uintptr_t)&endscreenMenuTextNumKills,
NULL,
},
{
@@ -1262,7 +1262,7 @@ struct menuitem g_MissionEndscreenMenuItems[] = {
0,
0,
L_OPTIONS_283, // "Accuracy:"
(u32)&endscreenMenuTextAccuracy,
(uintptr_t)&endscreenMenuTextAccuracy,
NULL,
},
{
@@ -1278,7 +1278,7 @@ struct menuitem g_MissionEndscreenMenuItems[] = {
0,
0,
L_OPTIONS_284, // "Shot Total:"
(u32)&endscreenMenuTextNumShots,
(uintptr_t)&endscreenMenuTextNumShots,
NULL,
},
{
@@ -1286,7 +1286,7 @@ struct menuitem g_MissionEndscreenMenuItems[] = {
0,
0,
L_OPTIONS_285, // "Head Shots:"
(u32)&endscreenMenuTextNumHeadShots,
(uintptr_t)&endscreenMenuTextNumHeadShots,
NULL,
},
{
@@ -1294,7 +1294,7 @@ struct menuitem g_MissionEndscreenMenuItems[] = {
0,
0,
L_OPTIONS_286, // "Body Shots:"
(u32)&endscreenMenuTextNumBodyShots,
(uintptr_t)&endscreenMenuTextNumBodyShots,
NULL,
},
{
@@ -1302,7 +1302,7 @@ struct menuitem g_MissionEndscreenMenuItems[] = {
0,
0,
L_OPTIONS_287, // "Limb Shots:"
(u32)&endscreenMenuTextNumLimbShots,
(uintptr_t)&endscreenMenuTextNumLimbShots,
NULL,
},
{
@@ -1310,7 +1310,7 @@ struct menuitem g_MissionEndscreenMenuItems[] = {
0,
0,
L_OPTIONS_288, // "Others:"
(u32)&endscreenMenuTextNumOtherShots,
(uintptr_t)&endscreenMenuTextNumOtherShots,
NULL,
},
#endif
@@ -1393,7 +1393,7 @@ void endscreenSetCoopCompleted(void)
struct menudialogdef g_SoloMissionEndscreenCompletedMenuDialog = {
MENUDIALOGTYPE_SUCCESS,
(u32)&endscreenMenuTitleStageCompleted,
(uintptr_t)&endscreenMenuTitleStageCompleted,
g_MissionEndscreenMenuItems,
endscreenHandle2PCompleted,
MENUDIALOGFLAG_DISABLEITEMSCROLL | MENUDIALOGFLAG_SMOOTHSCROLLABLE,
@@ -1402,7 +1402,7 @@ struct menudialogdef g_SoloMissionEndscreenCompletedMenuDialog = {
struct menudialogdef g_SoloMissionEndscreenFailedMenuDialog = {
MENUDIALOGTYPE_DANGER,
(u32)&endscreenMenuTitleStageFailed,
(uintptr_t)&endscreenMenuTitleStageFailed,
g_MissionEndscreenMenuItems,
endscreenHandle2PFailed,
MENUDIALOGFLAG_DISABLEITEMSCROLL | MENUDIALOGFLAG_SMOOTHSCROLLABLE,
@@ -1637,7 +1637,7 @@ void endscreenPrepare(void)
struct menudialogdef g_2PMissionEndscreenCompletedHMenuDialog = {
MENUDIALOGTYPE_SUCCESS,
(u32)&endscreenMenuTitleStageCompleted,
(uintptr_t)&endscreenMenuTitleStageCompleted,
g_MissionEndscreenMenuItems,
endscreenHandle2PCompleted,
MENUDIALOGFLAG_DISABLEITEMSCROLL | MENUDIALOGFLAG_SMOOTHSCROLLABLE,
@@ -1646,7 +1646,7 @@ struct menudialogdef g_2PMissionEndscreenCompletedHMenuDialog = {
struct menudialogdef g_2PMissionEndscreenFailedHMenuDialog = {
MENUDIALOGTYPE_DANGER,
(u32)&endscreenMenuTitleStageFailed,
(uintptr_t)&endscreenMenuTitleStageFailed,
g_MissionEndscreenMenuItems,
endscreenHandle2PFailed,
MENUDIALOGFLAG_DISABLEITEMSCROLL | MENUDIALOGFLAG_SMOOTHSCROLLABLE,
+2021 -2021
View File
File diff suppressed because it is too large Load Diff
+66 -66
View File
@@ -62,7 +62,7 @@ struct menudialogdef g_FilemgrRenameMenuDialog;
#endif
#if PAL
s32 filemgrHandleSetLanguage(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult filemgrHandleSetLanguage(s32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_SET) {
g_Vars.language = item->param;
@@ -163,7 +163,7 @@ char *filemgrGetDeviceName(s32 index)
return NULL;
}
s32 filemgrDeviceNameMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult filemgrDeviceNameMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_CHECKHIDDEN) {
if ((g_Menus[g_MpPlayerNum].fm.device1 & 0x7f) >= SAVEDEVICE_INVALID) {
@@ -231,7 +231,7 @@ const char var7f1b2f28[] = "Setup: item = %x\n";
// game, mpsetup, mpplayer, perfect head
const u32 g_FileTypeSizes[] = {0xa0, 0x31, 0x4e, 0x4a0};
s32 filemgrFileNameMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult filemgrFileNameMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_CHECKHIDDEN) {
if (g_Menus[g_MpPlayerNum].fm.filetodelete == 0) {
@@ -307,7 +307,7 @@ char *filemgr0f108484(struct menuitem *item)
return g_StringPointer;
}
s32 filemgrDeviceNameForErrorMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult filemgrDeviceNameForErrorMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_CHECKHIDDEN) {
if ((g_Menus[g_MpPlayerNum].fm.device1 & 0x7f) >= SAVEDEVICE_INVALID) {
@@ -375,7 +375,7 @@ struct menuitem g_FilemgrErrorMenuItems[] = {
MENUITEMTYPE_LABEL,
0,
MENUITEMFLAG_LESSLEFTPADDING,
(u32)&filemgrMenuTextDeviceNameForError,
(uintptr_t) &filemgrMenuTextDeviceNameForError,
0,
filemgrDeviceNameForErrorMenuHandler,
},
@@ -383,7 +383,7 @@ struct menuitem g_FilemgrErrorMenuItems[] = {
MENUITEMTYPE_LABEL,
0,
MENUITEMFLAG_LESSLEFTPADDING,
(u32)&filemgrMenuTextFailReason,
(uintptr_t) &filemgrMenuTextFailReason,
0,
NULL,
},
@@ -584,7 +584,7 @@ void filemgrHandleSuccess(void)
}
}
s32 filemgrRetrySaveMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult filemgrRetrySaveMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_SET) {
filemgrRetrySave(2);
@@ -593,7 +593,7 @@ s32 filemgrRetrySaveMenuHandler(s32 operation, struct menuitem *item, union hand
return 0;
}
s32 filemgrSaveElsewhereYesMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult filemgrSaveElsewhereYesMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_SET) {
s32 filetype;
@@ -623,7 +623,7 @@ s32 filemgrSaveElsewhereYesMenuHandler(s32 operation, struct menuitem *item, uni
return 0;
}
s32 filemgrCancelSave2MenuHandler(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult filemgrCancelSave2MenuHandler(s32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_SET) {
menuCloseDialog();
@@ -637,7 +637,7 @@ s32 filemgrCancelSave2MenuHandler(s32 operation, struct menuitem *item, union ha
/**
* Unused.
*/
s32 filemgr0f108d14(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult filemgr0f108d14(s32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_SET) {
filemgrRetrySave(2);
@@ -646,7 +646,7 @@ s32 filemgr0f108d14(s32 operation, struct menuitem *item, union handlerdata *dat
return 0;
}
s32 filemgrAcknowledgeFileLostMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult filemgrAcknowledgeFileLostMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_SET) {
menuCloseDialog();
@@ -679,7 +679,7 @@ void filemgrEraseCorruptFile(void)
}
#endif
s32 filemgrInsertOriginalPakMenuDialog(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data)
MenuDialogHandlerResult filemgrInsertOriginalPakMenuDialog(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data)
{
if (operation == MENUOP_TICK) {
if (g_Menus[g_MpPlayerNum].curdialog &&
@@ -691,7 +691,7 @@ s32 filemgrInsertOriginalPakMenuDialog(s32 operation, struct menudialogdef *dial
return false;
}
s32 filemgrReinsertedOkMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult filemgrReinsertedOkMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_SET) {
pakExecuteDebugOperations();
@@ -701,7 +701,7 @@ s32 filemgrReinsertedOkMenuHandler(s32 operation, struct menuitem *item, union h
return 0;
}
s32 filemgrReinsertedCancelMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult filemgrReinsertedCancelMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_SET) {
if (FILEOP_IS_SAVE(g_Menus[g_MpPlayerNum].fm.fileop) && g_Menus[g_MpPlayerNum].fm.fileop != FILEOP_SAVE_GAME_001) {
@@ -1057,7 +1057,7 @@ struct menuitem g_FilemgrSaveErrorMenuItems[] = {
MENUITEMTYPE_LABEL,
0,
MENUITEMFLAG_LESSLEFTPADDING,
(u32)&filemgrMenuTextDeviceName,
(uintptr_t) &filemgrMenuTextDeviceName,
0,
filemgrDeviceNameMenuHandler,
},
@@ -1098,7 +1098,7 @@ struct menuitem g_FilemgrSaveErrorMenuItems[] = {
struct menudialogdef g_FilemgrSaveErrorMenuDialog = {
MENUDIALOGTYPE_DANGER,
(u32)&filemgrMenuTextErrorTitle,
(uintptr_t) &filemgrMenuTextErrorTitle,
g_FilemgrSaveErrorMenuItems,
NULL,
MENUDIALOGFLAG_IGNOREBACK | MENUDIALOGFLAG_DISABLEBANNER,
@@ -1110,7 +1110,7 @@ struct menuitem g_FilemgrFileLostMenuItems[] = {
MENUITEMTYPE_LABEL,
0,
MENUITEMFLAG_LESSLEFTPADDING,
(u32)&filemgrMenuTextDeviceName,
(uintptr_t) &filemgrMenuTextDeviceName,
0,
filemgrDeviceNameMenuHandler,
},
@@ -1154,7 +1154,7 @@ struct menuitem g_FilemgrFileLostMenuItems[] = {
struct menudialogdef g_FilemgrFileLostMenuDialog = {
MENUDIALOGTYPE_DANGER,
(u32)&filemgrMenuTextErrorTitle,
(uintptr_t) &filemgrMenuTextErrorTitle,
g_FilemgrFileLostMenuItems,
NULL,
MENUDIALOGFLAG_IGNOREBACK | MENUDIALOGFLAG_DISABLEBANNER,
@@ -1204,7 +1204,7 @@ struct menuitem g_PakNotOriginalMenuItems[] = {
0,
MENUITEMFLAG_LESSLEFTPADDING,
#if VERSION >= VERSION_NTSC_1_0
(u32)&filemgrMenuTextInsertOriginalPak,
(uintptr_t) &filemgrMenuTextInsertOriginalPak,
#else
L_OPTIONS_363, // "Please insert the Controller Pak containing your %s into any controller."
#endif
@@ -1232,7 +1232,7 @@ struct menuitem g_PakNotOriginalMenuItems[] = {
struct menudialogdef g_PakNotOriginalMenuDialog = {
MENUDIALOGTYPE_DANGER,
(u32)&filemgrMenuTextErrorTitle,
(uintptr_t) &filemgrMenuTextErrorTitle,
g_PakNotOriginalMenuItems,
filemgrInsertOriginalPakMenuDialog,
MENUDIALOGFLAG_IGNOREBACK | MENUDIALOGFLAG_DISABLEBANNER,
@@ -1514,7 +1514,7 @@ void filemgrSaveToDevice(void)
#endif
#if VERSION >= VERSION_NTSC_1_0
s32 filemgrConfirmRenameMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult filemgrConfirmRenameMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data)
{
char *name = data->keyboard.string;
@@ -1535,7 +1535,7 @@ s32 filemgrConfirmRenameMenuHandler(s32 operation, struct menuitem *item, union
#endif
#if VERSION >= VERSION_NTSC_1_0
s32 filemgrDuplicateRenameMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult filemgrDuplicateRenameMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_SET) {
menuPopDialog();
@@ -1547,7 +1547,7 @@ s32 filemgrDuplicateRenameMenuHandler(s32 operation, struct menuitem *item, unio
#endif
#if VERSION >= VERSION_NTSC_1_0
s32 filemgrDuplicateCancelMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult filemgrDuplicateCancelMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_SET) {
menuPopDialog();
@@ -1614,7 +1614,7 @@ struct menuitem g_FilemgrDuplicateMenuMenuItems[] = {
MENUITEMTYPE_LABEL,
0,
MENUITEMFLAG_LESSLEFTPADDING | MENUITEMFLAG_SELECTABLE_CENTRE,
(u32)&filemgrMenuTextDeviceNameContainingDuplicateFile,
(uintptr_t) &filemgrMenuTextDeviceNameContainingDuplicateFile,
0,
NULL,
},
@@ -1638,7 +1638,7 @@ struct menuitem g_FilemgrDuplicateMenuMenuItems[] = {
MENUITEMTYPE_LABEL,
0,
MENUITEMFLAG_LESSLEFTPADDING | MENUITEMFLAG_SELECTABLE_CENTRE | MENUITEMFLAG_LESSHEIGHT,
(u32)&filemgrMenuTextDuplicateFileName,
(uintptr_t) &filemgrMenuTextDuplicateFileName,
0,
NULL,
},
@@ -1744,7 +1744,7 @@ const char var7f1b34ac[] = "Deleting files, wad %d\n";
/**
* item->param is a SAVEDEVICE constant.
*/
s32 filemgrSelectLocationMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult filemgrSelectLocationMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data)
{
if (g_FileLists[g_Menus[g_MpPlayerNum].fm.listnum] == NULL) {
return 0;
@@ -1791,7 +1791,7 @@ s32 filemgrSelectLocationMenuHandler(s32 operation, struct menuitem *item, union
return 0;
}
s32 filemgrCancelSaveMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult filemgrCancelSaveMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_SET) {
menuPopDialog();
@@ -1800,7 +1800,7 @@ s32 filemgrCancelSaveMenuHandler(s32 operation, struct menuitem *item, union han
return 0;
}
s32 filemgrDeleteFilesForSaveMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult filemgrDeleteFilesForSaveMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_SET) {
filemgrPushDeleteFileDialog(g_Menus[g_MpPlayerNum].fm.listnum);
@@ -1872,7 +1872,7 @@ bool filemgrIsFileInUse(struct filelistfile *file)
}
#endif
s32 filemgrConfirmDeleteMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult filemgrConfirmDeleteMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_SET) {
#if VERSION >= VERSION_JPN_FINAL
@@ -2013,7 +2013,7 @@ bool filemgrIsFileInUse(struct filelistfile *file)
/**
* item->param is 0 if copying, 1 if deleting.
*/
s32 filemgrFileToCopyOrDeleteListMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data, bool isdelete)
MenuItemHandlerResult filemgrFileToCopyOrDeleteListMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data, bool isdelete)
{
s32 x;
s32 y;
@@ -2068,7 +2068,7 @@ s32 filemgrFileToCopyOrDeleteListMenuHandler(s32 operation, struct menuitem *ite
gdl = text0f153780(gdl);
}
return (u32)gdl;
return (uintptr_t) gdl;
}
case MENUOP_GETOPTIONHEIGHT:
data->list.value = 11;
@@ -2086,7 +2086,7 @@ s32 filemgrFileToCopyOrDeleteListMenuHandler(s32 operation, struct menuitem *ite
return 0;
}
s32 filemgrFileToDeleteListMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult filemgrFileToDeleteListMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data)
{
if (g_FileLists[g_Menus[g_MpPlayerNum].fm.listnum] == NULL) {
return 0;
@@ -2116,7 +2116,7 @@ s32 filemgrFileToDeleteListMenuHandler(s32 operation, struct menuitem *item, uni
return filemgrFileToCopyOrDeleteListMenuHandler(operation, item, data, true);
}
s32 filemgrFileToCopyListMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult filemgrFileToCopyListMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data)
{
struct filelist *list = g_FileLists[0];
@@ -2141,7 +2141,7 @@ s32 filemgrFileToCopyListMenuHandler(s32 operation, struct menuitem *item, union
return filemgrFileToCopyOrDeleteListMenuHandler(operation, item, data, false);
}
s32 filemgrCopyOrDeleteListMenuDialog(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data)
MenuDialogHandlerResult filemgrCopyOrDeleteListMenuDialog(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data)
{
if (operation == MENUOP_CLOSE) {
if (g_Menus[g_MpPlayerNum].fm.isdeletingforsave == true) {
@@ -2172,7 +2172,7 @@ void filemgrPushDeleteFileDialog(s32 listnum)
menuPushDialog(&g_FilemgrDeleteMenuDialog);
}
s32 pakDeleteGameNoteMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult pakDeleteGameNoteMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_SET) {
OSPfsState *note = &g_EditingPak->notes[g_Menus[g_MpPlayerNum].fm.noteindex];
@@ -2198,7 +2198,7 @@ s32 pakDeleteGameNoteMenuHandler(s32 operation, struct menuitem *item, union han
/**
* Handler for the note listing in the controller pak menu.
*/
s32 pakGameNoteListMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult pakGameNoteListMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data)
{
s32 x;
s32 y;
@@ -2286,7 +2286,7 @@ s32 pakGameNoteListMenuHandler(s32 operation, struct menuitem *item, union handl
gdl = textRenderProjected(gdl, &x, &y, pagesbuffer, g_CharsHandelGothicSm, g_FontHandelGothicSm,
renderdata->colour, viGetWidth(), viGetHeight(), 0, 1);
return (u32)gdl;
return (uintptr_t) gdl;
case MENUOP_GETOPTIONHEIGHT:
data->list.value = VERSION == VERSION_JPN_FINAL ? LINEHEIGHT - 1 : LINEHEIGHT;
break;
@@ -2309,7 +2309,7 @@ const char var7f1b34e8[] = "Try to find last opened file...\n";
/**
* Controller pak note listing dialog.
*/
s32 pakGameNotesMenuDialog(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data)
MenuDialogHandlerResult pakGameNotesMenuDialog(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data)
{
if (operation == MENUOP_TICK) {
if (g_Menus[g_MpPlayerNum].curdialog
@@ -2400,7 +2400,7 @@ char *pakMenuTextEditingPakName(struct menuitem *item)
*
* Selecting one takes you to the note listing dialog.
*/
s32 pakSelectionMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult pakSelectionMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_CHECKDISABLED) {
if (!pakIsMemoryPak((s8)item->param)) {
@@ -2421,7 +2421,7 @@ s32 pakSelectionMenuHandler(s32 operation, struct menuitem *item, union handlerd
*
* Lists the connected controller paks.
*/
s32 pakChoosePakMenuDialog(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data)
MenuDialogHandlerResult pakChoosePakMenuDialog(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data)
{
#if VERSION >= VERSION_NTSC_1_0
switch (operation) {
@@ -2476,7 +2476,7 @@ s32 pakChoosePakMenuDialog(s32 operation, struct menudialogdef *dialogdef, union
return 0;
}
s32 filemgrOpenCopyFileMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult filemgrOpenCopyFileMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_SET) {
g_Menus[g_MpPlayerNum].fm.filetypeplusone = item->param + 1;
@@ -2493,7 +2493,7 @@ s32 filemgrOpenCopyFileMenuHandler(s32 operation, struct menuitem *item, union h
return 0;
}
s32 filemgrOpenDeleteFileMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult filemgrOpenDeleteFileMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_SET) {
g_Menus[g_MpPlayerNum].fm.filetypeplusone = item->param + 1;
@@ -2505,7 +2505,7 @@ s32 filemgrOpenDeleteFileMenuHandler(s32 operation, struct menuitem *item, union
return 0;
}
s32 filemgrAgentNameKeyboardMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult filemgrAgentNameKeyboardMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data)
{
char *name = data->keyboard.string;
@@ -2529,7 +2529,7 @@ s32 filemgrAgentNameKeyboardMenuHandler(s32 operation, struct menuitem *item, un
return 0;
}
s32 filemgrChooseAgentListMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult filemgrChooseAgentListMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data)
{
s32 x;
s32 y;
@@ -2722,7 +2722,7 @@ s32 filemgrChooseAgentListMenuHandler(s32 operation, struct menuitem *item, unio
g_CharsHandelGothicXs, g_FontHandelGothicXs, renderdata->colour, viGetWidth(), viGetHeight(), 0, 0);
}
gdl = text0f153780(gdl);
return (u32) gdl;
return (uintptr_t) gdl;
case MENUOP_GETOPTIONHEIGHT:
data->list.value = 40;
break;
@@ -2746,7 +2746,7 @@ s32 filemgrChooseAgentListMenuHandler(s32 operation, struct menuitem *item, unio
break;
case MENUOP_GETOPTGROUPTEXT:
if (data->list.value >= g_FileLists[0]->numdevices) {
return (u32) langGet(L_OPTIONS_402); // "New..."
return (uintptr_t) langGet(L_OPTIONS_402); // "New..."
}
return filemgrGetDeviceNameOrStartIndex(0, operation, data->list.value);
case MENUOP_GETGROUPSTARTINDEX:
@@ -2761,7 +2761,7 @@ s32 filemgrChooseAgentListMenuHandler(s32 operation, struct menuitem *item, unio
return 0;
}
s32 filemgrMainMenuDialog(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data)
MenuDialogHandlerResult filemgrMainMenuDialog(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data)
{
s32 i;
@@ -2839,40 +2839,40 @@ struct menuitem g_FilemgrSelectLocationMenuItems[] = {
MENUITEMTYPE_SELECTABLE,
SAVEDEVICE_GAMEPAK,
0,
(u32)&filemgrMenuTextLocationName2,
(u32)&filemgrMenuTextSaveLocationSpaces,
(uintptr_t)&filemgrMenuTextLocationName2,
(uintptr_t)&filemgrMenuTextSaveLocationSpaces,
filemgrSelectLocationMenuHandler,
},
{
MENUITEMTYPE_SELECTABLE,
SAVEDEVICE_CONTROLLERPAK1,
0,
(u32)&filemgrMenuTextLocationName2,
(u32)&filemgrMenuTextSaveLocationSpaces,
(uintptr_t)&filemgrMenuTextLocationName2,
(uintptr_t)&filemgrMenuTextSaveLocationSpaces,
filemgrSelectLocationMenuHandler,
},
{
MENUITEMTYPE_SELECTABLE,
SAVEDEVICE_CONTROLLERPAK2,
0,
(u32)&filemgrMenuTextLocationName2,
(u32)&filemgrMenuTextSaveLocationSpaces,
(uintptr_t)&filemgrMenuTextLocationName2,
(uintptr_t)&filemgrMenuTextSaveLocationSpaces,
filemgrSelectLocationMenuHandler,
},
{
MENUITEMTYPE_SELECTABLE,
SAVEDEVICE_CONTROLLERPAK3,
0,
(u32)&filemgrMenuTextLocationName2,
(u32)&filemgrMenuTextSaveLocationSpaces,
(uintptr_t)&filemgrMenuTextLocationName2,
(uintptr_t)&filemgrMenuTextSaveLocationSpaces,
filemgrSelectLocationMenuHandler,
},
{
MENUITEMTYPE_SELECTABLE,
SAVEDEVICE_CONTROLLERPAK4,
0,
(u32)&filemgrMenuTextLocationName2,
(u32)&filemgrMenuTextSaveLocationSpaces,
(uintptr_t)&filemgrMenuTextLocationName2,
(uintptr_t)&filemgrMenuTextSaveLocationSpaces,
filemgrSelectLocationMenuHandler,
},
{
@@ -2916,7 +2916,7 @@ struct menuitem g_FilemgrConfirmDeleteMenuItems[] = {
MENUITEMTYPE_LABEL,
0,
MENUITEMFLAG_LESSLEFTPADDING | MENUITEMFLAG_SELECTABLE_CENTRE,
(u32)&filemgrMenuTextDeleteFileName,
(uintptr_t)&filemgrMenuTextDeleteFileName,
0,
filemgrFileNameMenuHandler,
},
@@ -2924,7 +2924,7 @@ struct menuitem g_FilemgrConfirmDeleteMenuItems[] = {
MENUITEMTYPE_LABEL,
0,
MENUITEMFLAG_LESSLEFTPADDING | MENUITEMFLAG_SELECTABLE_CENTRE | MENUITEMFLAG_SMALLFONT,
(u32)&filemgrMenuTextDeviceName,
(uintptr_t)&filemgrMenuTextDeviceName,
0,
filemgrDeviceNameMenuHandler,
},
@@ -2969,7 +2969,7 @@ struct menuitem g_FilemgrFileInUseMenuItems[] = {
MENUITEMTYPE_LABEL,
0,
MENUITEMFLAG_LESSLEFTPADDING | MENUITEMFLAG_SELECTABLE_CENTRE,
(u32)&filemgrMenuTextDeleteFileName,
(uintptr_t)&filemgrMenuTextDeleteFileName,
0,
filemgrFileNameMenuHandler,
},
@@ -2977,7 +2977,7 @@ struct menuitem g_FilemgrFileInUseMenuItems[] = {
MENUITEMTYPE_LABEL,
0,
MENUITEMFLAG_LESSLEFTPADDING | MENUITEMFLAG_SELECTABLE_CENTRE | MENUITEMFLAG_SMALLFONT,
(u32)&filemgrMenuTextDeviceName,
(uintptr_t)&filemgrMenuTextDeviceName,
0,
filemgrDeviceNameMenuHandler,
},
@@ -2986,7 +2986,7 @@ struct menuitem g_FilemgrFileInUseMenuItems[] = {
0,
MENUITEMFLAG_LESSLEFTPADDING,
#if VERSION >= VERSION_NTSC_1_0
(u32)&filemgrMenuTextFileInUseDescription,
(uintptr_t)&filemgrMenuTextFileInUseDescription,
#else
0x54a0,
#endif
@@ -3132,7 +3132,7 @@ struct menuitem g_PakGameNotesMenuItems[] = {
0,
MENUITEMFLAG_LESSLEFTPADDING,
L_OPTIONS_388, // "Delete Game Notes:"
(u32)&pakMenuTextEditingPakName,
(uintptr_t)&pakMenuTextEditingPakName,
NULL,
},
{
@@ -3163,15 +3163,15 @@ struct menuitem g_PakGameNotesMenuItems[] = {
MENUITEMTYPE_LABEL,
0,
MENUITEMFLAG_LESSLEFTPADDING,
(u32)&pakMenuTextPagesFree,
(u32)&pakMenuTextPagesUsed,
(uintptr_t)&pakMenuTextPagesFree,
(uintptr_t)&pakMenuTextPagesUsed,
NULL,
},
{
MENUITEMTYPE_LABEL,
0,
MENUITEMFLAG_LESSLEFTPADDING,
(u32)&pakMenuTextStatusMessage,
(uintptr_t)&pakMenuTextStatusMessage,
0,
NULL,
},
+11 -11
View File
@@ -12,7 +12,7 @@
#include "data.h"
#include "types.h"
s32 fmbHandleDropOut(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult fmbHandleDropOut(s32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_SET) {
menuPopDialog();
@@ -26,7 +26,7 @@ s32 fmbHandleDropOut(s32 operation, struct menuitem *item, union handlerdata *da
return 0;
}
s32 fmdHandleAbortGame(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult fmdHandleAbortGame(s32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_SET) {
if (g_Vars.stagenum == STAGE_4MBMENU) {
@@ -39,7 +39,7 @@ s32 fmdHandleAbortGame(s32 operation, struct menuitem *item, union handlerdata *
return 0;
}
s32 fmbHandleAdvancedSetup(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult fmbHandleAdvancedSetup(s32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_SET) {
func0f0f820c(&g_AdvancedSetup4MbMenuDialog, MENUROOT_4MBMAINMENU);
@@ -48,7 +48,7 @@ s32 fmbHandleAdvancedSetup(s32 operation, struct menuitem *item, union handlerda
return 0;
}
s32 fmbHandleAcceptChallenge(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult fmbHandleAcceptChallenge(s32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_SET) {
challengeSetCurrentBySlot(g_Menus[g_MpPlayerNum].main4mb.slotindex);
@@ -94,7 +94,7 @@ void fmbReset(void)
g_MpPlayerNum = prevplayernum;
}
s32 fmbHandleMainMenu(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data)
MenuDialogHandlerResult fmbHandleMainMenu(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data)
{
if (operation == MENUOP_OPEN) {
g_Vars.waitingtojoin[0] = false;
@@ -350,7 +350,7 @@ struct menuitem g_MpPlayerSetup4MbMenuItems[] = {
0,
MENUITEMFLAG_SELECTABLE_OPENSDIALOG,
L_MPMENU_030, // "Name"
(u32)&mpGetCurrentPlayerName,
(uintptr_t)&mpGetCurrentPlayerName,
(void *)&g_MpPlayerNameMenuDialog,
},
{
@@ -397,7 +397,7 @@ struct menuitem g_MpPlayerSetup4MbMenuItems[] = {
MENUITEMTYPE_SELECTABLE,
0,
0,
(u32)&mpMenuTextSavePlayerOrCopy,
(uintptr_t)&mpMenuTextSavePlayerOrCopy,
0,
menuhandlerMpSavePlayer,
},
@@ -500,7 +500,7 @@ struct menuitem g_MpConfirmChallenge4MbMenuItems[] = {
struct menudialogdef g_MpConfirmChallenge4MbMenuDialog = {
MENUDIALOGTYPE_DEFAULT,
(u32)&func0f17e318,
(uintptr_t)&func0f17e318,
g_MpConfirmChallenge4MbMenuItems,
menudialog0017e3fc,
0,
@@ -717,7 +717,7 @@ struct menuitem g_MpEditSimulant4MbMenuItems[] = {
struct menudialogdef g_MpEditSimulant4MbMenuDialog = {
MENUDIALOGTYPE_DEFAULT,
(u32)&mpMenuTitleEditSimulant,
(uintptr_t)&mpMenuTitleEditSimulant,
g_MpEditSimulant4MbMenuItems,
menudialogMpSimulant,
MENUDIALOGFLAG_MPLOCKABLE,
@@ -730,7 +730,7 @@ struct menuitem g_AdvancedSetup4MbMenuItems[] = {
0,
MENUITEMFLAG_SELECTABLE_OPENSDIALOG | MENUITEMFLAG_LOCKABLEMINOR,
L_MPMENU_019, // "Scenario"
(u32)&mpMenuTextScenarioShortName,
(uintptr_t)&mpMenuTextScenarioShortName,
(void *)&g_MpScenarioMenuDialog,
},
{
@@ -746,7 +746,7 @@ struct menuitem g_AdvancedSetup4MbMenuItems[] = {
0,
MENUITEMFLAG_SELECTABLE_OPENSDIALOG,
L_MPMENU_020, // "Arena"
(u32)&mpMenuTextArenaName,
(uintptr_t)&mpMenuTextArenaName,
(void *)&g_MpArenaMenuDialog,
},
{
+1 -1
View File
@@ -431,7 +431,7 @@ Gfx *artifactsRenderGlaresForRoom(Gfx *gdl, s32 roomnum)
if (count > 0) {
if (roomnum == light->roomnum) {
lightindex = ((u32)light - (u32)g_BgLightsFileData) / sizeof(struct light);
lightindex = ((uintptr_t)light - (uintptr_t)g_BgLightsFileData) / sizeof(struct light);
s3 = &var800a41a0[lightindex * 3];
t2 = 0;
min = 0xffff;
+3 -3
View File
@@ -224,15 +224,15 @@ void textLoadFont(u8 *romstart, u8 *romend, struct font **fontptr, struct fontch
#define NUMCHARS() 94
#endif
len = (u32)romend - (u32)romstart;
len = (romptr_t)romend - (romptr_t)romstart;
font = mempAlloc(len, MEMPOOL_STAGE);
chars = font->chars;
dmaExec(font, (u32) romstart, len);
dmaExec(font, (romptr_t) romstart, len);
// Convert pointers
for (i = 0; i < NUMCHARS(); i++) {
chars[i].pixeldata += (u32)font;
chars[i].pixeldata += (uintptr_t)font;
}
#if VERSION >= VERSION_JPN_FINAL
+3 -3
View File
@@ -56,7 +56,7 @@ void mblurAllocate(void)
}
var800844f0 = mempAlloc(var800ab7c0 * var800ab7c4 * 2 + 0x40, MEMPOOL_STAGE);
var800844f0 = (void *)(((u32) var800844f0 + 0x3f) & ~0x3f);
var800844f0 = (void *)(((uintptr_t) var800844f0 + 0x3f) & ~0x3f);
var800844f4 = var800844f0;
}
@@ -81,7 +81,7 @@ Gfx *mblur0f1762ac(Gfx *gdl)
subamount = 0;
}
addr = (u32)var800844f4 - subamount;
addr = (uintptr_t)var800844f4 - subamount;
addr &= ~0x3f;
gDPPipeSync(gdl++);
@@ -135,7 +135,7 @@ u16 *mblur0f176668(s32 arg0)
addr = var800abdc8;
}
addr = (u16 *)(((u32)addr + 0x3f) & ~0x3f);
addr = (u16 *)(((uintptr_t)addr + 0x3f) & ~0x3f);
return addr;
}
+2 -2
View File
@@ -144,7 +144,7 @@ extern u8 _getitleSegmentEnd;
void getitleLoad(void *addr, u32 arg1)
{
u32 len = (u32)&_getitleSegmentEnd - (u32)&_getitleSegmentStart;
u32 len = (romptr_t)&_getitleSegmentEnd - (romptr_t)&_getitleSegmentStart;
var80062414 = 0;
var8009cc8c = 880;
@@ -152,7 +152,7 @@ void getitleLoad(void *addr, u32 arg1)
var80062498 = 0;
var8009cc90 = addr;
dmaExec(var8009cc90, (u32) &_getitleSegmentRomStart, ALIGN64(len));
dmaExec(var8009cc90, (romptr_t) &_getitleSegmentRomStart, ALIGN64(len));
}
Gfx *getitleRender(Gfx *gdl)
+1 -1
View File
@@ -127,7 +127,7 @@ struct gfxvtx *gfxAllocateVertices(u32 count)
{
void *ptr = g_GfxMemPos;
g_GfxMemPos += count * sizeof(struct gfxvtx);
g_GfxMemPos = (u8 *)ALIGN16((u32)g_GfxMemPos);
g_GfxMemPos = (u8 *)ALIGN16((uintptr_t)g_GfxMemPos);
return ptr;
}
+6 -6
View File
@@ -288,8 +288,8 @@ struct jpncharpixels *langGetJpnCharPixels(s32 codepoint)
g_JpnCacheCacheItems[freeindexsingle].ttl = 2;
g_JpnCacheCacheItems[freeindexsingle].codepoint = codepoint;
dmaExec((u8 *) (freeindexsingle * (TMUL * 0x0c) + (u32)&g_JpnCharCachePixels[0]),
(u32) &_fontjpnSegmentRomStart + ((codepoint * TMUL) * 0xc + TMUL * (24 * 0xc)),
dmaExec((u8 *) (freeindexsingle * (TMUL * 0x0c) + (romptr_t) &g_JpnCharCachePixels[0]),
(romptr_t) &_fontjpnSegmentRomStart + ((codepoint * TMUL) * 0xc + TMUL * (24 * 0xc)),
TMUL * 0x0c);
return &g_JpnCharCachePixels[TMUL * freeindexsingle];
@@ -310,7 +310,7 @@ struct jpncharpixels *langGetJpnCharPixels(s32 codepoint)
g_JpnCacheCacheItems[freeindexsingle].ttl = 2;
g_JpnCacheCacheItems[freeindexsingle].codepoint = codepoint >> 1;
dmaExec(&g_JpnCharCachePixels[freeindexsingle * 8], (u32)&_fontjpnsingleSegmentRomStart + (codepoint >> SHIFTAMOUNT) * 0x60, 0x60);
dmaExec(&g_JpnCharCachePixels[freeindexsingle * 8], (romptr_t) &_fontjpnsingleSegmentRomStart + (codepoint >> SHIFTAMOUNT) * 0x60, 0x60);
return &g_JpnCharCachePixels[freeindexsingle * 8];
}
@@ -321,7 +321,7 @@ struct jpncharpixels *langGetJpnCharPixels(s32 codepoint)
g_JpnCacheCacheItems[freeindexmulti + 0].codepoint = codepoint >> 1;
g_JpnCacheCacheItems[freeindexmulti + 1].codepoint = codepoint >> 1;
dmaExec(&g_JpnCharCachePixels[freeindexmulti * 8], (u32)&_fontjpnmultiSegmentRomStart + ((codepoint & 0x1fff) >> SHIFTAMOUNT) * 0x80, 0x80);
dmaExec(&g_JpnCharCachePixels[freeindexmulti * 8], (romptr_t) &_fontjpnmultiSegmentRomStart + ((codepoint & 0x1fff) >> SHIFTAMOUNT) * 0x80, 0x80);
return &g_JpnCharCachePixels[freeindexmulti * 8];
}
@@ -403,7 +403,7 @@ char *langGet(s32 textid)
u32 addr;
if (bank && bank[textindex]) {
addr = (u32)bank + bank[textindex];
addr = (uintptr_t)bank + bank[textindex];
} else {
addr = 0;
}
@@ -416,7 +416,7 @@ void langReload(void)
{
s32 i;
g_LangBufferPos = (u8 *) align32((u32) g_LangBuffer);
g_LangBufferPos = (u8 *) align32((uintptr_t) g_LangBuffer);
for (i = 0; i < ARRAYCOUNT(g_LangBanks); i++) {
if (g_LangBanks[i] != NULL) {
+3 -3
View File
@@ -1718,8 +1718,8 @@ Gfx *lvRender(Gfx *gdl)
gDPSetScissor(gdl++, G_SC_NON_INTERLACE, 0, 0, viGetWidth(), viGetHeight());
#if VERSION < VERSION_NTSC_1_0
if ((u32)gdl < (u32)g_GfxBuffers[g_GfxActiveBufferIndex]
|| (u32)gdl > (u32)g_GfxBuffers[g_GfxActiveBufferIndex + 1]) {
if ((uintptr_t)gdl < (uintptr_t)g_GfxBuffers[g_GfxActiveBufferIndex]
|| (uintptr_t)gdl > (uintptr_t)g_GfxBuffers[g_GfxActiveBufferIndex + 1]) {
crashSetMessage("lv.c Master DL overrun!");
CRASH();
}
@@ -1958,7 +1958,7 @@ s32 lvGetSlowMotionType(void)
if (actual != expected) {
u32 *ptr = (u32 *)&rspbootTextStart;
u32 *end = (u32 *)(u32)ptr + 1024;
u32 *end = (u32 *)(uintptr_t)ptr + 1024;
while (ptr < end) {
*ptr += 8;
+86 -86
View File
@@ -75,7 +75,7 @@ u16 g_ControlStyleOptions[] = {
L_OPTIONS_246, // "2.4"
};
s32 menuhandlerControlStyleImpl(s32 operation, struct menuitem *item, union handlerdata *data, s32 mpindex)
MenuItemHandlerResult menuhandlerControlStyleImpl(s32 operation, struct menuitem *item, union handlerdata *data, s32 mpindex)
{
u16 categories[] = {
L_OPTIONS_237, // "Single"
@@ -118,17 +118,17 @@ s32 menuhandlerControlStyleImpl(s32 operation, struct menuitem *item, union hand
return 0;
}
s32 menuhandler001024dc(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult menuhandler001024dc(s32 operation, struct menuitem *item, union handlerdata *data)
{
return menuhandlerControlStyleImpl(operation, item, data, 4);
}
s32 menuhandler001024fc(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult menuhandler001024fc(s32 operation, struct menuitem *item, union handlerdata *data)
{
return menuhandlerControlStyleImpl(operation, item, data, 5);
}
s32 menuhandlerReversePitch(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult menuhandlerReversePitch(s32 operation, struct menuitem *item, union handlerdata *data)
{
u32 mpchrnum;
@@ -149,7 +149,7 @@ s32 menuhandlerReversePitch(s32 operation, struct menuitem *item, union handlerd
return 0;
}
s32 menuhandlerAimControl(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult menuhandlerAimControl(s32 operation, struct menuitem *item, union handlerdata *data)
{
u32 playernum = (g_Vars.coopplayernum >= 0 || g_Vars.antiplayernum >= 0)
? g_Vars.currentplayerstats->mpindex : item->param3;
@@ -193,7 +193,7 @@ s32 menuhandlerAimControl(s32 operation, struct menuitem *item, union handlerdat
return 0;
}
s32 menuhandlerSoundMode(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult menuhandlerSoundMode(s32 operation, struct menuitem *item, union handlerdata *data)
{
u16 options[] = {
L_OPTIONS_232, // "Mono"
@@ -219,7 +219,7 @@ s32 menuhandlerSoundMode(s32 operation, struct menuitem *item, union handlerdata
return 0;
}
s32 menuhandlerScreenSize(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult menuhandlerScreenSize(s32 operation, struct menuitem *item, union handlerdata *data)
{
u16 options[] = {
L_OPTIONS_220, // "Full"
@@ -244,7 +244,7 @@ s32 menuhandlerScreenSize(s32 operation, struct menuitem *item, union handlerdat
return 0;
}
s32 menuhandlerScreenRatio(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult menuhandlerScreenRatio(s32 operation, struct menuitem *item, union handlerdata *data)
{
u16 options[] = {
L_OPTIONS_223, // "Normal"
@@ -269,7 +269,7 @@ s32 menuhandlerScreenRatio(s32 operation, struct menuitem *item, union handlerda
}
#if PAL
s32 menuhandlerLanguage(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult menuhandlerLanguage(s32 operation, struct menuitem *item, union handlerdata *data)
{
u16 labels[] = {
L_MPWEAPONS_262, // English
@@ -303,7 +303,7 @@ s32 menuhandlerLanguage(s32 operation, struct menuitem *item, union handlerdata
}
#endif
s32 menuhandlerScreenSplit(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult menuhandlerScreenSplit(s32 operation, struct menuitem *item, union handlerdata *data)
{
u16 options[] = {
L_OPTIONS_225, // "Horizontal"
@@ -340,7 +340,7 @@ s32 menuhandlerScreenSplit(s32 operation, struct menuitem *item, union handlerda
return 0;
}
s32 menuhandlerLookAhead(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult menuhandlerLookAhead(s32 operation, struct menuitem *item, union handlerdata *data)
{
u32 mpchrnum;
@@ -361,7 +361,7 @@ s32 menuhandlerLookAhead(s32 operation, struct menuitem *item, union handlerdata
return 0;
}
s32 menuhandlerHeadRoll(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult menuhandlerHeadRoll(s32 operation, struct menuitem *item, union handlerdata *data)
{
u32 mpchrnum;
@@ -382,7 +382,7 @@ s32 menuhandlerHeadRoll(s32 operation, struct menuitem *item, union handlerdata
return 0;
}
s32 menuhandlerInGameSubtitles(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult menuhandlerInGameSubtitles(s32 operation, struct menuitem *item, union handlerdata *data)
{
switch (operation) {
case MENUOP_GET:
@@ -395,7 +395,7 @@ s32 menuhandlerInGameSubtitles(s32 operation, struct menuitem *item, union handl
return 0;
}
s32 menuhandlerCutsceneSubtitles(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult menuhandlerCutsceneSubtitles(s32 operation, struct menuitem *item, union handlerdata *data)
{
switch (operation) {
case MENUOP_GET:
@@ -408,7 +408,7 @@ s32 menuhandlerCutsceneSubtitles(s32 operation, struct menuitem *item, union han
return 0;
}
s32 menuhandlerAlternativeTitle(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult menuhandlerAlternativeTitle(s32 operation, struct menuitem *item, union handlerdata *data)
{
switch (operation) {
case MENUOP_CHECKHIDDEN:
@@ -426,7 +426,7 @@ s32 menuhandlerAlternativeTitle(s32 operation, struct menuitem *item, union hand
return 0;
}
s32 menuhandlerHiRes(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult menuhandlerHiRes(s32 operation, struct menuitem *item, union handlerdata *data)
{
switch (operation) {
case MENUOP_CHECKHIDDEN:
@@ -449,7 +449,7 @@ s32 menuhandlerHiRes(s32 operation, struct menuitem *item, union handlerdata *da
return 0;
}
s32 menuhandlerAmmoOnScreen(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult menuhandlerAmmoOnScreen(s32 operation, struct menuitem *item, union handlerdata *data)
{
u32 mpchrnum;
@@ -470,7 +470,7 @@ s32 menuhandlerAmmoOnScreen(s32 operation, struct menuitem *item, union handlerd
return 0;
}
s32 menuhandlerShowGunFunction(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult menuhandlerShowGunFunction(s32 operation, struct menuitem *item, union handlerdata *data)
{
u32 mpchrnum;
@@ -496,7 +496,7 @@ s32 menuhandlerShowGunFunction(s32 operation, struct menuitem *item, union handl
return 0;
}
s32 menuhandlerShowMissionTime(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult menuhandlerShowMissionTime(s32 operation, struct menuitem *item, union handlerdata *data)
{
u32 mpchrnum;
@@ -517,7 +517,7 @@ s32 menuhandlerShowMissionTime(s32 operation, struct menuitem *item, union handl
return 0;
}
s32 menuhandlerAlwaysShowTarget(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult menuhandlerAlwaysShowTarget(s32 operation, struct menuitem *item, union handlerdata *data)
{
u32 mpchrnum;
@@ -543,7 +543,7 @@ s32 menuhandlerAlwaysShowTarget(s32 operation, struct menuitem *item, union hand
return 0;
}
s32 menuhandlerShowZoomRange(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult menuhandlerShowZoomRange(s32 operation, struct menuitem *item, union handlerdata *data)
{
u32 mpchrnum;
@@ -569,7 +569,7 @@ s32 menuhandlerShowZoomRange(s32 operation, struct menuitem *item, union handler
return 0;
}
s32 menuhandlerPaintball(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult menuhandlerPaintball(s32 operation, struct menuitem *item, union handlerdata *data)
{
u32 mpchrnum;
@@ -590,7 +590,7 @@ s32 menuhandlerPaintball(s32 operation, struct menuitem *item, union handlerdata
return 0;
}
s32 menuhandlerSightOnScreen(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult menuhandlerSightOnScreen(s32 operation, struct menuitem *item, union handlerdata *data)
{
u32 mpchrnum;
@@ -611,7 +611,7 @@ s32 menuhandlerSightOnScreen(s32 operation, struct menuitem *item, union handler
return 0;
}
s32 menuhandlerAutoAim(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult menuhandlerAutoAim(s32 operation, struct menuitem *item, union handlerdata *data)
{
u32 mpchrnum;
@@ -632,7 +632,7 @@ s32 menuhandlerAutoAim(s32 operation, struct menuitem *item, union handlerdata *
return 0;
}
s32 menuhandlerMusicVolume(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult menuhandlerMusicVolume(s32 operation, struct menuitem *item, union handlerdata *data)
{
switch (operation) {
case MENUOP_GETSLIDER:
@@ -646,7 +646,7 @@ s32 menuhandlerMusicVolume(s32 operation, struct menuitem *item, union handlerda
return 0;
}
s32 menuhandlerSfxVolume(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult menuhandlerSfxVolume(s32 operation, struct menuitem *item, union handlerdata *data)
{
switch (operation) {
case MENUOP_GETSLIDER:
@@ -660,7 +660,7 @@ s32 menuhandlerSfxVolume(s32 operation, struct menuitem *item, union handlerdata
return 0;
}
s32 menudialogBriefing(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data)
MenuDialogHandlerResult menudialogBriefing(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data)
{
if (operation == MENUOP_TICK) {
if (g_Menus[g_MpPlayerNum].curdialog
@@ -699,7 +699,7 @@ struct menudialogdef g_PreAndPostMissionBriefingMenuDialog = {
NULL,
};
s32 menuhandlerAcceptMission(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult menuhandlerAcceptMission(s32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_SET) {
menuStop();
@@ -768,7 +768,7 @@ char *soloMenuTitleStageOverview(struct menudialogdef *dialogdef)
return g_StringPointer;
}
s32 menudialog00103608(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data)
MenuDialogHandlerResult menudialog00103608(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data)
{
switch (operation) {
case MENUOP_OPEN:
@@ -816,7 +816,7 @@ struct menuitem g_AcceptMissionMenuItems[] = {
struct menudialogdef g_AcceptMissionMenuDialog = {
MENUDIALOGTYPE_DEFAULT,
(u32)&soloMenuTitleStageOverview,
(uintptr_t)&soloMenuTitleStageOverview,
g_AcceptMissionMenuItems,
menudialog00103608,
MENUDIALOGFLAG_STARTSELECTS | MENUDIALOGFLAG_DISABLEITEMSCROLL,
@@ -832,7 +832,7 @@ f32 func0f1036ac(u8 value, s32 prop)
return mpHandicapToDamageScale(value);
}
s32 menuhandlerPdModeSetting(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult menuhandlerPdModeSetting(s32 operation, struct menuitem *item, union handlerdata *data)
{
u8 *property;
f32 fvalue;
@@ -864,7 +864,7 @@ s32 menuhandlerPdModeSetting(s32 operation, struct menuitem *item, union handler
return 0;
}
s32 menuhandlerAcceptPdModeSettings(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult menuhandlerAcceptPdModeSettings(s32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_SET) {
g_MissionConfig.pdmode = true;
@@ -1097,7 +1097,7 @@ bool isStageDifficultyUnlocked(s32 stageindex, s32 difficulty)
return false;
}
s32 menuhandlerSoloDifficulty(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult menuhandlerSoloDifficulty(s32 operation, struct menuitem *item, union handlerdata *data)
{
switch (operation) {
case MENUOP_CHECKPREFOCUSED:
@@ -1135,7 +1135,7 @@ s32 menuhandlerSoloDifficulty(s32 operation, struct menuitem *item, union handle
return 0;
}
s32 menuhandlerPdMode(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult menuhandlerPdMode(s32 operation, struct menuitem *item, union handlerdata *data)
{
switch (operation) {
case MENUOP_SET:
@@ -1188,7 +1188,7 @@ struct menuitem g_SoloMissionDifficultyMenuItems[] = {
0,
0,
L_OPTIONS_251, // "Agent"
(u32)&soloMenuTextBestTime,
(uintptr_t)&soloMenuTextBestTime,
menuhandlerSoloDifficulty,
},
{
@@ -1196,7 +1196,7 @@ struct menuitem g_SoloMissionDifficultyMenuItems[] = {
1,
0,
L_OPTIONS_252, // "Special Agent"
(u32)&soloMenuTextBestTime,
(uintptr_t)&soloMenuTextBestTime,
menuhandlerSoloDifficulty,
},
{
@@ -1204,7 +1204,7 @@ struct menuitem g_SoloMissionDifficultyMenuItems[] = {
2,
0,
L_OPTIONS_253, // "Perfect Agent"
(u32)&soloMenuTextBestTime,
(uintptr_t)&soloMenuTextBestTime,
menuhandlerSoloDifficulty,
},
{
@@ -1243,7 +1243,7 @@ struct menudialogdef g_SoloMissionDifficultyMenuDialog = {
NULL,
};
s32 menuhandlerBuddyOptionsContinue(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult menuhandlerBuddyOptionsContinue(s32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_SET) {
menuPopDialog();
@@ -1291,7 +1291,7 @@ s32 getMaxAiBuddies(void)
}
#endif
s32 menudialogCoopAntiOptions(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data)
MenuDialogHandlerResult menudialogCoopAntiOptions(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data)
{
#if VERSION >= VERSION_NTSC_1_0
if (operation == MENUOP_OPEN) {
@@ -1318,7 +1318,7 @@ s32 menudialogCoopAntiOptions(s32 operation, struct menudialogdef *dialogdef, un
return 0;
}
s32 menuhandlerCoopRadar(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult menuhandlerCoopRadar(s32 operation, struct menuitem *item, union handlerdata *data)
{
switch (operation) {
case MENUOP_GET:
@@ -1331,7 +1331,7 @@ s32 menuhandlerCoopRadar(s32 operation, struct menuitem *item, union handlerdata
return 0;
}
s32 menuhandlerCoopFriendlyFire(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult menuhandlerCoopFriendlyFire(s32 operation, struct menuitem *item, union handlerdata *data)
{
switch (operation) {
case MENUOP_GET:
@@ -1344,7 +1344,7 @@ s32 menuhandlerCoopFriendlyFire(s32 operation, struct menuitem *item, union hand
return 0;
}
s32 menuhandlerCoopBuddy(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult menuhandlerCoopBuddy(s32 operation, struct menuitem *item, union handlerdata *data)
{
const u16 labels[] = {
L_OPTIONS_261, // "Human"
@@ -1505,7 +1505,7 @@ struct menudialogdef g_CoopOptionsMenuDialog = {
NULL,
};
s32 menuhandlerAntiRadar(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult menuhandlerAntiRadar(s32 operation, struct menuitem *item, union handlerdata *data)
{
switch (operation) {
case MENUOP_GET:
@@ -1518,7 +1518,7 @@ s32 menuhandlerAntiRadar(s32 operation, struct menuitem *item, union handlerdata
return 0;
}
s32 menuhandlerAntiPlayer(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult menuhandlerAntiPlayer(s32 operation, struct menuitem *item, union handlerdata *data)
{
const u16 labels[] = {L_OPTIONS_271, L_OPTIONS_272};
@@ -1593,7 +1593,7 @@ struct menudialogdef g_AntiOptionsMenuDialog = {
NULL,
};
s32 menuhandlerCoopDifficulty(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult menuhandlerCoopDifficulty(s32 operation, struct menuitem *item, union handlerdata *data)
{
switch (operation) {
case MENUOP_SET:
@@ -1665,7 +1665,7 @@ struct menudialogdef g_CoopMissionDifficultyMenuDialog = {
NULL,
};
s32 menuhandlerAntiDifficulty(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult menuhandlerAntiDifficulty(s32 operation, struct menuitem *item, union handlerdata *data)
{
switch (operation) {
case MENUOP_SET:
@@ -1800,7 +1800,7 @@ s32 func0f104720(s32 value)
return 20;
}
s32 menuhandlerMissionList(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult menuhandlerMissionList(s32 operation, struct menuitem *item, union handlerdata *data)
{
struct optiongroup groups[] = {
{ 0, L_OPTIONS_123 }, // "Mission 1"
@@ -2095,7 +2095,7 @@ s32 menuhandlerMissionList(s32 operation, struct menuitem *item, union handlerda
return 0;
}
s32 menudialog0010559c(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data)
MenuDialogHandlerResult menudialog0010559c(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data)
{
switch (operation) {
case MENUOP_OPEN:
@@ -2188,7 +2188,7 @@ char *func0f1056a0(struct menuitem *item)
return (char *)menuhandler001024fc(MENUOP_GETOPTIONTEXT, item, &data);
}
s32 menuhandlerLangFilter(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult menuhandlerLangFilter(s32 operation, struct menuitem *item, union handlerdata *data)
{
switch (operation) {
case MENUOP_GET:
@@ -2201,7 +2201,7 @@ s32 menuhandlerLangFilter(s32 operation, struct menuitem *item, union handlerdat
return 0;
}
s32 menuhandlerControlStyle(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult menuhandlerControlStyle(s32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_SET) {
if (PLAYERCOUNT() >= 2) {
@@ -2214,7 +2214,7 @@ s32 menuhandlerControlStyle(s32 operation, struct menuitem *item, union handlerd
return 0;
}
s32 menuhandler001057ec(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult menuhandler001057ec(s32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_SET) {
filemgrSaveOrLoad(&g_GameFileGuid, FILEOP_SAVE_GAME_002, 0);
@@ -2223,7 +2223,7 @@ s32 menuhandler001057ec(s32 operation, struct menuitem *item, union handlerdata
return 0;
}
s32 menuhandlerChangeAgent(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult menuhandlerChangeAgent(s32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_SET) {
func0f0f820c(NULL, -7);
@@ -3062,7 +3062,7 @@ struct menuitem g_MissionControlOptionsMenuItems[] = {
0,
0,
L_OPTIONS_194, // "Control Style"
(u32)&func0f105664,
(uintptr_t)&func0f105664,
menuhandlerControlStyle,
},
{
@@ -3140,7 +3140,7 @@ struct menuitem g_CiControlOptionsMenuItems2[] = {
0,
0,
L_MPWEAPONS_270, // ""
(u32)&func0f105664,
(uintptr_t)&func0f105664,
menuhandlerControlStyle,
},
{
@@ -3218,7 +3218,7 @@ struct menuitem g_CiControlOptionsMenuItems[] = {
0,
MENUITEMFLAG_SELECTABLE_OPENSDIALOG,
L_OPTIONS_194, // "Control Style"
(u32)&func0f105664,
(uintptr_t)&func0f105664,
(void *)&g_CiControlStyleMenuDialog,
},
{
@@ -3295,7 +3295,7 @@ struct menuitem g_CiControlPlayer2MenuItems[] = {
0,
MENUITEMFLAG_SELECTABLE_OPENSDIALOG,
L_OPTIONS_194, // "Control Style"
(u32)&func0f1056a0,
(uintptr_t)&func0f1056a0,
(void *)&g_CiControlStylePlayer2MenuDialog,
},
{
@@ -3484,7 +3484,7 @@ struct menuitem g_2PMissionOptionsHMenuItems[] = {
MENUITEMTYPE_SELECTABLE,
0,
0,
(u32)&menutextPauseOrUnpause,
(uintptr_t)&menutextPauseOrUnpause,
0,
menuhandlerMpPause,
},
@@ -3540,7 +3540,7 @@ struct menuitem g_2PMissionOptionsVMenuItems[] = {
MENUITEMTYPE_SELECTABLE,
0,
0,
(u32)&menutextPauseOrUnpause,
(uintptr_t)&menutextPauseOrUnpause,
0,
menuhandlerMpPause,
},
@@ -3823,7 +3823,7 @@ void func0f105948(s32 weaponnum)
}
}
s32 inventoryMenuDialog(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data)
MenuDialogHandlerResult inventoryMenuDialog(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data)
{
if (operation == MENUOP_TICK) {
if (g_Menus[g_MpPlayerNum].curdialog && g_Menus[g_MpPlayerNum].curdialog->definition == dialogdef) {
@@ -3987,7 +3987,7 @@ struct menuitem g_SoloMissionInventoryMenuItems[] = {
0,
MENUITEMFLAG_NEWCOLUMN | MENUITEMFLAG_00000002 | MENUITEMFLAG_SMALLFONT,
L_OPTIONS_003, // ""
(u32)&invMenuTextWeaponManufacturer,
(uintptr_t)&invMenuTextWeaponManufacturer,
NULL,
},
{
@@ -3995,7 +3995,7 @@ struct menuitem g_SoloMissionInventoryMenuItems[] = {
0,
MENUITEMFLAG_00000002 | MENUITEMFLAG_LABEL_ALTCOLOUR | MENUITEMFLAG_SMALLFONT,
L_OPTIONS_003, // ""
(u32)&invMenuTextWeaponName,
(uintptr_t)&invMenuTextWeaponName,
NULL,
},
{
@@ -4011,7 +4011,7 @@ struct menuitem g_SoloMissionInventoryMenuItems[] = {
0,
MENUITEMFLAG_00000002 | MENUITEMFLAG_SMALLFONT,
L_OPTIONS_003, // ""
(u32)&invMenuTextPrimaryFunction,
(uintptr_t)&invMenuTextPrimaryFunction,
NULL,
},
{
@@ -4019,14 +4019,14 @@ struct menuitem g_SoloMissionInventoryMenuItems[] = {
0,
MENUITEMFLAG_00000002 | MENUITEMFLAG_SMALLFONT,
L_OPTIONS_003, // ""
(u32)&invMenuTextSecondaryFunction,
(uintptr_t)&invMenuTextSecondaryFunction,
NULL,
},
{
MENUITEMTYPE_MARQUEE,
0,
MENUITEMFLAG_SMALLFONT | MENUITEMFLAG_MARQUEE_FADEBOTHSIDES,
(u32)&invMenuTextWeaponDescription,
(uintptr_t)&invMenuTextWeaponDescription,
0,
NULL,
},
@@ -4047,7 +4047,7 @@ struct menuitem g_FrWeaponsAvailableMenuItems[] = {
0,
MENUITEMFLAG_NEWCOLUMN | MENUITEMFLAG_00000002 | MENUITEMFLAG_LESSLEFTPADDING | MENUITEMFLAG_SMALLFONT,
L_OPTIONS_003, // ""
(u32)&invMenuTextWeaponManufacturer,
(uintptr_t)&invMenuTextWeaponManufacturer,
NULL,
},
{
@@ -4055,7 +4055,7 @@ struct menuitem g_FrWeaponsAvailableMenuItems[] = {
0,
MENUITEMFLAG_00000002 | MENUITEMFLAG_LESSLEFTPADDING | MENUITEMFLAG_LABEL_ALTCOLOUR | MENUITEMFLAG_SMALLFONT,
L_OPTIONS_003, // ""
(u32)&invMenuTextWeaponName,
(uintptr_t)&invMenuTextWeaponName,
NULL,
},
{
@@ -4071,7 +4071,7 @@ struct menuitem g_FrWeaponsAvailableMenuItems[] = {
0,
MENUITEMFLAG_00000002 | MENUITEMFLAG_LESSLEFTPADDING | MENUITEMFLAG_SMALLFONT,
L_OPTIONS_003, // ""
(u32)&invMenuTextPrimaryFunction,
(uintptr_t)&invMenuTextPrimaryFunction,
NULL,
},
{
@@ -4079,14 +4079,14 @@ struct menuitem g_FrWeaponsAvailableMenuItems[] = {
0,
MENUITEMFLAG_00000002 | MENUITEMFLAG_LESSLEFTPADDING | MENUITEMFLAG_SMALLFONT,
L_OPTIONS_003, // ""
(u32)&invMenuTextSecondaryFunction,
(uintptr_t)&invMenuTextSecondaryFunction,
NULL,
},
{
MENUITEMTYPE_MARQUEE,
0,
MENUITEMFLAG_SMALLFONT | MENUITEMFLAG_MARQUEE_FADEBOTHSIDES,
(u32)&invMenuTextWeaponDescription,
(uintptr_t)&invMenuTextWeaponDescription,
0,
NULL,
},
@@ -4115,7 +4115,7 @@ struct menudialogdef g_FrWeaponsAvailableMenuDialog = {
NULL,
};
s32 menuhandlerFrInventoryList(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult menuhandlerFrInventoryList(s32 operation, struct menuitem *item, union handlerdata *data)
{
static u8 g_FrFocusedSlotIndex = 0;
@@ -4156,7 +4156,7 @@ s32 menuhandlerFrInventoryList(s32 operation, struct menuitem *item, union handl
return 0;
}
s32 menuhandlerInventoryList(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult menuhandlerInventoryList(s32 operation, struct menuitem *item, union handlerdata *data)
{
switch (operation) {
case MENUOP_GETOPTIONCOUNT:
@@ -4230,7 +4230,7 @@ s32 menuhandlerInventoryList(s32 operation, struct menuitem *item, union handler
return 0;
}
s32 menuhandlerAbortMission(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult menuhandlerAbortMission(s32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_SET) {
g_Vars.currentplayer->aborted = true;
@@ -4240,7 +4240,7 @@ s32 menuhandlerAbortMission(s32 operation, struct menuitem *item, union handlerd
return 0;
}
s32 menudialogAbortMission(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data)
MenuDialogHandlerResult menudialogAbortMission(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data)
{
if (operation == MENUOP_TICK) {
// empty
@@ -4323,7 +4323,7 @@ struct menudialogdef g_2PMissionAbortVMenuDialog = {
NULL,
};
s32 soloMenuDialogPauseStatus(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data)
MenuDialogHandlerResult soloMenuDialogPauseStatus(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data)
{
if (operation == MENUOP_OPEN) {
struct briefingobj *briefing = g_BriefingObjs;
@@ -4420,7 +4420,7 @@ struct menuitem g_MissionPauseMenuItems[] = {
struct menudialogdef g_SoloMissionPauseMenuDialog = {
MENUDIALOGTYPE_DEFAULT,
(u32)&soloMenuTitlePauseStatus,
(uintptr_t)&soloMenuTitlePauseStatus,
g_MissionPauseMenuItems,
soloMenuDialogPauseStatus,
MENUDIALOGFLAG_DISABLEITEMSCROLL | MENUDIALOGFLAG_SMOOTHSCROLLABLE,
@@ -4429,7 +4429,7 @@ struct menudialogdef g_SoloMissionPauseMenuDialog = {
struct menudialogdef g_2PMissionPauseHMenuDialog = {
MENUDIALOGTYPE_DEFAULT,
(u32)&soloMenuTitlePauseStatus,
(uintptr_t)&soloMenuTitlePauseStatus,
g_MissionPauseMenuItems,
soloMenuDialogPauseStatus,
MENUDIALOGFLAG_DISABLEITEMSCROLL | MENUDIALOGFLAG_SMOOTHSCROLLABLE,
@@ -4560,7 +4560,7 @@ struct cutscenegroup {
u16 name;
};
s32 menuhandlerCinema(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult menuhandlerCinema(s32 operation, struct menuitem *item, union handlerdata *data)
{
struct cutscenegroup groups[] = {
{ /* 0*/ 0, L_OPTIONS_436 }, // "Special"
@@ -4672,7 +4672,7 @@ struct menudialogdef g_SelectMissionMenuDialog = {
NULL,
};
s32 menuhandlerMainMenuSoloMissions(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult menuhandlerMainMenuSoloMissions(s32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_SET) {
g_MissionConfig.iscoop = false;
@@ -4689,7 +4689,7 @@ s32 menuhandlerMainMenuSoloMissions(s32 operation, struct menuitem *item, union
return 0;
}
s32 menuhandlerMainMenuCombatSimulator(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult menuhandlerMainMenuCombatSimulator(s32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_SET) {
g_Vars.bondplayernum = 0;
@@ -4704,7 +4704,7 @@ s32 menuhandlerMainMenuCombatSimulator(s32 operation, struct menuitem *item, uni
return 0;
}
s32 menuhandlerMainMenuCooperative(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult menuhandlerMainMenuCooperative(s32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_SET) {
g_MissionConfig.iscoop = true;
@@ -4715,7 +4715,7 @@ s32 menuhandlerMainMenuCooperative(s32 operation, struct menuitem *item, union h
return 0;
}
s32 menuhandlerMainMenuCounterOperative(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult menuhandlerMainMenuCounterOperative(s32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_CHECKDISABLED) {
if ((joyGetConnectedControllers() & 2) == 0) {
@@ -4732,7 +4732,7 @@ s32 menuhandlerMainMenuCounterOperative(s32 operation, struct menuitem *item, un
return 0;
}
s32 menudialogMainMenu(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data)
MenuDialogHandlerResult menudialogMainMenu(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data)
{
switch (operation) {
case MENUOP_OPEN:
@@ -4786,7 +4786,7 @@ struct menuitem g_MainMenuMenuItems[] = {
MENUITEMTYPE_SELECTABLE,
0,
MENUITEMFLAG_BIGFONT,
(u32)&mainMenuTextLabel,
(uintptr_t)&mainMenuTextLabel,
0x00000002,
menuhandlerMainMenuSoloMissions,
},
@@ -4794,7 +4794,7 @@ struct menuitem g_MainMenuMenuItems[] = {
MENUITEMTYPE_SELECTABLE,
1,
MENUITEMFLAG_BIGFONT,
(u32)&mainMenuTextLabel,
(uintptr_t)&mainMenuTextLabel,
0x00000003,
menuhandlerMainMenuCombatSimulator,
},
@@ -4802,7 +4802,7 @@ struct menuitem g_MainMenuMenuItems[] = {
MENUITEMTYPE_SELECTABLE,
2,
MENUITEMFLAG_BIGFONT,
(u32)&mainMenuTextLabel,
(uintptr_t)&mainMenuTextLabel,
0x00000004,
menuhandlerMainMenuCooperative,
},
@@ -4810,7 +4810,7 @@ struct menuitem g_MainMenuMenuItems[] = {
MENUITEMTYPE_SELECTABLE,
3,
MENUITEMFLAG_BIGFONT,
(u32)&mainMenuTextLabel,
(uintptr_t)&mainMenuTextLabel,
0x00000005,
menuhandlerMainMenuCounterOperative,
},
+14 -14
View File
@@ -451,7 +451,7 @@ void func0f0f1494(void)
}
}
char *menuResolveText(u32 thing, void *dialogoritem)
char *menuResolveText(uintptr_t thing, void *dialogoritem)
{
char *(*handler)(void *dialogoritem) = (void *)thing;
@@ -465,7 +465,7 @@ char *menuResolveText(u32 thing, void *dialogoritem)
return langGet((u32)thing);
}
if (thing > (u32)func0f1a78b0) {
if (thing > (uintptr_t)func0f1a78b0) {
#if VERSION < VERSION_NTSC_1_0
CRASH();
#endif
@@ -2280,8 +2280,8 @@ Gfx *menuRenderModels(Gfx *gdl, struct menu840 *thing, s32 arg2)
sp160 = modelFindNodeMtxIndex(node, 0);
mtx4LoadIdentity(&sp120);
mtx4LoadXRotation(menuGetCosOscFrac(4), &sp120);
mtx4MultMtx4((Mtxf *)((u32)sp3b4 + sp160 * sizeof(Mtxf)), &sp120, &spe0);
mtx4Copy(&spe0, (Mtxf *)((u32)sp3b4 + sp160 * sizeof(Mtxf)));
mtx4MultMtx4((Mtxf *)((uintptr_t)sp3b4 + sp160 * sizeof(Mtxf)), &sp120, &spe0);
mtx4Copy(&spe0, (Mtxf *)((uintptr_t)sp3b4 + sp160 * sizeof(Mtxf)));
}
node = modelGetPart(thing->bodymodeldef, MODELPART_HUDPIECE_0001);
@@ -2325,7 +2325,7 @@ Gfx *menuRenderModels(Gfx *gdl, struct menu840 *thing, s32 arg2)
for (i = 0; i < thing->bodymodeldef->nummatrices; i++) {
Mtxf sp70;
mtx4Copy((Mtxf *)((u32)thing->bodymodel.matrices + i * sizeof(Mtxf)), &sp70);
mtx4Copy((Mtxf *)((uintptr_t)thing->bodymodel.matrices + i * sizeof(Mtxf)), &sp70);
mtxF2L(&sp70, &thing->bodymodel.matrices[i]);
}
@@ -5590,7 +5590,7 @@ u32 menuGetRoot(void)
#if VERSION >= VERSION_NTSC_1_0
struct menudialogdef g_PakAttemptRepairMenuDialog;
s32 menuhandler000fcc34(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult menuhandler000fcc34(s32 operation, struct menuitem *item, union handlerdata *data)
{
bool done = false;
@@ -5616,7 +5616,7 @@ s32 menuhandler000fcc34(s32 operation, struct menuitem *item, union handlerdata
}
#endif
s32 menudialog000fcd48(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data)
MenuDialogHandlerResult menudialog000fcd48(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data)
{
if (operation == MENUOP_TICK) {
if (g_Menus[g_MpPlayerNum].curdialog
@@ -5630,7 +5630,7 @@ s32 menudialog000fcd48(s32 operation, struct menudialogdef *dialogdef, union han
}
#if VERSION >= VERSION_NTSC_1_0
s32 func0f0fcdd0(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult func0f0fcdd0(s32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_SET) {
func0f0f3704(&g_PakDamagedMenuDialog);
@@ -5640,7 +5640,7 @@ s32 func0f0fcdd0(s32 operation, struct menuitem *item, union handlerdata *data)
}
#endif
s32 menuhandlerRepairPak(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult menuhandlerRepairPak(s32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_SET) {
if (pakRepair(g_Menus[g_MpPlayerNum].fm.device3)) {
@@ -5872,7 +5872,7 @@ char *menuTextSaveDeviceName(struct menuitem *item)
return NULL;
}
s32 menuhandlerRetrySavePak(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult menuhandlerRetrySavePak(s32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_SET) {
menuPopDialog();
@@ -5889,7 +5889,7 @@ s32 menuhandlerRetrySavePak(s32 operation, struct menuitem *item, union handlerd
return 0;
}
s32 menuhandlerWarnRepairPak(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult menuhandlerWarnRepairPak(s32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_SET) {
#if VERSION >= VERSION_NTSC_1_0
@@ -6049,7 +6049,7 @@ struct menuitem g_PakDamagedMenuItems[] = {
MENUITEMTYPE_LABEL,
0,
MENUITEMFLAG_LESSLEFTPADDING | MENUITEMFLAG_SELECTABLE_CENTRE,
(u32)&menuTextSaveDeviceName,
(uintptr_t)&menuTextSaveDeviceName,
0,
NULL,
},
@@ -6122,7 +6122,7 @@ struct menuitem g_PakFullMenuItems[] = {
MENUITEMTYPE_LABEL,
0,
MENUITEMFLAG_SELECTABLE_CENTRE,
(u32)&menuTextSaveDeviceName,
(uintptr_t)&menuTextSaveDeviceName,
0,
NULL,
},
@@ -6227,7 +6227,7 @@ struct menuitem g_PakDataLostMenuItems[] = {
MENUITEMTYPE_LABEL,
0,
MENUITEMFLAG_LESSLEFTPADDING | MENUITEMFLAG_SELECTABLE_CENTRE,
(u32)&menuTextSaveDeviceName,
(uintptr_t)&menuTextSaveDeviceName,
0,
NULL,
},
+1 -1
View File
@@ -576,7 +576,7 @@ Gfx *menuitemListRender(Gfx *gdl, struct menurendercontext *context)
spb8.type19.gdl = gdl;
spb8.type19.unk04 = optionindex;
spb8.type19.renderdata2 = (void *)((u32)&renderdata & 0xffffffff);
spb8.type19.renderdata2 = (void *)((uintptr_t)&renderdata & 0xffffffff);
spb8.type19.unk0c = sp15c.list.unk04;
gdl = (Gfx *) context->item->handler(MENUOP_RENDER, context->item, &spb8);
+12 -10
View File
@@ -113,10 +113,10 @@ void modeldef0f1a7560(struct modeldef *modeldef, u16 filenum, u32 arg2, struct m
s32 sp84;
u32 s0;
u32 s4;
u32 s5;
uintptr_t s5;
struct modelnode *node;
struct modelnode *prevnode;
u32 gdl;
uintptr_t gdl;
struct gfxvtx *vertices;
allocsize = fileGetAllocationSize(filenum);
@@ -128,11 +128,13 @@ void modeldef0f1a7560(struct modeldef *modeldef, u16 filenum, u32 arg2, struct m
s5 = gdl;
if (gdl) {
s32 v1 = allocsize - (loadedsize - (s32)(((u32)modeldef + (gdl & 0xffffff)) - (u32)modeldef));
sp84 = (s32)v1 + (s32)((s32)modeldef - ((u32)modeldef + (gdl & 0xffffff)));
s32 v1 = allocsize - (loadedsize - (s32)(((uintptr_t)modeldef + (gdl & 0xffffff)) - (uintptr_t)modeldef));
sp84 = (s32)v1 + (s32)((uintptr_t)modeldef - ((uintptr_t)modeldef + (gdl & 0xffffff)));
texCopyGdls((Gfx *)((u32)modeldef + (gdl & 0xffffff)), (Gfx *)(v1 + (u32)modeldef), loadedsize - (s32)(((u32)modeldef + (gdl & 0xffffff)) - (u32)modeldef));
texLoadFromConfigs(modeldef->texconfigs, modeldef->numtexconfigs, texpool, (u32)modeldef2 - arg2);
texCopyGdls((Gfx *)((uintptr_t)modeldef + (gdl & 0xffffff)),
(Gfx *)(v1 + (uintptr_t)modeldef),
loadedsize - (s32)(((uintptr_t)modeldef + (gdl & 0xffffff)) - (uintptr_t)modeldef));
texLoadFromConfigs(modeldef->texconfigs, modeldef->numtexconfigs, texpool, (uintptr_t)modeldef2 - arg2);
while (node) {
prevnode = node;
@@ -143,7 +145,7 @@ void modeldef0f1a7560(struct modeldef *modeldef, u16 filenum, u32 arg2, struct m
if (gdl) {
s4 = gdl - s0;
} else {
s4 = loadedsize + (u32)modeldef - (u32)modeldef - (s0 & 0xffffff);
s4 = loadedsize + (uintptr_t)modeldef - (uintptr_t)modeldef - (s0 & 0xffffff);
}
modelNodeReplaceGdl(modeldef, prevnode, (Gfx *) s0, (Gfx *) s5);
@@ -155,10 +157,10 @@ void modeldef0f1a7560(struct modeldef *modeldef, u16 filenum, u32 arg2, struct m
vertices = NULL;
}
s5 += texLoadFromGdl((Gfx *)((u32)modeldef + (s0 & 0xffffff) + sp84), s4, (Gfx *)((u32)modeldef + (s5 & 0xffffff)), texpool, (u8 *) vertices);
s5 += texLoadFromGdl((Gfx *)((uintptr_t)modeldef + (s0 & 0xffffff) + sp84), s4, (Gfx *)((uintptr_t)modeldef + (s5 & 0xffffff)), texpool, (u8 *) vertices);
}
fileSetSize(filenum, modeldef, (((u32)modeldef + (s5 & 0xffffff)) - (u32)modeldef + 0xf) & ~0xf, arg5);
fileSetSize(filenum, modeldef, (((uintptr_t)modeldef + (s5 & 0xffffff)) - (uintptr_t)modeldef + 0xf) & ~0xf, arg5);
}
}
@@ -189,7 +191,7 @@ struct modeldef *modeldefLoad(u16 fileid, u8 *dst, s32 size, struct texpool *arg
}
modelPromoteTypeToPointer(modeldef);
modelPromoteOffsetsToPointers(modeldef, 0x5000000, (u32) modeldef);
modelPromoteOffsetsToPointers(modeldef, 0x5000000, (uintptr_t) modeldef);
modeldef0f1a7560(modeldef, fileid, 0x5000000, modeldef, arg3, dst == NULL);
return modeldef;
+28 -28
View File
@@ -28,7 +28,7 @@ struct menudialogdef g_MpEndscreenTeamGameOverMenuDialog;
struct menudialogdef g_MpEndscreenSavePlayerMenuDialog;
#endif
s32 mpStatsForPlayerDropdownHandler(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult mpStatsForPlayerDropdownHandler(s32 operation, struct menuitem *item, union handlerdata *data)
{
struct mpchrconfig *mpchr;
s32 v0;
@@ -98,7 +98,7 @@ s32 mpStatsForPlayerDropdownHandler(s32 operation, struct menuitem *item, union
return 0;
}
s32 menuhandlerMpEndGame(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult menuhandlerMpEndGame(s32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_SET) {
g_Vars.currentplayer->aborted = true;
@@ -111,7 +111,7 @@ s32 menuhandlerMpEndGame(s32 operation, struct menuitem *item, union handlerdata
/**
* This is something near the top of the "End Game" dialog during gameplay.
*/
s32 menuhandler00178018(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult menuhandler00178018(s32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_CHECKHIDDEN) {
if (g_BossFile.locktype != MPLOCKTYPE_CHALLENGE) {
@@ -141,7 +141,7 @@ char *mpMenuTextInGameLimit(struct menuitem *item)
return g_StringPointer;
}
s32 menuhandlerMpInGameLimitLabel(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult menuhandlerMpInGameLimitLabel(s32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_CHECKHIDDEN) {
switch (item->param) {
@@ -154,7 +154,7 @@ s32 menuhandlerMpInGameLimitLabel(s32 operation, struct menuitem *item, union ha
return 0;
}
s32 menuhandlerMpPause(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult menuhandlerMpPause(s32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_SET) {
if (mpIsPaused()) {
@@ -249,7 +249,7 @@ struct menuitem g_MpPauseControlMenuItems[] = {
MENUITEMTYPE_LABEL,
0,
MENUITEMFLAG_SELECTABLE_CENTRE,
(u32)&mpMenuTextChallengeName,
(uintptr_t) &mpMenuTextChallengeName,
0,
menuhandler00178018,
},
@@ -258,7 +258,7 @@ struct menuitem g_MpPauseControlMenuItems[] = {
MENUITEMTYPE_LABEL,
0,
MENUITEMFLAG_SELECTABLE_CENTRE,
(u32)&mpMenuTextScenarioName,
(uintptr_t) &mpMenuTextScenarioName,
0,
NULL,
},
@@ -272,7 +272,7 @@ struct menuitem g_MpPauseControlMenuItems[] = {
MENUITEMFLAG_SMALLFONT,
#endif
L_MPWEAPONS_162, // "Time Limit:"
(u32)&mpMenuTextInGameLimit,
(uintptr_t) &mpMenuTextInGameLimit,
menuhandlerMpInGameLimitLabel,
},
{
@@ -284,7 +284,7 @@ struct menuitem g_MpPauseControlMenuItems[] = {
MENUITEMFLAG_SMALLFONT,
#endif
L_MPWEAPONS_163, // "Score Limit:"
(u32)&mpMenuTextInGameLimit,
(uintptr_t) &mpMenuTextInGameLimit,
menuhandlerMpInGameLimitLabel,
},
{
@@ -296,7 +296,7 @@ struct menuitem g_MpPauseControlMenuItems[] = {
MENUITEMFLAG_SMALLFONT,
#endif
L_MPWEAPONS_164, // "Team Score Limit:"
(u32)&mpMenuTextInGameLimit,
(uintptr_t) &mpMenuTextInGameLimit,
menuhandlerMpInGameLimitLabel,
},
{
@@ -316,14 +316,14 @@ struct menuitem g_MpPauseControlMenuItems[] = {
0,
#endif
L_MPMENU_286, // "Game Time:"
(u32)&menutextMatchTime,
(uintptr_t)&menutextMatchTime,
NULL,
},
{
MENUITEMTYPE_SELECTABLE,
1,
MENUITEMFLAG_SELECTABLE_CENTRE,
(u32)&menutextPauseOrUnpause,
(uintptr_t)&menutextPauseOrUnpause,
0,
menuhandlerMpPause,
},
@@ -341,7 +341,7 @@ struct menuitem g_MpPauseControlMenuItems[] = {
struct menudialogdef g_MpPauseControlMenuDialog = {
MENUDIALOGTYPE_DEFAULT,
#if VERSION >= VERSION_JPN_FINAL
(u32)&mpMenuTextScenarioName,
(uintptr_t)&mpMenuTextScenarioName,
#else
L_MPMENU_285, // "Control"
#endif
@@ -444,7 +444,7 @@ char *mpMenuTitleStatsFor(struct menudialogdef *dialogdef)
return g_StringPointer;
}
s32 func0f178440(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult func0f178440(s32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation);
@@ -479,7 +479,7 @@ struct menuitem g_Mp2PMissionInventoryMenuItems[] = {
MENUITEMTYPE_MARQUEE,
0,
MENUITEMFLAG_SMALLFONT | MENUITEMFLAG_MARQUEE_FADEBOTHSIDES,
(u32)&mpMenuTextWeaponDescription,
(uintptr_t)&mpMenuTextWeaponDescription,
0,
NULL,
},
@@ -527,7 +527,7 @@ struct menuitem g_MpInGamePlayerStatsMenuItems[] = {
struct menudialogdef g_MpPausePlayerStatsMenuDialog = {
MENUDIALOGTYPE_DEFAULT,
(u32)&mpMenuTitleStatsFor,
(uintptr_t)&mpMenuTitleStatsFor,
g_MpInGamePlayerStatsMenuItems,
NULL,
VERSION >= VERSION_JPN_FINAL ? MENUDIALOGFLAG_1000 : 0,
@@ -536,7 +536,7 @@ struct menudialogdef g_MpPausePlayerStatsMenuDialog = {
struct menudialogdef g_MpEndscreenPlayerStatsMenuDialog = {
MENUDIALOGTYPE_DEFAULT,
(u32)&mpMenuTitleStatsFor,
(uintptr_t)&mpMenuTitleStatsFor,
g_MpInGamePlayerStatsMenuItems,
NULL,
VERSION >= VERSION_JPN_FINAL ? MENUDIALOGFLAG_1000 : 0,
@@ -623,7 +623,7 @@ char *mpMenuTextPlacementWithSuffix(struct menuitem *item)
return langGet(suffixes[g_PlayerConfigsArray[g_MpPlayerNum].base.placement]);
}
s32 mpPlacementMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult mpPlacementMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_GETCOLOUR) {
if (g_PlayerConfigsArray[g_MpPlayerNum].base.placement == 0) { // winner
@@ -634,7 +634,7 @@ s32 mpPlacementMenuHandler(s32 operation, struct menuitem *item, union handlerda
return 0;
}
s32 mpAwardsMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult mpAwardsMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_RENDER) {
Gfx *gdl = data->type19.gdl;
@@ -704,7 +704,7 @@ s32 mpAwardsMenuHandler(s32 operation, struct menuitem *item, union handlerdata
return 0;
}
s32 mpPlayerTitleMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult mpPlayerTitleMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_GETCOLOUR) {
if (g_PlayerConfigsArray[g_MpPlayerNum].title != g_PlayerConfigsArray[g_MpPlayerNum].newtitle) {
@@ -721,7 +721,7 @@ char *mpMenuTextPlayerTitle(s32 arg0)
}
#if VERSION >= VERSION_NTSC_1_0
s32 mpConfirmPlayerNameHandler(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult mpConfirmPlayerNameHandler(s32 operation, struct menuitem *item, union handlerdata *data)
{
char *name = data->keyboard.string;
s32 i;
@@ -844,8 +844,8 @@ struct menuitem g_MpGameOverMenuItems[] = {
MENUITEMTYPE_LABEL,
0,
MENUITEMFLAG_LESSLEFTPADDING | MENUITEMFLAG_LABEL_CUSTOMCOLOUR,
(u32)&mpGetCurrentPlayerName,
(u32)&mpMenuTextPlacementWithSuffix,
(uintptr_t)&mpGetCurrentPlayerName,
(uintptr_t)&mpMenuTextPlacementWithSuffix,
mpPlacementMenuHandler,
},
{
@@ -853,12 +853,12 @@ struct menuitem g_MpGameOverMenuItems[] = {
0,
#if VERSION >= VERSION_JPN_FINAL
MENUITEMFLAG_SELECTABLE_CENTRE | MENUITEMFLAG_LABEL_CUSTOMCOLOUR,
(u32)&mpMenuTextPlayerTitle,
(uintptr_t)&mpMenuTextPlayerTitle,
0,
#else
MENUITEMFLAG_LABEL_CUSTOMCOLOUR,
L_MPMENU_261, // "Title:"
(u32)&mpMenuTextPlayerTitle,
(uintptr_t)&mpMenuTextPlayerTitle,
#endif
mpPlayerTitleMenuHandler,
},
@@ -882,7 +882,7 @@ struct menuitem g_MpGameOverMenuItems[] = {
MENUITEMTYPE_LABEL,
0,
MENUITEMFLAG_SELECTABLE_CENTRE | MENUITEMFLAG_LABEL_ALTCOLOUR,
(u32)&mpMenuTextWeaponOfChoiceName,
(uintptr_t)&mpMenuTextWeaponOfChoiceName,
0,
NULL,
},
@@ -931,7 +931,7 @@ struct menuitem g_MpGameOverMenuItems[] = {
#else
MENUITEMFLAG_SELECTABLE_CENTRE | MENUITEMFLAG_LABEL_ALTCOLOUR,
#endif
(u32)&mpMenuTextAward1,
(uintptr_t)&mpMenuTextAward1,
0,
NULL,
},
@@ -943,7 +943,7 @@ struct menuitem g_MpGameOverMenuItems[] = {
#else
MENUITEMFLAG_SELECTABLE_CENTRE | MENUITEMFLAG_LABEL_ALTCOLOUR,
#endif
(u32)&mpMenuTextAward2,
(uintptr_t)&mpMenuTextAward2,
0,
NULL,
},
+6 -6
View File
@@ -95,7 +95,7 @@ char *scenarioRemoveLineBreaks(char *src, s32 stringnum)
struct scenariodata g_ScenarioData;
s32 menuhandlerMpDisplayTeam(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult menuhandlerMpDisplayTeam(s32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_CHECKDISABLED) {
if (g_MpSetup.options & MPOPTION_TEAMSENABLED) {
@@ -108,7 +108,7 @@ s32 menuhandlerMpDisplayTeam(s32 operation, struct menuitem *item, union handler
return menuhandlerMpCheckboxOption(operation, item, data);
}
s32 menuhandlerMpOneHitKills(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult menuhandlerMpOneHitKills(s32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_CHECKDISABLED || operation == MENUOP_CHECKHIDDEN) {
if (challengeIsFeatureUnlocked(MPFEATURE_ONEHITKILLS)) {
@@ -121,7 +121,7 @@ s32 menuhandlerMpOneHitKills(s32 operation, struct menuitem *item, union handler
return menuhandlerMpCheckboxOption(operation, item, data);
}
s32 menuhandlerMpSlowMotion(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult menuhandlerMpSlowMotion(s32 operation, struct menuitem *item, union handlerdata *data)
{
u16 labels[] = {
L_MPMENU_240, // "Off"
@@ -264,7 +264,7 @@ struct mpscenariooverview g_MpScenarioOverviews[] = {
* While the options dialog is open, check if another player has changed the
* scenario to a different one. If so, replace this dialog with the new one.
*/
s32 mpOptionsMenuDialog(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data)
MenuDialogHandlerResult mpOptionsMenuDialog(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data)
{
if (operation == MENUOP_TICK) {
if (g_Menus[g_MpPlayerNum].curdialog->definition != g_MpScenarios[g_MpSetup.scenario].optionsdialog) {
@@ -304,7 +304,7 @@ struct scenariogroup {
u16 textid;
};
s32 scenarioScenarioMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult scenarioScenarioMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data)
{
struct scenariogroup groups[] = {
{ 0, L_MPMENU_244 }, // "Free for All!"
@@ -398,7 +398,7 @@ s32 scenarioScenarioMenuHandler(s32 operation, struct menuitem *item, union hand
return 0;
}
s32 menuhandlerMpOpenOptions(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult menuhandlerMpOpenOptions(s32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_SET) {
menuPushDialog(g_MpScenarios[g_MpSetup.scenario].optionsdialog);
+1 -1
View File
@@ -13,7 +13,7 @@
* Points are awarded to each player in the hill at the time that it is won.
*/
s32 menuhandlerMpHillTime(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult menuhandlerMpHillTime(s32 operation, struct menuitem *item, union handlerdata *data)
{
switch (operation) {
case MENUOP_GETSLIDER:
+176 -176
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -68,7 +68,7 @@ void func0f095350(u32 arg0, u32 *arg1)
value = *ptr;
}
*arg1 = *(u32 *)((u32)osRomBase | arg0 | 0xa0000000);
*arg1 = *(u32 *)((uintptr_t)osRomBase | arg0 | 0xa0000000);
__osPiRelAccess();
}
+4 -4
View File
@@ -1367,7 +1367,7 @@ void playerTickChrBody(void)
allocation = g_Vars.currentplayer->gunmem2;
model = (struct model *)(allocation + offset1);
osSyncPrintf("Gunmem: bondsub 0x%08x\n", (u32)model);
osSyncPrintf("Gunmem: bondsub 0x%08x\n", (uintptr_t)model);
offset1 += ALIGN64(sizeof(struct model));
model->anim = (struct anim *)(allocation + offset1);
@@ -1376,12 +1376,12 @@ void playerTickChrBody(void)
offset1 = ALIGN64(offset1);
rwdatas = (union modelrwdata **)(allocation + offset1);
osSyncPrintf("Gunmem: savedata 0x%08x\n", (u32)rwdatas);
osSyncPrintf("Gunmem: savedata 0x%08x\n", (uintptr_t)rwdatas);
offset1 += 0x400;
offset1 = ALIGN64(offset1);
weaponobj = (struct weaponobj *)(allocation + offset1);
osSyncPrintf("Gunmem: wo 0x%08x\n", (u32)weaponobj);
osSyncPrintf("Gunmem: wo 0x%08x\n", (uintptr_t)weaponobj);
offset1 += sizeof(struct weaponobj);
offset1 = ALIGN64(offset1);
@@ -5706,7 +5706,7 @@ void player0f0c3320(Mtxf *matrices, s32 count)
s32 j;
for (i = 0, j = 0; i < count; i++, j += sizeof(Mtxf)) {
mtx00015be4(camGetProjectionMtxF(), (Mtxf *)((u32)matrices + j), &sp40);
mtx00015be4(camGetProjectionMtxF(), (Mtxf *)((uintptr_t)matrices + j), &sp40);
sp40.m[3][0] -= g_Vars.currentplayer->globaldrawworldoffset.x;
sp40.m[3][1] -= g_Vars.currentplayer->globaldrawworldoffset.y;
+12 -12
View File
@@ -170,14 +170,14 @@ void playerReset(void)
if (cmd->param2 == 0) {
g_SpawnPoints[g_NumSpawnPoints++] = cmd->param1;
}
cmd = (struct cmd32 *)((u32)cmd + 12);
cmd = (struct cmd32 *)((uintptr_t)cmd + 12);
break;
case INTROCMD_CASE:
case INTROCMD_CASERESPAWN:
cmd = (struct cmd32 *)((u32)cmd + 12);
cmd = (struct cmd32 *)((uintptr_t)cmd + 12);
break;
case INTROCMD_HILL:
cmd = (struct cmd32 *)((u32)cmd + 8);
cmd = (struct cmd32 *)((uintptr_t)cmd + 8);
break;
case INTROCMD_WEAPON:
if (cmd->param3 == 0 && g_Vars.currentplayer != g_Vars.anti) {
@@ -204,26 +204,26 @@ void playerReset(void)
haseyespy = true;
}
}
cmd = (struct cmd32 *)((u32)cmd + 16);
cmd = (struct cmd32 *)((uintptr_t)cmd + 16);
break;
case INTROCMD_AMMO:
if (cmd->param3 == 0 && g_Vars.currentplayer != g_Vars.anti) {
bgunSetAmmoQuantity(cmd->param1, cmd->param2);
}
cmd = (struct cmd32 *)((u32)cmd + 16);
cmd = (struct cmd32 *)((uintptr_t)cmd + 16);
break;
case INTROCMD_3:
cmd = (struct cmd32 *)((u32)cmd + 32);
cmd = (struct cmd32 *)((uintptr_t)cmd + 32);
break;
case INTROCMD_4:
cmd = (struct cmd32 *)((u32)cmd + 8);
cmd = (struct cmd32 *)((uintptr_t)cmd + 8);
break;
case INTROCMD_OUTFIT:
g_Vars.currentplayer->bondtype = cmd->param1;
cmd = (struct cmd32 *)((u32)cmd + 8);
cmd = (struct cmd32 *)((uintptr_t)cmd + 8);
break;
case INTROCMD_6:
cmd = (struct cmd32 *)((u32)cmd + 40);
cmd = (struct cmd32 *)((uintptr_t)cmd + 40);
break;
case INTROCMD_WATCHTIME:
g_Vars.currentplayer->bondwatchtime60 = 0;
@@ -233,7 +233,7 @@ void playerReset(void)
if (cmd->param1 > 0) {
g_Vars.currentplayer->bondwatchtime60 += (cmd->param1 % 12) * 3600 * 60;
}
cmd = (struct cmd32 *)((u32)cmd + 12);
cmd = (struct cmd32 *)((uintptr_t)cmd + 12);
break;
case INTROCMD_CREDITOFFSET:
thing = (struct gecreditsdata *)((s32)g_GeCreditsData + cmd->param1);
@@ -241,10 +241,10 @@ void playerReset(void)
while (thing->text1 || thing->text2) {
thing++;
}
cmd = (struct cmd32 *)((u32)cmd + 8);
cmd = (struct cmd32 *)((uintptr_t)cmd + 8);
break;
default:
cmd = (struct cmd32 *)((u32)cmd + 4);
cmd = (struct cmd32 *)((uintptr_t)cmd + 4);
}
}
}
+1 -1
View File
@@ -14,7 +14,7 @@
s32 portalConvertCoordinates(s32 portalnum, s32 *start, struct portalthing2 *things)
{
Mtxf *mtx = g_Vars.currentplayer->worldtoscreenmtx;
struct portalvertices *pvertices = (struct portalvertices *) ((u32) g_BgPortals + g_BgPortals[portalnum].verticesoffset);
struct portalvertices *pvertices = (struct portalvertices *) ((uintptr_t) g_BgPortals + g_BgPortals[portalnum].verticesoffset);
struct portalthing2 *left;
struct portalthing2 *right = &things[39];
bool anybehind = false;
+22 -22
View File
@@ -2914,13 +2914,13 @@ bool func0f06bea0(struct model *model, struct modelnode *endnode, struct modelno
if (rwdata->gdl != NULL) {
if (rwdata->gdl == rodata->dl.opagdl) {
s4 = (Gfx *)((u32)rodata->dl.colourtable + ((u32)rodata->dl.opagdl & 0xffffff));
s4 = (Gfx *)((uintptr_t)rodata->dl.colourtable + ((uintptr_t)rodata->dl.opagdl & 0xffffff));
} else {
s4 = rwdata->gdl;
}
if (rodata->dl.xlugdl != NULL) {
s6 = (Gfx *)((u32)rodata->dl.colourtable + ((u32)rodata->dl.xlugdl & 0xffffff));
s6 = (Gfx *)((uintptr_t)rodata->dl.colourtable + ((uintptr_t)rodata->dl.xlugdl & 0xffffff));
}
vertices = rwdata->vertices;
@@ -2930,12 +2930,12 @@ bool func0f06bea0(struct model *model, struct modelnode *endnode, struct modelno
case MODELNODETYPE_GUNDL:
if (s7) {
if (node->rodata->gundl.opagdl != NULL) {
s32 base = (s32)node->rodata->gundl.baseaddr;
s32 base = (intptr_t)node->rodata->gundl.baseaddr;
s4 = (Gfx *)(base + ((u32)node->rodata->gundl.opagdl & 0xffffff));
s4 = (Gfx *)(base + ((uintptr_t)node->rodata->gundl.opagdl & 0xffffff));
if (node->rodata->gundl.xlugdl != NULL) {
s6 = (Gfx *)(base + ((u32)node->rodata->gundl.xlugdl & 0xffffff));
s6 = (Gfx *)(base + ((uintptr_t)node->rodata->gundl.xlugdl & 0xffffff));
}
vertices = (struct gfxvtx *)base;
@@ -7737,7 +7737,7 @@ void doorUpdatePortalIfWindowed(struct prop *doorprop, s32 playercount)
}
}
#define MTX(i) ((Mtxf *)((u32)matrices + i * sizeof(Mtxf)))
#define MTX(i) ((Mtxf *)((uintptr_t)matrices + i * sizeof(Mtxf)))
void doorInitMatrices(struct prop *prop)
{
@@ -13659,7 +13659,7 @@ Gfx *objRender(struct prop *prop, Gfx *gdl, bool xlupass)
node = func0f0687e4(obj->model);
dldata1 = &node->rodata->dl;
dldata2 = (struct modelrwdata_dl *) modelGetNodeRwData(obj->model, node);
oldcolours = (struct colour *) ((((u32) &dldata1->vertices[dldata1->numvertices] + 7) | 7) ^ 7);
oldcolours = (struct colour *) ((((uintptr_t) &dldata1->vertices[dldata1->numvertices] + 7) | 7) ^ 7);
newcolours = (struct colour *) gfxAllocateColours(dldata1->numcolours);
for (i = 0; i < dldata1->numcolours; i++) {
@@ -13977,7 +13977,7 @@ void objDeform(struct defaultobj *obj, s32 level)
ok = false;
}
if ((u32)rwdata->colours == ALIGN8((u32)&rodata->vertices[rodata->numvertices])) {
if ((uintptr_t)rwdata->colours == ALIGN8((uintptr_t)&rodata->vertices[rodata->numvertices])) {
struct colour *colours = vtxstoreAllocate(rodata->numcolours, VTXSTORETYPE_OBJCOL, NULL, 0);
if (colours) {
@@ -14288,12 +14288,12 @@ void piracyRestore(void)
ptr = (u32 *)buffer;
// Align ptr to an 8 byte boundary
while ((u32)ptr % 8) {
while ((uintptr_t)ptr % 8) {
ptr++;
}
// Copy the writeaddr/copylen pairs from ROM to the buffer
dmaExec(ptr, (u32) &_blankSegmentRomStart, 0x40);
dmaExec(ptr, (romptr_t) &_blankSegmentRomStart, 0x40);
// Calculate what needs to be copied and where
i = 0;
@@ -14311,7 +14311,7 @@ void piracyRestore(void)
// Copy it
if (copylen != 0) {
dmaExec((void *) writeaddr, (u32) &_blankSegmentRomStart + readoffset, copylen);
dmaExec((void *) writeaddr, (romptr_t) &_blankSegmentRomStart + readoffset, copylen);
}
// Increment the index, so the next time the function is called
@@ -14972,13 +14972,13 @@ bool func0f0849dc(struct model *model, struct modelnode *nodearg, struct coord *
if (rwdata->gdl != NULL) {
if (rwdata->gdl == rodata->opagdl) {
s3 = (Gfx *)((u32)rodata->colourtable + ((u32)rodata->opagdl & 0xffffff));
s3 = (Gfx *)((uintptr_t)rodata->colourtable + ((u32)rodata->opagdl & 0xffffff));
} else {
s3 = rwdata->gdl;
}
if (rodata->xlugdl != NULL) {
s5 = (void *)((u32)rodata->colourtable + ((u32)rodata->xlugdl & 0xffffff));
s5 = (void *)((uintptr_t)rodata->colourtable + ((u32)rodata->xlugdl & 0xffffff));
}
vertices = rwdata->vertices;
@@ -14990,13 +14990,13 @@ bool func0f0849dc(struct model *model, struct modelnode *nodearg, struct coord *
struct modelrodata_gundl *rodata = &node->rodata->gundl;
if (rodata->opagdl != NULL) {
s3 = (Gfx *)((u32)rodata->baseaddr + ((u32)rodata->opagdl & 0xffffff));
s3 = (Gfx *)((uintptr_t)rodata->baseaddr + ((u32)rodata->opagdl & 0xffffff));
if (rodata->xlugdl != NULL) {
s5 = (Gfx *)((u32)rodata->baseaddr + ((u32)rodata->xlugdl & 0xffffff));
s5 = (Gfx *)((uintptr_t)rodata->baseaddr + ((u32)rodata->xlugdl & 0xffffff));
}
vertices = (void *)(u32)rodata->baseaddr;
vertices = (void *)(uintptr_t)rodata->baseaddr;
}
}
break;
@@ -15105,7 +15105,7 @@ void glassDestroy(struct defaultobj *obj)
u8 buffer[0x20];
u32 *ptr;
u32 romaddr = add43214321(0x00000dc0 - 0x43214321);
ptr = (u32 *) ALIGN16((u32)buffer);
ptr = (u32 *) ALIGN16((uintptr_t)buffer);
dmaExec(ptr, romaddr, 0x10);
if (ptr[1] + ptr[0] != add43214321(0x10a78f00e - 0x43214321)) {
@@ -16198,7 +16198,7 @@ bool objUpdateGeometry(struct prop *prop, u8 **start, u8 **end)
if (obj->flags & OBJFLAG_00000100) {
if ((obj->hidden & (OBJHFLAG_PERIMDISABLED | OBJHFLAG_DOORPERIMDISABLED)) == 0) {
*start = (void *) obj->unkgeo;
*end = (void *)((u32)obj->unkgeo + len);
*end = (void *)((uintptr_t)obj->unkgeo + len);
if (obj->geocount >= 2) {
*end += obj->geocount * 0x40 - 0x40;
@@ -16209,7 +16209,7 @@ bool objUpdateGeometry(struct prop *prop, u8 **start, u8 **end)
}
if (obj->geocount >= 2) {
*start = (void *)((u32)obj->unkgeo + len);
*start = (void *)((uintptr_t)obj->unkgeo + len);
*end = (void *)(*start + obj->geocount * 0x40 - 0x40);
return true;
}
@@ -16220,7 +16220,7 @@ bool objUpdateGeometry(struct prop *prop, u8 **start, u8 **end)
}
*start = (void *) obj->unkgeo;
*end = (void *) ((u32)obj->unkgeo + obj->geocount * 0x40);
*end = (void *) ((uintptr_t)obj->unkgeo + obj->geocount * 0x40);
return true;
}
@@ -17685,7 +17685,7 @@ void modelFreeVertices(s32 vtxstoretype, struct model *model)
rwdata->dl.vertices = rodata->dl.vertices;
}
if ((u32)rwdata->dl.colours != ALIGN8((u32)rodata->dl.vertices + rodata->dl.numvertices * sizeof(struct gfxvtx))) {
if ((uintptr_t)rwdata->dl.colours != ALIGN8((uintptr_t)rodata->dl.vertices + rodata->dl.numvertices * sizeof(struct gfxvtx))) {
if (vtxstoretype == VTXSTORETYPE_OBJVTX) {
newtype = VTXSTORETYPE_OBJCOL;
} else {
@@ -17694,7 +17694,7 @@ void modelFreeVertices(s32 vtxstoretype, struct model *model)
vtxstoreFree(newtype, rwdata->dl.colours);
rwdata->dl.colours = (struct colour *)ALIGN8((u32)rodata->dl.vertices + rodata->dl.numvertices * sizeof(struct gfxvtx));
rwdata->dl.colours = (struct colour *)ALIGN8((uintptr_t)rodata->dl.vertices + rodata->dl.numvertices * sizeof(struct gfxvtx));
}
}
break;
+7 -7
View File
@@ -1237,7 +1237,7 @@ void setupLoadBriefing(s32 stagenum, u8 *buffer, s32 bufferlen, struct briefing
langLoadToAddr(briefing->langbank, langbuffer, langbufferlen);
start = (struct defaultobj *)((u32)setup + (u32)setup->props);
start = (struct defaultobj *)((uintptr_t)setup + (u32)setup->props);
if (start != NULL) {
struct defaultobj *obj;
@@ -1323,10 +1323,10 @@ void setupLoadFiles(s32 stagenum)
setup = (struct stagesetup *)g_GeCreditsData;
langLoad(langGetLangBankIndexFromStagenum(stagenum));
g_StageSetup.intro = (s32 *)((u32)setup + (u32)setup->intro);
g_StageSetup.props = (u32 *)((u32)setup + (u32)setup->props);
g_StageSetup.paths = (struct path *)((u32)setup + (u32)setup->paths);
g_StageSetup.ailists = (struct ailist *)((u32)setup + (u32)setup->ailists);
g_StageSetup.intro = (s32 *)((uintptr_t)setup + (u32)setup->intro);
g_StageSetup.props = (u32 *)((uintptr_t)setup + (u32)setup->props);
g_StageSetup.paths = (struct path *)((uintptr_t)setup + (u32)setup->paths);
g_StageSetup.ailists = (struct ailist *)((uintptr_t)setup + (u32)setup->ailists);
g_LoadType = LOADTYPE_PADS;
@@ -1339,7 +1339,7 @@ void setupLoadFiles(s32 stagenum)
// Convert ailist pointers from file-local to proper pointers
if (g_StageSetup.ailists) {
for (i = 0; g_StageSetup.ailists[i].list != NULL; i++) {
g_StageSetup.ailists[i].list = (u8 *)((u32)setup + (u32)g_StageSetup.ailists[i].list);
g_StageSetup.ailists[i].list = (u8 *)((uintptr_t)setup + (u32)g_StageSetup.ailists[i].list);
}
}
@@ -1383,7 +1383,7 @@ void setupLoadFiles(s32 stagenum)
// and calculate the path lengths
if (g_StageSetup.paths) {
for (i = 0; g_StageSetup.paths[i].pads != NULL; i++) {
g_StageSetup.paths[i].pads = (s32 *)((u32)g_StageSetup.paths[i].pads + (u32)setup);
g_StageSetup.paths[i].pads = (s32 *)((uintptr_t)g_StageSetup.paths[i].pads + (u32)setup);
for (j = 0; g_StageSetup.paths[i].pads[j] >= 0; j++);
+6 -6
View File
@@ -87,9 +87,9 @@ void setupPreparePads(void)
}
}
g_StageSetup.waypoints = (struct waypoint *) ((u32)g_StageSetup.padfiledata + g_PadsFile->waypointsoffset);
g_StageSetup.waygroups = (struct waygroup *) ((u32)g_StageSetup.padfiledata + g_PadsFile->waygroupsoffset);
g_StageSetup.cover = (void *) ((s32)g_StageSetup.padfiledata + g_PadsFile->coversoffset);
g_StageSetup.waypoints = (struct waypoint *) ((uintptr_t)g_StageSetup.padfiledata + g_PadsFile->waypointsoffset);
g_StageSetup.waygroups = (struct waygroup *) ((uintptr_t)g_StageSetup.padfiledata + g_PadsFile->waygroupsoffset);
g_StageSetup.cover = (void *) ((intptr_t)g_StageSetup.padfiledata + g_PadsFile->coversoffset);
if (g_StageSetup.cover != NULL) {
setupPrepareCover();
@@ -99,7 +99,7 @@ void setupPreparePads(void)
waypoint = g_StageSetup.waypoints;
while (waypoint->padnum >= 0) {
waypoint->neighbours = (s32 *)((u32)g_StageSetup.padfiledata + (u32)waypoint->neighbours);
waypoint->neighbours = (s32 *)((uintptr_t)g_StageSetup.padfiledata + (uintptr_t)waypoint->neighbours);
waypoint++;
}
@@ -107,8 +107,8 @@ void setupPreparePads(void)
waygroup = g_StageSetup.waygroups;
while (waygroup->neighbours != NULL) {
waygroup->neighbours = (s32 *)((u32)g_StageSetup.padfiledata + (u32)waygroup->neighbours);
waygroup->waypoints = (s32 *)((u32)g_StageSetup.padfiledata + (u32)waygroup->waypoints);
waygroup->neighbours = (s32 *)((uintptr_t)g_StageSetup.padfiledata + (uintptr_t)waygroup->neighbours);
waygroup->waypoints = (s32 *)((uintptr_t)g_StageSetup.padfiledata + (uintptr_t)waygroup->waypoints);
waygroup++;
}
}
+1 -1
View File
@@ -514,7 +514,7 @@ void splat0f14986c(struct splatdata *splat)
void splatResetChr(struct chrdata *chr)
{
osSyncPrintf("Splat_ResetChr : Reset One Char : chrdata = %x\n", (u32)chr);
osSyncPrintf("Splat_ResetChr : Reset One Char : chrdata = %x\n", (uintptr_t) chr);
chr->bulletstaken = 0;
chr->tickssincesplat = 0;
+2 -2
View File
@@ -74,7 +74,7 @@ struct stagetableentry g_Stages[61] = {
struct stagetableentry *stageGetCurrent(void)
{
struct stagetableentry *stage = g_Stages;
struct stagetableentry *end = (struct stagetableentry *)(u32)stage + ARRAYCOUNT(g_Stages);
struct stagetableentry *end = (struct stagetableentry *)(uintptr_t)stage + ARRAYCOUNT(g_Stages);
s32 stagenum = g_Vars.stagenum;
while (stage < end) {
@@ -91,7 +91,7 @@ struct stagetableentry *stageGetCurrent(void)
s32 stageGetIndex(s32 stagenum)
{
struct stagetableentry *stage = g_Stages;
struct stagetableentry *end = (struct stagetableentry *)(u32)stage + ARRAYCOUNT(g_Stages);
struct stagetableentry *end = (struct stagetableentry *)(uintptr_t)stage + ARRAYCOUNT(g_Stages);
s32 i = 0;
while (stage < end) {
+1 -1
View File
@@ -1108,7 +1108,7 @@ s32 texLoadFromGdl(Gfx *arg0, s32 gdlsizeinbytes, Gfx *arg2, struct texpool *poo
}
}
return (u32) s6 - (u32) arg2;
return (uintptr_t) s6 - (uintptr_t) arg2;
}
void texCopyGdls(Gfx *src, Gfx *dst, s32 arg2)
+8 -8
View File
@@ -342,7 +342,7 @@ s32 texAlignIndices(u8 *src, s32 width, s32 height, s32 format, u8 *dst)
src++;
}
outptr = (u8 *)(((u32)outptr + 7) & ~7);
outptr = (u8 *)(((uintptr_t)outptr + 7) & ~7);
}
return outptr - dst;
@@ -1457,9 +1457,9 @@ void texReadAlphaBits(u8 *dst, s32 count)
*/
s32 texReadUncompressed(u8 *dst, s32 width, s32 height, s32 format)
{
u32 *dst32 = (u32 *)(((u32)dst + 0xf) & ~0xf);
u16 *dst16 = (u16 *)(((u32)dst + 7) & ~7);
u8 *dst8 = (u8 *)(((u32)dst + 7) & ~7);
u32 *dst32 = (u32 *)(((uintptr_t)dst + 0xf) & ~0xf);
u16 *dst16 = (u16 *)(((uintptr_t)dst + 7) & ~7);
u8 *dst8 = (u8 *)(((uintptr_t)dst + 7) & ~7);
s32 x;
s32 y;
@@ -2161,7 +2161,7 @@ void texLoad(s32 *updateword, struct texpool *pool, bool arg2)
return;
}
alignedcompbuffer = (u8 *) (((u32)compbuffer + 0xf) >> 4 << 4);
alignedcompbuffer = (u8 *) (((uintptr_t)compbuffer + 0xf) >> 4 << 4);
if (alignedcompbuffer);
if (tex);
@@ -2179,7 +2179,7 @@ void texLoad(s32 *updateword, struct texpool *pool, bool arg2)
// Copy the compressed texture to RAM
dmaExec(alignedcompbuffer,
(u32) &_texturesdataSegmentRomStart + (thisoffset & 0xfffffff8),
(romptr_t) &_texturesdataSegmentRomStart + (thisoffset & 0xfffffff8),
((u32) (nextoffset - thisoffset) + 0x1f) >> 4 << 4);
compptr = (u8 *) alignedcompbuffer + (thisoffset & 7);
@@ -2215,7 +2215,7 @@ void texLoad(s32 *updateword, struct texpool *pool, bool arg2)
// - set leftpos to 0x10 after rightpos
if (usingsharedpool) {
tail = pool->rightpos;
pool->rightpos = (struct tex *) ((((u32) buffer5kb + 0xf) >> 4 << 4) + sizeof(struct tex));
pool->rightpos = (struct tex *) ((((uintptr_t) buffer5kb + 0xf) >> 4 << 4) + sizeof(struct tex));
pool->leftpos = ((u8 *) pool->rightpos + sizeof(struct tex));
while (tail) {
@@ -2263,7 +2263,7 @@ void texLoad(s32 *updateword, struct texpool *pool, bool arg2)
pool->rightpos->next = 0;
if (tail != NULL) {
tail->next = (u32) pool->rightpos & 0xffffff;
tail->next = (uintptr_t) pool->rightpos & 0xffffff;
} else {
pool->head = pool->rightpos;
}
+1 -1
View File
@@ -15,5 +15,5 @@ void texInit(void)
g_Textures = mempAlloc(len, MEMPOOL_PERMANENT);
dmaExec(g_Textures, (u32) &_textureslistSegmentRomStart, len);
dmaExec(g_Textures, (romptr_t) &_textureslistSegmentRomStart, len);
}
+23 -23
View File
@@ -48,31 +48,31 @@ void texReset(void)
s32 i;
g_TextureConfigSegment = mempAlloc(len, MEMPOOL_STAGE);
dmaExec(g_TextureConfigSegment, (u32)&_textureconfigSegmentRomStart, len);
dmaExec(g_TextureConfigSegment, (romptr_t)&_textureconfigSegmentRomStart, len);
g_TexBase = (u32)g_TextureConfigSegment - ROM_SIZE * 1024 * 1024;
g_TexGdl1 = (Gfx *)(g_TexBase + (u32)g_TcGdl1);
g_TexGdl2 = (Gfx *)(g_TexBase + (u32)g_TcGdl2);
g_TexGdl3 = (Gfx *)(g_TexBase + (u32)g_TcGdl3);
g_ExplosionTexturePairs = (void *)(g_TexBase + (u32)g_TcExplosionTexturePairs);
g_TexWallhitConfigs = (struct textureconfig *)(g_TexBase + (u32)g_TcWallhitConfigs);
g_TexBeamConfigs = (struct textureconfig *)(g_TexBase + (u32)g_TcBeamConfigs);
g_TexLaserConfigs = (struct textureconfig *)(g_TexBase + (u32)g_TcLaserConfigs);
g_TexGroup03Configs = (struct textureconfig *)(g_TexBase + (u32)g_TcGroup03Configs);
g_TexGeCrosshairConfigs = (struct textureconfig *)(g_TexBase + (u32)g_TcGeCrosshairConfigs);
g_TexRedLinesConfigs = (struct textureconfig *)(g_TexBase + (u32)g_TcRedLineConfigs);
g_TexShadowConfigs = (struct textureconfig *)(g_TexBase + (u32)g_TcGroup06Configs);
g_TexShieldConfigs = (struct textureconfig *)(g_TexBase + (u32)g_TcShieldConfigs);
g_TexShardConfigs = (struct textureconfig *)(g_TexBase + (u32)g_TcShardConfigs);
g_TexScreenConfigs = (struct textureconfig *)(g_TexBase + (u32)g_TcScreenConfigs);
g_TexWaterConfigs = (struct textureconfig *)(g_TexBase + (u32)g_TcWaterConfigs);
g_TexSkyConfigs = (struct textureconfig *)(g_TexBase + (u32)g_TcSkyConfigs);
g_TexLightGlareConfigs = (struct textureconfig *)(g_TexBase + (u32)g_TcLightGlareConfigs);
g_TexSparkConfigs = (struct textureconfig *)(g_TexBase + (u32)g_TcSparkConfigs);
g_TexGeneralConfigs = (struct textureconfig *)(g_TexBase + (u32)g_TcGeneralConfigs);
g_TexRadarConfigs = (struct textureconfig *)(g_TexBase + (u32)g_TcRadarConfigs);
g_TexBase = (uintptr_t)g_TextureConfigSegment - ROM_SIZE * 1024 * 1024;
g_TexGdl1 = (Gfx *)(g_TexBase + (uintptr_t)g_TcGdl1);
g_TexGdl2 = (Gfx *)(g_TexBase + (uintptr_t)g_TcGdl2);
g_TexGdl3 = (Gfx *)(g_TexBase + (uintptr_t)g_TcGdl3);
g_ExplosionTexturePairs = (void *)(g_TexBase + (uintptr_t)g_TcExplosionTexturePairs);
g_TexWallhitConfigs = (struct textureconfig *)(g_TexBase + (uintptr_t)g_TcWallhitConfigs);
g_TexBeamConfigs = (struct textureconfig *)(g_TexBase + (uintptr_t)g_TcBeamConfigs);
g_TexLaserConfigs = (struct textureconfig *)(g_TexBase + (uintptr_t)g_TcLaserConfigs);
g_TexGroup03Configs = (struct textureconfig *)(g_TexBase + (uintptr_t)g_TcGroup03Configs);
g_TexGeCrosshairConfigs = (struct textureconfig *)(g_TexBase + (uintptr_t)g_TcGeCrosshairConfigs);
g_TexRedLinesConfigs = (struct textureconfig *)(g_TexBase + (uintptr_t)g_TcRedLineConfigs);
g_TexShadowConfigs = (struct textureconfig *)(g_TexBase + (uintptr_t)g_TcGroup06Configs);
g_TexShieldConfigs = (struct textureconfig *)(g_TexBase + (uintptr_t)g_TcShieldConfigs);
g_TexShardConfigs = (struct textureconfig *)(g_TexBase + (uintptr_t)g_TcShardConfigs);
g_TexScreenConfigs = (struct textureconfig *)(g_TexBase + (uintptr_t)g_TcScreenConfigs);
g_TexWaterConfigs = (struct textureconfig *)(g_TexBase + (uintptr_t)g_TcWaterConfigs);
g_TexSkyConfigs = (struct textureconfig *)(g_TexBase + (uintptr_t)g_TcSkyConfigs);
g_TexLightGlareConfigs = (struct textureconfig *)(g_TexBase + (uintptr_t)g_TcLightGlareConfigs);
g_TexSparkConfigs = (struct textureconfig *)(g_TexBase + (uintptr_t)g_TcSparkConfigs);
g_TexGeneralConfigs = (struct textureconfig *)(g_TexBase + (uintptr_t)g_TcGeneralConfigs);
g_TexRadarConfigs = (struct textureconfig *)(g_TexBase + (uintptr_t)g_TcRadarConfigs);
g_TexNumConfigs = (len - (u32)&g_TcWallhitConfigs + ROM_SIZE * 1024 * 1024) / sizeof(struct textureconfig);
g_TexNumConfigs = (len - (uintptr_t)&g_TcWallhitConfigs + ROM_SIZE * 1024 * 1024) / sizeof(struct textureconfig);
g_TexWords = mempAlloc(ALIGN16(g_TexNumConfigs * 4), MEMPOOL_STAGE);
for (i = 0; i < g_TexNumConfigs; i++) {
+2 -2
View File
@@ -41,9 +41,9 @@ void stageParseTiles(void)
tile->ymax = mult6(tile->ymax) + 16;
tile->zmin = mult6(tile->zmin) + 18;
tile->zmax = mult6(tile->zmax) + 18;
geo = (struct geo *)((u8 *)geo + (u32)(geo->numvertices - 0x40) * 6 + 0x18e);
geo = (struct geo *)((u8 *)geo + (uintptr_t)(geo->numvertices - 0x40) * 6 + 0x18e);
} else if (geo->type == GEOTYPE_TILE_F) {
geo = (struct geo *)((u8 *)geo + (u32)(geo->numvertices - 0x40) * 12 + 0x310);
geo = (struct geo *)((u8 *)geo + (uintptr_t)(geo->numvertices - 0x40) * 12 + 0x310);
} else if (geo->type == GEOTYPE_BLOCK) {
geo = (struct geo *)((u8 *)geo + sizeof(struct geoblock));
} else if (geo->type == GEOTYPE_CYL) {
+6 -6
View File
@@ -897,7 +897,7 @@ Gfx *titleRenderPdLogoModel(Gfx *gdl, struct model *model, bool arg2, f32 arg3,
gdl = renderdata.gdl;
for (j = 0, k = 0; j < model->definition->nummatrices; j++, k += sizeof(Mtxf)) {
mtx4Copy((Mtxf *)((u32)model->matrices + k), &sp6c);
mtx4Copy((Mtxf *)((uintptr_t)model->matrices + k), &sp6c);
mtxF2L(&sp6c, model->matrices + j);
}
@@ -7588,7 +7588,7 @@ Gfx *titleRenderPdLogo(Gfx *gdl)
s32 j;
for (sp19c = 0, j = 0; sp19c < g_TitleModelJpnLogo2->definition->nummatrices; sp19c++, j += sizeof(Mtxf)) {
mtx4Copy((Mtxf *)((u32)g_TitleModelJpnLogo2->matrices + j), &sp158);
mtx4Copy((Mtxf *)((uintptr_t)g_TitleModelJpnLogo2->matrices + j), &sp158);
mtxF2L(&sp158, g_TitleModelJpnLogo2->matrices + sp19c);
}
}
@@ -7649,7 +7649,7 @@ Gfx *titleRenderPdLogo(Gfx *gdl)
s32 j;
for (sp14c = 0, j = 0; sp14c < g_TitleModelJpnPd->definition->nummatrices; sp14c++, j += sizeof(Mtxf)) {
mtx4Copy((Mtxf *)((u32)g_TitleModelJpnPd->matrices + j), &spf4);
mtx4Copy((Mtxf *)((uintptr_t)g_TitleModelJpnPd->matrices + j), &spf4);
mtxF2L(&spf4, g_TitleModelJpnPd->matrices + sp14c);
}
}
@@ -7683,7 +7683,7 @@ Gfx *titleRenderPdLogo(Gfx *gdl)
s32 j;
for (sp9c = 0, j = 0; sp9c < g_TitleModelJpnLogo1->definition->nummatrices; sp9c++, j += sizeof(Mtxf)) {
mtx4Copy((Mtxf *)((u32)g_TitleModelJpnLogo1->matrices + j), &sp5c);
mtx4Copy((Mtxf *)((uintptr_t)g_TitleModelJpnLogo1->matrices + j), &sp5c);
mtxF2L(&sp5c, g_TitleModelJpnLogo1->matrices + sp9c);
}
}
@@ -8009,7 +8009,7 @@ Gfx *titleRenderNintendoLogo(Gfx *gdl)
gdl = renderdata.gdl;
for (i = 0, j = 0; i < g_TitleModel->definition->nummatrices; i++, j += sizeof(Mtxf)) {
mtx4Copy((Mtxf *)((u32)g_TitleModel->matrices + j), &sp54);
mtx4Copy((Mtxf *)((uintptr_t)g_TitleModel->matrices + j), &sp54);
mtxF2L(&sp54, g_TitleModel->matrices + i);
}
}
@@ -8256,7 +8256,7 @@ Gfx *titleRenderRareLogo(Gfx *gdl)
for (i = 0, j = 0; i < g_TitleModel->definition->nummatrices; i++, j += sizeof(Mtxf)) {
Mtxf sp58;
mtx4Copy((Mtxf *)((u32)g_TitleModel->matrices + j), &sp58);
mtx4Copy((Mtxf *)((uintptr_t)g_TitleModel->matrices + j), &sp58);
mtxF2L(&sp58, g_TitleModel->matrices + i);
}
}
+1 -1
View File
@@ -479,7 +479,7 @@ void *frLoadRomData(u32 len)
g_FrRomData = mempAlloc(ALIGN16(len), MEMPOOL_STAGE);
if (g_FrRomData) {
return dmaExecWithAutoAlign(g_FrRomData, (u32)&_firingrangeSegmentRomStart, len);
return dmaExecWithAutoAlign(g_FrRomData, (romptr_t) &_firingrangeSegmentRomStart, len);
}
return NULL;
+71 -71
View File
@@ -30,7 +30,7 @@ struct menudialogdef g_BioTextMenuDialog;
struct menudialogdef g_HangarLocationDetailsMenuDialog;
struct menudialogdef g_HangarVehicleDetailsMenuDialog;
s32 frDetailsOkMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult frDetailsOkMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data)
{
s32 i;
@@ -72,7 +72,7 @@ s32 frDetailsOkMenuHandler(s32 operation, struct menuitem *item, union handlerda
return 0;
}
s32 frAbortMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult frAbortMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_SET) {
if (frIsInTraining()) {
@@ -85,7 +85,7 @@ s32 frAbortMenuHandler(s32 operation, struct menuitem *item, union handlerdata *
struct menudialogdef g_FrDifficultyMenuDialog;
s32 frWeaponListMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult frWeaponListMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data)
{
s32 weaponnum;
s32 score;
@@ -212,7 +212,7 @@ s32 frWeaponListMenuHandler(s32 operation, struct menuitem *item, union handlerd
return 0;
}
s32 frTrainingInfoMenuDialog(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data)
MenuDialogHandlerResult frTrainingInfoMenuDialog(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data)
{
u32 stack;
s32 weaponnum;
@@ -246,7 +246,7 @@ s32 frTrainingInfoMenuDialog(s32 operation, struct menudialogdef *dialogdef, uni
return 0;
}
s32 frTrainingStatsMenuDialog(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data)
MenuDialogHandlerResult frTrainingStatsMenuDialog(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data)
{
if (operation == MENUOP_CLOSE) {
if (frIsInTraining() == false) {
@@ -261,7 +261,7 @@ s32 frTrainingStatsMenuDialog(s32 operation, struct menudialogdef *dialogdef, un
* This is an unused menu handler which implements the difficulty selection
* using a dropdown.
*/
s32 frDifficultyDropdownMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult frDifficultyDropdownMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data)
{
u16 names[] = {
L_MPMENU_439, // "Bronze"
@@ -291,7 +291,7 @@ s32 frDifficultyDropdownMenuHandler(s32 operation, struct menuitem *item, union
return 0;
}
s32 frDifficultyMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult frDifficultyMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data)
{
switch (operation) {
case MENUOP_CHECKHIDDEN:
@@ -570,7 +570,7 @@ char *frMenuTextAmmoLimitValue(struct menuitem *item)
* as well as the player's score chart. There are lines leading from
* the score chart to the diagram.
*/
s32 frScoringMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult frScoringMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_RENDER) {
Gfx *gdl = data->type19.gdl;
@@ -882,7 +882,7 @@ s32 frScoringMenuHandler(s32 operation, struct menuitem *item, union handlerdata
}
#if VERSION >= VERSION_NTSC_1_0
s32 menuhandlerFrFailedContinue(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult menuhandlerFrFailedContinue(s32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_SET) {
if (g_Vars.currentplayer->prop->rooms[0] == 0xa) {
@@ -984,39 +984,39 @@ struct menuitem g_FrTrainingInfoInGameMenuItems[] = {
0,
MENUITEMFLAG_00000002,
L_MPMENU_443, // "Difficulty:"
(u32)&frMenuTextDifficultyName,
(uintptr_t)&frMenuTextDifficultyName,
NULL,
},
{
MENUITEMTYPE_LABEL,
0,
MENUITEMFLAG_00000002,
(u32)&frMenuTextGoalScoreLabel,
(u32)&frMenuTextGoalScoreValue,
(uintptr_t)&frMenuTextGoalScoreLabel,
(uintptr_t)&frMenuTextGoalScoreValue,
NULL,
},
{
MENUITEMTYPE_LABEL,
0,
MENUITEMFLAG_00000002,
(u32)&frMenuTextMinAccuracyOrTargetsLabel,
(u32)&frMenuTextMinAccuracyOrTargetsValue,
(uintptr_t)&frMenuTextMinAccuracyOrTargetsLabel,
(uintptr_t)&frMenuTextMinAccuracyOrTargetsValue,
NULL,
},
{
MENUITEMTYPE_LABEL,
0,
MENUITEMFLAG_00000002,
(u32)&frMenuTextTimeLimitLabel,
(u32)&frMenuTextTimeLimitValue,
(uintptr_t)&frMenuTextTimeLimitLabel,
(uintptr_t)&frMenuTextTimeLimitValue,
NULL,
},
{
MENUITEMTYPE_LABEL,
0,
MENUITEMFLAG_00000002,
(u32)&frMenuTextAmmoLimitLabel,
(u32)&frMenuTextAmmoLimitValue,
(uintptr_t)&frMenuTextAmmoLimitLabel,
(uintptr_t)&frMenuTextAmmoLimitValue,
NULL,
},
{
@@ -1077,39 +1077,39 @@ struct menuitem g_FrTrainingInfoPreGameMenuItems[] = {
0,
MENUITEMFLAG_00000002,
L_MPMENU_443, // "Difficulty:"
(u32)&frMenuTextDifficultyName,
(uintptr_t)&frMenuTextDifficultyName,
NULL,
},
{
MENUITEMTYPE_LABEL,
0,
MENUITEMFLAG_00000002,
(u32)&frMenuTextGoalScoreLabel,
(u32)&frMenuTextGoalScoreValue,
(uintptr_t)&frMenuTextGoalScoreLabel,
(uintptr_t)&frMenuTextGoalScoreValue,
NULL,
},
{
MENUITEMTYPE_LABEL,
0,
MENUITEMFLAG_00000002,
(u32)&frMenuTextMinAccuracyOrTargetsLabel,
(u32)&frMenuTextMinAccuracyOrTargetsValue,
(uintptr_t)&frMenuTextMinAccuracyOrTargetsLabel,
(uintptr_t)&frMenuTextMinAccuracyOrTargetsValue,
NULL,
},
{
MENUITEMTYPE_LABEL,
0,
MENUITEMFLAG_00000002,
(u32)&frMenuTextTimeLimitLabel,
(u32)&frMenuTextTimeLimitValue,
(uintptr_t)&frMenuTextTimeLimitLabel,
(uintptr_t)&frMenuTextTimeLimitValue,
NULL,
},
{
MENUITEMTYPE_LABEL,
0,
MENUITEMFLAG_00000002,
(u32)&frMenuTextAmmoLimitLabel,
(u32)&frMenuTextAmmoLimitValue,
(uintptr_t)&frMenuTextAmmoLimitLabel,
(uintptr_t)&frMenuTextAmmoLimitValue,
NULL,
},
{
@@ -1188,7 +1188,7 @@ struct menuitem g_FrCompletedMenuItems[] = {
0,
MENUITEMFLAG_00000002,
L_MPMENU_450, // "Score:"
(u32)&frMenuTextScoreValue,
(uintptr_t)&frMenuTextScoreValue,
NULL,
},
{
@@ -1196,7 +1196,7 @@ struct menuitem g_FrCompletedMenuItems[] = {
0,
MENUITEMFLAG_00000002,
L_MPMENU_451, // "Targets Destroyed:"
(u32)&frMenuTextTargetsDestroyedValue,
(uintptr_t)&frMenuTextTargetsDestroyedValue,
NULL,
},
{
@@ -1212,7 +1212,7 @@ struct menuitem g_FrCompletedMenuItems[] = {
0,
MENUITEMFLAG_00000002,
L_MPMENU_452, // "Difficulty:"
(u32)&frMenuTextDifficultyName,
(uintptr_t)&frMenuTextDifficultyName,
NULL,
},
{
@@ -1220,7 +1220,7 @@ struct menuitem g_FrCompletedMenuItems[] = {
0,
MENUITEMFLAG_00000002,
L_MPMENU_453, // "Time Taken:"
(u32)&frMenuTextTimeTakenValue,
(uintptr_t)&frMenuTextTimeTakenValue,
NULL,
},
{
@@ -1236,7 +1236,7 @@ struct menuitem g_FrCompletedMenuItems[] = {
0,
MENUITEMFLAG_00000002,
L_MPMENU_454, // "Weapon:"
(u32)&frMenuTextWeaponName,
(uintptr_t)&frMenuTextWeaponName,
NULL,
},
{
@@ -1244,7 +1244,7 @@ struct menuitem g_FrCompletedMenuItems[] = {
0,
MENUITEMFLAG_00000002,
L_MPMENU_455, // "Accuracy:"
(u32)&frMenuTextAccuracyValue,
(uintptr_t)&frMenuTextAccuracyValue,
NULL,
},
{
@@ -1295,7 +1295,7 @@ struct menuitem g_FrFailedMenuItems[] = {
MENUITEMTYPE_LABEL,
0,
MENUITEMFLAG_SELECTABLE_CENTRE,
(u32)&frMenuTextFailReason,
(uintptr_t)&frMenuTextFailReason,
0,
NULL,
},
@@ -1314,7 +1314,7 @@ struct menuitem g_FrFailedMenuItems[] = {
0,
MENUITEMFLAG_00000002,
L_MPMENU_450, // "Score:"
(u32)&frMenuTextScoreValue,
(uintptr_t)&frMenuTextScoreValue,
NULL,
},
{
@@ -1322,7 +1322,7 @@ struct menuitem g_FrFailedMenuItems[] = {
0,
MENUITEMFLAG_00000002,
L_MPMENU_451, // "Targets Destroyed:"
(u32)&frMenuTextTargetsDestroyedValue,
(uintptr_t)&frMenuTextTargetsDestroyedValue,
NULL,
},
{
@@ -1338,7 +1338,7 @@ struct menuitem g_FrFailedMenuItems[] = {
0,
MENUITEMFLAG_00000002,
L_MPMENU_452, // "Difficulty:"
(u32)&frMenuTextDifficultyName,
(uintptr_t)&frMenuTextDifficultyName,
NULL,
},
{
@@ -1346,7 +1346,7 @@ struct menuitem g_FrFailedMenuItems[] = {
0,
MENUITEMFLAG_00000002,
L_MPMENU_453, // "Time Taken:"
(u32)&frMenuTextTimeTakenValue,
(uintptr_t)&frMenuTextTimeTakenValue,
NULL,
},
{
@@ -1362,7 +1362,7 @@ struct menuitem g_FrFailedMenuItems[] = {
0,
MENUITEMFLAG_00000002,
L_MPMENU_454, // "Weapon:"
(u32)&frMenuTextWeaponName,
(uintptr_t)&frMenuTextWeaponName,
NULL,
},
{
@@ -1370,7 +1370,7 @@ struct menuitem g_FrFailedMenuItems[] = {
0,
MENUITEMFLAG_00000002,
L_MPMENU_455, // "Accuracy:"
(u32)&frMenuTextAccuracyValue,
(uintptr_t)&frMenuTextAccuracyValue,
NULL,
},
{
@@ -1416,7 +1416,7 @@ struct menudialogdef g_FrFailedMenuDialog = {
#endif
};
s32 ciOfficeInformationMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult ciOfficeInformationMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data)
{
struct optiongroup groups[2] = {
{ 0, L_MPMENU_421 }, // "Character Profiles"
@@ -1525,7 +1525,7 @@ struct menudialogdef g_NowSafeMenuDialog = {
NULL,
};
s32 ciCharacterProfileMenuDialog(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data)
MenuDialogHandlerResult ciCharacterProfileMenuDialog(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data)
{
u32 bodynum = ciGetChrBioBodynumBySlot(g_ChrBioSlot);
u32 mpbodynum = mpGetMpbodynumByBodynum(bodynum);
@@ -1682,7 +1682,7 @@ char *ciMenuTextMiscBioName(struct menuitem *item)
return g_StringPointer;
}
s32 dtDeviceListMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult dtDeviceListMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data)
{
switch (operation) {
case MENUOP_GETOPTIONCOUNT:
@@ -1717,7 +1717,7 @@ char *dtMenuTextName(struct menuitem *item)
return bgunGetName(weaponnum);
}
s32 menuhandlerDtOkOrResume(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult menuhandlerDtOkOrResume(s32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_SET) {
// @bug: dtBegin() should not be called if training is already in
@@ -1729,7 +1729,7 @@ s32 menuhandlerDtOkOrResume(s32 operation, struct menuitem *item, union handlerd
return 0;
}
s32 menuhandler001a6514(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult menuhandler001a6514(s32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_SET) {
dtEnd();
@@ -1752,7 +1752,7 @@ struct menuitem g_BioProfileMenuItems[] = {
0,
MENUITEMFLAG_NEWCOLUMN | MENUITEMFLAG_00000002,
L_MPMENU_432, // "Name:"
(u32)&ciMenuTextChrBioName,
(uintptr_t)&ciMenuTextChrBioName,
NULL,
},
{
@@ -1760,7 +1760,7 @@ struct menuitem g_BioProfileMenuItems[] = {
0,
MENUITEMFLAG_00000002,
L_MPMENU_433, // "Age:"
(u32)&ciMenuTextChrBioAge,
(uintptr_t)&ciMenuTextChrBioAge,
NULL,
},
{
@@ -1768,7 +1768,7 @@ struct menuitem g_BioProfileMenuItems[] = {
0,
MENUITEMFLAG_00000002,
L_MPMENU_434, // "Race:"
(u32)&ciMenuTextChrBioRace,
(uintptr_t)&ciMenuTextChrBioRace,
NULL,
},
{
@@ -1845,7 +1845,7 @@ struct menuitem g_BioTextMenuItems[] = {
struct menudialogdef g_BioTextMenuDialog = {
MENUDIALOGTYPE_DEFAULT,
(u32)&ciMenuTextMiscBioName,
(uintptr_t)&ciMenuTextMiscBioName,
g_BioTextMenuItems,
NULL,
MENUDIALOGFLAG_DISABLERESIZE,
@@ -1873,7 +1873,7 @@ struct menudialogdef g_DtListMenuDialog = {
NULL,
};
s32 dtTrainingDetailsMenuDialog(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data)
MenuDialogHandlerResult dtTrainingDetailsMenuDialog(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data)
{
switch (operation) {
case MENUOP_OPEN:
@@ -1990,7 +1990,7 @@ char *dtMenuTextTimeTakenValue(struct menuitem *item)
return g_StringPointer;
}
s32 menudialogDeviceTrainingResults(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data)
MenuDialogHandlerResult menudialogDeviceTrainingResults(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data)
{
if (operation == MENUOP_CLOSE) {
chrSetStageFlag(NULL, 0x08000000);
@@ -1999,7 +1999,7 @@ s32 menudialogDeviceTrainingResults(s32 operation, struct menudialogdef *dialogd
return false;
}
s32 htHoloListMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult htHoloListMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data)
{
switch (operation) {
case MENUOP_GETOPTIONCOUNT:
@@ -2032,7 +2032,7 @@ char *htMenuTextName(struct menuitem *item)
return htGetName(htGetIndexBySlot(var80088bb4));
}
s32 menuhandler001a6a34(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult menuhandler001a6a34(s32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_SET) {
htBegin();
@@ -2042,7 +2042,7 @@ s32 menuhandler001a6a34(s32 operation, struct menuitem *item, union handlerdata
return 0;
}
s32 menuhandler001a6a70(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult menuhandler001a6a70(s32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_SET) {
htEnd();
@@ -2051,7 +2051,7 @@ s32 menuhandler001a6a70(s32 operation, struct menuitem *item, union handlerdata
return 0;
}
s32 menudialog001a6aa4(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data)
MenuDialogHandlerResult menudialog001a6aa4(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data)
{
switch (operation) {
case MENUOP_OPEN:
@@ -2108,7 +2108,7 @@ char *htMenuTextTimeTakenValue(struct menuitem *item)
return g_StringPointer;
}
s32 menudialogFiringRangeResults(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data)
MenuDialogHandlerResult menudialogFiringRangeResults(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data)
{
if (operation == MENUOP_CLOSE) {
chrSetStageFlag(NULL, 0x08000000);
@@ -2172,7 +2172,7 @@ struct menuitem g_DtDetailsMenuItems[] = {
MENUITEMTYPE_SELECTABLE,
0,
MENUITEMFLAG_SELECTABLE_CLOSESDIALOG,
(u32)&dtMenuTextOkOrResume,
(uintptr_t)&dtMenuTextOkOrResume,
0,
menuhandlerDtOkOrResume,
},
@@ -2180,7 +2180,7 @@ struct menuitem g_DtDetailsMenuItems[] = {
MENUITEMTYPE_SELECTABLE,
0,
MENUITEMFLAG_SELECTABLE_CLOSESDIALOG,
(u32)&dtMenuTextCancelOrAbort,
(uintptr_t)&dtMenuTextCancelOrAbort,
0,
menuhandler001a6514,
},
@@ -2189,7 +2189,7 @@ struct menuitem g_DtDetailsMenuItems[] = {
struct menudialogdef g_DtDetailsMenuDialog = {
MENUDIALOGTYPE_DEFAULT,
(u32)&dtMenuTextName,
(uintptr_t)&dtMenuTextName,
g_DtDetailsMenuItems,
dtTrainingDetailsMenuDialog,
MENUDIALOGFLAG_0002 | MENUDIALOGFLAG_STARTSELECTS | MENUDIALOGFLAG_DISABLERESIZE,
@@ -2218,7 +2218,7 @@ struct menuitem g_DtFailedMenuItems[] = {
0,
MENUITEMFLAG_00000002,
L_MPMENU_424, // "Time Taken:"
(u32)&dtMenuTextTimeTakenValue,
(uintptr_t)&dtMenuTextTimeTakenValue,
NULL,
},
{
@@ -2271,7 +2271,7 @@ struct menuitem g_DtCompletedMenuItems[] = {
0,
MENUITEMFLAG_00000002,
L_MPMENU_424, // "Time Taken:"
(u32)&dtMenuTextTimeTakenValue,
(uintptr_t)&dtMenuTextTimeTakenValue,
NULL,
},
{
@@ -2352,7 +2352,7 @@ struct menuitem g_HtDetailsMenuItems[] = {
MENUITEMTYPE_SELECTABLE,
0,
MENUITEMFLAG_SELECTABLE_CLOSESDIALOG,
(u32)&htMenuTextOkOrResume,
(uintptr_t)&htMenuTextOkOrResume,
0,
menuhandler001a6a34,
},
@@ -2360,7 +2360,7 @@ struct menuitem g_HtDetailsMenuItems[] = {
MENUITEMTYPE_SELECTABLE,
0,
MENUITEMFLAG_SELECTABLE_CLOSESDIALOG,
(u32)&htMenuTextCancelOrAbort,
(uintptr_t)&htMenuTextCancelOrAbort,
0,
menuhandler001a6a70,
},
@@ -2369,7 +2369,7 @@ struct menuitem g_HtDetailsMenuItems[] = {
struct menudialogdef g_HtDetailsMenuDialog = {
MENUDIALOGTYPE_DEFAULT,
(u32)&htMenuTextName,
(uintptr_t)&htMenuTextName,
g_HtDetailsMenuItems,
menudialog001a6aa4,
MENUDIALOGFLAG_0002 | MENUDIALOGFLAG_STARTSELECTS | MENUDIALOGFLAG_DISABLERESIZE,
@@ -2398,7 +2398,7 @@ struct menuitem g_HtFailedMenuItems[] = {
0,
MENUITEMFLAG_00000002,
L_MPMENU_424, // "Time Taken:"
(u32)&htMenuTextTimeTakenValue,
(uintptr_t)&htMenuTextTimeTakenValue,
NULL,
},
{
@@ -2457,7 +2457,7 @@ struct menuitem g_HtCompletedMenuItems[] = {
0,
MENUITEMFLAG_00000002,
L_MPMENU_424, // "Time Taken:"
(u32)&htMenuTextTimeTakenValue,
(uintptr_t)&htMenuTextTimeTakenValue,
NULL,
},
{
@@ -2494,7 +2494,7 @@ struct menudialogdef g_HtCompletedMenuDialog = {
&g_HtListMenuDialog,
};
s32 ciHangarInformationMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult ciHangarInformationMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data)
{
struct optiongroup groups[2] = {
{ 0, L_MPMENU_419 }, // "Locations"
@@ -2539,7 +2539,7 @@ s32 ciHangarInformationMenuHandler(s32 operation, struct menuitem *item, union h
return 0;
}
s32 ciHangarTitleMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data)
MenuItemHandlerResult ciHangarTitleMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data)
{
if (operation == MENUOP_RENDER) {
Gfx *gdl = data->type19.gdl;
@@ -2631,7 +2631,7 @@ struct modelpartvisibility g_BioPartVisibility[] = {
{ 255 },
};
s32 ciHangarHolographMenuDialog(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data)
MenuDialogHandlerResult ciHangarHolographMenuDialog(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data)
{
s32 index = ciGetHangarBioIndexBySlot(g_HangarBioSlot);
@@ -2819,7 +2819,7 @@ struct menudialogdef g_HangarVehicleHolographMenuDialog = {
struct menudialogdef g_HangarVehicleDetailsMenuDialog = {
MENUDIALOGTYPE_DEFAULT,
(u32)&bioMenuTextName,
(uintptr_t)&bioMenuTextName,
g_HangarDetailsMenuItems,
NULL,
MENUDIALOGFLAG_0002 | MENUDIALOGFLAG_DISABLERESIZE,
@@ -2828,7 +2828,7 @@ struct menudialogdef g_HangarVehicleDetailsMenuDialog = {
struct menudialogdef g_HangarLocationDetailsMenuDialog = {
MENUDIALOGTYPE_DEFAULT,
(u32)&bioMenuTextName,
(uintptr_t)&bioMenuTextName,
g_HangarDetailsMenuItems,
NULL,
MENUDIALOGFLAG_0002 | MENUDIALOGFLAG_DISABLERESIZE,
+1 -1
View File
@@ -111,7 +111,7 @@ void wallhitReset(void)
ptr = mempAlloc(structssize + numberssize, MEMPOOL_STAGE);
g_WallhitCountsPerRoom = ptr;
g_Wallhits = (struct wallhit *)((u32)ptr + numberssize);
g_Wallhits = (struct wallhit *)((uintptr_t)ptr + numberssize);
g_FreeWallhits = NULL;
g_ActiveWallhits = 0;
+2 -2
View File
@@ -7,8 +7,8 @@
void amTick(void);
void amOpenPickTarget(void);
s32 menudialog000fcd48(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data);
s32 amPickTargetMenuDialog(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data);
MenuDialogHandlerResult menudialog000fcd48(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data);
MenuDialogHandlerResult amPickTargetMenuDialog(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data);
void amSetAiBuddyTemperament(bool aggressive);
void amSetAiBuddyStealth(void);
s32 amGetFirstBuddyIndex(void);
+4 -4
View File
@@ -24,9 +24,9 @@ s32 cheatGetByTimedStageIndex(s32 stage_index, s32 difficulty);
s32 cheatGetByCompletedStageIndex(s32 stage_index);
s32 cheatGetTime(s32 cheat_id);
char *cheatGetName(s32 cheat_id);
s32 cheatMenuHandleDialog(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data);
s32 cheatCheckboxMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data);
s32 cheatMenuHandleBuddyCheckbox(s32 operation, struct menuitem *item, union handlerdata *data);
s32 cheatMenuHandleTurnOffAllCheats(s32 operation, struct menuitem *item, union handlerdata *data);
MenuDialogHandlerResult cheatMenuHandleDialog(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data);
MenuItemHandlerResult cheatCheckboxMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult cheatMenuHandleBuddyCheckbox(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult cheatMenuHandleTurnOffAllCheats(s32 operation, struct menuitem *item, union handlerdata *data);
#endif
+8 -8
View File
@@ -4,14 +4,14 @@
#include "data.h"
#include "types.h"
s32 endscreenHandleRetryMission(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data);
s32 endscreenHandle2PCompleted(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data);
s32 endscreenHandle2PFailed(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data);
s32 endscreenHandleDeclineMission(s32 operation, struct menuitem *item, union handlerdata *data);
s32 endscreenHandleCheatInfo(s32 operation, struct menuitem *item, union handlerdata *data);
s32 endscreenHandleContinueMission(s32 operation, struct menuitem *item, union handlerdata *data);
s32 endscreenHandleReplayLastLevel(s32 operation, struct menuitem *item, union handlerdata *data);
s32 endscreenHandleReplayPreviousMission(s32 operation, struct menuitem *item, union handlerdata *data);
MenuDialogHandlerResult endscreenHandleRetryMission(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data);
MenuDialogHandlerResult endscreenHandle2PCompleted(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data);
MenuDialogHandlerResult endscreenHandle2PFailed(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data);
MenuItemHandlerResult endscreenHandleDeclineMission(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult endscreenHandleCheatInfo(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult endscreenHandleContinueMission(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult endscreenHandleReplayLastLevel(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult endscreenHandleReplayPreviousMission(s32 operation, struct menuitem *item, union handlerdata *data);
char *endscreenMenuTitleRetryMission(struct menudialogdef *dialogdef);
char *endscreenMenuTitleNextMission(struct menudialogdef *dialogdef);
char *endscreenMenuTextNumKills(struct menuitem *item);
+1 -1
View File
@@ -4,7 +4,7 @@
#include "data.h"
#include "types.h"
u32 fileGetRomAddress(s32 filenum);
romptr_t fileGetRomAddress(s32 filenum);
s32 fileGetRomSize(s32 filenum);
void filesInit(void);
void fileLoadPartToAddr(u16 filenum, void *memaddr, s32 offset, u32 len);
+31 -31
View File
@@ -42,7 +42,7 @@ void filemgrPushSelectLocationDialog(s32 arg0, u32 filetype);
char *filemgrMenuTextFileInUseDescription(struct menuitem *item);
Gfx *filemgrRenderPerfectHeadThumbnail(Gfx *gdl, struct menuitemrenderdata *renderdata, s32 filenum, s32 deviceserial);
bool filemgrIsFileInUse(struct filelistfile *file);
s32 filemgrFileToCopyOrDeleteListMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data, bool isdelete);
MenuItemHandlerResult filemgrFileToCopyOrDeleteListMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data, bool isdelete);
void filemgrPushDeleteFileDialog(s32 listnum);
char *pakMenuTextPagesFree(struct menuitem *item);
char *pakMenuTextPagesUsed(struct menuitem *item);
@@ -50,36 +50,36 @@ char *pakMenuTextStatusMessage(struct menuitem *item);
char *pakMenuTextEditingPakName(struct menuitem *item);
bool filemgrConsiderPushingFileSelectDialog(void);
void bootmenuReset(void);
s32 filemgrChooseAgentListMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data);
s32 pakGameNoteListMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data);
s32 filemgrFileToCopyListMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data);
s32 filemgrFileToDeleteListMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data);
s32 filemgrInsertOriginalPakMenuDialog(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data);
s32 filemgrCopyOrDeleteListMenuDialog(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data);
s32 pakGameNotesMenuDialog(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data);
s32 pakChoosePakMenuDialog(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data);
s32 filemgrMainMenuDialog(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data);
s32 filemgrDeviceNameMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data);
s32 filemgrFileNameMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data);
s32 filemgrDeviceNameForErrorMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data);
s32 filemgrRetrySaveMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data);
s32 filemgrCancelSave2MenuHandler(s32 operation, struct menuitem *item, union handlerdata *data);
s32 filemgrAcknowledgeFileLostMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data);
s32 filemgrReinsertedOkMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data);
s32 filemgrReinsertedCancelMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data);
s32 filemgrDuplicateRenameMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data);
s32 filemgrDuplicateCancelMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data);
s32 filemgrCancelSaveMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data);
s32 filemgrDeleteFilesForSaveMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data);
s32 filemgrConfirmDeleteMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data);
s32 pakDeleteGameNoteMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data);
s32 pakSelectionMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data);
s32 filemgrAgentNameKeyboardMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data);
s32 filemgrOpenCopyFileMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data);
s32 filemgrOpenDeleteFileMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data);
s32 filemgrConfirmRenameMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data);
s32 filemgrSaveElsewhereYesMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data);
s32 filemgrSelectLocationMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult filemgrChooseAgentListMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult pakGameNoteListMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult filemgrFileToCopyListMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult filemgrFileToDeleteListMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data);
MenuDialogHandlerResult filemgrInsertOriginalPakMenuDialog(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data);
MenuDialogHandlerResult filemgrCopyOrDeleteListMenuDialog(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data);
MenuDialogHandlerResult pakGameNotesMenuDialog(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data);
MenuDialogHandlerResult pakChoosePakMenuDialog(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data);
MenuDialogHandlerResult filemgrMainMenuDialog(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data);
MenuItemHandlerResult filemgrDeviceNameMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult filemgrFileNameMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult filemgrDeviceNameForErrorMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult filemgrRetrySaveMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult filemgrCancelSave2MenuHandler(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult filemgrAcknowledgeFileLostMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult filemgrReinsertedOkMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult filemgrReinsertedCancelMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult filemgrDuplicateRenameMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult filemgrDuplicateCancelMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult filemgrCancelSaveMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult filemgrDeleteFilesForSaveMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult filemgrConfirmDeleteMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult pakDeleteGameNoteMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult pakSelectionMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult filemgrAgentNameKeyboardMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult filemgrOpenCopyFileMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult filemgrOpenDeleteFileMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult filemgrConfirmRenameMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult filemgrSaveElsewhereYesMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult filemgrSelectLocationMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data);
extern const char var7f1b3214[];
extern const char var7f1b3218[];
+5 -5
View File
@@ -5,10 +5,10 @@
#include "types.h"
void fmbReset(void);
s32 fmbHandleDropOut(s32 operation, struct menuitem *item, union handlerdata *data);
s32 fmdHandleAbortGame(s32 operation, struct menuitem *item, union handlerdata *data);
s32 fmbHandleAdvancedSetup(s32 operation, struct menuitem *item, union handlerdata *data);
s32 fmbHandleAcceptChallenge(s32 operation, struct menuitem *item, union handlerdata *data);
s32 fmbHandleMainMenu(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data);
MenuItemHandlerResult fmbHandleDropOut(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult fmdHandleAbortGame(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult fmbHandleAdvancedSetup(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult fmbHandleAcceptChallenge(s32 operation, struct menuitem *item, union handlerdata *data);
MenuDialogHandlerResult fmbHandleMainMenu(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data);
#endif
+54 -54
View File
@@ -13,7 +13,7 @@ extern struct menudialogdef g_NextMissionMenuDialog;
char *menuTextCurrentStageName(struct menuitem *item);
char *soloMenuTextDifficulty(struct menuitem *item);
s32 menuhandlerControlStyleImpl(s32 operation, struct menuitem *item, union handlerdata *data, s32 mpindex);
MenuItemHandlerResult menuhandlerControlStyleImpl(s32 operation, struct menuitem *item, union handlerdata *data, s32 mpindex);
char *soloMenuTitleStageOverview(struct menudialogdef *dialogdef);
f32 func0f1036ac(u8 value, s32 prop);
bool isStageDifficultyUnlocked(s32 stageindex, s32 difficulty);
@@ -30,60 +30,60 @@ char *invMenuTextWeaponName(struct menuitem *item);
char *invMenuTextWeaponManufacturer(struct menuitem *item);
char *invMenuTextWeaponDescription(struct menuitem *item);
bool soloChoosePauseDialog(void);
s32 menudialogBriefing(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data);
s32 menudialog00103608(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data);
s32 menudialogCoopAntiOptions(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data);
s32 menudialog0010559c(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data);
s32 inventoryMenuDialog(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data);
s32 menudialogAbortMission(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data);
s32 soloMenuDialogPauseStatus(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data);
s32 menuhandler001024dc(s32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandler001024fc(s32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerAcceptMission(s32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerAcceptPdModeSettings(s32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerBuddyOptionsContinue(s32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerCoopDifficulty(s32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerAntiDifficulty(s32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerMissionList(s32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerControlStyle(s32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerFrInventoryList(s32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerInventoryList(s32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerAbortMission(s32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerCinema(s32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerAimControl(s32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerAlternativeTitle(s32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerAlwaysShowTarget(s32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerAmmoOnScreen(s32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerAntiPlayer(s32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerAntiRadar(s32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerAutoAim(s32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerChangeAgent(s32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerCoopBuddy(s32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerCoopFriendlyFire(s32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerCoopRadar(s32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerCutsceneSubtitles(s32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerHeadRoll(s32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerHiRes(s32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerInGameSubtitles(s32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerLangFilter(s32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerLookAhead(s32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerMusicVolume(s32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerPaintball(s32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerPdMode(s32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerPdModeSetting(s32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerReversePitch(s32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerScreenRatio(s32 operation, struct menuitem *item, union handlerdata *data);
MenuDialogHandlerResult menudialogBriefing(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data);
MenuDialogHandlerResult menudialog00103608(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data);
MenuDialogHandlerResult menudialogCoopAntiOptions(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data);
MenuDialogHandlerResult menudialog0010559c(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data);
MenuDialogHandlerResult inventoryMenuDialog(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data);
MenuDialogHandlerResult menudialogAbortMission(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data);
MenuDialogHandlerResult soloMenuDialogPauseStatus(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data);
MenuItemHandlerResult menuhandler001024dc(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult menuhandler001024fc(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult menuhandlerAcceptMission(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult menuhandlerAcceptPdModeSettings(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult menuhandlerBuddyOptionsContinue(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult menuhandlerCoopDifficulty(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult menuhandlerAntiDifficulty(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult menuhandlerMissionList(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult menuhandlerControlStyle(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult menuhandlerFrInventoryList(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult menuhandlerInventoryList(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult menuhandlerAbortMission(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult menuhandlerCinema(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult menuhandlerAimControl(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult menuhandlerAlternativeTitle(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult menuhandlerAlwaysShowTarget(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult menuhandlerAmmoOnScreen(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult menuhandlerAntiPlayer(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult menuhandlerAntiRadar(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult menuhandlerAutoAim(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult menuhandlerChangeAgent(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult menuhandlerCoopBuddy(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult menuhandlerCoopFriendlyFire(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult menuhandlerCoopRadar(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult menuhandlerCutsceneSubtitles(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult menuhandlerHeadRoll(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult menuhandlerHiRes(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult menuhandlerInGameSubtitles(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult menuhandlerLangFilter(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult menuhandlerLookAhead(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult menuhandlerMusicVolume(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult menuhandlerPaintball(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult menuhandlerPdMode(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult menuhandlerPdModeSetting(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult menuhandlerReversePitch(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult menuhandlerScreenRatio(s32 operation, struct menuitem *item, union handlerdata *data);
#if PAL
s32 menuhandlerLanguage(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult menuhandlerLanguage(s32 operation, struct menuitem *item, union handlerdata *data);
#endif
s32 menuhandlerScreenSize(s32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerScreenSplit(s32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerSfxVolume(s32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerShowGunFunction(s32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerShowMissionTime(s32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerShowZoomRange(s32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerSightOnScreen(s32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerSoloDifficulty(s32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerSoundMode(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult menuhandlerScreenSize(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult menuhandlerScreenSplit(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult menuhandlerSfxVolume(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult menuhandlerShowGunFunction(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult menuhandlerShowMissionTime(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult menuhandlerShowZoomRange(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult menuhandlerSightOnScreen(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult menuhandlerSoloDifficulty(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult menuhandlerSoundMode(s32 operation, struct menuitem *item, union handlerdata *data);
#endif
+6 -6
View File
@@ -29,7 +29,7 @@ void func0f0f139c(struct menuitem *item, f32 arg1);
void func0f0f13ec(struct menuitem *item);
void func0f0f1418(void);
void func0f0f1494(void);
char *menuResolveText(u32 thing, void *dialogoritem);
char *menuResolveText(uintptr_t thing, void *dialogoritem);
char *menuResolveParam2Text(struct menuitem *item);
char *menuResolveDialogTitle(struct menudialogdef *dialogdef);
void func0f0f15a4(struct menuitem *item, s32 *arg1);
@@ -107,11 +107,11 @@ void func0f0fd548(s32 arg0);
struct menudialog *menuIsDialogOpen(struct menudialogdef *dialogdef);
struct chrdata *currentPlayerGetCommandingAibot(void);
s32 menuhandler000fcc34(s32 operation, struct menuitem *item, union handlerdata *data);
s32 amPickTargetMenuList(s32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerRepairPak(s32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerRetrySavePak(s32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerWarnRepairPak(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult menuhandler000fcc34(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult amPickTargetMenuList(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult menuhandlerRepairPak(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult menuhandlerRetrySavePak(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult menuhandlerWarnRepairPak(s32 operation, struct menuitem *item, union handlerdata *data);
extern const char var7f1b2658[];
extern const char var7f1b265c[];
+9 -9
View File
@@ -4,7 +4,7 @@
#include "data.h"
#include "types.h"
s32 mpStatsForPlayerDropdownHandler(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult mpStatsForPlayerDropdownHandler(s32 operation, struct menuitem *item, union handlerdata *data);
char *mpMenuTextInGameLimit(struct menuitem *item);
char *menutextPauseOrUnpause(s32 arg0);
char *menutextMatchTime(s32 arg0);
@@ -14,16 +14,16 @@ char *mpMenuTextWeaponOfChoiceName(struct menuitem *item);
char *mpMenuTextAward1(struct menuitem *item);
char *mpMenuTextAward2(struct menuitem *item);
char *mpMenuTextPlacementWithSuffix(struct menuitem *item);
s32 mpPlacementMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data);
s32 mpAwardsMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data);
s32 mpPlayerTitleMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult mpPlacementMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult mpAwardsMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult mpPlayerTitleMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data);
char *mpMenuTextPlayerTitle(s32 arg0);
s32 mpConfirmPlayerNameHandler(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult mpConfirmPlayerNameHandler(s32 operation, struct menuitem *item, union handlerdata *data);
void mpPushPauseDialog(void);
void mpPushEndscreenDialog(u32 arg0, u32 playernum);
s32 menuhandlerMpEndGame(s32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandler00178018(s32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerMpInGameLimitLabel(s32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerMpPause(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult menuhandlerMpEndGame(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult menuhandler00178018(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult menuhandlerMpInGameLimitLabel(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult menuhandlerMpPause(s32 operation, struct menuitem *item, union handlerdata *data);
#endif
+1 -1
View File
@@ -16,7 +16,7 @@ struct mpscenariooverview {
extern struct mpscenariooverview g_MpScenarioOverviews[6];
s32 menuhandlerMpOpenOptions(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult menuhandlerMpOpenOptions(s32 operation, struct menuitem *item, union handlerdata *data);
void scenarioReadSave(struct savebuffer *buffer);
void scenarioWriteSave(struct savebuffer *buffer);
void scenarioInit(void);
+87 -87
View File
@@ -6,12 +6,12 @@
char *mpGetCurrentPlayerName(struct menuitem *item);
s16 mpChooseRandomStage(void);
s32 mpArenaMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult mpArenaMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data);
char *mpMenuTextWeaponNameForSlot(struct menuitem *item);
char *mpMenuTextSetupName(struct menuitem *item);
s32 mpCharacterBodyMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data, s32 mpheadnum, s32 mpbodynum, bool isplayer);
s32 menudialog0017a174(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data);
s32 mpChallengesListHandler(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult mpCharacterBodyMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data, s32 mpheadnum, s32 mpbodynum, bool isplayer);
MenuDialogHandlerResult menudialog0017a174(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data);
MenuItemHandlerResult mpChallengesListHandler(s32 operation, struct menuitem *item, union handlerdata *data);
char *mpMenuTextKills(struct menuitem *item);
char *mpMenuTextDeaths(struct menuitem *item);
char *mpMenuTextGamesPlayed(struct menuitem *item);
@@ -29,50 +29,50 @@ char *mpMenuTextAccuracy(struct menuitem *item);
void mpFormatDamageValue(char *dst, f32 damage);
char *mpMenuTextPainReceived(struct menuitem *item);
char *mpMenuTextDamageDealt(struct menuitem *item);
s32 mpMedalMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult mpMedalMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data);
char *mpMenuTitleStatsForPlayerName(struct menudialogdef *dialogdef);
char *mpMenuTextUsernamePassword(struct menuitem *item);
s32 mpCharacterHeadMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data, s32 mpheadnum, bool arg4);
MenuItemHandlerResult mpCharacterHeadMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data, s32 mpheadnum, bool arg4);
char *mpMenuTextBodyName(struct menuitem *item);
void func0f17b8f0(void);
s32 mpPlayerNameMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data);
s32 mpLoadSettingsMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult mpPlayerNameMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult mpLoadSettingsMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data);
char *mpMenuTextMpconfigMarquee(struct menuitem *item);
s32 mpLoadPlayerMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerMpHandicapPlayer(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult mpLoadPlayerMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult menuhandlerMpHandicapPlayer(s32 operation, struct menuitem *item, union handlerdata *data);
char *mpMenuTextHandicapPlayerName(struct menuitem *item);
s32 mpAddChangeSimulantMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult mpAddChangeSimulantMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data);
char *mpMenuTextSimulantDescription(struct menuitem *item);
s32 menudialog0017ccfc(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data);
s32 mpBotDifficultyMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data);
MenuDialogHandlerResult menudialog0017ccfc(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data);
MenuItemHandlerResult mpBotDifficultyMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data);
char *mpMenuTitleEditSimulant(struct menudialogdef *dialogdef);
char *mpMenuTextSimulantName(struct menuitem *item);
s32 menuhandlerMpNTeams(s32 operation, struct menuitem *item, union handlerdata *data, s32 numteams);
MenuItemHandlerResult menuhandlerMpNTeams(s32 operation, struct menuitem *item, union handlerdata *data, s32 numteams);
char *mpMenuTextChrNameForTeamSetup(struct menuitem *item);
s32 func0f17dac4(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult func0f17dac4(s32 operation, struct menuitem *item, union handlerdata *data);
char *mpMenuTextSelectTuneOrTunes(struct menuitem *item);
s32 mpSelectTuneListHandler(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult mpSelectTuneListHandler(s32 operation, struct menuitem *item, union handlerdata *data);
char *mpMenuTextCurrentTrack(struct menuitem *item);
s32 mpTeamNameMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult mpTeamNameMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data);
char *mpMenuTextTeamName(struct menuitem *item);
char *func0f17e318(struct menudialogdef *dialogdef);
s32 menudialog0017e3fc(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data);
s32 mpChallengesListMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data);
MenuDialogHandlerResult menudialog0017e3fc(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data);
MenuItemHandlerResult mpChallengesListMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data);
char *mpMenuTextChallengeName(struct menuitem *item);
s32 mpCombatChallengesMenuDialog(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data);
MenuDialogHandlerResult mpCombatChallengesMenuDialog(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data);
char *mpMenuTextSavePlayerOrCopy(struct menuitem *item);
char *mpMenuTextArenaName(struct menuitem *item);
char *mpMenuTextWeaponSetName(struct menuitem *item);
void mpConfigureQuickTeamPlayers(void);
void mpConfigureQuickTeamSimulants(void);
void func0f17f428(void);
s32 menuhandlerPlayerTeam(s32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerMpNumberOfSimulants(s32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerMpSimulantsPerTeam(s32 operation, struct menuitem *item, union handlerdata *data);
s32 mpQuickTeamSimulantDifficultyHandler(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult menuhandlerPlayerTeam(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult menuhandlerMpNumberOfSimulants(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult menuhandlerMpSimulantsPerTeam(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult mpQuickTeamSimulantDifficultyHandler(s32 operation, struct menuitem *item, union handlerdata *data);
void mpCloseDialogsForNewSetup(void);
void func0f17fcb0(s32 silent);
s32 menuhandlerMpSlowMotion(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult menuhandlerMpSlowMotion(s32 operation, struct menuitem *item, union handlerdata *data);
void htbAddPad(s16 padnum);
void htbRemoveAmmoCrateAtPad(s16 padnum);
void htbReset(void);
@@ -100,10 +100,10 @@ void pacHandleDeath(s32 cplayernum, s32 vplayernum);
void pacTick(void);
Gfx *pacRenderHud(Gfx *gdl);
bool pacRadarChr(Gfx **gdl, struct prop *prop);
s32 mpOptionsMenuDialog(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data);
MenuDialogHandlerResult mpOptionsMenuDialog(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data);
char *mpMenuTextScenarioShortName(struct menuitem *item);
char *mpMenuTextScenarioName(struct menuitem *item);
s32 scenarioScenarioMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult scenarioScenarioMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data);
void scenarioCreateMatchStartHudmsgs(void);
Gfx *scenarioRenderHud(Gfx *gdl);
void scenarioCalculatePlayerScore(struct mpchrconfig *mpchr, s32 chrnum, s32 *arg2, s32 *arg3);
@@ -116,66 +116,66 @@ s32 scenarioPickUpBriefcase(struct chrdata *chr, struct prop *prop);
void scenarioHandleDroppedToken(struct chrdata *chr, struct prop *prop);
s32 scenarioPickUpUplink(struct chrdata *chr, struct prop *prop);
void scenarioHandleActivatedProp(struct chrdata *chr, struct prop *prop);
s32 menuhandlerMpDropOut(s32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerMpTeamsLabel(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult menuhandlerMpDropOut(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult menuhandlerMpTeamsLabel(s32 operation, struct menuitem *item, union handlerdata *data);
s32 mpGetNumStages(void);
s32 menuhandlerMpControlStyle(s32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerMpWeaponSlot(s32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerMpWeaponSetDropdown(s32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerMpControlCheckbox(s32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerMpAimControl(s32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerMpCheckboxOption(s32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerMpTeamsEnabled(s32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerMpDisplayOptionCheckbox(s32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerMpConfirmSaveChr(s32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerMpSetupName(s32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerMpSaveSetupOverwrite(s32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerMpSaveSetupCopy(s32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerMpCharacterBody(s32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerMpUsernamePassword(s32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerMpCharacterHead(s32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerMpTimeLimitSlider(s32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerMpScoreLimitSlider(s32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerMpTeamScoreLimitSlider(s32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerMpRestoreScoreDefaults(s32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerMpRestoreHandicapDefaults(s32 operation, struct menuitem *item, union handlerdata *data);
s32 menudialogMpReady(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data);
s32 menudialogMpSimulant(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data);
s32 menuhandlerMpSimulantHead(s32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerMpSimulantBody(s32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerMpDeleteSimulant(s32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerMpChangeSimulantType(s32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerMpClearAllSimulants(s32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerMpAddSimulant(s32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerMpSimulantSlot(s32 operation, struct menuitem *item, union handlerdata *data);
s32 menudialogMpSimulants(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data);
s32 menuhandlerMpTwoTeams(s32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerMpThreeTeams(s32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerMpFourTeams(s32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerMpMaximumTeams(s32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerMpHumansVsSimulants(s32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerMpHumanSimulantPairs(s32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerMpTeamSlot(s32 operation, struct menuitem *item, union handlerdata *data);
s32 menudialogMpSelectTune(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data);
s32 menuhandlerMpMultipleTunes(s32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerMpTeamNameSlot(s32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandler0017e38c(s32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandler0017e9d8(s32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerMpAbortChallenge(s32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerMpStartChallenge(s32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandler0017ec64(s32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerMpLock(s32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerMpSavePlayer(s32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandler0017ef30(s32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerMpSaveSettings(s32 operation, struct menuitem *item, union handlerdata *data);
s32 menudialogMpGameSetup(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data);
s32 menudialogMpQuickGo(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data);
s32 menuhandlerMpFinishedSetup(s32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerQuickTeamSeparator(s32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerMpQuickTeamOption(s32 operation, struct menuitem *item, union handlerdata *data);
s32 menudialogCombatSimulator(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data);
s32 menuhandlerMpAdvancedSetup(s32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerMpDisplayTeam(s32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerMpOneHitKills(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult menuhandlerMpControlStyle(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult menuhandlerMpWeaponSlot(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult menuhandlerMpWeaponSetDropdown(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult menuhandlerMpControlCheckbox(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult menuhandlerMpAimControl(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult menuhandlerMpCheckboxOption(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult menuhandlerMpTeamsEnabled(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult menuhandlerMpDisplayOptionCheckbox(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult menuhandlerMpConfirmSaveChr(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult menuhandlerMpSetupName(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult menuhandlerMpSaveSetupOverwrite(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult menuhandlerMpSaveSetupCopy(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult menuhandlerMpCharacterBody(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult menuhandlerMpUsernamePassword(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult menuhandlerMpCharacterHead(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult menuhandlerMpTimeLimitSlider(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult menuhandlerMpScoreLimitSlider(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult menuhandlerMpTeamScoreLimitSlider(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult menuhandlerMpRestoreScoreDefaults(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult menuhandlerMpRestoreHandicapDefaults(s32 operation, struct menuitem *item, union handlerdata *data);
MenuDialogHandlerResult menudialogMpReady(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data);
MenuDialogHandlerResult menudialogMpSimulant(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data);
MenuItemHandlerResult menuhandlerMpSimulantHead(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult menuhandlerMpSimulantBody(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult menuhandlerMpDeleteSimulant(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult menuhandlerMpChangeSimulantType(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult menuhandlerMpClearAllSimulants(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult menuhandlerMpAddSimulant(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult menuhandlerMpSimulantSlot(s32 operation, struct menuitem *item, union handlerdata *data);
MenuDialogHandlerResult menudialogMpSimulants(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data);
MenuItemHandlerResult menuhandlerMpTwoTeams(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult menuhandlerMpThreeTeams(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult menuhandlerMpFourTeams(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult menuhandlerMpMaximumTeams(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult menuhandlerMpHumansVsSimulants(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult menuhandlerMpHumanSimulantPairs(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult menuhandlerMpTeamSlot(s32 operation, struct menuitem *item, union handlerdata *data);
MenuDialogHandlerResult menudialogMpSelectTune(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data);
MenuItemHandlerResult menuhandlerMpMultipleTunes(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult menuhandlerMpTeamNameSlot(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult menuhandler0017e38c(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult menuhandler0017e9d8(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult menuhandlerMpAbortChallenge(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult menuhandlerMpStartChallenge(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult menuhandler0017ec64(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult menuhandlerMpLock(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult menuhandlerMpSavePlayer(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult menuhandler0017ef30(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult menuhandlerMpSaveSettings(s32 operation, struct menuitem *item, union handlerdata *data);
MenuDialogHandlerResult menudialogMpGameSetup(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data);
MenuDialogHandlerResult menudialogMpQuickGo(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data);
MenuItemHandlerResult menuhandlerMpFinishedSetup(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult menuhandlerQuickTeamSeparator(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult menuhandlerMpQuickTeamOption(s32 operation, struct menuitem *item, union handlerdata *data);
MenuDialogHandlerResult menudialogCombatSimulator(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data);
MenuItemHandlerResult menuhandlerMpAdvancedSetup(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult menuhandlerMpDisplayTeam(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult menuhandlerMpOneHitKills(s32 operation, struct menuitem *item, union handlerdata *data);
#endif
+23 -23
View File
@@ -34,28 +34,28 @@ char *htMenuTextTimeTakenValue(struct menuitem *item);
char *bioMenuTextName(struct menuitem *item);
char *ciMenuTextHangarBioSubheading(struct menuitem *item);
struct menudialogdef *ciGetFrWeaponListMenuDialog(void);
s32 frTrainingInfoMenuDialog(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data);
s32 frTrainingStatsMenuDialog(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data);
s32 ciCharacterProfileMenuDialog(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data);
s32 dtTrainingDetailsMenuDialog(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data);
s32 menudialogDeviceTrainingResults(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data);
s32 menudialog001a6aa4(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data);
s32 menudialogFiringRangeResults(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data);
s32 ciHangarHolographMenuDialog(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data);
s32 frDetailsOkMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data);
s32 frAbortMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data);
s32 frWeaponListMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data);
s32 frScoringMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerFrFailedContinue(s32 operation, struct menuitem *item, union handlerdata *data);
s32 ciOfficeInformationMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data);
s32 dtDeviceListMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandlerDtOkOrResume(s32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandler001a6514(s32 operation, struct menuitem *item, union handlerdata *data);
s32 htHoloListMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandler001a6a34(s32 operation, struct menuitem *item, union handlerdata *data);
s32 menuhandler001a6a70(s32 operation, struct menuitem *item, union handlerdata *data);
s32 ciHangarInformationMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data);
s32 ciHangarTitleMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data);
s32 frDifficultyMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data);
MenuDialogHandlerResult frTrainingInfoMenuDialog(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data);
MenuDialogHandlerResult frTrainingStatsMenuDialog(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data);
MenuDialogHandlerResult ciCharacterProfileMenuDialog(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data);
MenuDialogHandlerResult dtTrainingDetailsMenuDialog(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data);
MenuDialogHandlerResult menudialogDeviceTrainingResults(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data);
MenuDialogHandlerResult menudialog001a6aa4(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data);
MenuDialogHandlerResult menudialogFiringRangeResults(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data);
MenuDialogHandlerResult ciHangarHolographMenuDialog(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data);
MenuItemHandlerResult frDetailsOkMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult frAbortMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult frWeaponListMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult frScoringMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult menuhandlerFrFailedContinue(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult ciOfficeInformationMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult dtDeviceListMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult menuhandlerDtOkOrResume(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult menuhandler001a6514(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult htHoloListMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult menuhandler001a6a34(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult menuhandler001a6a70(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult ciHangarInformationMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult ciHangarTitleMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data);
MenuItemHandlerResult frDifficultyMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data);
#endif
+1 -1
View File
@@ -97,7 +97,7 @@ void modelRender(struct modelrenderdata *renderdata, struct model *model);
bool modelTestBboxNodeForHit(struct modelrodata_bbox *bbox, Mtxf *mtx, struct coord *arg2, struct coord *arg3);
s32 modelTestForHit(struct model *model, struct coord *arg1, struct coord *arg2, struct modelnode **startnode);
void modelPromoteNodeOffsetsToPointers(struct modelnode *node, u32 vma, u32 fileramaddr);
void modelPromoteOffsetsToPointers(struct modeldef *modeldef, u32 arg1, u32 arg2);
void modelPromoteOffsetsToPointers(struct modeldef *modeldef, u32 arg1, uintptr_t arg2);
s32 modelCalculateRwDataIndexes(struct modelnode *node);
void modelAllocateRwData(struct modeldef *modeldef);
void modelInitRwData(struct model *model, struct modelnode *node);
+8 -3
View File
@@ -11,9 +11,14 @@
#define bool s32
#define ubool u32
#define intptr_t s32
#define uintptr_t u32
#define romptr_t u32
typedef s32 PakErr1;
typedef s32 PakErr2;
typedef s32 MenuDialogHandlerResult;
typedef intptr_t MenuItemHandlerResult;
// Float version of a graphics matrix, which has higher precision than an Mtx.
// Matrices are stored as Mtxfs then converted to an Mtx when passed to the GPU.
@@ -3422,8 +3427,8 @@ struct menuitem {
u8 type;
u8 param;
u32 flags;
s32 param2;
s32 param3;
intptr_t param2;
intptr_t param3;
union {
s32 (*handler)(s32 operation, struct menuitem *item, union handlerdata *data);
@@ -3433,7 +3438,7 @@ struct menuitem {
struct menudialogdef {
u8 type;
u32 title;
uintptr_t title;
struct menuitem *items;
s32 (*handler)(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data);
u32 flags;
+2 -2
View File
@@ -49,7 +49,7 @@ void animsInit(void)
u32 tablelen = ALIGN64(&_animationsTableRomEnd - &_animationsTableRomStart);
ptr = mempAlloc(tablelen, MEMPOOL_PERMANENT);
dmaExec(ptr, (s32)&_animationsTableRomStart, tablelen);
dmaExec(ptr, (romptr_t) &_animationsTableRomStart, tablelen);
g_NumAnimations = g_NumRomAnimations = ptr[0];
g_Anims = g_RomAnims = (struct animtableentry *)&ptr[1];
@@ -140,7 +140,7 @@ u8 *animDma(u8 *dst, u32 segoffset, u32 len)
return dst;
}
return dmaExecWithAutoAlign(dst, (u32)&_animationsSegmentRomStart + segoffset, len);
return dmaExecWithAutoAlign(dst, (romptr_t) &_animationsSegmentRomStart + segoffset, len);
}
/**
+1 -1
View File
@@ -281,7 +281,7 @@ void amgrHandleFrameMsg(AudioInfo *info, AudioInfo *previnfo)
g_AmgrCurrentCmdList->list.t.type = M_AUDTASK;
g_AmgrCurrentCmdList->list.t.flags = 0;
g_AmgrCurrentCmdList->list.t.ucode_boot = (u64 *) &rspbootTextStart;
g_AmgrCurrentCmdList->list.t.ucode_boot_size = (u32) &rspbootTextEnd - (u32) &rspbootTextStart;
g_AmgrCurrentCmdList->list.t.ucode_boot_size = (uintptr_t) &rspbootTextEnd - (uintptr_t) &rspbootTextStart;
g_AmgrCurrentCmdList->list.t.ucode = (u64 *) &aspTextStart;
g_AmgrCurrentCmdList->list.t.ucode_data = (u64 *) &aspDataStart;
g_AmgrCurrentCmdList->list.t.ucode_size = SP_UCODE_SIZE;
+5 -5
View File
@@ -97,17 +97,17 @@ void bootPhase1(void)
// Copy compressed .data and inflate segments
// .data is copied from ROM to 0x701eb000 - 0x70200000
// inflate is copied from ROM to 0x70200000 - 0x702013f0
datacomplen = (s32) &_datazipSegmentRomEnd - (s32) &_datazipSegmentRomStart;
datacomplen = (romptr_t) &_datazipSegmentRomEnd - (romptr_t) &_datazipSegmentRomStart;
#if VERSION >= VERSION_NTSC_1_0
if (1);
#endif
inflatelen = (s32) &_inflateSegmentRomEnd - (s32) &_inflateSegmentRomStart;
inflatelen = (romptr_t) &_inflateSegmentRomEnd - (romptr_t) &_inflateSegmentRomStart;
copylen = datacomplen + inflatelen;
libram = (u32 *) ((u32) &_libSegmentStart + 0x2000);
libram = (u32 *) ((romptr_t) &_libSegmentStart + 0x2000);
libzipram = (u32 *) 0x70280000;
dataziprom = (u8 *) ((s32) &_datazipSegmentRomStart | 0x70000000);
dataziprom = (u8 *) ((romptr_t) &_datazipSegmentRomStart | 0x70000000);
datazipram = (u8 *) (0x70200000 - datacomplen);
dataram = (u32) &_dataSegmentStart;
dataram = (romptr_t) &_dataSegmentStart;
for (i = copylen - 1; i >= 0; i--) {
datazipram[i] = dataziprom[i];
+97 -97
View File
@@ -575,15 +575,15 @@ f32 cdFindGroundInIntTileAtVertex(struct geotilei *tile, f32 x, f32 z, s32 verte
+ sp68 * tile->vertices[0][2];
if (sp60 == 0) {
return *(s16 *)(tile->ymax + (u32)tile);
return *(s16 *)(tile->ymax + (uintptr_t)tile);
}
ground = (tmp - (f64)x * sp58 - (f64)z * sp68) / sp60;
if (ground > *(s16 *)(tile->ymax + (u32)tile)) {
ground = *(s16 *)(tile->ymax + (u32)tile);
} else if (ground < *(s16 *)(tile->ymin + (u32)tile)) {
ground = *(s16 *)(tile->ymin + (u32)tile);
if (ground > *(s16 *)(tile->ymax + (uintptr_t)tile)) {
ground = *(s16 *)(tile->ymax + (uintptr_t)tile);
} else if (ground < *(s16 *)(tile->ymin + (uintptr_t)tile)) {
ground = *(s16 *)(tile->ymin + (uintptr_t)tile);
}
return ground;
@@ -821,7 +821,7 @@ void cdGetPropsOnPlatform(struct prop *platform, s16 *propnums, s32 maxlen)
while (geo < (struct geo *) end) {
if (geo->type == GEOTYPE_TILE_I) {
struct geotilei *tile = (struct geotilei *) geo;
geo = (struct geo *)((u32)geo + sizeof(struct geotilei) + sizeof(tile->vertices[0]) * (tile->header.numvertices - ARRAYCOUNT(tile->vertices)));
geo = (struct geo *)((uintptr_t)geo + sizeof(struct geotilei) + sizeof(tile->vertices[0]) * (tile->header.numvertices - ARRAYCOUNT(tile->vertices)));
} else if (geo->type == GEOTYPE_TILE_F) {
struct geotilef *tile = (struct geotilef *) geo;
struct coord *pos = &prop->pos;
@@ -837,11 +837,11 @@ void cdGetPropsOnPlatform(struct prop *platform, s16 *propnums, s32 maxlen)
break;
}
geo = (struct geo *)((u32)geo + sizeof(struct geotilef) + sizeof(struct coord) * (tile->header.numvertices - ARRAYCOUNT(tile->vertices)));
geo = (struct geo *)((uintptr_t)geo + sizeof(struct geotilef) + sizeof(struct coord) * (tile->header.numvertices - ARRAYCOUNT(tile->vertices)));
} else if (geo->type == GEOTYPE_BLOCK) {
geo = (struct geo *)((u32)geo + sizeof(struct geoblock));
geo = (struct geo *)((uintptr_t)geo + sizeof(struct geoblock));
} else if (geo->type == GEOTYPE_CYL) {
geo = (struct geo *)((u32)geo + sizeof(struct geocyl));
geo = (struct geo *)((uintptr_t)geo + sizeof(struct geocyl));
}
}
@@ -874,20 +874,20 @@ void cdSetPropYBounds(struct prop *prop, f32 ymax, f32 ymin)
while (geo < (struct geo *) end) {
if (geo->type == GEOTYPE_TILE_I) {
struct geotilei *tile = (struct geotilei *) geo;
geo = (struct geo *)((u32)geo + sizeof(struct geotilei) + sizeof(tile->vertices[0]) * (tile->header.numvertices - ARRAYCOUNT(tile->vertices)));
geo = (struct geo *)((uintptr_t)geo + sizeof(struct geotilei) + sizeof(tile->vertices[0]) * (tile->header.numvertices - ARRAYCOUNT(tile->vertices)));
} else if (geo->type == GEOTYPE_TILE_F) {
struct geotilef *tile = (struct geotilef *) geo;
geo = (struct geo *)((u32)geo + sizeof(struct geotilef) + sizeof(struct coord) * (tile->header.numvertices - ARRAYCOUNT(tile->vertices)));
geo = (struct geo *)((uintptr_t)geo + sizeof(struct geotilef) + sizeof(struct coord) * (tile->header.numvertices - ARRAYCOUNT(tile->vertices)));
} else if (geo->type == GEOTYPE_BLOCK) {
struct geoblock *block = (struct geoblock *) geo;
block->ymax = ymax;
block->ymin = ymin;
geo = (struct geo *)((u32)geo + sizeof(struct geoblock));
geo = (struct geo *)((uintptr_t)geo + sizeof(struct geoblock));
} else if (geo->type == GEOTYPE_CYL) {
struct geocyl *cyl = (struct geocyl *) geo;
cyl->ymax = ymax;
cyl->ymin = ymin;
geo = (struct geo *)((u32)geo + sizeof(struct geocyl));
geo = (struct geo *)((uintptr_t)geo + sizeof(struct geocyl));
}
}
}
@@ -906,12 +906,12 @@ bool cd00026a04(struct coord *pos, u8 *start, u8 *end, u16 geoflags, s32 room, s
struct geotilei *tile = (struct geotilei *) geo;
if ((geo->flags & geoflags)
&& pos->x >= *(s16 *)(tile->xmin + (u32)tile)
&& pos->x <= *(s16 *)(tile->xmax + (u32)tile)
&& pos->z >= *(s16 *)(tile->zmin + (u32)tile)
&& pos->z <= *(s16 *)(tile->zmax + (u32)tile)) {
if ((!ceiling && pos->y >= *(s16 *)(tile->ymin + (u32)tile))
|| (ceiling && pos->y <= *(s16 *)(tile->ymax + (u32)tile))) {
&& pos->x >= *(s16 *)(tile->xmin + (uintptr_t)tile)
&& pos->x <= *(s16 *)(tile->xmax + (uintptr_t)tile)
&& pos->z >= *(s16 *)(tile->zmin + (uintptr_t)tile)
&& pos->z <= *(s16 *)(tile->zmax + (uintptr_t)tile)) {
if ((!ceiling && pos->y >= *(s16 *)(tile->ymin + (uintptr_t)tile))
|| (ceiling && pos->y <= *(s16 *)(tile->ymax + (uintptr_t)tile))) {
if (cdIs2dPointInIntTile(tile, pos->x, pos->z)) {
f32 ground = cdFindGroundInIntTile(tile, pos->x, pos->z);
@@ -926,7 +926,7 @@ bool cd00026a04(struct coord *pos, u8 *start, u8 *end, u16 geoflags, s32 room, s
}
}
geo = (struct geo *)((u32)geo + sizeof(struct geotilei) + sizeof(tile->vertices[0]) * (tile->header.numvertices - ARRAYCOUNT(tile->vertices)));
geo = (struct geo *)((uintptr_t)geo + sizeof(struct geotilei) + sizeof(tile->vertices[0]) * (tile->header.numvertices - ARRAYCOUNT(tile->vertices)));
} else if (geo->type == GEOTYPE_TILE_F) {
struct geotilef *tile = (struct geotilef *) geo;
@@ -951,11 +951,11 @@ bool cd00026a04(struct coord *pos, u8 *start, u8 *end, u16 geoflags, s32 room, s
}
}
geo = (struct geo *)((u32)geo + sizeof(struct geotilef) + sizeof(struct coord) * (tile->header.numvertices - ARRAYCOUNT(tile->vertices)));
geo = (struct geo *)((uintptr_t)geo + sizeof(struct geotilef) + sizeof(struct coord) * (tile->header.numvertices - ARRAYCOUNT(tile->vertices)));
} else if (geo->type == GEOTYPE_BLOCK) {
geo = (struct geo *)((u32)geo + sizeof(struct geoblock));
geo = (struct geo *)((uintptr_t)geo + sizeof(struct geoblock));
} else if (geo->type == GEOTYPE_CYL) {
geo = (struct geo *)((u32)geo + sizeof(struct geocyl));
geo = (struct geo *)((uintptr_t)geo + sizeof(struct geocyl));
}
}
@@ -1173,12 +1173,12 @@ void cdCollectGeoForCylFromList(struct coord *pos, f32 radius, u8 *start, u8 *en
struct geotilei *tile = (struct geotilei *) geo;
if ((geo->flags & geoflags)
&& pos->x >= *(s16 *)(tile->xmin + (u32)tile) - radius
&& pos->x <= *(s16 *)(tile->xmax + (u32)tile) + radius
&& pos->z >= *(s16 *)(tile->zmin + (u32)tile) - radius
&& pos->z <= *(s16 *)(tile->zmax + (u32)tile) + radius
&& (!checkvertical || (pos->y + arg6 >= *(s16 *)(tile->ymin + (u32)tile)
&& pos->y + arg7 <= *(s16 *)(tile->ymax + (u32)tile)))) {
&& pos->x >= *(s16 *)(tile->xmin + (uintptr_t)tile) - radius
&& pos->x <= *(s16 *)(tile->xmax + (uintptr_t)tile) + radius
&& pos->z >= *(s16 *)(tile->zmin + (uintptr_t)tile) - radius
&& pos->z <= *(s16 *)(tile->zmax + (uintptr_t)tile) + radius
&& (!checkvertical || (pos->y + arg6 >= *(s16 *)(tile->ymin + (uintptr_t)tile)
&& pos->y + arg7 <= *(s16 *)(tile->ymax + (uintptr_t)tile)))) {
if (geo->flags & GEOFLAG_RAMPWALL) {
result = cdTestRampWall(tile, pos, radius, pos->y + arg7, pos->y + arg6);
} else {
@@ -1197,18 +1197,18 @@ void cdCollectGeoForCylFromList(struct coord *pos, f32 radius, u8 *start, u8 *en
}
}
geo = (struct geo *)((u32)geo + tile->header.numvertices * 6 + 0xe);
geo = (struct geo *)((uintptr_t)geo + tile->header.numvertices * 6 + 0xe);
} else if (geo->type == GEOTYPE_TILE_F) {
struct geotilef *tile = (struct geotilef *) geo;
s32 tmp = 0x40;
if ((geo->flags & geoflags)
&& pos->x >= *(f32 *)((u32)tile + tile->xmin * 0xc + 0x10) - radius
&& pos->x <= *(f32 *)((u32)tile + tile->xmax * 0xc + 0x10) + radius
&& pos->z >= *(f32 *)((u32)tile + tile->zmin * 0xc + 0x18) - radius
&& pos->z <= *(f32 *)((u32)tile + tile->zmax * 0xc + 0x18) + radius
&& (!checkvertical || (pos->y + arg6 >= *(f32*)((u32)tile + tile->ymin * 0xc + 0x14)
&& pos->y + arg7 <= *(f32 *)((u32)tile + tile->ymax * 0xc + 0x14)))) {
&& pos->x >= *(f32 *)((uintptr_t)tile + tile->xmin * 0xc + 0x10) - radius
&& pos->x <= *(f32 *)((uintptr_t)tile + tile->xmax * 0xc + 0x10) + radius
&& pos->z >= *(f32 *)((uintptr_t)tile + tile->zmin * 0xc + 0x18) - radius
&& pos->z <= *(f32 *)((uintptr_t)tile + tile->zmax * 0xc + 0x18) + radius
&& (!checkvertical || (pos->y + arg6 >= *(f32*)((uintptr_t)tile + tile->ymin * 0xc + 0x14)
&& pos->y + arg7 <= *(f32 *)((uintptr_t)tile + tile->ymax * 0xc + 0x14)))) {
result = cd000272f8FltTile(tile, pos->x, pos->z, radius, prop, &collisions[*numcollisions]);
if (result != 0) {
@@ -1221,7 +1221,7 @@ void cdCollectGeoForCylFromList(struct coord *pos, f32 radius, u8 *start, u8 *en
}
}
geo = (struct geo *)((u32)geo + (tile->header.numvertices - tmp) * 0xc + 0x310);
geo = (struct geo *)((uintptr_t)geo + (tile->header.numvertices - tmp) * 0xc + 0x310);
} else if (geo->type == GEOTYPE_BLOCK) {
struct geoblock *block = (struct geoblock *) geo;
@@ -1239,7 +1239,7 @@ void cdCollectGeoForCylFromList(struct coord *pos, f32 radius, u8 *start, u8 *en
}
}
geo = (struct geo *)((u32)geo + 0x4c);
geo = (struct geo *)((uintptr_t)geo + 0x4c);
} else if (geo->type == GEOTYPE_CYL) {
struct geocyl *cyl = (struct geocyl *) geo;
@@ -1257,7 +1257,7 @@ void cdCollectGeoForCylFromList(struct coord *pos, f32 radius, u8 *start, u8 *en
}
}
geo = (struct geo *)((u32)geo + 0x18);
geo = (struct geo *)((uintptr_t)geo + 0x18);
}
}
}
@@ -1533,12 +1533,12 @@ void cdCollectGeoForCylMoveFromList(u8 *start, u8 *end, struct coord *pos, f32 r
struct geotilei *tile = (struct geotilei *) geo;
if (geo->flags & geoflags) {
if (pos->x >= *(s16 *)(tile->xmin + (u32)tile) - radius
&& pos->x <= *(s16 *)(tile->xmax + (u32)tile) + radius
&& pos->z >= *(s16 *)(tile->zmin + (u32)tile) - radius
&& pos->z <= *(s16 *)(tile->zmax + (u32)tile) + radius
&& (!checkvertical || (pos->y + arg6 >= *(s16 *)(tile->ymin + (u32)tile)
&& pos->y + arg7 <= *(s16 *)(tile->ymax + (u32)tile)))) {
if (pos->x >= *(s16 *)(tile->xmin + (uintptr_t)tile) - radius
&& pos->x <= *(s16 *)(tile->xmax + (uintptr_t)tile) + radius
&& pos->z >= *(s16 *)(tile->zmin + (uintptr_t)tile) - radius
&& pos->z <= *(s16 *)(tile->zmax + (uintptr_t)tile) + radius
&& (!checkvertical || (pos->y + arg6 >= *(s16 *)(tile->ymin + (uintptr_t)tile)
&& pos->y + arg7 <= *(s16 *)(tile->ymax + (uintptr_t)tile)))) {
bool pass;
if (geo->flags & GEOFLAG_RAMPWALL) {
@@ -1553,7 +1553,7 @@ void cdCollectGeoForCylMoveFromList(u8 *start, u8 *end, struct coord *pos, f32 r
}
}
geo = (struct geo *)((u32)geo + tile->header.numvertices * 6 + 0xe);
geo = (struct geo *)((uintptr_t)geo + tile->header.numvertices * 6 + 0xe);
} else if (geo->type == GEOTYPE_TILE_F) {
struct geotilef *tile = (struct geotilef *) geo;
@@ -1567,7 +1567,7 @@ void cdCollectGeoForCylMoveFromList(u8 *start, u8 *end, struct coord *pos, f32 r
cd0002840c(tile, pos->x, pos->z, radius, prop, collisions, maxcollisions, numcollisions);
}
geo = (struct geo *)((u32)geo + (u32)(tile->header.numvertices - 0x40) * 0xc + 0x310);
geo = (struct geo *)((uintptr_t)geo + (uintptr_t)(tile->header.numvertices - 0x40) * 0xc + 0x310);
} else if (geo->type == GEOTYPE_BLOCK) {
struct geoblock *block = (struct geoblock *) geo;
@@ -1576,7 +1576,7 @@ void cdCollectGeoForCylMoveFromList(u8 *start, u8 *end, struct coord *pos, f32 r
cd00028638(block, pos->x, pos->z, radius, prop, collisions, maxcollisions, numcollisions);
}
geo = (struct geo *)((u32)geo + sizeof(struct geoblock));
geo = (struct geo *)((uintptr_t)geo + sizeof(struct geoblock));
} else if (geo->type == GEOTYPE_CYL) {
struct geocyl *cyl = (struct geocyl *) geo;
@@ -1585,7 +1585,7 @@ void cdCollectGeoForCylMoveFromList(u8 *start, u8 *end, struct coord *pos, f32 r
cd0002885c(cyl, pos->x, pos->z, radius, prop, collisions, maxcollisions, numcollisions);
}
geo = (struct geo *)((u32)geo + sizeof(struct geocyl));
geo = (struct geo *)((uintptr_t)geo + sizeof(struct geocyl));
}
}
}
@@ -2746,8 +2746,8 @@ bool cd0002ac70IntTile(struct coord *arg0, struct coord *arg1, struct coord *arg
s32 spb0;
f32 spac;
f32 spa8;
f32 ymax = *(s16 *)(tile->ymax + (u32)tile);
f32 ymin = *(s16 *)(tile->ymin + (u32)tile);
f32 ymax = *(s16 *)(tile->ymax + (uintptr_t)tile);
f32 ymin = *(s16 *)(tile->ymin + (uintptr_t)tile);
f32 spa0[2];
f32 sp98[2];
f32 sp90[2];
@@ -3093,22 +3093,22 @@ bool cdTestAToBGeolist(u8 *start, u8 *end, struct coord *arg2, struct coord *arg
struct coord spb8;
if (tile->header.flags & geoflags) {
min.x = *(s16 *)(tile->xmin + (u32)tile);
min.x = *(s16 *)(tile->xmin + (uintptr_t)tile);
if ((!(arg2->x < min.x)) || !(arg3->x < min.x)) {
max.x = *(s16 *)(tile->xmax + (u32)tile);
max.x = *(s16 *)(tile->xmax + (uintptr_t)tile);
if ((!(arg2->x > max.x)) || !(arg3->x > max.x)) {
min.z = *(s16 *)(tile->zmin + (u32)tile);
min.z = *(s16 *)(tile->zmin + (uintptr_t)tile);
if ((!(arg2->z < min.z)) || !(arg3->z < min.z)) {
max.z = *(s16 *)(tile->zmax + (u32)tile);
max.z = *(s16 *)(tile->zmax + (uintptr_t)tile);
if ((!(arg2->z > max.z)) || !(arg3->z > max.z)) {
if (1);
if (checkvertical) {
min.y = *(s16 *)(tile->ymin + (u32)tile);
max.y = *(s16 *)(tile->ymax + (u32)tile);
min.y = *(s16 *)(tile->ymin + (uintptr_t)tile);
max.y = *(s16 *)(tile->ymax + (uintptr_t)tile);
if ((!(arg2->y < min.y) || !(arg3->y < min.y))
&& (!(arg2->y > max.y) || !(arg3->y > max.y))
@@ -3125,7 +3125,7 @@ bool cdTestAToBGeolist(u8 *start, u8 *end, struct coord *arg2, struct coord *arg
}
}
geo = (struct geo *)((u32)geo + tile->header.numvertices * 6 + 0xe);
geo = (struct geo *)((uintptr_t)geo + tile->header.numvertices * 6 + 0xe);
} else if (geo->type == GEOTYPE_TILE_F) {
struct geotilef *tile = (struct geotilef *) geo;
struct coord min;
@@ -3159,7 +3159,7 @@ bool cdTestAToBGeolist(u8 *start, u8 *end, struct coord *arg2, struct coord *arg
}
}
geo = (struct geo *)((u32)geo + (u32)(tile->header.numvertices - 0x40) * 0xc + 0x310);
geo = (struct geo *)((uintptr_t)geo + (uintptr_t)(tile->header.numvertices - 0x40) * 0xc + 0x310);
} else if (geo->type == GEOTYPE_BLOCK) {
struct coord sp78;
struct geoblock *block = (struct geoblock *) geo;
@@ -3169,7 +3169,7 @@ bool cdTestAToBGeolist(u8 *start, u8 *end, struct coord *arg2, struct coord *arg
return false;
}
geo = (struct geo *)((u32)geo + sizeof(struct geoblock));
geo = (struct geo *)((uintptr_t)geo + sizeof(struct geoblock));
} else if (geo->type == GEOTYPE_CYL) {
struct coord sp68;
struct geocyl *cyl = (struct geocyl *) geo;
@@ -3179,7 +3179,7 @@ bool cdTestAToBGeolist(u8 *start, u8 *end, struct coord *arg2, struct coord *arg
return false;
}
geo = (struct geo *)((u32)geo + sizeof(struct geocyl));
geo = (struct geo *)((uintptr_t)geo + sizeof(struct geocyl));
}
}
@@ -3325,21 +3325,21 @@ bool cdExamAToBGeolist(u8 *start, u8 *end, struct coord *arg2, struct coord *arg
}
if (ok && (geo->flags & geoflags)) {
min.x = *(s16 *)(tile->xmin + (u32)tile);
min.x = *(s16 *)(tile->xmin + (uintptr_t)tile);
if (!(arg2->x < min.x) || !(arg3->x < min.x)) {
max.x = *(s16 *)(tile->xmax + (u32)tile);
max.x = *(s16 *)(tile->xmax + (uintptr_t)tile);
if (!(arg2->x > max.x) || !(arg3->x > max.x)) {
min.z = *(s16 *)(tile->zmin + (u32)tile);
min.z = *(s16 *)(tile->zmin + (uintptr_t)tile);
if (!(arg2->z < min.z) || !(arg3->z < min.z)) {
max.z = *(s16 *)(tile->zmax + (u32)tile);
max.z = *(s16 *)(tile->zmax + (uintptr_t)tile);
if (!(arg2->z > max.z) || !(arg3->z > max.z)) {
if (checkvertical) {
min.y = *(s16 *)(tile->ymin + (u32)tile);
max.y = *(s16 *)(tile->ymax + (u32)tile);
min.y = *(s16 *)(tile->ymin + (uintptr_t)tile);
max.y = *(s16 *)(tile->ymax + (uintptr_t)tile);
if ((!(arg2->y < min.y) || !(arg3->y < min.y))
&& (!(arg2->y > max.y) || !(arg3->y > max.y))
@@ -3396,7 +3396,7 @@ bool cdExamAToBGeolist(u8 *start, u8 *end, struct coord *arg2, struct coord *arg
}
}
geo = (struct geo *)((u32)geo + (u32)(tile->header.numvertices * 6) + 0xe);
geo = (struct geo *)((uintptr_t)geo + (uintptr_t)(tile->header.numvertices * 6) + 0xe);
} else if (geo->type == GEOTYPE_TILE_F) {
struct geotilef *tile = (struct geotilef *) geo;
struct coord min;
@@ -3472,7 +3472,7 @@ bool cdExamAToBGeolist(u8 *start, u8 *end, struct coord *arg2, struct coord *arg
}
}
geo = (struct geo *)((u32)geo + (u32)(tile->header.numvertices - 0x40) * 0xc + 0x310);
geo = (struct geo *)((uintptr_t)geo + (uintptr_t)(tile->header.numvertices - 0x40) * 0xc + 0x310);
} else if (geo->type == GEOTYPE_BLOCK) {
struct coord spb0;
struct coord spa4;
@@ -3506,7 +3506,7 @@ bool cdExamAToBGeolist(u8 *start, u8 *end, struct coord *arg2, struct coord *arg
}
}
geo = (struct geo *)((u32)geo + sizeof(struct geoblock));
geo = (struct geo *)((uintptr_t)geo + sizeof(struct geoblock));
} else if (geo->type == GEOTYPE_CYL) {
struct geocyl *cyl = (struct geocyl *) geo;
struct coord sp88;
@@ -3541,7 +3541,7 @@ bool cdExamAToBGeolist(u8 *start, u8 *end, struct coord *arg2, struct coord *arg
}
}
geo = (struct geo *)((u32)geo + sizeof(struct geocyl));
geo = (struct geo *)((uintptr_t)geo + sizeof(struct geocyl));
}
}
@@ -3962,10 +3962,10 @@ s32 cdTestBlockOverlapsGeolist(u8 *start, u8 *end, struct geoblock *block, u16 g
while (geo < (struct geo *) end) {
if (geo->type == GEOTYPE_TILE_I) {
struct geotilei *tile = (struct geotilei *) geo;
geo = (struct geo *)((u32)geo + tile->header.numvertices * 6 + 0xe);
geo = (struct geo *)((uintptr_t)geo + tile->header.numvertices * 6 + 0xe);
} else if (geo->type == GEOTYPE_TILE_F) {
struct geotilef *tile = (struct geotilef *) geo;
geo = (struct geo *)((u32)geo + tile->header.numvertices * 0xc + 0x10);
geo = (struct geo *)((uintptr_t)geo + tile->header.numvertices * 0xc + 0x10);
} else if (geo->type == GEOTYPE_BLOCK) {
struct geoblock *thisblock = (struct geoblock *) geo;
@@ -3994,7 +3994,7 @@ s32 cdTestBlockOverlapsGeolist(u8 *start, u8 *end, struct geoblock *block, u16 g
}
}
geo = (struct geo *)((u32)geo + 0x4c);
geo = (struct geo *)((uintptr_t)geo + 0x4c);
} else if (geo->type == GEOTYPE_CYL) {
struct geocyl *cyl = (struct geocyl *) geo;
@@ -4005,7 +4005,7 @@ s32 cdTestBlockOverlapsGeolist(u8 *start, u8 *end, struct geoblock *block, u16 g
return CDRESULT_COLLISION;
}
geo = (struct geo *)((u32)geo + 0x18);
geo = (struct geo *)((uintptr_t)geo + 0x18);
}
}
@@ -4099,12 +4099,12 @@ bool cd0002e680IntTile(struct geotilei *tile, s32 numvertices, struct coord *ver
curr = i;
}
if (cd0002ac70IntTile((struct coord *)((u32)verts + curr * sizeof(struct coord)),
(struct coord *)((u32)verts + next * sizeof(struct coord)),
(struct coord *)((u32)diffs + curr * sizeof(struct coord)),
if (cd0002ac70IntTile((struct coord *)((uintptr_t)verts + curr * sizeof(struct coord)),
(struct coord *)((uintptr_t)verts + next * sizeof(struct coord)),
(struct coord *)((uintptr_t)diffs + curr * sizeof(struct coord)),
tile, &sp6c, &sp84, &sp78, 0, 0.0f, 0.0f)) {
cdSetObstacleVtxColProp(&sp84, &sp78, &sp6c, prop);
cdSetSavedPos((struct coord *)((u32)verts + curr * sizeof(struct coord)), (struct coord *)((u32)verts + next * sizeof(struct coord)));
cdSetSavedPos((struct coord *)((uintptr_t)verts + curr * sizeof(struct coord)), (struct coord *)((uintptr_t)verts + next * sizeof(struct coord)));
cdSetSavedBlock(block);
result = true;
break;
@@ -4134,12 +4134,12 @@ bool cd0002e82cIntTile(struct geotilef *tile, s32 numvertices, struct coord *ver
curr = i;
}
if (cd0002b128FltTile((struct coord *)((u32)verts + curr * sizeof(struct coord)),
(struct coord *)((u32)verts + next * sizeof(struct coord)),
(struct coord *)((u32)diffs + curr * sizeof(struct coord)),
if (cd0002b128FltTile((struct coord *)((uintptr_t)verts + curr * sizeof(struct coord)),
(struct coord *)((uintptr_t)verts + next * sizeof(struct coord)),
(struct coord *)((uintptr_t)diffs + curr * sizeof(struct coord)),
tile, &sp6c, &sp84, &sp78, 0, 0.0f, 0.0f)) {
cdSetObstacleVtxColProp(&sp84, &sp78, &sp6c, prop);
cdSetSavedPos((struct coord *)((u32)verts + curr * sizeof(struct coord)), (struct coord *)((u32)verts + next * sizeof(struct coord)));
cdSetSavedPos((struct coord *)((uintptr_t)verts + curr * sizeof(struct coord)), (struct coord *)((uintptr_t)verts + next * sizeof(struct coord)));
cdSetSavedBlock(block);
result = true;
break;
@@ -4169,12 +4169,12 @@ bool cd0002e9d8Block(struct geoblock *thisblock, s32 numvertices, struct coord *
curr = i;
}
if (cd0002b560Block((struct coord *)((u32)verts + curr * sizeof(struct coord)),
(struct coord *)((u32)verts + next * sizeof(struct coord)),
(struct coord *)((u32)diffs + curr * sizeof(struct coord)),
if (cd0002b560Block((struct coord *)((uintptr_t)verts + curr * sizeof(struct coord)),
(struct coord *)((uintptr_t)verts + next * sizeof(struct coord)),
(struct coord *)((uintptr_t)diffs + curr * sizeof(struct coord)),
thisblock, &sp6c, &sp84, &sp78, 0, 0.0f, 0.0f)) {
cdSetObstacleVtxColProp(&sp84, &sp78, &sp6c, prop);
cdSetSavedPos((struct coord *)((u32)verts + curr * sizeof(struct coord)), (struct coord *)((u32)verts + next * sizeof(struct coord)));
cdSetSavedPos((struct coord *)((uintptr_t)verts + curr * sizeof(struct coord)), (struct coord *)((uintptr_t)verts + next * sizeof(struct coord)));
cdSetSavedBlock(block);
result = true;
break;
@@ -4204,12 +4204,12 @@ bool cd0002eb84Cyl(struct geocyl *cyl, s32 numvertices, struct coord *arg2, stru
curr = i;
}
if (cd0002b954Cyl((struct coord *)((u32)arg2 + curr * sizeof(struct coord)),
(struct coord *)((u32)arg2 + next * sizeof(struct coord)),
(struct coord *)((u32)arg3 + curr * sizeof(struct coord)),
if (cd0002b954Cyl((struct coord *)((uintptr_t)arg2 + curr * sizeof(struct coord)),
(struct coord *)((uintptr_t)arg2 + next * sizeof(struct coord)),
(struct coord *)((uintptr_t)arg3 + curr * sizeof(struct coord)),
cyl, &sp6c, &sp84, &sp78, 0, 0.0f, 0.0f)) {
cdSetObstacleVtxColProp(&sp84, &sp78, &sp6c, prop);
cdSetSavedPos((struct coord *)((u32)arg2 + curr * sizeof(struct coord)), (struct coord *)((u32)arg2 + next * sizeof(struct coord)));
cdSetSavedPos((struct coord *)((uintptr_t)arg2 + curr * sizeof(struct coord)), (struct coord *)((uintptr_t)arg2 + next * sizeof(struct coord)));
cdSetSavedBlock(block);
result = true;
break;
@@ -4230,13 +4230,13 @@ bool cd0002ed30(u8 *start, u8 *end, struct geoblock *block, s32 numvertices, str
struct geotilei *tile = (struct geotilei *)geo;
if ((geoflags & geo->flags)
&& *(s16 *)(tile->ymax + (u32)tile) >= block->ymin
&& *(s16 *)(tile->ymin + (u32)tile) <= block->ymax
&& *(s16 *)(tile->ymax + (uintptr_t)tile) >= block->ymin
&& *(s16 *)(tile->ymin + (uintptr_t)tile) <= block->ymax
&& cd0002e680IntTile(tile, numvertices, verts, diffs, prop, block)) {
return false;
}
geo = (struct geo *)((u32)geo + tile->header.numvertices * 6 + 0xe);
geo = (struct geo *)((uintptr_t)geo + tile->header.numvertices * 6 + 0xe);
} else if (geo->type == GEOTYPE_TILE_F) {
struct geotilef *tile = (struct geotilef *)geo;
@@ -4247,7 +4247,7 @@ bool cd0002ed30(u8 *start, u8 *end, struct geoblock *block, s32 numvertices, str
return false;
}
geo = (struct geo *)((u32)geo + (u32)(tile->header.numvertices - 0x40) * 0xc + 0x310);
geo = (struct geo *)((uintptr_t)geo + (uintptr_t)(tile->header.numvertices - 0x40) * 0xc + 0x310);
} else if (geo->type == GEOTYPE_BLOCK) {
struct geoblock *block2 = (struct geoblock *)geo;
@@ -4258,7 +4258,7 @@ bool cd0002ed30(u8 *start, u8 *end, struct geoblock *block, s32 numvertices, str
return false;
}
geo = (struct geo *)((u32)geo + sizeof(struct geoblock));
geo = (struct geo *)((uintptr_t)geo + sizeof(struct geoblock));
} else if (geo->type == GEOTYPE_CYL) {
struct geocyl *cyl = (struct geocyl *)geo;
@@ -4269,7 +4269,7 @@ bool cd0002ed30(u8 *start, u8 *end, struct geoblock *block, s32 numvertices, str
return false;
}
geo = (struct geo *)((u32)geo + sizeof(struct geocyl));
geo = (struct geo *)((uintptr_t)geo + sizeof(struct geocyl));
}
}
+10 -10
View File
@@ -353,9 +353,9 @@ u32 crashGetParentStackFrame(u32 *origptr, u32 *minaddr, u32 origsp, u32 *regs)
bool crashIsReturnAddress(u32 *instruction)
{
if (((u32)instruction % 4) == 0
&& (u32)instruction >= (u32)tlbInit
&& (u32)instruction <= (u32)&_libSegmentEnd) {
if (((uintptr_t)instruction % 4) == 0
&& (uintptr_t)instruction >= (uintptr_t)tlbInit
&& (uintptr_t)instruction <= (uintptr_t)&_libSegmentEnd) {
// This condition can never pass because 9 is masked out
if ((instruction[-2] & 0xfc00003c) == 9) {
return true;
@@ -399,7 +399,7 @@ u32 crash0000c52cnb(u32 romaddr)
var8009710cnb = var80097118nb[0];
var80097110nb = (char *)&var80097118nb[1];
var80097114nb = (char *)(crashGetStrLen(var80097110nb) + (u32)var80097110nb + 1);
var80097114nb = (char *)(crashGetStrLen(var80097110nb) + (uintptr_t)var80097110nb + 1);
addr = romaddr + crashGetStrLen(var80097110nb) + crashGetStrLen(var80097114nb) + 6;
@@ -512,8 +512,8 @@ u32 crashGetStackEnd(u32 sp, s32 tid)
return 0;
}
start = (u32)g_StackLeftAddrs[tid];
end = (u32)g_StackRightAddrs[tid];
start = (uintptr_t)g_StackLeftAddrs[tid];
end = (uintptr_t)g_StackRightAddrs[tid];
if (sp >= K0BASE) {
return end;
@@ -531,7 +531,7 @@ u32 crashGetStackStart(u32 sp, s32 tid)
return 0;
}
start = (u32)g_StackLeftAddrs[tid];
start = (uintptr_t)g_StackLeftAddrs[tid];
if (sp >= K0BASE) {
return start;
@@ -686,14 +686,14 @@ u32 crashGenerate(OSThread *thread, u32 *callstack, s32 *tracelen)
i = 0;
done = false;
sp = (u32 *)ctx->sp;
stackend = (u32 *) crashGetStackEnd((u32)sp, thread->id);
stackstart = (u32 *) crashGetStackStart((u32)sp, thread->id);
stackend = (u32 *) crashGetStackEnd((uintptr_t)sp, thread->id);
stackstart = (u32 *) crashGetStackStart((uintptr_t)sp, thread->id);
ptr = ctx->pc;
*tracelen = 0;
rmonPrintf("nearl: ");
while (!done) {
sp = (u32 *) crashGetParentStackFrame((u32 *) ptr, &_libSegmentStart, (u32)sp, regs);
sp = (u32 *) crashGetParentStackFrame((u32 *) ptr, &_libSegmentStart, (uintptr_t)sp, regs);
rmonPrintf(" %08x ", ptr);
callstack[*tracelen] = ptr;
+1 -1
View File
@@ -354,7 +354,7 @@ Gfx *dhudRender(Gfx *gdl)
// Make sure there'll be a least 256 GBI commands free (2KB)
available = gfxGetFreeGfx(gdl) - 256 * sizeof(Gfx);
needed = (u32)gdl2 - (u32)gdl;
needed = (uintptr_t) gdl2 - (uintptr_t) gdl;
if (needed <= 0) { // shouldn't be possible
return gdl;
+2 -2
View File
@@ -64,7 +64,7 @@ void dmaStart(void *memaddr, u32 romaddr, u32 len, bool priority)
osPiStartDma(&g_DmaIoMsgs[i], priority, 0, romaddr, memaddr, 0x4000, &g_DmaMesgQueue);
romaddr += 0x4000;
memaddr = (void *)((u32)memaddr + 0x4000);
memaddr = (void *)((uintptr_t) memaddr + 0x4000);
}
if (remainder) {
@@ -175,7 +175,7 @@ void dmaExecHighPriority(void *memaddr, u32 romaddr, u32 len)
void *dmaExecWithAutoAlign(void *memaddr, u32 romaddr, u32 len)
{
u32 alignedrom = ALIGN2(romaddr);
u32 alignedmem = ALIGN16((u32)memaddr);
u32 alignedmem = ALIGN16((uintptr_t) memaddr);
u32 offset = romaddr - alignedrom; // 0 or 1
u32 alignedlen = ALIGN16(offset + len);
+2 -2
View File
@@ -13,7 +13,7 @@ u8 var8009a4e0[456][2];
void portalGetAvgVertexPos(s32 portalnum, struct coord *avg)
{
struct portalvertices *pvertices = (struct portalvertices *)((u32)g_BgPortals + g_BgPortals[portalnum].verticesoffset);
struct portalvertices *pvertices = (struct portalvertices *)((uintptr_t)g_BgPortals + g_BgPortals[portalnum].verticesoffset);
f32 f0;
s32 i;
@@ -91,7 +91,7 @@ s32 portal00017e30(s32 portalnum, struct coord *arg1, struct coord *arg2)
u32 stack;
lastside = 0;
pvertices = (struct portalvertices *)((u32)g_BgPortals + g_BgPortals[portalnum].verticesoffset);
pvertices = (struct portalvertices *)((uintptr_t)g_BgPortals + g_BgPortals[portalnum].verticesoffset);
value1 = arg1->f[0] * (var800a4ccc + portalnum)->coord.f[0] + arg1->f[1] * (var800a4ccc + portalnum)->coord.f[1] + arg1->f[2] * (var800a4ccc + portalnum)->coord.f[2];
value2 = arg2->f[0] * (var800a4ccc + portalnum)->coord.f[0] + arg2->f[1] * (var800a4ccc + portalnum)->coord.f[1] + arg2->f[2] * (var800a4ccc + portalnum)->coord.f[2];
+3 -3
View File
@@ -433,11 +433,11 @@ void mainInit(void)
if (g_DoBootPakMenu) {
start = &_accessingpakSegmentRomStart;
end = &_accessingpakSegmentRomEnd;
dmaExec(fb, (u32) start, end - start);
dmaExec(fb, (romptr_t) start, end - start);
} else {
start = &_copyrightSegmentRomStart;
end = &_copyrightSegmentRomEnd;
dmaExec(fb, (u32) start, end - start);
dmaExec(fb, (romptr_t) start, end - start);
}
// This is required for a match
@@ -577,7 +577,7 @@ void mainInit(void)
// It's using the framebuffer as a temporary data buffer.
start = &_copyrightSegmentRomStart;
end = &_copyrightSegmentRomEnd;
dmaExec(fb, (u32) start, end - start);
dmaExec(fb, (romptr_t) start, end - start);
// Unzip the compressed texture from fb to texture
rzipInflate(fb, texture, scratch);
+4 -4
View File
@@ -138,7 +138,7 @@ struct memaspace *memaMakeSlot(struct memaheap *heap)
return curr;
}
if ((u32)curr[1].addr < (u32)curr[0].addr) {
if ((uintptr_t) curr[1].addr < (uintptr_t) curr[0].addr) {
memaSwap(&curr[0], &curr[1]);
}
@@ -243,7 +243,7 @@ void memaReset(void *heapaddr, u32 heapsize)
space->size = 0;
}
g_MemaHeap.spaces[0].addr = g_MemaHeapStart = (u32)heapaddr;
g_MemaHeap.spaces[0].addr = g_MemaHeapStart = (uintptr_t) heapaddr;
g_MemaHeap.spaces[0].size = g_MemaHeapSize = heapsize;
#if VERSION == VERSION_PAL_BETA
@@ -386,7 +386,7 @@ void memaPrint(void)
dhudPrintString(buffer);
line++;
sprintf(buffer, "Audio Free: %d", g_SndHeap.base + (g_SndHeap.len - (u32)g_SndHeap.cur));
sprintf(buffer, "Audio Free: %d", g_SndHeap.base + (g_SndHeap.len - (uintptr_t) g_SndHeap.cur));
dhudSetPos(30, line);
dhudPrintString(buffer);
line++;
@@ -627,7 +627,7 @@ found:
void memaFree(void *addr, s32 size)
{
_memaFree((u32)addr, size);
_memaFree((uintptr_t) addr, size);
}
void mema00012cd4(void)
+1 -1
View File
@@ -239,7 +239,7 @@ s32 mempRealloc(void *allocation, s32 newsize, u8 poolnum)
if (growsize <= 0) {
pool->leftpos += growsize;
pool->leftpos = (u8 *)ALIGN16((u32)pool->leftpos);
pool->leftpos = (u8 *)ALIGN16((uintptr_t) pool->leftpos);
return 1;
}
+4 -4
View File
@@ -3289,7 +3289,7 @@ void modelRenderNodeStarGunfire(struct modelrenderdata *renderdata, struct model
struct gfxvtx *dst = g_ModelVtxAllocatorFunc(rodata->unk00 * 4);
gSPSegment(renderdata->gdl++, SPSEGMENT_MODEL_VTX, osVirtualToPhysical(dst));
gSPSegment(renderdata->gdl++, SPSEGMENT_MODEL_COL2, osVirtualToPhysical((void *)ALIGN8((u32)&rodata->vertices[rodata->unk00 << 2])));
gSPSegment(renderdata->gdl++, SPSEGMENT_MODEL_COL2, osVirtualToPhysical((void *)ALIGN8((uintptr_t)&rodata->vertices[rodata->unk00 << 2])));
gSPSegment(renderdata->gdl++, SPSEGMENT_MODEL_COL1, osVirtualToPhysical(rodata->baseaddr));
gDPSetFogColor(renderdata->gdl++, 0x00, 0x00, 0x00, 0x00);
@@ -3851,7 +3851,7 @@ s32 modelTestForHit(struct model *model, struct coord *arg1, struct coord *arg2,
#define PROMOTE(var) \
if (var) \
var = (void *)((u32)var + diff)
var = (void *)((uintptr_t)var + diff)
void modelPromoteNodeOffsetsToPointers(struct modelnode *node, u32 vma, u32 fileramaddr)
{
@@ -3947,7 +3947,7 @@ void modelPromoteNodeOffsetsToPointers(struct modelnode *node, u32 vma, u32 file
* Offsets in model files are based from virtual memory address 0x0f000000.
* This vma address is specified as an argument to the function.
*/
void modelPromoteOffsetsToPointers(struct modeldef *modeldef, u32 vma, u32 fileramaddr)
void modelPromoteOffsetsToPointers(struct modeldef *modeldef, u32 vma, uintptr_t fileramaddr)
{
s32 diff = fileramaddr - vma;
s32 i;
@@ -4152,7 +4152,7 @@ void modelInitRwData(struct model *model, struct modelnode *startnode)
rwdata = modelGetNodeRwData(model, node);
rwdata->dl.vertices = rodata->dl.vertices;
rwdata->dl.gdl = rodata->dl.opagdl;
rwdata->dl.colours = (void *) ALIGN8((u32)(rodata->dl.vertices + rodata->dl.numvertices));
rwdata->dl.colours = (void *) ALIGN8((uintptr_t)(rodata->dl.vertices + rodata->dl.numvertices));
if (rodata->dl.numvertices);
if (rodata->dl.numvertices);
if (rodata->dl.numvertices);
+2 -2
View File
@@ -53,7 +53,7 @@ void mp3Init(ALHeap *heap)
mp3mainInit();
g_Mp3Vars.var8009c398 = alHeapAlloc(heap, 1, 0x50);
*(u8 **)((u32)&g_Mp3Vars+0x44) = alHeapAlloc(heap, 1, 0x440);
*(u8 **)((uintptr_t)&g_Mp3Vars+0x44) = alHeapAlloc(heap, 1, 0x440);
g_Mp3Vars.var8009c3e0 = 0;
g_Mp3Vars.var8009c3e4 = 0x7fff;
@@ -268,7 +268,7 @@ s32 func00037fc0(s32 arg0, Acmd **cmd)
}
if (arg0 > 0 && g_Mp3Vars.var8009c3c8) {
sp54 = (struct mp3thing *)(g_Mp3Vars.var8009c3d0 * 2 + (u32)g_Mp3Vars.var8009c3c8);
sp54 = (struct mp3thing *)(g_Mp3Vars.var8009c3d0 * 2 + (uintptr_t)g_Mp3Vars.var8009c3c8);
n_aLoadBuffer((*cmd)++, arg0 + arg0, sp4c, osVirtualToPhysical(sp54));
+1 -1
View File
@@ -307,7 +307,7 @@ u32 mtxGetObfuscatedRomBase(void)
// osRomBase is 0xb0000000
// load address is 0xb0000a5c
// value is 0x1740fff9
value = *(u32 *) (((u32) osRomBase | 0xb764b4fd) ^ 0x0764bea1);
value = *(u32 *) (((uintptr_t) osRomBase | 0xb764b4fd) ^ 0x0764bea1);
osSendMesg(&__osPiAccessQueue, 0, 0);
+2 -1
View File
@@ -2,6 +2,7 @@
#include "n_libaudio.h"
#include <os_internal.h>
#include <ultraerror.h>
#include "types.h"
u32 __n_alCSeqGetTrackEvent(ALCSeq *seq, u32 track, N_ALEvent *event, s32 arg3);
u8 __getTrackByte(ALCSeq *seq, u32 track);
@@ -27,7 +28,7 @@ void n_alCSeqNew(ALCSeq *seq, u8 *ptr)
if (tmpOff) {
flagTmp = 1 << i;
seq->validTracks |= flagTmp;
seq->curLoc[i] = (u8*)((u32)ptr + tmpOff);
seq->curLoc[i] = (u8*)((uintptr_t)ptr + tmpOff);
seq->evtDeltaTicks[i] = __readVarLen(seq,i);
} else {
seq->curLoc[i] = 0;
+4 -4
View File
@@ -74,7 +74,7 @@ Acmd *n_alAdpcmPull(N_PVoice *filter, s16 *outp, s32 outCount, Acmd *p)
* Now fix up state info to reflect the loop start point
*/
f->dc_lastsam = f->dc_loop.start &0xf;
f->dc_memin = (s32) f->dc_table->base + ADPCMFBYTES * ((s32) (f->dc_loop.start>>LFSAMPLES) + 1);
f->dc_memin = (intptr_t) f->dc_table->base + ADPCMFBYTES * ((s32) (f->dc_loop.start>>LFSAMPLES) + 1);
f->dc_sample = f->dc_loop.start;
bEnd = *outp;
@@ -138,7 +138,7 @@ Acmd *n_alAdpcmPull(N_PVoice *filter, s16 *outp, s32 outCount, Acmd *p)
* overFlow is the number of bytes past the end
* of the bitstream I try to generate
*/
overFlow = f->dc_memin + nbytes - ((s32) f->dc_table->base + f->dc_table->len);
overFlow = f->dc_memin + nbytes - ((intptr_t) f->dc_table->base + f->dc_table->len);
if (overFlow < 0) {
overFlow = 0;
@@ -195,7 +195,7 @@ s32 n_alLoadParam(N_PVoice *filter, s32 paramID, void *param)
switch (paramID) {
case (AL_FILTER_SET_WAVETABLE):
a->dc_table = (ALWaveTable *) param;
a->dc_memin = (s32) a->dc_table->base;
a->dc_memin = (intptr_t) a->dc_table->base;
a->dc_sample = 0;
switch (a->dc_table->type) {
@@ -236,7 +236,7 @@ s32 n_alLoadParam(N_PVoice *filter, s32 paramID, void *param)
/* sct 2/14/96 - Check table since it is initialized to null and */
/* Get loop info according to table type. */
if (a->dc_table) {
a->dc_memin = (s32) a->dc_table->base;
a->dc_memin = (intptr_t) a->dc_table->base;
if (a->dc_table->type == AL_ADPCM_WAVE) {
if (a->dc_table->waveInfo.adpcmWave.loop) {
+1
View File
@@ -1,6 +1,7 @@
#include "n_synthInternals.h"
#include <os.h>
#include <gu.h>
#include "types.h"
void func0003ba64(struct fx *fx, f32 outputrate);
+1 -1
View File
@@ -254,7 +254,7 @@ Acmd *_n_loadOutputBuffer(ALFx *r, ALDelay *d, s32 arg2, s32 buff, Acmd *p)
count = (s32) fincount;
d->rs->delta = fincount - (f32)count;
out_ptr = &r->input[arg2][-(d->output - d->rsdelta)];
ramalign = ((s32)out_ptr & 0x7) >> 1;
ramalign = ((intptr_t)out_ptr & 0x7) >> 1;
ptr = _n_loadBuffer(r, arg2, out_ptr - ramalign, rbuff, count + ramalign, ptr);
ratio = (s32)(fratio * UNITY_PITCH);
+1 -1
View File
@@ -137,7 +137,7 @@ void _n_handleEvent(N_ALSndpEvent *event)
state = (struct sndstate *)event->common.state;
if (((u32)state & 0x80000000) == 0) {
if (((uintptr_t) state & 0x80000000) == 0) {
// empty
}
+2 -1
View File
@@ -23,6 +23,7 @@
#include <n_libaudio.h>
#include <synthInternals.h>
#include "n_abi.h"
#include "types.h"
#define SAMPLE_ROUND
#undef SAMPLE_ROUND
@@ -67,7 +68,7 @@ typedef struct N_PVoice_s {
s32 dc_sample;
s32 dc_lastsam;
s32 dc_first;
s32 dc_memin;
intptr_t dc_memin;
/** ALResampler *********************************/
RESAMPLE_STATE *rs_state;
f32 rs_ratio;
+1 -1
View File
@@ -143,7 +143,7 @@ Acmd *n_alAudioFrame(Acmd *cmdList, s32 *cmdLen, s16 *outBuf, s32 outLen)
nOut = MIN(n_syn->maxOutSamples, outLen);
cmdPtr = cmdlEnd;
n_syn->sv_dramout = (s32)lOutBuf;
n_syn->sv_dramout = (intptr_t) lOutBuf;
cmdlEnd = n_alSavePull(n_syn->curSamples, cmdPtr);
+3 -3
View File
@@ -72,7 +72,7 @@ void rdpInit(void)
}
g_RdpOutBufferStart = mempAlloc(size, MEMPOOL_PERMANENT);
g_RdpOutBufferEnd = (u16 *)((u32)g_RdpOutBufferStart + size);
g_RdpOutBufferEnd = (u16 *) ((uintptr_t) g_RdpOutBufferStart + size);
}
void rdpCreateTask(Gfx *gdlstart, Gfx *gdlend, u32 arg2, void *msg)
@@ -84,7 +84,7 @@ void rdpCreateTask(Gfx *gdlstart, Gfx *gdlend, u32 arg2, void *msg)
task = &sctask->list;
task->t.ucode_boot = (u64 *) rspbootTextStart;
task->t.ucode_boot_size = (u32) ((u32)rspbootTextEnd - (u32)rspbootTextStart);
task->t.ucode_boot_size = (uintptr_t) rspbootTextEnd - (uintptr_t) rspbootTextStart;
if (rspbootTextStart);
@@ -107,5 +107,5 @@ void rdpCreateTask(Gfx *gdlstart, Gfx *gdlend, u32 arg2, void *msg)
schedAppendTasks(&g_Sched, sctask);
// Swap g_RdpCurTask
g_RdpCurTask = (struct rdptask *)((u32)g_RdpCurTask ^ (u32) &g_RdpTaskA ^ (u32) &g_RdpTaskB);
g_RdpCurTask = (struct rdptask *)((uintptr_t) g_RdpCurTask ^ (uintptr_t) &g_RdpTaskA ^ (uintptr_t) &g_RdpTaskB);
}
+41 -41
View File
@@ -928,23 +928,23 @@ void sndLoadSfxCtl(void)
u32 size;
g_ALSoundRomOffsets = NULL;
buffer = (u8 *) ALIGN16((u32)unalignedbuffer);
buffer = (u8 *) ALIGN16((uintptr_t)unalignedbuffer);
// Load the first 256 bytes of the ctl file.
size = 256;
dmaExec(buffer, (u32) &_sfxctlSegmentRomStart, size);
dmaExec(buffer, (romptr_t) &_sfxctlSegmentRomStart, size);
// Get the ROM address of the first (and only) bank,
// then load the first 256 bytes of the bank.
file = (ALBankFile *) buffer;
romaddr = (u32)&_sfxctlSegmentRomStart;
romaddr = (romptr_t)&_sfxctlSegmentRomStart;
romaddr += (u32)file->bankArray[0];
dmaExec(buffer, romaddr, size);
// Get the ROM address of the first (and only) instrument,
// then load the first 256 bytes of the instrument.
bank = (ALBank *) buffer;
romaddr = (u32)&_sfxctlSegmentRomStart;
romaddr = (romptr_t)&_sfxctlSegmentRomStart;
romaddr += (u32)bank->instArray[0];
dmaExec(buffer, romaddr, size);
@@ -965,7 +965,7 @@ void sndLoadSfxCtl(void)
// Convert ctl-local offsets to ROM offsets
for (i = 0; i < g_NumSounds; i++) {
g_ALSoundRomOffsets[i] += (u32) &_sfxctlSegmentRomStart;
g_ALSoundRomOffsets[i] += (romptr_t) &_sfxctlSegmentRomStart;
}
// Allocate and initialise cache
@@ -1004,13 +1004,13 @@ ALEnvelope *sndLoadEnvelope(u32 offset, u16 cacheindex)
#if VERSION >= VERSION_NTSC_1_0
u8 spaf[0x50];
u8 sp5f[0x50];
ALEnvelope *s2 = (ALEnvelope *)ALIGN16((u32)spaf);
ALEnvelope *s1 = (ALEnvelope *)ALIGN16((u32)sp5f);
ALEnvelope *s2 = (ALEnvelope *)ALIGN16((uintptr_t)spaf);
ALEnvelope *s1 = (ALEnvelope *)ALIGN16((uintptr_t)sp5f);
s32 i;
s32 sum1;
s32 sum2;
offset += (u32)&_sfxctlSegmentRomStart;
offset += (romptr_t)&_sfxctlSegmentRomStart;
do {
dmaExecHighPriority(s2, offset, 0x40);
@@ -1031,9 +1031,9 @@ ALEnvelope *sndLoadEnvelope(u32 offset, u16 cacheindex)
} while (sum1 != sum2);
#else
u8 sp5f[0x50];
ALEnvelope *s1 = (ALEnvelope *)ALIGN16((u32)sp5f);
ALEnvelope *s1 = (ALEnvelope *)ALIGN16((uintptr_t)sp5f);
offset += (u32)&_sfxctlSegmentRomStart;
offset += (romptr_t)&_sfxctlSegmentRomStart;
dmaExecHighPriority(s1, offset, 0x40);
#endif
@@ -1051,13 +1051,13 @@ ALKeyMap *sndLoadKeymap(u32 offset, u16 cacheindex)
#if VERSION >= VERSION_NTSC_1_0
u8 spaf[0x50];
u8 sp5f[0x50];
ALKeyMap *s2 = (ALKeyMap *)ALIGN16((u32)spaf);
ALKeyMap *s1 = (ALKeyMap *)ALIGN16((u32)sp5f);
ALKeyMap *s2 = (ALKeyMap *)ALIGN16((uintptr_t)spaf);
ALKeyMap *s1 = (ALKeyMap *)ALIGN16((uintptr_t)sp5f);
s32 i;
s32 sum1;
s32 sum2;
offset += (u32)&_sfxctlSegmentRomStart;
offset += (romptr_t)&_sfxctlSegmentRomStart;
do {
dmaExecHighPriority(s2, offset, 0x40);
@@ -1078,9 +1078,9 @@ ALKeyMap *sndLoadKeymap(u32 offset, u16 cacheindex)
} while (sum1 != sum2);
#else
u8 sp5f[0x50];
ALKeyMap *s1 = (ALKeyMap *)ALIGN16((u32)sp5f);
ALKeyMap *s1 = (ALKeyMap *)ALIGN16((uintptr_t)sp5f);
offset += (u32)&_sfxctlSegmentRomStart;
offset += (romptr_t)&_sfxctlSegmentRomStart;
dmaExecHighPriority(s1, offset, 0x40);
#endif
@@ -1098,13 +1098,13 @@ ALADPCMBook *sndLoadAdpcmBook(u32 offset, u16 cacheindex)
#if VERSION >= VERSION_NTSC_1_0
u8 spaf[0x150];
u8 sp5f[0x150];
ALADPCMBook *s2 = (ALADPCMBook *)ALIGN16((u32)spaf);
ALADPCMBook *s1 = (ALADPCMBook *)ALIGN16((u32)sp5f);
ALADPCMBook *s2 = (ALADPCMBook *)ALIGN16((uintptr_t)spaf);
ALADPCMBook *s1 = (ALADPCMBook *)ALIGN16((uintptr_t)sp5f);
s32 i;
s32 sum1;
s32 sum2;
offset += (u32)&_sfxctlSegmentRomStart;
offset += (romptr_t)&_sfxctlSegmentRomStart;
do {
dmaExecHighPriority(s2, offset, 0x140);
@@ -1125,9 +1125,9 @@ ALADPCMBook *sndLoadAdpcmBook(u32 offset, u16 cacheindex)
} while (sum1 != sum2);
#else
u8 sp5f[0x150];
ALADPCMBook *s1 = (ALADPCMBook *)ALIGN16((u32)sp5f);
ALADPCMBook *s1 = (ALADPCMBook *)ALIGN16((uintptr_t)sp5f);
offset += (u32)&_sfxctlSegmentRomStart;
offset += (romptr_t)&_sfxctlSegmentRomStart;
dmaExecHighPriority(s1, offset, 0x140);
#endif
@@ -1145,8 +1145,8 @@ ALADPCMloop *sndLoadAdpcmLoop(u32 offset, u16 cacheindex)
#if VERSION >= VERSION_NTSC_1_0
u8 spaf[0x50];
u8 sp5f[0x50];
ALADPCMloop *s2 = (ALADPCMloop *)ALIGN16((u32)spaf);
ALADPCMloop *s1 = (ALADPCMloop *)ALIGN16((u32)sp5f);
ALADPCMloop *s2 = (ALADPCMloop *)ALIGN16((uintptr_t)spaf);
ALADPCMloop *s1 = (ALADPCMloop *)ALIGN16((uintptr_t)sp5f);
s32 i;
s32 sum1;
s32 sum2;
@@ -1155,7 +1155,7 @@ ALADPCMloop *sndLoadAdpcmLoop(u32 offset, u16 cacheindex)
return NULL;
}
offset += (u32)&_sfxctlSegmentRomStart;
offset += (romptr_t)&_sfxctlSegmentRomStart;
do {
dmaExecHighPriority(s2, offset, 0x40);
@@ -1176,13 +1176,13 @@ ALADPCMloop *sndLoadAdpcmLoop(u32 offset, u16 cacheindex)
} while (sum1 != sum2);
#else
u8 sp5f[0x50];
ALADPCMloop *s1 = (ALADPCMloop *)ALIGN16((u32)sp5f);
ALADPCMloop *s1 = (ALADPCMloop *)ALIGN16((uintptr_t)sp5f);
if (offset == 0) {
return NULL;
}
offset += (u32)&_sfxctlSegmentRomStart;
offset += (romptr_t)&_sfxctlSegmentRomStart;
dmaExecHighPriority(s1, offset, 0x40);
#endif
@@ -1200,14 +1200,14 @@ ALWaveTable *sndLoadWavetable(u32 offset, u16 cacheindex)
#if VERSION >= VERSION_NTSC_1_0
u8 spaf[0x50];
u8 sp5f[0x50];
ALWaveTable *s2 = (ALWaveTable *)ALIGN16((u32)spaf);
ALWaveTable *s1 = (ALWaveTable *)ALIGN16((u32)sp5f);
ALWaveTable *s2 = (ALWaveTable *)ALIGN16((uintptr_t)spaf);
ALWaveTable *s1 = (ALWaveTable *)ALIGN16((uintptr_t)sp5f);
s32 i;
s32 sum1;
s32 sum2;
ALWaveTable *tmp;
offset += (u32)&_sfxctlSegmentRomStart;
offset += (romptr_t)&_sfxctlSegmentRomStart;
do {
dmaExecHighPriority(s2, offset, 0x40);
@@ -1228,10 +1228,10 @@ ALWaveTable *sndLoadWavetable(u32 offset, u16 cacheindex)
} while (sum1 != sum2);
#else
u8 sp5f[0x50];
ALWaveTable *s1 = (ALWaveTable *)ALIGN16((u32)sp5f);
ALWaveTable *s1 = (ALWaveTable *)ALIGN16((uintptr_t)sp5f);
ALWaveTable *tmp;
offset += (u32)&_sfxctlSegmentRomStart;
offset += (romptr_t)&_sfxctlSegmentRomStart;
dmaExecHighPriority(s1, offset, 0x40);
#endif
@@ -1240,11 +1240,11 @@ ALWaveTable *sndLoadWavetable(u32 offset, u16 cacheindex)
*tmp = *s1;
tmp->base += (u32)&_sfxtblSegmentRomStart;
tmp->base += (romptr_t)&_sfxtblSegmentRomStart;
if (tmp->type == AL_ADPCM_WAVE) {
tmp->waveInfo.adpcmWave.book = sndLoadAdpcmBook((u32)tmp->waveInfo.adpcmWave.book, cacheindex);
tmp->waveInfo.adpcmWave.loop = sndLoadAdpcmLoop((u32)tmp->waveInfo.adpcmWave.loop, cacheindex);
tmp->waveInfo.adpcmWave.book = sndLoadAdpcmBook((uintptr_t)tmp->waveInfo.adpcmWave.book, cacheindex);
tmp->waveInfo.adpcmWave.loop = sndLoadAdpcmLoop((uintptr_t)tmp->waveInfo.adpcmWave.loop, cacheindex);
}
return tmp;
@@ -1296,7 +1296,7 @@ ALSound *sndLoadSound(s16 soundnum)
s16 sfxnum;
u8 sp47[0x58];
sound = (ALSound *)ALIGN16((u32)sp47);
sound = (ALSound *)ALIGN16((uintptr_t)sp47);
tmp.packed = soundnum;
sfxnum = tmp.id;
@@ -1348,9 +1348,9 @@ ALSound *sndLoadSound(s16 soundnum)
dmaExecHighPriority(sound, g_ALSoundRomOffsets[sfxnum - 1], 0x40);
// Promote segment offsets to pointers and load their child data
sound->envelope = sndLoadEnvelope((u32)sound->envelope, cacheindex);
sound->wavetable = sndLoadWavetable((u32)sound->wavetable, cacheindex);
sound->keyMap = sndLoadKeymap((u32)sound->keyMap, cacheindex);
sound->envelope = sndLoadEnvelope((uintptr_t)sound->envelope, cacheindex);
sound->wavetable = sndLoadWavetable((uintptr_t)sound->wavetable, cacheindex);
sound->keyMap = sndLoadKeymap((uintptr_t)sound->keyMap, cacheindex);
// Save the ALSound into the cache
g_SndCache.sounds[cacheindex] = *sound;
@@ -1477,7 +1477,7 @@ void sndInit(void)
// Load seq.ctl
var80095200 = 0xffffffff;
bankfile = alHeapAlloc(&g_SndHeap, 1, len);
dmaExec(bankfile, (u32) &_seqctlSegmentRomStart, len);
dmaExec(bankfile, (romptr_t) &_seqctlSegmentRomStart, len);
// Load seq.tbl
alBnkfNew(bankfile, &_seqtblSegmentRomStart);
@@ -1487,15 +1487,15 @@ void sndInit(void)
// enough space for the table and load it.
var80095204 = bankfile->bankArray[0];
g_SeqTable = alHeapDBAlloc(0, 0, &g_SndHeap, 1, 0x10);
dmaExec(g_SeqTable, (u32) &_sequencesSegmentRomStart, 0x10);
dmaExec(g_SeqTable, (romptr_t) &_sequencesSegmentRomStart, 0x10);
len = g_SeqTable->count * sizeof(struct seqtableentry) + 4;
g_SeqTable = alHeapDBAlloc(0, 0, &g_SndHeap, 1, len);
dmaExec(g_SeqTable, (u32) &_sequencesSegmentRomStart, (len + 0xf) & 0xfffffff0);
dmaExec(g_SeqTable, (romptr_t) &_sequencesSegmentRomStart, (len + 0xf) & 0xfffffff0);
// Promote segment-relative offsets to ROM addresses
for (i = 0; i < g_SeqTable->count; i++) {
g_SeqTable->entries[i].romaddr += (u32) &_sequencesSegmentRomStart;
g_SeqTable->entries[i].romaddr += (romptr_t) &_sequencesSegmentRomStart;
}
synconfig.maxVVoices = 44;
+2 -2
View File
@@ -217,11 +217,11 @@ s32 strtol(const char *src, const char **endptr, s32 base)
break;
}
if (value > cutoff || (value == cutoff && (u32)c > cutlim)) {
if (value > cutoff || (value == cutoff && (uintptr_t) c > cutlim)) {
overflow = true;
} else {
value *= base;
value += (u32)c;
value += (uintptr_t) c;
}
}
+4 -3
View File
@@ -1,6 +1,7 @@
#include <libaudio.h>
#include <os_internal.h>
#include <ultraerror.h>
#include "types.h"
void _bnkfPatchBank(ALBank *bank, s32 offset, s32 table);
void _bnkfPatchInst(ALInstrument *inst, s32 offset, s32 table);
@@ -9,7 +10,7 @@ void _bnkfPatchWaveTable(ALWaveTable *w, s32 offset, s32 table);
void alSeqFileNew(ALSeqFile *file, u8 *base)
{
s32 offset = (s32) base;
intptr_t offset = (intptr_t) base;
s32 i;
/*
@@ -22,8 +23,8 @@ void alSeqFileNew(ALSeqFile *file, u8 *base)
void alBnkfNew(ALBankFile *file, u8 *table)
{
s32 offset = (s32) file;
s32 woffset = (s32) table;
intptr_t offset = (intptr_t) file;
intptr_t woffset = (intptr_t) table;
s32 i;
+2 -1
View File
@@ -1,6 +1,7 @@
#include <os_internal.h>
#include <rcp.h>
#include "../os/osint.h"
#include "types.h"
s32 osAiSetNextBuffer(void *bufPtr, u32 size)
{
@@ -11,7 +12,7 @@ s32 osAiSetNextBuffer(void *bufPtr, u32 size)
bptr -= 0x2000;
}
if ((((u32)bufPtr + size) & 0x1fff) == 0) {
if ((((uintptr_t) bufPtr + size) & 0x1fff) == 0) {
hdwrBugFlag = 1;
} else {
hdwrBugFlag = 0;
+2 -1
View File
@@ -1,5 +1,6 @@
#include <os_internal.h>
#include "controller.h"
#include "types.h"
s32 g_PfsPrevChannel = -1;
u8 g_PfsPrevBank = 250;
@@ -28,7 +29,7 @@ s32 __osIdCheckSum(u16 *ptr, u16 *csum, u16 *icsum)
*csum = *icsum = 0;
for (i = 0; i < ((sizeof(__OSPackId) - sizeof(u32)) / sizeof(u8)); i += 2) {
data = *(u16 *)((u32)ptr + i);
data = *(u16 *)((uintptr_t) ptr + i);
*csum += data;
*icsum += ~data;
}
+2 -1
View File
@@ -1,6 +1,7 @@
#include <os_internal.h>
#include <rcp.h>
#include "piint.h"
#include "types.h"
void __osDevMgrMain(void *args)
{
@@ -30,7 +31,7 @@ void __osDevMgrMain(void *args)
info->sectorNum = -1;
if (info->transferMode != LEO_SECTOR_MODE) {
blockInfo->dramAddr = (void *)((u32)blockInfo->dramAddr - blockInfo->sectorSize);
blockInfo->dramAddr = (void *)((uintptr_t)blockInfo->dramAddr - blockInfo->sectorSize);
}
if (info->transferMode == LEO_TRACK_MODE && mb->piHandle->transferInfo.cmdType == LEO_CMD_TYPE_0) {
+2 -1
View File
@@ -1,5 +1,6 @@
#include <os_internal.h>
#include "piint.h"
#include "types.h"
s32 osPiRawStartDma(s32 direction, u32 devAddr, void *dramAddr, u32 size)
{
@@ -8,7 +9,7 @@ s32 osPiRawStartDma(s32 direction, u32 devAddr, void *dramAddr, u32 size)
WAIT_ON_IOBUSY(stat);
IO_WRITE(PI_DRAM_ADDR_REG, osVirtualToPhysical(dramAddr));
IO_WRITE(PI_CART_ADDR_REG, K1_TO_PHYS((u32)osRomBase | devAddr));
IO_WRITE(PI_CART_ADDR_REG, K1_TO_PHYS((uintptr_t) osRomBase | devAddr));
switch (direction) {
case OS_READ:
+2 -1
View File
@@ -1,6 +1,7 @@
#include <os_internal.h>
#include "controller.h"
#include "piint.h"
#include "types.h"
s32 osPiRawReadIo(u32 devAddr, u32 *data)
{
@@ -8,7 +9,7 @@ s32 osPiRawReadIo(u32 devAddr, u32 *data)
WAIT_ON_IOBUSY(stat);
*data = IO_READ((u32)osRomBase | devAddr);
*data = IO_READ((uintptr_t) osRomBase | devAddr);
return 0;
}
+2 -1
View File
@@ -2,6 +2,7 @@
#include <sptask.h>
#include <rcp.h>
#include "../os/osint.h"
#include "types.h"
OSTask tmp_task;
@@ -40,7 +41,7 @@ void osSpTaskLoad(OSTask *intp)
intp->t.flags &= ~OS_TASK_YIELDED;
if (tp->t.flags & OS_TASK_LOADABLE) {
tp->t.ucode = (u64 *)IO_READ((u32)intp->t.yield_data_ptr + OS_YIELD_DATA_SIZE - 4);
tp->t.ucode = (u64 *)IO_READ((uintptr_t) intp->t.yield_data_ptr + OS_YIELD_DATA_SIZE - 4);
}
}
+2 -1
View File
@@ -1,5 +1,6 @@
#include <os_internal.h>
#include "viint.h"
#include "types.h"
void osViSetXScale(f32 value)
{
@@ -11,7 +12,7 @@ void osViSetXScale(f32 value)
__osViNext->x.factor = value;
__osViNext->state |= VI_STATE_XSCALE_UPDATED;
nomValue = __osViNext->modep->comRegs.xScale & VI_SCALE_MASK;
__osViNext->x.scale = (u32)(__osViNext->x.factor * nomValue) & VI_SCALE_MASK;
__osViNext->x.scale = (uintptr_t) (__osViNext->x.factor * nomValue) & VI_SCALE_MASK;
__osRestoreInt(saveMask);
}
+3 -2
View File
@@ -1,6 +1,7 @@
#include <os_internal.h>
#include <R4300.h>
#include "osint.h"
#include "types.h"
void __osCleanupThread(void);
@@ -12,13 +13,13 @@ void osCreateThread(OSThread *t, OSId id, void (*entry)(void *), void *arg, void
t->priority = p;
t->next = NULL;
t->queue = NULL;
t->context.pc = (u32) entry;
t->context.pc = (uintptr_t) entry;
t->context.a0 = (u64) arg;
t->context.sp = (u64) sp - 16;
t->context.ra = (u64) __osCleanupThread;
t->context.sr = SR_FR | SR_IMASK | SR_EXL | SR_IE;
t->context.rcp = (OS_IM_ALL & RCP_IMASK) >> RCP_IMASKSHIFT;
t->context.fpcsr = (u32) (FPCSR_FS | FPCSR_EV);
t->context.fpcsr = (uintptr_t) (FPCSR_FS | FPCSR_EV);
t->fp = 0;
t->state = OS_STATE_STOPPED;
t->flags = 0;
+1 -1
View File
@@ -226,7 +226,7 @@ void viReset(s32 stagenum)
ptr = mempAlloc(fbsize * 2 + 0x40, MEMPOOL_STAGE);
ptr = (u8 *)(((u32)ptr + 0x3f) & 0xffffffc0);
ptr = (u8 *)(((uintptr_t) ptr + 0x3f) & 0xffffffc0);
g_FrameBuffers[0] = (u16 *) ptr;
g_FrameBuffers[1] = (u16 *) (fbsize + ptr);
+13 -13
View File
@@ -221,17 +221,17 @@ void vmInit(void)
gameseg = (u8 *) (STACK_START - g_VmNumPages * 8);
g_VmStateTable = (u32 *) gameseg;
numpages = (u32) (((u32) &_gameSegmentEnd - (u32) &_gameSegmentStart) + (PAGE_SIZE - 1)) / PAGE_SIZE;
numpages = (u32) (((uintptr_t) &_gameSegmentEnd - (uintptr_t) &_gameSegmentStart) + (PAGE_SIZE - 1)) / PAGE_SIZE;
numentries = numpages + 1;
g_VmZipTable = (u32 *) ((u32) ((u32 *) gameseg - (numentries + 4)) & ~0xf);
g_VmZipTable = (u32 *) ((uintptr_t) ((u32 *) gameseg - (numentries + 4)) & ~0xf);
// Load gamezips pointer list
dmaExec(g_VmZipTable, (u32) &_gamezipSegmentRomStart, ALIGN16((numentries + 1) << 2));
dmaExec(g_VmZipTable, (romptr_t) &_gamezipSegmentRomStart, ALIGN16((numentries + 1) << 2));
// Make pointers absolute instead of relative to their segment
for (pagenum = 0; pagenum < numentries; pagenum++) {
g_VmZipTable[pagenum] += (u32) &_gamezipSegmentRomStart;
g_VmZipTable[pagenum] += (romptr_t) &_gamezipSegmentRomStart;
}
// Find the size of the biggest compressed zip
@@ -247,11 +247,11 @@ void vmInit(void)
s1 += 0x40;
s1 &= (u32) ~0xf;
g_VmZipBuffer = (u32) g_VmZipTable - s1;
g_VmZipBuffer = (uintptr_t) g_VmZipTable - s1;
g_VmZipBuffer &= ~0xf;
gameseg = (u8 *) (g_VmZipBuffer - MAX_LOADED_PAGES * PAGE_SIZE);
gameseg -= (u32) gameseg & 0x1fff;
var8008ae20 = (u32) gameseg;
gameseg -= (uintptr_t) gameseg & 0x1fff;
var8008ae20 = (uintptr_t) gameseg;
g_VmMarker = gameseg;
tlb000010a4();
@@ -274,18 +274,18 @@ void vmInit(void)
#if VERSION >= VERSION_NTSC_1_0
numentries = numpages + 1;
gameseg = (u8 *) ((u32) (s7 - (u8 *) ALIGN64((u32) &_gameSegmentEnd - (u32) &_gameSegmentStart)) & 0xfffe0000);
gameseg = (u8 *) ((uintptr_t) (s7 - (u8 *) ALIGN64((uintptr_t) &_gameSegmentEnd - (uintptr_t) &_gameSegmentStart)) & 0xfffe0000);
#else
gameseg = (u8 *) ((u32) (s7 - (u8 *) ALIGN64((u32) &_gameSegmentEnd - (u32) &_gameSegmentStart)) & 0xfffe0000);
gameseg = (u8 *) ((uintptr_t) (s7 - (u8 *) ALIGN64((uintptr_t) &_gameSegmentEnd - (uintptr_t) &_gameSegmentStart)) & 0xfffe0000);
numentries = numpages + 1;
#endif
romaddrs = (u32 *) (((u32) gameseg - ((numentries + 4) << 2)) & ~0xf);
romaddrs = (u32 *) (((uintptr_t) gameseg - ((numentries + 4) << 2)) & ~0xf);
g_VmMarker = gameseg;
numentries2 = numentries;
// Load gamezips pointer list
dmaExec(romaddrs, (u32) &_gamezipSegmentRomStart, ALIGN16((numentries2 + 1) << 2));
dmaExec(romaddrs, (romptr_t) &_gamezipSegmentRomStart, ALIGN16((numentries2 + 1) << 2));
if (pagenum);
@@ -297,12 +297,12 @@ void vmInit(void)
// Make pointers absolute instead of relative to their segment
for (ITER = 0; ITER < numentries2; ITER++) { \
romaddrs[ITER] += (u32) &_gamezipSegmentRomStart;
romaddrs[ITER] += (romptr_t) &_gamezipSegmentRomStart;
}
// Load each zip from the ROM and inflate them to the game segment
s2 = gameseg;
chunkbuffer = (u8 *) ((u32) romaddrs - PAGE_SIZE * 2);
chunkbuffer = (u8 *) ((uintptr_t) romaddrs - PAGE_SIZE * 2);
zip = chunkbuffer + 2;
for (ITER = 0; ITER < numentries2 - 1;) {