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
+8 -8
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;
+5 -5
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
+2 -2
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);
+1 -1
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);
+1 -1
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
+1 -1
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);
+1 -1
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);
+2 -2
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);
+1 -1
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
+1 -1
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
+16 -18
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
+17 -17
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
};