mirror of
https://gitlab.com/ryandwyer/perfect-dark
synced 2026-07-11 22:10:03 -04:00
jpn-final: Attempt to decompile frRenderHudElement
This commit is contained in:
@@ -10977,6 +10977,54 @@ glabel frRenderHudElement
|
||||
/* f1a3a24: 03e00008 */ jr $ra
|
||||
/* f1a3a28: 27bd0078 */ addiu $sp,$sp,0x78
|
||||
);
|
||||
|
||||
//Gfx *frRenderHudElement(Gfx *gdl, s32 x, s32 y, char *string1, char *string2, char *string3, u32 colour, u8 alpha)
|
||||
//{
|
||||
// s32 textheight; // 74
|
||||
// s32 textwidth; // 70
|
||||
// s32 x2; // 6c
|
||||
// s32 y2; // 68
|
||||
//
|
||||
// u32 halfalpha = alpha >> 1;
|
||||
// u32 fullcolour = (colour & 0xffffff00) | alpha;
|
||||
//
|
||||
// textMeasure(&textheight, &textwidth, string1, g_CharsHandelGothicMd, g_FontHandelGothicMd, 0);
|
||||
//
|
||||
// x2 = x - (textwidth >> 1);
|
||||
// y2 = y;
|
||||
// gdl = func0f153858(gdl, &x2, &y2, &textwidth, &textheight);
|
||||
//
|
||||
// gdl = textRender(gdl, &x2, &y2, string1,
|
||||
// g_CharsHandelGothicMd, g_FontHandelGothicMd, fullcolour, halfalpha, viGetWidth(), viGetHeight(), 0, 0);
|
||||
//
|
||||
// if (string2) {
|
||||
// s32 textheight2; // 5c
|
||||
// s32 textwidth2; // 58
|
||||
// s32 textheight3; // 54
|
||||
// s32 textwidth3; // 50
|
||||
//
|
||||
// textMeasure(&textheight2, &textwidth2, string2, g_CharsHandelGothicXs, g_FontHandelGothicXs, 0);
|
||||
// textMeasure(&textheight3, &textwidth3, string3, g_CharsHandelGothicXs, g_FontHandelGothicXs, 0);
|
||||
//
|
||||
// textwidth = textwidth2 + textwidth3;
|
||||
// textheight = textheight3;
|
||||
// x2 = x - (textwidth >> 1);
|
||||
// y2 = y + 17;
|
||||
//
|
||||
// gdl = func0f153858(gdl, &x2, &y2, &textwidth, &textheight);
|
||||
//
|
||||
// gdl = func0f1574d0jf(gdl, &x2, &y2, string2,
|
||||
// g_CharsHandelGothicXs, g_FontHandelGothicXs, fullcolour, halfalpha, viGetWidth(), viGetHeight(), 0, 0);
|
||||
//
|
||||
// x2 -= 4;
|
||||
// y2 = y + 18;
|
||||
//
|
||||
// gdl = func0f1574d0jf(gdl, &x2, &y2, string3,
|
||||
// g_CharsHandelGothicXs, g_FontHandelGothicXs, fullcolour, halfalpha, viGetWidth(), viGetHeight(), 0, 0);
|
||||
// }
|
||||
//
|
||||
// return gdl;
|
||||
//}
|
||||
#else
|
||||
Gfx *frRenderHudElement(Gfx *gdl, s32 x, s32 y, char *string1, char *string2, u32 colour, u8 alpha)
|
||||
{
|
||||
|
||||
@@ -49,4 +49,6 @@ Gfx *textRender(Gfx *gdl, s32 *x, s32 *y, char *text, struct fontchar *font1, st
|
||||
void textMeasure(s32 *textheight, s32 *textwidth, char *text, struct fontchar *font1, struct font *font2, s32 lineheight);
|
||||
void textWrap(s32 width, char *in, char *out, struct fontchar *font1, struct font *font2);
|
||||
|
||||
Gfx *func0f1574d0jf(Gfx *gdl, s32 *x, s32 *y, char *text, struct fontchar *font1, struct font *font2, s32 colour, u32 colour2, s32 width, s32 height, s32 arg9, u32 arg10);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -118,19 +118,20 @@ void frGetGoalScoreText(char *buffer1, char *buffer2);
|
||||
bool frGetMinAccuracy(char *buffer1, f32 accuracy, char *buffer2);
|
||||
bool frGetHudMiddleSubtext(char *buffer1, char *buffer2);
|
||||
bool frGetFeedback(char *score, char *zone, char *extrabuffer);
|
||||
Gfx *frRenderHudElement(Gfx *gdl, s32 x, s32 y, char *string1, char *string2, char *string3, u32 colour, u8 alpha);
|
||||
#else
|
||||
void frGetGoalTargetsText(char *buffer);
|
||||
void frGetGoalScoreText(char *buffer);
|
||||
bool frGetMinAccuracy(char *buffer, f32 accuracy);
|
||||
bool frGetHudMiddleSubtext(char *buffer);
|
||||
bool frGetFeedback(char *score, char *zone);
|
||||
Gfx *frRenderHudElement(Gfx *gdl, s32 x, s32 y, char *string1, char *string2, u32 colour, u8 alpha);
|
||||
#endif
|
||||
|
||||
void frGetTargetsDestroyedValue(char *buffer);
|
||||
void frGetScoreValue(char *buffer);
|
||||
f32 frGetAccuracy(char *buffer);
|
||||
bool frFormatTime(char *buffer);
|
||||
Gfx *frRenderHudElement(Gfx *gdl, s32 x, s32 y, char *string1, char *string2, u32 colour, u8 alpha);
|
||||
Gfx *frRenderHud(Gfx *gdl);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user