Attempt to decompile handRenderHudGauge

This commit is contained in:
Ryan Dwyer
2021-04-18 22:47:25 +10:00
parent a76566fd69
commit eb099e32d4
3 changed files with 298 additions and 10 deletions
+1 -1
View File
@@ -165,7 +165,7 @@ s32 weaponGetAmmoCapacity(s32 weaponnum, s32 func);
Gfx *handRenderHudString(Gfx *gdl, char *text, s32 x, bool halign, s32 y, s32 valign, u32 colour);
Gfx *handRenderHudInteger(Gfx *gdl, s32 value, s32 x, bool halign, s32 y, s32 valign, u32 colour);
void abmagReset(struct abmag *abmag);
u32 func0f0a9da8(void);
void func0f0a9da8(struct abmag *abmag, s32 remaining, s32 capacity, s32 height);
Gfx *handRenderHudGauge(Gfx *gdl, s32 x1, s32 y1, s32 x2, s32 y2, struct abmag *abmag, s32 remaining, s32 capacity, u32 vacantcolour, u32 occupiedcolour, bool flip);
Gfx *handRenderHud(Gfx *gdl);
void cboostAdd(s32 arg0);
+22 -5
View File
@@ -2058,11 +2058,28 @@ struct beam {
};
struct abmag {
u16 unk00;
u16 unk02;
u8 unk04;
u8 unk05;
u16 alignment;
// When the gauge uses separate bars, this is zero/unused. When the gauge
// uses merged bars, this is the same figure as displayed on the HUD.
/*0x00*/ u16 loadedammo;
// Counts up to 255 when firing or reloading. It's used to determine the
// brightness of the bar in the ammo gauge.
/*0x02*/ s16 timer60;
// When firing, this is the number of bars still loaded + any bars recently
// fired which are fading to empty.
// When loading, this is the number of bars which are loaded and don't have
// a fade effect on them.
// In other words, it's a reference to where the fade effects start and is
// also a reference for the timer.
/*0x04*/ s8 ref;
// When positive, is the number of slots remaining to settle when reloading,
// including slots which are fully empty.
// When negative, is the number of slots remaining to settle when firing.
/*0x05*/ s8 change;
/*0x06*/ u16 alignment;
};
// The first 4 bytes of the hand struct