Decompile wallhitCreateWith20Args

This commit is contained in:
Ryan Dwyer 2022-07-02 00:55:35 +10:00
parent a1f35464c1
commit bc591bf6fc
24 changed files with 907 additions and 4299 deletions

View File

@ -2518,10 +2518,10 @@ Gfx *bgRenderSceneInXray(Gfx *gdl)
if (debugIsPropRenderingEnabled() && getVar80084040()) {
if (thing->roomnum == -1) {
gdl = propsRender(gdl, 0, RENDERPASS_ALPHA, roomnumsbyprop);
gdl = propsRender(gdl, 0, RENDERPASS_XLU, roomnumsbyprop);
}
gdl = propsRender(gdl, thing->roomnum, RENDERPASS_ALPHA, roomnumsbyprop);
gdl = propsRender(gdl, thing->roomnum, RENDERPASS_XLU, roomnumsbyprop);
}
if (1);
@ -2696,10 +2696,10 @@ Gfx *bgRenderScene(Gfx *gdl)
if (debugIsPropRenderingEnabled() && getVar80084040()) {
if (firstroomnum == thing->roomnum) {
gdl = propsRender(gdl, 0, RENDERPASS_OPAQUE_PREBG, roomnumsbyprop);
gdl = propsRender(gdl, 0, RENDERPASS_OPA_PREBG, roomnumsbyprop);
}
gdl = propsRender(gdl, thing->roomnum, RENDERPASS_OPAQUE_PREBG, roomnumsbyprop);
gdl = propsRender(gdl, thing->roomnum, RENDERPASS_OPA_PREBG, roomnumsbyprop);
}
// Render BG opaque components
@ -2721,10 +2721,10 @@ Gfx *bgRenderScene(Gfx *gdl)
if (debugIsPropRenderingEnabled() && getVar80084040()) {
if (firstroomnum == thing->roomnum) {
gdl = propsRender(gdl, 0, RENDERPASS_OPAQUE_POSTBG, roomnumsbyprop);
gdl = propsRender(gdl, 0, RENDERPASS_OPA_POSTBG, roomnumsbyprop);
}
gdl = propsRender(gdl, thing->roomnum, RENDERPASS_OPAQUE_POSTBG, roomnumsbyprop);
gdl = propsRender(gdl, thing->roomnum, RENDERPASS_OPA_POSTBG, roomnumsbyprop);
}
}
@ -2770,10 +2770,10 @@ Gfx *bgRenderScene(Gfx *gdl)
// Render prop alpha components
if (debugIsPropRenderingEnabled() && getVar80084040()) {
if (firstroomnum == thing->roomnum) {
gdl = propsRender(gdl, 0, RENDERPASS_ALPHA, roomnumsbyprop);
gdl = propsRender(gdl, 0, RENDERPASS_XLU, roomnumsbyprop);
}
gdl = propsRender(gdl, thing->roomnum, RENDERPASS_ALPHA, roomnumsbyprop);
gdl = propsRender(gdl, thing->roomnum, RENDERPASS_XLU, roomnumsbyprop);
}
if (!g_Vars.mplayerisrunning) {

View File

@ -1429,7 +1429,7 @@ void chrRemove(struct prop *prop, bool delete)
chair->hidden &= ~OBJHFLAG_OCCUPIEDCHAIR;
}
wallhit0f14159c(prop);
wallhitFadeSplatsForRemovedChr(prop);
func0f0926bc(prop, 1, 0xffff);
shieldhitsRemoveByProp(prop);
modelFreeVertices(VTXSTORETYPE_CHRVTX, model);
@ -3292,7 +3292,7 @@ bool chr0f024b18(struct model *model, struct modelnode *node)
* This function is recursive. The chr's gun can have mines placed on it, and
* mines can also have further mines placed on them.
*/
void chrRenderAttachedObject(struct prop *prop, struct modelrenderdata *renderdata, bool withalpha, struct chrdata *chr)
void chrRenderAttachedObject(struct prop *prop, struct modelrenderdata *renderdata, bool xlupass, struct chrdata *chr)
{
if (prop->flags & PROPFLAG_ONTHISSCREENTHISTICK) {
u32 stack;
@ -3302,20 +3302,20 @@ void chrRenderAttachedObject(struct prop *prop, struct modelrenderdata *renderda
modelRender(renderdata, model);
// Note: OBJH2FLAG_RENDEROPAQUE << 1 is OBJH2FLAG_RENDERALPHA
// Note: OBJH2FLAG_HASOPA << 1 is OBJH2FLAG_HASXLU
// so this is just checking if the appropriate flag is enabled
if (obj->hidden2 & OBJH2FLAG_RENDEROPAQUE << withalpha) {
renderdata->gdl = wallhitRenderPropHits(renderdata->gdl, prop, withalpha);
if (obj->hidden2 & (OBJH2FLAG_HASOPA << xlupass)) {
renderdata->gdl = wallhitRenderPropHits(renderdata->gdl, prop, xlupass);
}
child = prop->child;
while (child) {
chrRenderAttachedObject(child, renderdata, withalpha, chr);
chrRenderAttachedObject(child, renderdata, xlupass, chr);
child = child->next;
}
if (withalpha) {
if (xlupass) {
func0f0c33f0(model->matrices, model->filedata->nummatrices);
}
}
@ -3382,7 +3382,7 @@ void chrGetBloodColour(s16 bodynum, u8 *colour1, u32 *colour2)
}
}
Gfx *chrRender(struct prop *prop, Gfx *gdl, bool withalpha)
Gfx *chrRender(struct prop *prop, Gfx *gdl, bool xlupass)
{
struct chrdata *chr = prop->chr;
struct model *model = chr->model;
@ -3452,13 +3452,13 @@ Gfx *chrRender(struct prop *prop, Gfx *gdl, bool withalpha)
}
if (alpha < 0xff) {
if (!withalpha) {
if (!xlupass) {
return gdl;
}
sp100 = 3;
} else {
if (!withalpha) {
if (!xlupass) {
sp100 = 1;
} else {
sp100 = 2;
@ -3478,7 +3478,7 @@ Gfx *chrRender(struct prop *prop, Gfx *gdl, bool withalpha)
s32 colour[4]; // rgba levels, but allowing > 256 temporarily
u32 stack;
if (withalpha && chr->cloakfadefrac > 0 && !chr->cloakfadefinished) {
if (xlupass && chr->cloakfadefrac > 0 && !chr->cloakfadefinished) {
gdl = chrRenderCloak(gdl, chr->prop, chr->prop);
}
@ -3607,7 +3607,7 @@ Gfx *chrRender(struct prop *prop, Gfx *gdl, bool withalpha)
child = prop->child;
while (child) {
chrRenderAttachedObject(child, &renderdata, withalpha, chr);
chrRenderAttachedObject(child, &renderdata, xlupass, chr);
child = child->next;
}
@ -3616,7 +3616,7 @@ Gfx *chrRender(struct prop *prop, Gfx *gdl, bool withalpha)
var8005efc4 = NULL;
// Render shadow
if (withalpha) {
if (xlupass) {
if (!chr->onladder && chr->actiontype != ACT_SKJUMP) {
s32 shadowalpha = 0;

View File

@ -356,13 +356,13 @@ void envApplyTransitionFrac(f32 frac)
envApplyType1(&tmp);
}
Gfx *envStartFog(Gfx *gdl, bool withalpha)
Gfx *envStartFog(Gfx *gdl, bool xlupass)
{
if (!g_FogEnabled) {
return gdl;
}
if (withalpha) {
if (xlupass) {
gDPSetFogColor(gdl++, g_Env.sky_r, g_Env.sky_g, g_Env.sky_b, 0xff);
gSPFogPosition(gdl++, g_Env.fogmin, g_Env.fogmax);
} else {

View File

@ -1027,10 +1027,10 @@ u32 explosionTick(struct prop *prop)
struct coord spfc;
struct coord spf0;
s32 bb;
bool s3;
bool xlu;
struct chrdata *chr;
f32 scorchsize;
struct hitthing spb0;
struct hitthing hitthing;
maxage = TICKS(type->duration);
@ -1194,7 +1194,7 @@ u32 explosionTick(struct prop *prop)
// Make scorch at half duration
if (exp->age == (maxage >> 1) && exp->makescorch) {
s3 = false;
xlu = false;
scorchsize = 2.0f * type->innersize;
if (scorchsize > 100.0f) {
@ -1214,12 +1214,15 @@ u32 explosionTick(struct prop *prop)
}
if (g_Rooms[exp->room].gfxdata) {
// Not 100% sure about spb0 being a struct hitthing, but it's likely
if (g_Rooms[exp->room].gfxdata->unk0c && func0f161520(&prop->pos, &exp->unk3d0, exp->room, &spb0)) {
s3 = spb0.unk2c == 2;
if (g_Rooms[exp->room].gfxdata->unk0c && func0f161520(&prop->pos, &exp->unk3d0, exp->room, &hitthing)) {
xlu = hitthing.unk2c == 2;
}
wallhit0f13f504(&exp->unk3d0, &exp->unk3dc, &prop->pos, 0, 0, 7, exp->room, 0, 0, -1, 0, chr, scorchsize, scorchsize, 0xff, 0xff, 0, 0, 0, s3);
wallhitCreateWith20Args(&exp->unk3d0, &exp->unk3dc, &prop->pos, NULL,
0, WALLHITTEX_SCORCH, exp->room, 0,
0, -1, 0, chr,
scorchsize, scorchsize, 0xff, 0xff,
0, 0, 0, xlu);
}
}
}
@ -1259,14 +1262,14 @@ u32 explosionTickPlayer(struct prop *prop)
return TICKOP_NONE;
}
Gfx *explosionRender(struct prop *prop, Gfx *gdl, bool withalpha)
Gfx *explosionRender(struct prop *prop, Gfx *gdl, bool xlupass)
{
struct explosion *exp = prop->explosion;
s32 roomnum;
s32 i;
s32 j;
if (!withalpha) {
if (!xlupass) {
return gdl;
}
@ -1286,7 +1289,7 @@ Gfx *explosionRender(struct prop *prop, Gfx *gdl, bool withalpha)
if (roomnum != -1) {
struct screenbox screenbox;
struct coord *coord = room0f166dd0(roomnum);
struct coord *coord = roomGetPos(roomnum);
u32 *colour;
s32 tmp;

View File

@ -6470,10 +6470,10 @@ void playerChooseThirdPersonAnimation(struct chrdata *chr, s32 crouchpos, f32 sp
*animcfgptr = animcfg;
}
Gfx *playerRender(struct prop *prop, Gfx *gdl, bool withalpha)
Gfx *playerRender(struct prop *prop, Gfx *gdl, bool xlupass)
{
if (g_Vars.players[playermgrGetPlayerNumByProp(prop)]->haschrbody) {
gdl = chrRender(prop, gdl, withalpha);
gdl = chrRender(prop, gdl, xlupass);
}
return gdl;

View File

@ -162,8 +162,8 @@ struct prop *propAllocate(void)
prop->lastupdateframe = 0xffff;
prop->propupdate240 = 0;
prop->propupdate60err = 2;
prop->wallhits1 = NULL;
prop->wallhits2 = NULL;
prop->opawallhits = NULL;
prop->xluwallhits = NULL;
g_Vars.propstates[prop->propstateindex].propcount++;
g_Vars.allocstateindex++;
@ -343,7 +343,7 @@ void propDetach(struct prop *prop)
}
}
Gfx *propRender(Gfx *gdl, struct prop *prop, bool withalpha)
Gfx *propRender(Gfx *gdl, struct prop *prop, bool xlupass)
{
switch (prop->type) {
case 0:
@ -351,19 +351,19 @@ Gfx *propRender(Gfx *gdl, struct prop *prop, bool withalpha)
case PROPTYPE_OBJ:
case PROPTYPE_DOOR:
case PROPTYPE_WEAPON:
gdl = objRender(prop, gdl, withalpha);
gdl = objRender(prop, gdl, xlupass);
break;
case PROPTYPE_CHR:
gdl = chrRender(prop, gdl, withalpha);
gdl = chrRender(prop, gdl, xlupass);
break;
case PROPTYPE_PLAYER:
gdl = playerRender(prop, gdl, withalpha);
gdl = playerRender(prop, gdl, xlupass);
break;
case PROPTYPE_EXPLOSION:
gdl = explosionRender(prop, gdl, withalpha);
gdl = explosionRender(prop, gdl, xlupass);
break;
case PROPTYPE_SMOKE:
gdl = smokeRender(prop, gdl, withalpha);
gdl = smokeRender(prop, gdl, xlupass);
break;
}
@ -378,8 +378,8 @@ Gfx *propRender(Gfx *gdl, struct prop *prop, bool withalpha)
* - Opaque components of BG
* - Opaque components of props (post-BG)
* - Wall hits
* - Alpha components of BG
* - Alpha components of props
* - Translucent components of BG
* - Translucent components of props
*
* Most props are rendered in the pre-bg pass for performance reasons, as there
* is less BG to draw if it's being obscured by props.
@ -394,7 +394,7 @@ Gfx *propsRender(Gfx *gdl, s16 renderroomnum, s32 renderpass, s16 *roomnumsbypro
struct prop *prop;
s16 *proprooms;
if (renderpass == RENDERPASS_OPAQUE_PREBG || renderpass == RENDERPASS_OPAQUE_POSTBG) {
if (renderpass == RENDERPASS_OPA_PREBG || renderpass == RENDERPASS_OPA_POSTBG) {
// Iterate onscreen props near to far
ptr = g_Vars.endonscreenprops - 1;
@ -406,8 +406,8 @@ Gfx *propsRender(Gfx *gdl, s16 renderroomnum, s32 renderpass, s16 *roomnumsbypro
prop = *ptr;
if (prop) {
if ((renderpass == RENDERPASS_OPAQUE_PREBG && (prop->flags & (PROPFLAG_DRAWONTOP | PROPFLAG_RENDERPOSTBG)) == 0)
|| (renderpass == RENDERPASS_OPAQUE_POSTBG && (prop->flags & (PROPFLAG_DRAWONTOP | PROPFLAG_RENDERPOSTBG)) == PROPFLAG_RENDERPOSTBG)) {
if ((renderpass == RENDERPASS_OPA_PREBG && (prop->flags & (PROPFLAG_DRAWONTOP | PROPFLAG_RENDERPOSTBG)) == 0)
|| (renderpass == RENDERPASS_OPA_POSTBG && (prop->flags & (PROPFLAG_DRAWONTOP | PROPFLAG_RENDERPOSTBG)) == PROPFLAG_RENDERPOSTBG)) {
gdl = propRender(gdl, prop, false);
}
}

View File

@ -52269,7 +52269,7 @@ glabel var7f1aa824
// return gdl;
//}
void objRenderProp(struct prop *prop, struct modelrenderdata *renderdata, bool withalpha)
void objRenderProp(struct prop *prop, struct modelrenderdata *renderdata, bool xlupass)
{
if (prop->flags & PROPFLAG_ONTHISSCREENTHISTICK) {
struct defaultobj *obj = prop->obj;
@ -52377,8 +52377,8 @@ void objRenderProp(struct prop *prop, struct modelrenderdata *renderdata, bool w
gSPClearGeometryMode(gdl++, G_CULL_BOTH);
}
if (obj->hidden2 & (OBJH2FLAG_RENDEROPAQUE << withalpha)) {
gdl = wallhitRenderPropHits(gdl, prop, withalpha);
if (obj->hidden2 & (OBJH2FLAG_HASOPA << xlupass)) {
gdl = wallhitRenderPropHits(gdl, prop, xlupass);
}
if (sp6c) {
@ -52390,11 +52390,11 @@ void objRenderProp(struct prop *prop, struct modelrenderdata *renderdata, bool w
child = prop->child;
while (child) {
objRenderProp(child, renderdata, withalpha);
objRenderProp(child, renderdata, xlupass);
child = child->next;
}
if (withalpha) {
if (xlupass) {
if (sp6c) {
player0f0c3320(model->matrices, model->filedata->nummatrices);
} else {
@ -52504,7 +52504,7 @@ Gfx *objRenderShadow(struct defaultobj *obj, Gfx *gdl)
return gdl;
}
Gfx *objRender(struct prop *prop, Gfx *gdl, bool withalpha)
Gfx *objRender(struct prop *prop, Gfx *gdl, bool xlupass)
{
u32 stack;
u32 stack2;
@ -52595,13 +52595,13 @@ Gfx *objRender(struct prop *prop, Gfx *gdl, bool withalpha)
}
if (alpha < 0xff || (obj->flags2 & OBJFLAG2_DRAWONTOP)) {
if (!withalpha) {
if (!xlupass) {
return gdl;
}
sp84 = 3;
} else {
if (!withalpha) {
if (!xlupass) {
sp84 = 1;
} else {
sp84 = 2;
@ -52734,11 +52734,11 @@ Gfx *objRender(struct prop *prop, Gfx *gdl, bool withalpha)
}
renderdata.fogcolour = colour[0] << 24 | colour[1] << 16 | colour[2] << 8 | colour[3];
objRenderProp(prop, &renderdata, withalpha);
objRenderProp(prop, &renderdata, xlupass);
gdl = renderdata.gdl;
if (withalpha) {
if (xlupass) {
if (obj->type == OBJTYPE_HOVERPROP
|| obj->type == OBJTYPE_HOVERBIKE
|| obj->modelnum == MODEL_HOOVERBOT

View File

@ -127,7 +127,7 @@ Gfx *room0f166d7c(Gfx *gdl, s32 roomnum)
return gdl;
}
struct coord *room0f166dd0(s32 room)
struct coord *roomGetPos(s32 room)
{
return &g_BgRooms[room].pos;
}

View File

@ -603,7 +603,7 @@ u32 smokeTickPlayer(struct prop *prop)
return TICKOP_NONE;
}
Gfx *smokeRender(struct prop *prop, Gfx *gdl, bool withalpha)
Gfx *smokeRender(struct prop *prop, Gfx *gdl, bool xlupass)
{
struct smoke *smoke = prop->smoke;
s32 roomnum;
@ -615,7 +615,7 @@ Gfx *smokeRender(struct prop *prop, Gfx *gdl, bool withalpha)
struct coord worldoffset;
bool near = true;
if (!withalpha) {
if (!xlupass) {
return gdl;
}
@ -634,7 +634,7 @@ Gfx *smokeRender(struct prop *prop, Gfx *gdl, bool withalpha)
}
if (roomnum != -1) {
coord = room0f166dd0(roomnum);
coord = roomGetPos(roomnum);
room0f166df0(roomnum, &worldoffset);

View File

@ -84,7 +84,7 @@ void splatTick(struct prop *prop)
}
if (chr->woundedsplatsadded >= 40) {
wallhit0f141704(prop);
wallhitRemoveOldestWoundedSplatByChr(prop);
chr->woundedsplatsadded--;
}
@ -863,7 +863,7 @@ glabel var7f1b6048
/* f149b30: 46002202 */ mul.s $f8,$f4,$f0
/* f149b34: e7a80098 */ swc1 $f8,0x98($sp)
/* f149b38: 8e040038 */ lw $a0,0x38($s0)
/* f149b3c: 0fc4f972 */ jal wallhit0f13e5c8
/* f149b3c: 0fc4f972 */ jal wallhitChooseBloodColour
/* f149b40: e7ae0094 */ swc1 $f14,0x94($sp)
/* f149b44: 8e02003c */ lw $v0,0x3c($s0)
/* f149b48: c7ae0094 */ lwc1 $f14,0x94($sp)
@ -912,7 +912,7 @@ glabel var7f1b6048
/* f149bf0: afaf0044 */ sw $t7,0x44($sp)
/* f149bf4: 8e180058 */ lw $t8,0x58($s0)
/* f149bf8: afb9004c */ sw $t9,0x4c($sp)
/* f149bfc: 0fc4fd41 */ jal wallhit0f13f504
/* f149bfc: 0fc4fd41 */ jal wallhitCreateWith20Args
/* f149c00: afb80048 */ sw $t8,0x48($sp)
/* f149c04: 8fa20088 */ lw $v0,0x88($sp)
/* f149c08: 8fa80084 */ lw $t0,0x84($sp)

File diff suppressed because it is too large Load Diff

View File

@ -5,21 +5,21 @@
#include "data.h"
#include "types.h"
u16 *var8009cc40;
u16 *g_WallhitCountsPerRoom;
s32 g_WallhitsMax;
u32 var8009cc48;
u32 g_WallhitsNumFree;
u32 g_WallhitsNumUsed;
u32 var8009cc54;
u32 var8009cc58;
s32 var8009cc5c;
u32 var8009cc60;
s32 var8009cc64;
u32 var8009cc68;
s32 g_MinPropWallhits;
u32 g_MaxPropWallhits;
s32 g_MinBgWallhitsPerRoom;
s32 g_MaxBgWallhitsPerRoom;
u32 var8009cc6c;
s32 var8009cc70;
s32 var8009cc74;
f32 var8009cc78;
f32 g_WallhitTargetBloodRatio;
/**
* Initialises an array of room numbers and a linked list of structs.
@ -45,43 +45,43 @@ void wallhitReset(void)
case 0:
// 4MB or MP with 2+ players
g_WallhitsMax = 80;
var8009cc5c = 10;
var8009cc60 = 40;
var8009cc64 = 1;
var8009cc68 = 25;
g_MinPropWallhits = 10;
g_MaxPropWallhits = 40;
g_MinBgWallhitsPerRoom = 1;
g_MaxBgWallhitsPerRoom = 25;
var8009cc6c = 20;
var8009cc70 = 5;
var8009cc74 = 15;
var8009cc78 = 0.3f;
g_WallhitTargetBloodRatio = 0.3f;
break;
case 1:
// 2 player coop/anti
g_WallhitsMax = 200;
var8009cc5c = 25;
var8009cc60 = 100;
var8009cc64 = 4;
var8009cc68 = 40;
g_MinPropWallhits = 25;
g_MaxPropWallhits = 100;
g_MinBgWallhitsPerRoom = 4;
g_MaxBgWallhitsPerRoom = 40;
var8009cc6c = 80;
var8009cc70 = 20;
var8009cc74 = 30;
var8009cc78 = 0.4f;
g_WallhitTargetBloodRatio = 0.4f;
break;
case 2:
default:
// 1 player 8MB
g_WallhitsMax = 360;
var8009cc5c = 50;
var8009cc60 = 120;
var8009cc64 = 10;
var8009cc68 = 60; // max bullet holes
g_MinPropWallhits = 50;
g_MaxPropWallhits = 120;
g_MinBgWallhitsPerRoom = 10;
g_MaxBgWallhitsPerRoom = 60;
var8009cc6c = 180;
var8009cc70 = 25;
var8009cc74 = 40;
var8009cc78 = 0.5f;
g_WallhitTargetBloodRatio = 0.5f;
break;
}
var8009cc40 = 0;
g_WallhitCountsPerRoom = NULL;
var8009cc48 = 0;
g_WallhitsNumFree = 0;
g_WallhitsNumUsed = 0;
@ -110,30 +110,30 @@ void wallhitReset(void)
ptr = mempAlloc(structssize + numberssize, MEMPOOL_STAGE);
var8009cc40 = ptr;
g_WallhitCountsPerRoom = ptr;
g_Wallhits = (struct wallhit *)((u32)ptr + numberssize);
var800a41b4 = NULL;
var800a41b8 = 0;
g_FreeWallhits = NULL;
g_ActiveWallhits = 0;
// Initialise structs
for (i = 0; i < g_WallhitsMax; i++) {
g_Wallhits[i].unk6d = 0;
g_Wallhits[i].unk6e = 0;
g_Wallhits[i].unk70_00 = 0;
g_Wallhits[i].timermax = 0;
g_Wallhits[i].timercur = 0;
g_Wallhits[i].createdframe = 0;
g_Wallhits[i].inuse = false;
g_Wallhits[i].roomnum = -1;
g_Wallhits[i].prop = NULL;
g_Wallhits[i].prop60 = NULL;
g_Wallhits[i].chrprop = NULL;
g_Wallhits[i].objprop = NULL;
g_WallhitsNumFree++;
g_Wallhits[i].globalnext = var800a41b4;
var800a41b4 = &g_Wallhits[i];
g_Wallhits[i].globalnext = g_FreeWallhits;
g_FreeWallhits = &g_Wallhits[i];
}
// Initialise room numbers
for (i = 0; i < g_Vars.roomcount; i++) {
var8009cc40[i] = 0;
g_WallhitCountsPerRoom[i] = 0;
}
}
}

View File

@ -68,20 +68,20 @@ extern u8 var8009caee;
extern u8 var8009caef;
extern u8 var8009caf0;
extern struct prop *g_DangerousProps[MAX_DANGEROUSPROPS];
extern u16 *var8009cc40;
extern u16 *g_WallhitCountsPerRoom;
extern s32 g_WallhitsMax;
extern u32 var8009cc48;
extern u32 g_WallhitsNumFree;
extern u32 g_WallhitsNumUsed;
extern u32 var8009cc54;
extern u32 var8009cc58;
extern s32 var8009cc5c;
extern u32 var8009cc60;
extern s32 var8009cc64;
extern u32 var8009cc68;
extern s32 g_MinPropWallhits;
extern u32 g_MaxPropWallhits;
extern s32 g_MinBgWallhitsPerRoom;
extern s32 g_MaxBgWallhitsPerRoom;
extern s32 var8009cc70;
extern s32 var8009cc74;
extern f32 var8009cc78;
extern f32 g_WallhitTargetBloodRatio;
extern Mtx *var8009cc80;
extern Mtx *var8009cc84;
extern Mtx *var8009cc88;
@ -207,8 +207,8 @@ extern struct sparkgroup g_SparkGroups[10];
extern s32 g_NextSparkGroupIndex;
extern u8 *var800a41a0;
extern struct wallhit *g_Wallhits;
extern struct wallhit *var800a41b4;
extern struct wallhit *var800a41b8;
extern struct wallhit *g_FreeWallhits;
extern struct wallhit *g_ActiveWallhits;
extern s32 g_MaxShards;
extern struct shard *g_Shards;
extern Gfx *var800a4634;

View File

@ -3096,8 +3096,8 @@
#define OBJHFLAG_20000000 0x20000000 // upper nibble might be a single 4-bit value
// obj->hidden2
#define OBJH2FLAG_RENDEROPAQUE 0x01
#define OBJH2FLAG_RENDERALPHA 0x02 // must be immediately after OBJH2FLAG_RENDEROPAQUE
#define OBJH2FLAG_HASOPA 0x01 // obj has opaque polygons (ie. most objects)
#define OBJH2FLAG_HASXLU 0x02 // obj has translucent polygons
#define OBJH2FLAG_CANREGEN 0x04
#define OBJH2FLAG_08 0x08
#define OBJH2FLAG_10 0x10
@ -3464,9 +3464,9 @@
#define RACE_EYESPY 3
#define RACE_ROBOT 4
#define RENDERPASS_OPAQUE_PREBG 0
#define RENDERPASS_ALPHA 1
#define RENDERPASS_OPAQUE_POSTBG 2
#define RENDERPASS_OPA_PREBG 0
#define RENDERPASS_XLU 1
#define RENDERPASS_OPA_POSTBG 2
#define ROOMFLAG_FORCEDISABLED 0x0001
#define ROOMFLAG_HASDYNTEX 0x0002

View File

@ -39,9 +39,9 @@ void chrDropItemsForOwnerReap(struct chrdata *chr);
void chr0f0246e4(u8 *arg0);
bool chr0f024738(struct chrdata *chr);
bool chr0f024b18(struct model *model, struct modelnode *node);
void chrRenderAttachedObject(struct prop *prop, struct modelrenderdata *renderdata, bool withalpha, struct chrdata *chr);
void chrRenderAttachedObject(struct prop *prop, struct modelrenderdata *renderdata, bool xlupass, struct chrdata *chr);
void chrGetBloodColour(s16 bodynum, u8 *colour1, u32 *colour2);
Gfx *chrRender(struct prop *prop, Gfx *gdl, bool withalpha);
Gfx *chrRender(struct prop *prop, Gfx *gdl, bool xlupass);
void chrEmitSparks(struct chrdata *chr, struct prop *prop, s32 hitpart, struct coord *coord, struct coord *coord2, struct chrdata *chr2);
u32 chr0f0260c4(void);
void chrBruise(struct model *model, s32 hitpart, struct modelnode *node, struct coord *arg3);

View File

@ -12,7 +12,7 @@ void envApplyType2(struct envtype2 *sky);
void envSetStageNum(s32 stagenum);
void envChooseAndApply(s32 stagenum, bool allowoverride);
void envApplyTransitionFrac(f32 arg0);
Gfx *envStartFog(Gfx *gdl, bool withalpha);
Gfx *envStartFog(Gfx *gdl, bool xlupass);
Gfx *envStopFog(Gfx *gdl);
bool env0f1666f8(struct coord *pos, f32 arg1);
struct coord *env0f1667e8(void);

View File

@ -20,7 +20,7 @@ bool explosionOverlapsProp(struct explosion *exp, struct prop *prop, struct coor
void explosionInflictDamage(struct prop *prop);
u32 explosionTick(struct prop *prop);
u32 explosionTickPlayer(struct prop *prop);
Gfx *explosionRender(struct prop *prop, Gfx *gdl, bool withalpha);
Gfx *explosionRender(struct prop *prop, Gfx *gdl, bool xlupass);
Gfx *explosionRenderPart(struct explosion *exp, struct explosionpart *part, Gfx *gdl, struct coord *coord, s32 arg4);
#endif

View File

@ -78,7 +78,7 @@ s32 playerGetMissionTime(void);
s32 playerTickBeams(struct prop *prop);
s32 playerTickThirdPerson(struct prop *prop);
void playerChooseThirdPersonAnimation(struct chrdata *chr, s32 crouchpos, f32 speedsideways, f32 speedforwards, f32 speedtheta, f32 *angleoffset, struct attackanimconfig **animcfg);
Gfx *playerRender(struct prop *prop, Gfx *gdl, bool withalpha);
Gfx *playerRender(struct prop *prop, Gfx *gdl, bool xlupass);
Gfx *playerLoadMatrix(Gfx *gdl);
void player0f0c3320(Mtxf *matrices, s32 count);
void playerSetTickMode(s32 tickmode);

View File

@ -16,7 +16,7 @@ void propActivateThisFrame(struct prop *prop);
void propDelist(struct prop *prop);
void propReparent(struct prop *mover, struct prop *adopter);
void propDetach(struct prop *prop);
Gfx *propRender(Gfx *gdl, struct prop *prop, bool withalpha);
Gfx *propRender(Gfx *gdl, struct prop *prop, bool xlupass);
Gfx *propsRender(Gfx *gdl, s16 renderroomnum, s32 renderpass, s16 *roomnumsbyprop);
void weaponPlayWhooshSound(s32 weaponnum, struct prop *prop);
void func0f060bac(s32 weaponnum, struct prop *prop);

View File

@ -206,10 +206,10 @@ void tvscreenSetCmdlist(struct tvscreen *screen, u32 *cmdlist);
void tvscreenSetImageByNum(struct tvscreen *screen, s32 imagenum);
void tvscreenSetTexture(struct tvscreen *screen, s32 texturenum);
Gfx *tvscreenRender(struct model *model, struct modelnode *node, struct tvscreen *screen, Gfx *gdl, s32 arg4, s32 arg5);
void objRenderProp(struct prop *prop, struct modelrenderdata *renderdata, bool withalpha);
void objRenderProp(struct prop *prop, struct modelrenderdata *renderdata, bool xlupass);
Gfx *gfxRenderRadialShadow(Gfx *gdl, f32 x, f32 y, f32 z, f32 angle, f32 radius, u32 colour);
Gfx *objRenderShadow(struct defaultobj *obj, Gfx *gdl);
Gfx *objRender(struct prop *prop, Gfx *gdl, bool withalpha);
Gfx *objRender(struct prop *prop, Gfx *gdl, bool xlupass);
bool modelIsNodeNotTvscreen(struct modelfiledata *filedata, struct modelnode *node);
void objDeform(struct defaultobj *obj, s32 level);
void objBounce(struct defaultobj *obj, struct coord *arg1);

View File

@ -16,7 +16,7 @@ s32 room0f1669fc(void);
void room0f166a6c(Mtxf *matrix, s32 roomnum);
s32 room0f166c20(s32 roomnum);
Gfx *room0f166d7c(Gfx *gdl, s32 roomnum);
struct coord *room0f166dd0(s32 room);
struct coord *roomGetPos(s32 room);
void room0f166df0(s32 room, struct coord *globaldrawworldoffset);
#endif

View File

@ -20,7 +20,7 @@ void smokeClearForProp(struct prop *prop);
struct smoke *smokeCreateSimple(struct coord *pos, s16 *rooms, s16 type);
u32 smokeTick(struct prop *prop);
u32 smokeTickPlayer(struct prop *prop);
Gfx *smokeRender(struct prop *prop, Gfx *gdl, bool withalpha);
Gfx *smokeRender(struct prop *prop, Gfx *gdl, bool xlupass);
void smokeClearSomeTypes(void);
#endif

View File

@ -6,33 +6,31 @@
void wallhitReset(void);
s16 wallhit0f13e0e0(f32 arg0);
s16 wallhitFinaliseAxis(f32 arg0);
void wallhitFree(struct wallhit *wallhit);
void wallhitsFreeByProp(struct prop *prop, s8 layer);
bool chrIsUsingPaintball(struct chrdata *chr);
void wallhit0f13e5c8(struct prop *prop);
void wallhit0f13e640(struct wallhit *wallhit, u32 arg1);
bool wallhit0f13e744(s32 arg0);
void wallhit0f13e994(void);
void wallhitChooseBloodColour(struct prop *prop);
void wallhitFade(struct wallhit *wallhit, u32 arg1);
bool wallhitReapOneInRoom(s32 arg0);
void wallhitReapOne(void);
void wallhitsTick(void);
void wallhitCreate(struct coord *arg0, struct coord *arg1, struct coord *arg2, u32 arg3,
u32 arg4, s16 arg5, s16 room, struct prop *arg7,
s8 arg8, s8 arg9, struct chrdata *chr, bool arg11);
void wallhitCreate(struct coord *relpos, struct coord *arg1, struct coord *arg2, s16 arg3[3],
s16 arg4[3], s16 texnum, s16 room, struct prop *objprop,
s8 mtxindex, s8 arg9, struct chrdata *chr, bool xlu);
void wallhit0f13f504(struct coord *arg0, struct coord *arg1, struct coord *arg2, u32 arg3,
u32 arg4, s16 arg5, s16 room, struct prop *arg7,
u32 arg8, s8 arg9, s8 arg10, struct chrdata *chr,
f32 arg12, f32 arg13, u8 arg14, u8 arg15,
u32 arg16, u32 arg17, u32 arg18, bool arg19);
void wallhitCreateWith20Args(struct coord *relpos, struct coord *arg1, struct coord *arg2, s16 arg3[3],
s16 arg4[3], s16 texnum, s16 room, struct prop *objprop,
struct prop *chrprop, s8 mtxindex, s8 arg10, struct chrdata *chr,
f32 width, f32 height, u8 minalpha, u8 maxalpha,
s32 rotdeg, u32 timermax, u32 timerspeed, bool xlu);
s32 wallhit0f140750(struct coord *coord);
Gfx *wallhitRenderBgHitsLayer1(s32 roomnum, Gfx *gdl);
Gfx *wallhitRenderBgHitsLayer2(s32 roomnum, Gfx *gdl);
Gfx *wallhitRenderPropHits(Gfx *gdl, struct prop *prop, bool withalpha);
Gfx *wallhitRenderPropHits(Gfx *gdl, struct prop *prop, bool xlupass);
Gfx *wallhitRenderBgHits(s32 roomnum, Gfx *gdl);
void wallhitsRecolour(void);
void wallhit0f14159c(struct prop *prop);
void wallhit0f141704(struct prop *prop);
void wallhitFadeSplatsForRemovedChr(struct prop *chrprop);
void wallhitRemoveOldestWoundedSplatByChr(struct prop *chrprop);
#endif

View File

@ -288,8 +288,8 @@ struct prop {
/*0x3f*/ u8 backgrounded : 1;
/*0x3f*/ u8 forcetick : 1;
/*0x3f*/ u8 active : 1;
/*0x40*/ struct wallhit *wallhits1;
/*0x44*/ struct wallhit *wallhits2;
/*0x40*/ struct wallhit *opawallhits; // opaque
/*0x44*/ struct wallhit *xluwallhits; // translucent
};
struct packedpad {
@ -3610,8 +3610,8 @@ struct room {
/*0x78*/ f32 unk78;
/*0x7c*/ f32 unk7c;
/*0x80*/ s32 gfxdatalen; // when inflated
/*0x84*/ struct wallhit *wallhits1;
/*0x88*/ struct wallhit *wallhits2;
/*0x84*/ struct wallhit *opawallhits; // opaque
/*0x88*/ struct wallhit *xluwallhits; // translucent
};
struct fireslotthing {
@ -6016,26 +6016,26 @@ struct stageheadlimit {
struct wallhit {
/*0x00*/ struct gfxvtx vertices[4];
/*0x30*/ struct colour unk30[4];
/*0x40*/ struct colour colours[4];
/*0x50*/ struct coord unk50;
/*0x5c*/ struct prop *prop;
/*0x60*/ struct prop *prop60;
/*0x64*/ struct gfxvtx *verticesptr;
/*0x30*/ struct colour basecolours[4]; // without room lighting applied
/*0x40*/ struct colour finalcolours[4]; // with room lighting applied
/*0x50*/ struct coord relpos; // position relative to room or prop's pos
/*0x5c*/ struct prop *chrprop;
/*0x60*/ struct prop *objprop;
/*0x64*/ struct gfxvtx *vertices2; // overridden vertices for when blood is expanding
/*0x68*/ s16 roomnum;
/*0x6a*/ u8 texturenum;
/*0x6b*/ u8 unk6b;
/*0x6c*/ u8 mtxindex;
/*0x6d*/ u8 unk6d;
/*0x6e*/ u8 unk6e;
/*0x6d*/ u8 timermax;
/*0x6e*/ u8 timercur;
/*0x6f*/ u8 inuse : 1;
/*0x6f*/ u8 unk6f_01 : 1;
/*0x6f*/ u8 unk6f_02 : 1;
/*0x6f*/ u8 unk6f_03 : 1;
/*0x6f*/ u8 unk6f_04 : 1;
/*0x6f*/ u8 fading : 1;
/*0x6f*/ u8 expanding : 1;
/*0x6f*/ u8 xlu : 1;
/*0x6f*/ u8 unk6f_05 : 1;
/*0x70*/ u32 unk70_00 : 28;
/*0x70*/ u32 unk70_28 : 4;
/*0x70*/ u32 createdframe : 28;
/*0x70*/ u32 timerspeed : 4;
/*0x74*/ struct wallhit *globalnext; // for the used/free linked lists
/*0x78*/ struct wallhit *localnext; // for the room/prop specific linked list
};