mirror of
https://gitlab.com/ryandwyer/perfect-dark
synced 2026-08-19 05:22:21 -04:00
Decompile healthbarDraw
This commit is contained in:
+514
-1338
File diff suppressed because it is too large
Load Diff
+1
-1
@@ -2917,7 +2917,7 @@ Gfx *playerRenderHealthBar(Gfx *gdl)
|
||||
gDPSetPrimColorViaWord(gdl++, 0, 0, 0xe6e6e600);
|
||||
gSPClearGeometryMode(gdl++, G_CULL_BOTH);
|
||||
|
||||
gdl = healthbarRender(gdl, 0, 0, 0);
|
||||
gdl = healthbarDraw(gdl, NULL, 0, 0);
|
||||
|
||||
gSPMatrix(gdl++, osVirtualToPhysical(camGetUnk1750()), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
|
||||
|
||||
|
||||
@@ -4,8 +4,6 @@
|
||||
#include "data.h"
|
||||
#include "types.h"
|
||||
|
||||
u32 func0f0d5a90(void);
|
||||
u32 func0f0d5c60(void);
|
||||
Gfx *healthbarRender(Gfx *gdl, u32 arg1, u32 arg2, f32 arg3);
|
||||
Gfx *healthbarDraw(Gfx *gdl, struct chrdata *chr, s32 offy, f32 heightfrac);
|
||||
|
||||
#endif
|
||||
|
||||
+18
-15
@@ -12,21 +12,24 @@
|
||||
*
|
||||
* upper word
|
||||
* 00F00000 number of points
|
||||
* 000FFFFF number of bytes to grab
|
||||
* 0000FFFF number of bytes to grab
|
||||
*
|
||||
* lower word
|
||||
* 0f000000 segment
|
||||
* 00ffffff offset in point table
|
||||
*/
|
||||
#define gDPSetVerticeArray(pkt, ptr, numvertices) \
|
||||
{ \
|
||||
Gfx *_g = (Gfx *)(pkt); \
|
||||
_g->words.w0 = (_SHIFTL(G_VTX, 24, 8) \
|
||||
| _SHIFTL(numvertices - 1, 20, 4) \
|
||||
| _SHIFTL(numvertices * sizeof(struct gfxvtx), 0, 20)); \
|
||||
_g->words.w1 = (unsigned int)(ptr); \
|
||||
#define gDPSetVerticeArrayRaw(pkt, ptr, count, size) \
|
||||
{ \
|
||||
Gfx *_g = (Gfx *)(pkt); \
|
||||
_g->words.w0 = (_SHIFTL(G_VTX, 24, 8) \
|
||||
| _SHIFTL((count), 16, 8) \
|
||||
| _SHIFTL((size), 0, 16)); \
|
||||
_g->words.w1 = (unsigned int)(ptr); \
|
||||
}
|
||||
|
||||
#define gDPSetVerticeArray(pkt, ptr, numvertices) \
|
||||
gDPSetVerticeArrayRaw(pkt, ptr, ((numvertices) - 1) << 4, (numvertices) * sizeof(struct gfxvtx))
|
||||
|
||||
/**
|
||||
* 07 rsp_color
|
||||
* This PD-specific command declares offset to RGBA data
|
||||
@@ -39,13 +42,13 @@
|
||||
* 0f000000 segment
|
||||
* 00ffffff address or offset in file
|
||||
*/
|
||||
#define gDPSetColorArray(pkt, ptr, numcolors) \
|
||||
{ \
|
||||
Gfx *_g = (Gfx *)(pkt); \
|
||||
_g->words.w0 = (_SHIFTL(G_SETCOLOR, 24, 8) \
|
||||
| _SHIFTL((numcolors - 1) * 4, 16, 8) \
|
||||
| _SHIFTL(numcolors * 4, 0, 16)); \
|
||||
_g->words.w1 = (unsigned int)(ptr); \
|
||||
#define gDPSetColorArray(pkt, ptr, numcolors) \
|
||||
{ \
|
||||
Gfx *_g = (Gfx *)(pkt); \
|
||||
_g->words.w0 = (_SHIFTL(G_SETCOLOR, 24, 8) \
|
||||
| _SHIFTL(((numcolors) - 1) << 2, 16, 8) \
|
||||
| _SHIFTL((numcolors) * 4, 0, 16)); \
|
||||
_g->words.w1 = (unsigned int)(ptr); \
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user