mirror of
https://gitlab.com/ryandwyer/perfect-dark
synced 2026-05-28 00:15:41 -04:00
Identify all text functions
This commit is contained in:
+36
-45
@@ -187,9 +187,9 @@ MenuItemHandlerResult am_pick_target_menu_list(s32 operation, struct menuitem *i
|
||||
x = renderdata->x + 10;
|
||||
y = renderdata->y + 1;
|
||||
|
||||
gdl = text0f153628(gdl);
|
||||
gdl = text_render_projected(gdl, &x, &y, g_MpAllChrConfigPtrs[chrindex]->name, g_CharsHandelGothicSm, g_FontHandelGothicSm, colour, vi_get_width(), vi_get_height(), 0, 0);
|
||||
gdl = text0f153780(gdl);
|
||||
gdl = text_begin(gdl);
|
||||
gdl = text_render_v2(gdl, &x, &y, g_MpAllChrConfigPtrs[chrindex]->name, g_CharsHandelGothicSm, g_FontHandelGothicSm, colour, vi_get_width(), vi_get_height(), 0, 0);
|
||||
gdl = text_end(gdl);
|
||||
return (s32)gdl;
|
||||
}
|
||||
case MENUOP_GETOPTIONHEIGHT:
|
||||
@@ -834,7 +834,7 @@ void am_calculate_slot_position(s16 column, s16 row, s16 *x, s16 *y)
|
||||
*y = (*y * 7) / 10;
|
||||
}
|
||||
|
||||
*x += vi_get_view_left() / g_ScaleX + vi_get_view_width() / (g_ScaleX * 2);
|
||||
*x += vi_get_view_left() / g_UiScaleX + vi_get_view_width() / (g_UiScaleX * 2);
|
||||
*y += vi_get_view_top() + vi_get_view_height() / 2;
|
||||
|
||||
if (playercount >= 2) {
|
||||
@@ -890,7 +890,7 @@ void am_calculate_slot_position(s16 column, s16 row, s16 *x, s16 *y)
|
||||
*y = (*y * 3) / 5;
|
||||
}
|
||||
|
||||
*x += vi_get_view_left() / g_ScaleX + vi_get_view_width() / (g_ScaleX * 2);
|
||||
*x += vi_get_view_left() / g_UiScaleX + vi_get_view_width() / (g_UiScaleX * 2);
|
||||
*y += vi_get_view_top() + vi_get_view_height() / 2;
|
||||
|
||||
if ((playercount == 2 && (options_get_screen_split() == SCREENSPLIT_VERTICAL || IS4MB()))
|
||||
@@ -938,7 +938,7 @@ void am_calculate_slot_position(s16 column, s16 row, s16 *x, s16 *y)
|
||||
*y = (*y * 3) / 5;
|
||||
}
|
||||
|
||||
*x += vi_get_view_left() / g_ScaleX + vi_get_view_width() / (g_ScaleX * 2);
|
||||
*x += vi_get_view_left() / g_UiScaleX + vi_get_view_width() / (g_UiScaleX * 2);
|
||||
*y += vi_get_view_top() + vi_get_view_height() / 2;
|
||||
|
||||
if ((playercount == 2 && options_get_screen_split() == SCREENSPLIT_VERTICAL) || playercount >= 3) {
|
||||
@@ -962,7 +962,7 @@ Gfx *am_render_text(Gfx *gdl, char *text, u32 colour, s16 left, s16 top)
|
||||
|
||||
x = left - (textwidth / 2);
|
||||
y = top - 4;
|
||||
gdl = text_render_projected(gdl, &x, &y, text, g_AmFont1, g_AmFont2, colour, SCREEN_320, SCREEN_240, 0, 0);
|
||||
gdl = text_render_v2(gdl, &x, &y, text, g_AmFont1, g_AmFont2, colour, SCREEN_320, SCREEN_240, 0, 0);
|
||||
|
||||
return gdl;
|
||||
}
|
||||
@@ -1018,8 +1018,8 @@ Gfx *am_render_aibot_info(Gfx *gdl, s32 buddynum)
|
||||
|
||||
text_measure(&textheight, &textwidth, aibotname, g_AmFont1, g_AmFont2, 0);
|
||||
|
||||
x = vi_get_view_left() / g_ScaleX
|
||||
+ (s32)(vi_get_view_width() / g_ScaleX * 0.5f)
|
||||
x = vi_get_view_left() / g_UiScaleX
|
||||
+ (s32)(vi_get_view_width() / g_UiScaleX * 0.5f)
|
||||
- (s32)(textwidth * 0.5f)
|
||||
+ offset;
|
||||
|
||||
@@ -1031,34 +1031,30 @@ Gfx *am_render_aibot_info(Gfx *gdl, s32 buddynum)
|
||||
|
||||
#if VERSION >= VERSION_NTSC_1_0
|
||||
if (wide) {
|
||||
x = vi_get_view_left() / g_ScaleX + 32;
|
||||
x = vi_get_view_left() / g_UiScaleX + 32;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if VERSION >= VERSION_JPN_FINAL
|
||||
gdl = func0f1574d0jf(gdl, &x, &y, aibotname, g_AmFont1, g_AmFont2, -1,
|
||||
gdl = text_render_vx(gdl, &x, &y, aibotname, g_AmFont1, g_AmFont2, -1,
|
||||
0x000000ff, SCREEN_320, SCREEN_240, 0, 0);
|
||||
|
||||
y += (PLAYERCOUNT() >= 2) ? 0 : (s32)(textheight * 1.1f);
|
||||
#else
|
||||
gdl = text_render(gdl, &x, &y, aibotname, g_AmFont1, g_AmFont2, -1,
|
||||
0x000000ff, SCREEN_320, SCREEN_240, 0, 0);
|
||||
|
||||
y += (PLAYERCOUNT() >= 2) ? 0 : (s32)(textheight * 1.1f);
|
||||
#if VERSION != VERSION_JPN_FINAL
|
||||
text_measure(&textheight, &textwidth, weaponname, g_AmFont1, g_AmFont2, 0);
|
||||
|
||||
x = vi_get_view_left() / g_ScaleX
|
||||
+ (s32)(vi_get_view_width() / g_ScaleX * 0.5f)
|
||||
x = vi_get_view_left() / g_UiScaleX
|
||||
+ (s32)(vi_get_view_width() / g_UiScaleX * 0.5f)
|
||||
- (s32)(textwidth * 0.5f)
|
||||
+ offset;
|
||||
|
||||
#if VERSION >= VERSION_NTSC_1_0
|
||||
if (wide) {
|
||||
x = vi_get_view_left() / g_ScaleX + 32;
|
||||
x = vi_get_view_left() / g_UiScaleX + 32;
|
||||
}
|
||||
#endif
|
||||
|
||||
gdl = text_render(gdl, &x, &y, weaponname, g_AmFont1, g_AmFont2, -1,
|
||||
gdl = text_render_v1(gdl, &x, &y, weaponname, g_AmFont1, g_AmFont2, -1,
|
||||
0x000000ff, SCREEN_320, SCREEN_240, 0, 0);
|
||||
#endif
|
||||
|
||||
@@ -1068,8 +1064,8 @@ Gfx *am_render_aibot_info(Gfx *gdl, s32 buddynum)
|
||||
|
||||
text_measure(&textheight, &textwidth, title, g_AmFont1, g_AmFont2, 0);
|
||||
|
||||
x = vi_get_view_left() / g_ScaleX
|
||||
+ (s32)(vi_get_view_width() / g_ScaleX * 0.5f)
|
||||
x = vi_get_view_left() / g_UiScaleX
|
||||
+ (s32)(vi_get_view_width() / g_UiScaleX * 0.5f)
|
||||
- (s32)(textwidth * 0.5f)
|
||||
+ offset;
|
||||
|
||||
@@ -1081,17 +1077,12 @@ Gfx *am_render_aibot_info(Gfx *gdl, s32 buddynum)
|
||||
|
||||
#if VERSION >= VERSION_NTSC_1_0
|
||||
if (wide) {
|
||||
x = vi_get_view_left() / g_ScaleX + 32;
|
||||
x = vi_get_view_left() / g_UiScaleX + 32;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if VERSION >= VERSION_JPN_FINAL
|
||||
gdl = func0f1574d0jf(gdl, &x, &y, title, g_AmFont1, g_AmFont2, -1,
|
||||
gdl = text_render_vx(gdl, &x, &y, title, g_AmFont1, g_AmFont2, -1,
|
||||
0x000000ff, SCREEN_320, SCREEN_240, 0, 0);
|
||||
#else
|
||||
gdl = text_render(gdl, &x, &y, title, g_AmFont1, g_AmFont2, -1,
|
||||
0x000000ff, SCREEN_320, SCREEN_240, 0, 0);
|
||||
#endif
|
||||
}
|
||||
|
||||
return gdl;
|
||||
@@ -1168,7 +1159,7 @@ Gfx *am_render_slot(Gfx *gdl, char *text, s16 x, s16 y, s32 mode, s32 flags)
|
||||
colour = 0x0000006f;
|
||||
}
|
||||
|
||||
gdl = text_set_prim_colour(gdl, colour);
|
||||
gdl = text_begin_boxmode(gdl, colour);
|
||||
|
||||
gDPFillRectangleScaled(gdl++,
|
||||
x - g_AmMenus[g_AmIndex].slotwidth / 2 + 1,
|
||||
@@ -1176,7 +1167,7 @@ Gfx *am_render_slot(Gfx *gdl, char *text, s16 x, s16 y, s32 mode, s32 flags)
|
||||
x + g_AmMenus[g_AmIndex].slotwidth / 2,
|
||||
y + paddingbottom);
|
||||
|
||||
gdl = text0f153838(gdl);
|
||||
gdl = text_end_boxmode(gdl);
|
||||
|
||||
// Render borders
|
||||
colour = obcol;
|
||||
@@ -1195,7 +1186,7 @@ Gfx *am_render_slot(Gfx *gdl, char *text, s16 x, s16 y, s32 mode, s32 flags)
|
||||
colour = 0x4f4f4f7f;
|
||||
}
|
||||
|
||||
gdl = text_set_prim_colour(gdl, colour);
|
||||
gdl = text_begin_boxmode(gdl, colour);
|
||||
|
||||
// Top border
|
||||
gDPFillRectangleScaled(gdl++,
|
||||
@@ -1225,7 +1216,7 @@ Gfx *am_render_slot(Gfx *gdl, char *text, s16 x, s16 y, s32 mode, s32 flags)
|
||||
x + g_AmMenus[g_AmIndex].slotwidth / 2 + 1,
|
||||
y + paddingbottom);
|
||||
|
||||
gdl = text0f153838(gdl);
|
||||
gdl = text_end_boxmode(gdl);
|
||||
|
||||
// Render text
|
||||
colour = defcol;
|
||||
@@ -1265,9 +1256,9 @@ Gfx *am_render(Gfx *gdl)
|
||||
s16 tmp2;
|
||||
|
||||
#if PAL
|
||||
g_ScaleX = 1;
|
||||
g_UiScaleX = 1;
|
||||
#else
|
||||
g_ScaleX = g_ViRes == VIRES_HI ? 2 : 1;
|
||||
g_UiScaleX = g_ViRes == VIRES_HI ? 2 : 1;
|
||||
#endif
|
||||
|
||||
g_AmIndex = g_Vars.currentplayernum;
|
||||
@@ -1275,7 +1266,7 @@ Gfx *am_render(Gfx *gdl)
|
||||
|
||||
if (g_Vars.currentplayer->activemenumode != AMMODE_CLOSED) {
|
||||
// Draw diamond
|
||||
gdl = text0f153628(gdl);
|
||||
gdl = text_begin(gdl);
|
||||
|
||||
if (g_Vars.normmplayerisrunning
|
||||
&& g_AmMenus[g_AmIndex].screenindex >= 2) {
|
||||
@@ -1502,7 +1493,7 @@ Gfx *am_render(Gfx *gdl)
|
||||
colour = 0x4f4f4f7f;
|
||||
}
|
||||
|
||||
gdl = text_set_prim_colour(gdl, colour);
|
||||
gdl = text_begin_boxmode(gdl, colour);
|
||||
|
||||
halfwidth = g_AmMenus[g_AmIndex].slotwidth / 2;
|
||||
|
||||
@@ -1558,10 +1549,10 @@ Gfx *am_render(Gfx *gdl)
|
||||
g_AmMenus[g_AmIndex].selx + halfwidth + 1,
|
||||
g_AmMenus[g_AmIndex].sely + below);
|
||||
|
||||
gdl = text0f153838(gdl);
|
||||
gdl = text_end_boxmode(gdl);
|
||||
}
|
||||
|
||||
gdl = text0f153780(gdl);
|
||||
gdl = text_end(gdl);
|
||||
}
|
||||
|
||||
#if VERSION != VERSION_JPN_FINAL
|
||||
@@ -1604,10 +1595,10 @@ Gfx *am_render(Gfx *gdl)
|
||||
}
|
||||
|
||||
if (PLAYERCOUNT() == 1 && options_get_effective_screen_size() != SCREENSIZE_FULL) {
|
||||
part1left = vi_get_view_left() / g_ScaleX + 32;
|
||||
part1left = vi_get_view_left() / g_UiScaleX + 32;
|
||||
} else {
|
||||
part1left = (s32) ((vi_get_view_width() / g_ScaleX) * 0.5f)
|
||||
+ (s32) (vi_get_view_left() / g_ScaleX)
|
||||
part1left = (s32) ((vi_get_view_width() / g_UiScaleX) * 0.5f)
|
||||
+ (s32) (vi_get_view_left() / g_UiScaleX)
|
||||
- (s32) (barwidth * 0.5f)
|
||||
+ xoffset;
|
||||
}
|
||||
@@ -1616,8 +1607,8 @@ Gfx *am_render(Gfx *gdl)
|
||||
xoffset = (g_Vars.currentplayernum & 1) == 0 ? 8 : -8;
|
||||
}
|
||||
|
||||
part1left = (s32) ((vi_get_view_width() / g_ScaleX) * 0.5f)
|
||||
+ (s32) (vi_get_view_left() / g_ScaleX)
|
||||
part1left = (s32) ((vi_get_view_width() / g_UiScaleX) * 0.5f)
|
||||
+ (s32) (vi_get_view_left() / g_UiScaleX)
|
||||
- (s32) (barwidth * 0.5f)
|
||||
+ xoffset;
|
||||
#endif
|
||||
@@ -1698,7 +1689,7 @@ Gfx *am_render(Gfx *gdl)
|
||||
}
|
||||
#endif
|
||||
|
||||
g_ScaleX = 1;
|
||||
g_UiScaleX = 1;
|
||||
|
||||
return gdl;
|
||||
}
|
||||
|
||||
+2
-2
@@ -1081,14 +1081,14 @@ Gfx *bg_render_scene(Gfx *gdl)
|
||||
|| stagenum == STAGE_INFILTRATION
|
||||
|| stagenum == STAGE_ESCAPE
|
||||
|| stagenum == STAGE_ATTACKSHIP)) {
|
||||
gdl = text0f153628(gdl);
|
||||
gdl = text_begin(gdl);
|
||||
|
||||
gSPMatrix(gdl++, osVirtualToPhysical(cam_get_orthogonal_mtxl()), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
|
||||
|
||||
gdl = player_load_matrix(gdl);
|
||||
gdl = env_stop_fog(gdl);
|
||||
gdl = stars_render(gdl);
|
||||
gdl = text0f153780(gdl);
|
||||
gdl = text_end(gdl);
|
||||
gdl = vi0000ab78(gdl);
|
||||
}
|
||||
|
||||
|
||||
+26
-26
@@ -9577,8 +9577,8 @@ Gfx *bgun_draw_hud_string(Gfx *gdl, char *text, s32 x, bool halign, s32 y, s32 v
|
||||
y1 = y2 - textheight;
|
||||
}
|
||||
|
||||
gdl = text0f153858(gdl, &x1, &y1, &x2, &y2);
|
||||
gdl = text_render(gdl, &x1, &y1, text, g_CharsNumeric, g_FontNumeric, colour, 0x000000a0, vi_get_width(), vi_get_height(), 0, 0);
|
||||
gdl = text_draw_black_box(gdl, &x1, &y1, &x2, &y2);
|
||||
gdl = text_render_v1(gdl, &x1, &y1, text, g_CharsNumeric, g_FontNumeric, colour, 0x000000a0, vi_get_width(), vi_get_height(), 0, 0);
|
||||
|
||||
return gdl;
|
||||
}
|
||||
@@ -9754,7 +9754,7 @@ Gfx *bgun_draw_hud_gauge(Gfx *gdl, s32 x1, s32 y1, s32 x2, s32 y2, struct abmag
|
||||
|
||||
if (partitiony > gaugetop) {
|
||||
// Render empty partition
|
||||
gdl = text_set_prim_colour(gdl, emptycolour);
|
||||
gdl = text_begin_boxmode(gdl, emptycolour);
|
||||
|
||||
if (flip) {
|
||||
gDPFillRectangleScaled(gdl++, x1, y2 - partitiony + y1, x2, gaugeheight + y1);
|
||||
@@ -9762,11 +9762,11 @@ Gfx *bgun_draw_hud_gauge(Gfx *gdl, s32 x1, s32 y1, s32 x2, s32 y2, struct abmag
|
||||
gDPFillRectangleScaled(gdl++, x1, gaugetop, x2, partitiony);
|
||||
}
|
||||
|
||||
gdl = text0f153838(gdl);
|
||||
gdl = text_end_boxmode(gdl);
|
||||
}
|
||||
|
||||
// Render filled partition
|
||||
gdl = text_set_prim_colour(gdl, filledcolour);
|
||||
gdl = text_begin_boxmode(gdl, filledcolour);
|
||||
|
||||
if (flip) {
|
||||
gDPFillRectangleScaled(gdl++, x1, y2 - tmp + y1, x2, y2 - partitiony + y1);
|
||||
@@ -9778,7 +9778,7 @@ Gfx *bgun_draw_hud_gauge(Gfx *gdl, s32 x1, s32 y1, s32 x2, s32 y2, struct abmag
|
||||
s32 unittop;
|
||||
s32 unitbottom;
|
||||
|
||||
gdl = text_set_prim_colour(gdl, emptycolour);
|
||||
gdl = text_begin_boxmode(gdl, emptycolour);
|
||||
|
||||
unittop = gaugetop;
|
||||
unitbottom = -1;
|
||||
@@ -9918,7 +9918,7 @@ Gfx *bgun_draw_hud_gauge(Gfx *gdl, s32 x1, s32 y1, s32 x2, s32 y2, struct abmag
|
||||
}
|
||||
}
|
||||
|
||||
gdl = text0f153838(gdl);
|
||||
gdl = text_end_boxmode(gdl);
|
||||
|
||||
gDPSetRenderMode(gdl++, G_RM_AA_XLU_SURF, G_RM_AA_XLU_SURF2);
|
||||
|
||||
@@ -9974,12 +9974,12 @@ Gfx *bgun_draw_hud(Gfx *gdl)
|
||||
}
|
||||
|
||||
#if PAL
|
||||
g_ScaleX = 1;
|
||||
g_UiScaleX = 1;
|
||||
#else
|
||||
g_ScaleX = g_ViRes == VIRES_HI ? 2 : 1;
|
||||
g_UiScaleX = g_ViRes == VIRES_HI ? 2 : 1;
|
||||
#endif
|
||||
|
||||
gdl = text0f153628(gdl);
|
||||
gdl = text_begin(gdl);
|
||||
|
||||
if (playercount >= 2) {
|
||||
barwidth = 5;
|
||||
@@ -10016,7 +10016,7 @@ Gfx *bgun_draw_hud(Gfx *gdl)
|
||||
}
|
||||
#endif
|
||||
|
||||
xpos = (vi_get_view_left() + vi_get_view_width()) / g_ScaleX - barwidth - 24;
|
||||
xpos = (vi_get_view_left() + vi_get_view_width()) / g_UiScaleX - barwidth - 24;
|
||||
|
||||
if (playercount == 2 && (options_get_screen_split() == SCREENSPLIT_VERTICAL || IS4MB()) && playernum == 0) {
|
||||
xpos += 15;
|
||||
@@ -10049,11 +10049,11 @@ Gfx *bgun_draw_hud(Gfx *gdl)
|
||||
fncolour = ((ctrl->fnfader * 2) - 256) << 16 | 0xff000040;
|
||||
}
|
||||
|
||||
gdl = text_set_prim_colour(gdl, fncolour);
|
||||
gdl = text_begin_boxmode(gdl, fncolour);
|
||||
|
||||
gDPFillRectangleScaled(gdl++, xpos - 13, bottom - 11, xpos - 2, bottom);
|
||||
|
||||
gdl = text0f153838(gdl);
|
||||
gdl = text_end_boxmode(gdl);
|
||||
|
||||
// Draw weapon name and function name
|
||||
if (options_get_show_gun_function(g_Vars.currentplayerstats->mpindex)) {
|
||||
@@ -10106,14 +10106,14 @@ Gfx *bgun_draw_hud(Gfx *gdl)
|
||||
if (0xffffff00);
|
||||
}
|
||||
|
||||
gdl = text_set_prim_colour(gdl, 0);
|
||||
gdl = text_begin_boxmode(gdl, 0);
|
||||
|
||||
gDPFillRectangleScaled(gdl++, x - 1, y - 1, xpos - 11, bottom);
|
||||
|
||||
gdl = text0f153838(gdl);
|
||||
gdl = text_end_boxmode(gdl);
|
||||
text_set_wave_blend(g_20SecIntervalFrac * 50.0f, 0, 50);
|
||||
text_set_wave_colours(0xffffffff, 0xffffffff);
|
||||
gdl = text_render_projected(gdl, &x, &y, str, g_CharsHandelGothicXs, g_FontHandelGothicXs, colour, textwidth, 1000, 0, 0);
|
||||
gdl = text_render_v2(gdl, &x, &y, str, g_CharsHandelGothicXs, g_FontHandelGothicXs, colour, textwidth, 1000, 0, 0);
|
||||
text_reset_blends();
|
||||
}
|
||||
|
||||
@@ -10173,16 +10173,16 @@ Gfx *bgun_draw_hud(Gfx *gdl)
|
||||
colour = (colour & 0xffffff00) | alpha;
|
||||
}
|
||||
|
||||
gdl = text_set_prim_colour(gdl, 0);
|
||||
gdl = text_begin_boxmode(gdl, 0);
|
||||
|
||||
gDPFillRectangleScaled(gdl++, x - 1, y - 1, xpos - 11, bottom + 3);
|
||||
|
||||
gdl = text0f153838(gdl);
|
||||
gdl = text_end_boxmode(gdl);
|
||||
|
||||
text_set_wave_blend(g_20SecIntervalFrac * 50.0f, 0, 50);
|
||||
text_set_wave_colours(0xffffffff, 0xffffffff);
|
||||
|
||||
gdl = text_render_projected(gdl, &x, &y, str,
|
||||
gdl = text_render_v2(gdl, &x, &y, str,
|
||||
g_CharsHandelGothicXs, g_FontHandelGothicXs, colour, textwidth,
|
||||
1000, 0, 0);
|
||||
|
||||
@@ -10201,8 +10201,8 @@ Gfx *bgun_draw_hud(Gfx *gdl)
|
||||
}
|
||||
|
||||
if (ammoindex == -1) {
|
||||
gdl = text0f153780(gdl);
|
||||
g_ScaleX = 1;
|
||||
gdl = text_end(gdl);
|
||||
g_UiScaleX = 1;
|
||||
return gdl;
|
||||
}
|
||||
}
|
||||
@@ -10218,7 +10218,7 @@ Gfx *bgun_draw_hud(Gfx *gdl)
|
||||
if (lefthand->inuse
|
||||
&& weapon->ammos[ammoindex] != NULL
|
||||
&& lefthand->gset.weaponnum != WEAPON_REMOTEMINE) {
|
||||
xpos = vi_get_view_left() / g_ScaleX + 24;
|
||||
xpos = vi_get_view_left() / g_UiScaleX + 24;
|
||||
|
||||
if (playercount == 2 && (options_get_screen_split() == SCREENSPLIT_VERTICAL || IS4MB()) && playernum == 1) {
|
||||
xpos -= 14;
|
||||
@@ -10245,13 +10245,13 @@ Gfx *bgun_draw_hud(Gfx *gdl)
|
||||
ammotype = player->gunctrl.ammotypes[ammoindex];
|
||||
|
||||
#if VERSION >= VERSION_NTSC_1_0
|
||||
xpos = (vi_get_view_left() + vi_get_view_width()) / g_ScaleX - barwidth - 24;
|
||||
xpos = (vi_get_view_left() + vi_get_view_width()) / g_UiScaleX - barwidth - 24;
|
||||
#else
|
||||
// NTSC Beta omits the brackets here. This would normally cause the
|
||||
// ammo info to be misaligned for players on the right side of the
|
||||
// screen and when using hi-res, but I'm not sure if hi-res can even be
|
||||
// active when using multiple players...
|
||||
xpos = vi_get_view_left() + vi_get_view_width() / g_ScaleX - barwidth - 24;
|
||||
xpos = vi_get_view_left() + vi_get_view_width() / g_UiScaleX - barwidth - 24;
|
||||
#endif
|
||||
|
||||
if (playercount == 2 && (options_get_screen_split() == SCREENSPLIT_VERTICAL || IS4MB()) && playernum == 0) {
|
||||
@@ -10313,9 +10313,9 @@ Gfx *bgun_draw_hud(Gfx *gdl)
|
||||
}
|
||||
}
|
||||
|
||||
gdl = text0f153780(gdl);
|
||||
gdl = text_end(gdl);
|
||||
|
||||
g_ScaleX = 1;
|
||||
g_UiScaleX = 1;
|
||||
|
||||
return gdl;
|
||||
}
|
||||
|
||||
+36
-91
@@ -919,11 +919,11 @@ Gfx *bview_draw_eyespy_metrics(Gfx *gdl)
|
||||
#endif
|
||||
|
||||
if (g_Vars.currentplayer->eyespy->mode == EYESPYMODE_CAMSPY) {
|
||||
gdl = text_set_prim_colour(gdl, 0x00ff0028);
|
||||
gdl = text_begin_boxmode(gdl, 0x00ff0028);
|
||||
} else if (g_Vars.currentplayer->eyespy->mode == EYESPYMODE_DRUGSPY) {
|
||||
gdl = text_set_prim_colour(gdl, 0x2244ffa0);
|
||||
gdl = text_begin_boxmode(gdl, 0x2244ffa0);
|
||||
} else {
|
||||
gdl = text_set_prim_colour(gdl, 0xff3300a0);
|
||||
gdl = text_begin_boxmode(gdl, 0xff3300a0);
|
||||
}
|
||||
|
||||
#if VERSION >= VERSION_NTSC_1_0
|
||||
@@ -980,15 +980,10 @@ Gfx *bview_draw_eyespy_metrics(Gfx *gdl)
|
||||
y = savedy;
|
||||
x2 = x + textwidth; \
|
||||
y2 = y + textheight; \
|
||||
gdl = text0f153858(gdl, &x, &y, &x2, &y2);
|
||||
gdl = text_draw_black_box(gdl, &x, &y, &x2, &y2);
|
||||
|
||||
#if VERSION >= VERSION_JPN_FINAL
|
||||
gdl = func0f1574d0jf(gdl, &x, &y, text, g_CharsHandelGothicXs, g_FontHandelGothicXs,
|
||||
gdl = text_render_vx(gdl, &x, &y, text, g_CharsHandelGothicXs, g_FontHandelGothicXs,
|
||||
colourtextbright, colourglow, vi_get_width(), vi_get_height(), 0, 0);
|
||||
#else
|
||||
gdl = text_render(gdl, &x, &y, text, g_CharsHandelGothicXs, g_FontHandelGothicXs,
|
||||
colourtextbright, colourglow, vi_get_width(), vi_get_height(), 0, 0);
|
||||
#endif
|
||||
|
||||
// "H/M"
|
||||
sprintf(text, "%s %s%4.2f", lang_get(L_MISC_074), "", g_Vars.currentplayer->eyespy->height * 0.01f);
|
||||
@@ -998,14 +993,9 @@ Gfx *bview_draw_eyespy_metrics(Gfx *gdl)
|
||||
y = savedy;
|
||||
x2 = x + textwidth; \
|
||||
y2 = y + textheight; \
|
||||
gdl = text0f153858(gdl, &x, &y, &x2, &y2);
|
||||
#if VERSION >= VERSION_JPN_FINAL
|
||||
gdl = func0f1574d0jf(gdl, &x, &y, text, g_CharsHandelGothicXs, g_FontHandelGothicXs,
|
||||
gdl = text_draw_black_box(gdl, &x, &y, &x2, &y2);
|
||||
gdl = text_render_vx(gdl, &x, &y, text, g_CharsHandelGothicXs, g_FontHandelGothicXs,
|
||||
colourtextbright, colourglow, vi_get_width(), vi_get_height(), 0, 0);
|
||||
#else
|
||||
gdl = text_render(gdl, &x, &y, text, g_CharsHandelGothicXs, g_FontHandelGothicXs,
|
||||
colourtextbright, colourglow, vi_get_width(), vi_get_height(), 0, 0);
|
||||
#endif
|
||||
|
||||
// "Y/D"
|
||||
sprintf(text, "%s %d", lang_get(L_MISC_075), (s32)g_Vars.currentplayer->eyespy->theta);
|
||||
@@ -1015,14 +1005,9 @@ Gfx *bview_draw_eyespy_metrics(Gfx *gdl)
|
||||
y = savedy;
|
||||
x2 = x + textwidth; \
|
||||
y2 = y + textheight; \
|
||||
gdl = text0f153858(gdl, &x, &y, &x2, &y2);
|
||||
#if VERSION >= VERSION_JPN_FINAL
|
||||
gdl = func0f1574d0jf(gdl, &x, &y, text, g_CharsHandelGothicXs, g_FontHandelGothicXs,
|
||||
gdl = text_draw_black_box(gdl, &x, &y, &x2, &y2);
|
||||
gdl = text_render_vx(gdl, &x, &y, text, g_CharsHandelGothicXs, g_FontHandelGothicXs,
|
||||
colourtextbright, colourglow, vi_get_width(), vi_get_height(), 0, 0);
|
||||
#else
|
||||
gdl = text_render(gdl, &x, &y, text, g_CharsHandelGothicXs, g_FontHandelGothicXs,
|
||||
colourtextbright, colourglow, vi_get_width(), vi_get_height(), 0, 0);
|
||||
#endif
|
||||
|
||||
// "P/D"
|
||||
sprintf(text, "%s %d", lang_get(L_MISC_076), (s32)g_Vars.currentplayer->eyespy->verta);
|
||||
@@ -1032,14 +1017,9 @@ Gfx *bview_draw_eyespy_metrics(Gfx *gdl)
|
||||
y = savedy;
|
||||
x2 = x + textwidth; \
|
||||
y2 = y + textheight; \
|
||||
gdl = text0f153858(gdl, &x, &y, &x2, &y2);
|
||||
#if VERSION >= VERSION_JPN_FINAL
|
||||
gdl = func0f1574d0jf(gdl, &x, &y, text, g_CharsHandelGothicXs, g_FontHandelGothicXs,
|
||||
gdl = text_draw_black_box(gdl, &x, &y, &x2, &y2);
|
||||
gdl = text_render_vx(gdl, &x, &y, text, g_CharsHandelGothicXs, g_FontHandelGothicXs,
|
||||
colourtextbright, colourglow, vi_get_width(), vi_get_height(), 0, 0);
|
||||
#else
|
||||
gdl = text_render(gdl, &x, &y, text, g_CharsHandelGothicXs, g_FontHandelGothicXs,
|
||||
colourtextbright, colourglow, vi_get_width(), vi_get_height(), 0, 0);
|
||||
#endif
|
||||
|
||||
// "CI 2023"
|
||||
sprintf(text, "%s", lang_get(L_MISC_077));
|
||||
@@ -1054,14 +1034,9 @@ Gfx *bview_draw_eyespy_metrics(Gfx *gdl)
|
||||
#endif
|
||||
x2 = x + textwidth; \
|
||||
y2 = y + textheight; \
|
||||
gdl = text0f153858(gdl, &x, &y, &x2, &y2);
|
||||
#if VERSION >= VERSION_JPN_FINAL
|
||||
gdl = func0f1574d0jf(gdl, &x, &y, text, g_CharsHandelGothicXs, g_FontHandelGothicXs,
|
||||
gdl = text_draw_black_box(gdl, &x, &y, &x2, &y2);
|
||||
gdl = text_render_vx(gdl, &x, &y, text, g_CharsHandelGothicXs, g_FontHandelGothicXs,
|
||||
colourtextdull, colourglow, vi_get_width(), vi_get_height(), 0, 0);
|
||||
#else
|
||||
gdl = text_render(gdl, &x, &y, text, g_CharsHandelGothicXs, g_FontHandelGothicXs,
|
||||
colourtextdull, colourglow, vi_get_width(), vi_get_height(), 0, 0);
|
||||
#endif
|
||||
|
||||
if (g_Vars.currentplayer->eyespy->mode == EYESPYMODE_CAMSPY) {
|
||||
sprintf(text, "%s", lang_get(L_MISC_078)); // "YKK: 95935"
|
||||
@@ -1083,14 +1058,9 @@ Gfx *bview_draw_eyespy_metrics(Gfx *gdl)
|
||||
|
||||
x2 = x + textwidth; \
|
||||
y2 = y + textheight; \
|
||||
gdl = text0f153858(gdl, &x, &y, &x2, &y2);
|
||||
#if VERSION >= VERSION_JPN_FINAL
|
||||
gdl = func0f1574d0jf(gdl, &x, &y, text, g_CharsHandelGothicXs, g_FontHandelGothicXs,
|
||||
gdl = text_draw_black_box(gdl, &x, &y, &x2, &y2);
|
||||
gdl = text_render_vx(gdl, &x, &y, text, g_CharsHandelGothicXs, g_FontHandelGothicXs,
|
||||
colourtextdull, colourglow, vi_get_width(), vi_get_height(), 0, 0);
|
||||
#else
|
||||
gdl = text_render(gdl, &x, &y, text, g_CharsHandelGothicXs, g_FontHandelGothicXs,
|
||||
colourtextdull, colourglow, vi_get_width(), vi_get_height(), 0, 0);
|
||||
#endif
|
||||
|
||||
if (g_Vars.currentplayer->eyespy->mode == EYESPYMODE_CAMSPY) {
|
||||
// "CAMSPY"
|
||||
@@ -1109,14 +1079,9 @@ Gfx *bview_draw_eyespy_metrics(Gfx *gdl)
|
||||
#endif
|
||||
x2 = x + textwidth; \
|
||||
y2 = y + textheight; \
|
||||
gdl = text0f153858(gdl, &x, &y, &x2, &y2);
|
||||
#if VERSION >= VERSION_JPN_FINAL
|
||||
gdl = func0f1574d0jf(gdl, &x, &y, text, g_CharsHandelGothicXs, g_FontHandelGothicXs,
|
||||
gdl = text_draw_black_box(gdl, &x, &y, &x2, &y2);
|
||||
gdl = text_render_vx(gdl, &x, &y, text, g_CharsHandelGothicXs, g_FontHandelGothicXs,
|
||||
colourtextdull, colourglow, vi_get_width(), vi_get_height(), 0, 0);
|
||||
#else
|
||||
gdl = text_render(gdl, &x, &y, text, g_CharsHandelGothicXs, g_FontHandelGothicXs,
|
||||
colourtextdull, colourglow, vi_get_width(), vi_get_height(), 0, 0);
|
||||
#endif
|
||||
} else if (g_Vars.currentplayer->eyespy->mode == EYESPYMODE_DRUGSPY) {
|
||||
// "DRUGSPY"
|
||||
sprintf(text, " %s", lang_get(L_MISC_468));
|
||||
@@ -1134,14 +1099,9 @@ Gfx *bview_draw_eyespy_metrics(Gfx *gdl)
|
||||
#endif
|
||||
x2 = x + textwidth; \
|
||||
y2 = y + textheight; \
|
||||
gdl = text0f153858(gdl, &x, &y, &x2, &y2);
|
||||
#if VERSION >= VERSION_JPN_FINAL
|
||||
gdl = func0f1574d0jf(gdl, &x, &y, text, g_CharsHandelGothicXs, g_FontHandelGothicXs,
|
||||
gdl = text_draw_black_box(gdl, &x, &y, &x2, &y2);
|
||||
gdl = text_render_vx(gdl, &x, &y, text, g_CharsHandelGothicXs, g_FontHandelGothicXs,
|
||||
colourtextdull, colourglow, vi_get_width(), vi_get_height(), 0, 0);
|
||||
#else
|
||||
gdl = text_render(gdl, &x, &y, text, g_CharsHandelGothicXs, g_FontHandelGothicXs,
|
||||
colourtextdull, colourglow, vi_get_width(), vi_get_height(), 0, 0);
|
||||
#endif
|
||||
} else {
|
||||
// "BOMBSPY"
|
||||
sprintf(text, " %s", lang_get(L_MISC_469));
|
||||
@@ -1159,14 +1119,9 @@ Gfx *bview_draw_eyespy_metrics(Gfx *gdl)
|
||||
#endif
|
||||
x2 = x + textwidth; \
|
||||
y2 = y + textheight; \
|
||||
gdl = text0f153858(gdl, &x, &y, &x2, &y2);
|
||||
#if VERSION >= VERSION_JPN_FINAL
|
||||
gdl = func0f1574d0jf(gdl, &x, &y, text, g_CharsHandelGothicXs, g_FontHandelGothicXs,
|
||||
gdl = text_draw_black_box(gdl, &x, &y, &x2, &y2);
|
||||
gdl = text_render_vx(gdl, &x, &y, text, g_CharsHandelGothicXs, g_FontHandelGothicXs,
|
||||
colourtextdull, colourglow, vi_get_width(), vi_get_height(), 0, 0);
|
||||
#else
|
||||
gdl = text_render(gdl, &x, &y, text, g_CharsHandelGothicXs, g_FontHandelGothicXs,
|
||||
colourtextdull, colourglow, vi_get_width(), vi_get_height(), 0, 0);
|
||||
#endif
|
||||
}
|
||||
|
||||
// Model number
|
||||
@@ -1191,14 +1146,9 @@ Gfx *bview_draw_eyespy_metrics(Gfx *gdl)
|
||||
#endif
|
||||
x2 = x + textwidth; \
|
||||
y2 = y + textheight; \
|
||||
gdl = text0f153858(gdl, &x, &y, &x2, &y2);
|
||||
#if VERSION >= VERSION_JPN_FINAL
|
||||
gdl = func0f1574d0jf(gdl, &x, &y, text, g_CharsHandelGothicXs, g_FontHandelGothicXs,
|
||||
gdl = text_draw_black_box(gdl, &x, &y, &x2, &y2);
|
||||
gdl = text_render_vx(gdl, &x, &y, text, g_CharsHandelGothicXs, g_FontHandelGothicXs,
|
||||
colourtextdull, colourglow, vi_get_width(), vi_get_height(), 0, 0);
|
||||
#else
|
||||
gdl = text_render(gdl, &x, &y, text, g_CharsHandelGothicXs, g_FontHandelGothicXs,
|
||||
colourtextdull, colourglow, vi_get_width(), vi_get_height(), 0, 0);
|
||||
#endif
|
||||
|
||||
// Gyrostat/dartammo text
|
||||
if (g_Vars.currentplayer->eyespy->mode == EYESPYMODE_CAMSPY
|
||||
@@ -1222,16 +1172,11 @@ Gfx *bview_draw_eyespy_metrics(Gfx *gdl)
|
||||
if (1);
|
||||
x2 = x + textwidth; \
|
||||
y2 = y + textheight; \
|
||||
gdl = text0f153858(gdl, &x, &y, &x2, &y2);
|
||||
#if VERSION >= VERSION_JPN_FINAL
|
||||
gdl = func0f1574d0jf(gdl, &x, &y, text, g_CharsHandelGothicXs, g_FontHandelGothicXs,
|
||||
gdl = text_draw_black_box(gdl, &x, &y, &x2, &y2);
|
||||
gdl = text_render_vx(gdl, &x, &y, text, g_CharsHandelGothicXs, g_FontHandelGothicXs,
|
||||
colourtextdull, colourglow, vi_get_width(), vi_get_height(), 0, 0);
|
||||
#else
|
||||
gdl = text_render(gdl, &x, &y, text, g_CharsHandelGothicXs, g_FontHandelGothicXs,
|
||||
colourtextdull, colourglow, vi_get_width(), vi_get_height(), 0, 0);
|
||||
#endif
|
||||
|
||||
gdl = text0f153838(gdl);
|
||||
gdl = text_end_boxmode(gdl);
|
||||
|
||||
{
|
||||
s8 contpadnum = options_get_contpad_num1(g_Vars.currentplayerstats->mpindex);
|
||||
@@ -2366,12 +2311,12 @@ Gfx *bview_draw_horizon_scanner(Gfx *gdl)
|
||||
lenstop = viewtop + (viewheight / 2) - (lensheight / 2);
|
||||
|
||||
// Black out areas above and below lens
|
||||
gdl = text_set_prim_colour(gdl, 0x000000ff);
|
||||
gdl = text_begin_boxmode(gdl, 0x000000ff);
|
||||
|
||||
gDPFillRectangle(gdl++, viewleft, viewtop, viewleft + viewwidth, lenstop);
|
||||
gDPFillRectangle(gdl++, viewleft, lenstop + lensheight, viewleft + viewwidth, viewtop + viewheight);
|
||||
|
||||
gdl = text0f153838(gdl);
|
||||
gdl = text_end_boxmode(gdl);
|
||||
|
||||
// Prepare text buffers
|
||||
sprintf(directiontext, "%s %s:%03d", arrows, &directions[(turnangle + 22) / 45], turnangle);
|
||||
@@ -2387,7 +2332,7 @@ Gfx *bview_draw_horizon_scanner(Gfx *gdl)
|
||||
|
||||
sprintf(zoomtext, "%s %s%s%4.2fX", arrows, "", "", fovy);
|
||||
|
||||
gdl = text0f153628(gdl);
|
||||
gdl = text_begin(gdl);
|
||||
|
||||
// Arrows left of product name
|
||||
if (vsplit) {
|
||||
@@ -2397,7 +2342,7 @@ Gfx *bview_draw_horizon_scanner(Gfx *gdl)
|
||||
}
|
||||
|
||||
y = lenstop - 7;
|
||||
gdl = text_render_projected(gdl, &x, &y, arrows,
|
||||
gdl = text_render_v2(gdl, &x, &y, arrows,
|
||||
g_CharsHandelGothicXs, g_FontHandelGothicXs, 0xffffff7f, vi_get_width(), vi_get_height(), 0, 0);
|
||||
|
||||
// Product name
|
||||
@@ -2410,17 +2355,17 @@ Gfx *bview_draw_horizon_scanner(Gfx *gdl)
|
||||
|
||||
strcat(nametext, " SCANNER\n");
|
||||
|
||||
gdl = text_render_projected(gdl, &x, &y, nametext,
|
||||
gdl = text_render_v2(gdl, &x, &y, nametext,
|
||||
g_CharsHandelGothicXs, g_FontHandelGothicXs, 0xffffff7f, vi_get_width(), vi_get_height(), 0, 0);
|
||||
#else
|
||||
gdl = text_render_projected(gdl, &x, &y, " JMBC WIDE BAND SCANNER\n",
|
||||
gdl = text_render_v2(gdl, &x, &y, " JMBC WIDE BAND SCANNER\n",
|
||||
g_CharsHandelGothicXs, g_FontHandelGothicXs, 0xffffff7f, vi_get_width(), vi_get_height(), 0, 0);
|
||||
#endif
|
||||
|
||||
// Hertz
|
||||
x = viewleft + 75 * scale;
|
||||
y = lenstop + lensheight + 1;
|
||||
gdl = text_render_projected(gdl, &x, &y, hertztext,
|
||||
gdl = text_render_v2(gdl, &x, &y, hertztext,
|
||||
g_CharsHandelGothicXs, g_FontHandelGothicXs, 0xffffff7f, vi_get_width(), vi_get_height(), 0, 0);
|
||||
|
||||
// Zoom level
|
||||
@@ -2432,7 +2377,7 @@ Gfx *bview_draw_horizon_scanner(Gfx *gdl)
|
||||
y = lenstop + lensheight + 1;
|
||||
}
|
||||
|
||||
gdl = text_render_projected(gdl, &x, &y, zoomtext,
|
||||
gdl = text_render_v2(gdl, &x, &y, zoomtext,
|
||||
g_CharsHandelGothicXs, g_FontHandelGothicXs, 0xffffff7f, vi_get_width(), vi_get_height(), 0, 0);
|
||||
|
||||
// Direction
|
||||
@@ -2444,9 +2389,9 @@ Gfx *bview_draw_horizon_scanner(Gfx *gdl)
|
||||
y = lenstop + lensheight + 1;
|
||||
}
|
||||
|
||||
gdl = text_render_projected(gdl, &x, &y, directiontext,
|
||||
gdl = text_render_v2(gdl, &x, &y, directiontext,
|
||||
g_CharsHandelGothicXs, g_FontHandelGothicXs, 0xffffff7f, vi_get_width(), vi_get_height(), 0, 0);
|
||||
gdl = text0f153780(gdl);
|
||||
gdl = text_end(gdl);
|
||||
|
||||
gDPPipeSync(gdl++);
|
||||
|
||||
|
||||
+3
-3
@@ -1815,10 +1815,10 @@ Gfx *phead_draw_texture(Gfx *gdl, struct textureconfig *tconfig, f32 pos[2], f32
|
||||
gDPSetCombineMode(gdl++, G_CC_DECALRGBA, G_CC_DECALRGBA);
|
||||
|
||||
gSPTextureRectangle(gdl++,
|
||||
x * g_ScaleX, y,
|
||||
pxwidth * g_ScaleX, pxheight,
|
||||
x * g_UiScaleX, y,
|
||||
pxwidth * g_UiScaleX, pxheight,
|
||||
G_TX_RENDERTILE, 16, sp28,
|
||||
(s32)(1024.0f / width) / g_ScaleX,
|
||||
(s32)(1024.0f / width) / g_UiScaleX,
|
||||
(s32)(1024.0f / height));
|
||||
|
||||
return gdl;
|
||||
|
||||
@@ -16044,7 +16044,7 @@ Gfx *chrs_render_chr_stats(Gfx *gdl, RoomNum *rooms)
|
||||
s32 i;
|
||||
s32 numchrs = chrs_get_num_slots();
|
||||
|
||||
gdl = text0f153628(gdl);
|
||||
gdl = text_begin(gdl);
|
||||
|
||||
for (i = 0; i < numchrs; i++) {
|
||||
struct chrdata *chr = &g_ChrSlots[i];
|
||||
@@ -16079,15 +16079,15 @@ Gfx *chrs_render_chr_stats(Gfx *gdl, RoomNum *rooms)
|
||||
x2 = x + textwidth;
|
||||
y2 = y + textheight;
|
||||
|
||||
gdl = text0f153858(gdl, &x, &y, &x2, &y2);
|
||||
gdl = text_render(gdl, &x, &y, fullbuffer,
|
||||
gdl = text_draw_black_box(gdl, &x, &y, &x2, &y2);
|
||||
gdl = text_render_v1(gdl, &x, &y, fullbuffer,
|
||||
g_CharsHandelGothicXs, g_FontHandelGothicXs,
|
||||
0xff8800aa, 0x00000088, vi_get_width(), vi_get_height(), 0, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
gdl = text0f153780(gdl);
|
||||
gdl = text_end(gdl);
|
||||
|
||||
return gdl;
|
||||
}
|
||||
|
||||
+8
-8
@@ -569,11 +569,11 @@ Gfx *credits_fill_framebuffer(Gfx *gdl, u32 colour)
|
||||
{
|
||||
gSPDisplayList(gdl++, &var800613a0);
|
||||
|
||||
gdl = text_set_prim_colour(gdl, colour);
|
||||
gdl = text_begin_boxmode(gdl, colour);
|
||||
|
||||
gDPFillRectangle(gdl++, 0, 0, vi_get_width(), vi_get_height());
|
||||
|
||||
gdl = text0f153838(gdl);
|
||||
gdl = text_end_boxmode(gdl);
|
||||
|
||||
return gdl;
|
||||
}
|
||||
@@ -1010,7 +1010,7 @@ Gfx *credits_draw_background_text(Gfx *gdl, s32 x, s32 y, char *text, struct fon
|
||||
f32 value = (i * 0.3f * (spread + 0.5f)) + 1.0f;
|
||||
u32 stack[2];
|
||||
|
||||
gdl = text0f1552d4(gdl, x + sinf(f24) * mult, y + cosf(f24) * mult, f26, value, text, chars, font, colour3, 0, 1);
|
||||
gdl = text_render_credits(gdl, x + sinf(f24) * mult, y + cosf(f24) * mult, f26, value, text, chars, font, colour3, 0, 1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1059,7 +1059,7 @@ Gfx *credits_draw_foreground_text(Gfx *gdl, s32 x, s32 y, char *text, struct fon
|
||||
|
||||
colour = 0xffffff00 | (u32) (255.0f * opacityfrac);
|
||||
|
||||
gdl = text0f1552d4(gdl, x, y, widthscale, heightscale, text, chars, font, colour, hdir, vdir);
|
||||
gdl = text_render_credits(gdl, x, y, widthscale, heightscale, text, chars, font, colour, hdir, vdir);
|
||||
|
||||
return gdl;
|
||||
}
|
||||
@@ -1511,7 +1511,7 @@ Gfx *credits_draw_slide(Gfx *gdl)
|
||||
#endif
|
||||
}
|
||||
|
||||
gdl = text0f153628(gdl);
|
||||
gdl = text_begin(gdl);
|
||||
|
||||
// Draw text repetitions
|
||||
for (i = 0; i < g_CreditsData->numthisslide * 2; i++) {
|
||||
@@ -1664,7 +1664,7 @@ Gfx *credits_draw_slide(Gfx *gdl)
|
||||
}
|
||||
}
|
||||
|
||||
gdl = text0f153780(gdl);
|
||||
gdl = text_end(gdl);
|
||||
|
||||
return gdl;
|
||||
}
|
||||
@@ -1764,13 +1764,13 @@ Gfx *credits_draw(Gfx *gdl)
|
||||
|
||||
static u32 scrolltimer240 = 0;
|
||||
|
||||
text0f1531dc(false);
|
||||
text_set_hires(false);
|
||||
|
||||
#if VERSION >= VERSION_JPN_FINAL
|
||||
var800800f0jf = 0;
|
||||
#endif
|
||||
|
||||
g_ScaleX = 1;
|
||||
g_UiScaleX = 1;
|
||||
|
||||
gdl = vi_prepare_zbuf(gdl);
|
||||
gdl = vi0000b1d0(gdl);
|
||||
|
||||
+20
-20
@@ -1948,11 +1948,11 @@ Gfx *filemgr_render_perfect_head_thumbnail(Gfx *gdl, struct menuitemrenderdata *
|
||||
gDPTileSync(gdl++);
|
||||
|
||||
gSPTextureRectangle(gdl++,
|
||||
((renderdata->x + 4) << 2) * g_ScaleX,
|
||||
((renderdata->x + 4) << 2) * g_UiScaleX,
|
||||
(renderdata->y + 2) << 2,
|
||||
((renderdata->x + 20) << 2) * g_ScaleX,
|
||||
((renderdata->x + 20) << 2) * g_UiScaleX,
|
||||
(renderdata->y + 18) << 2,
|
||||
G_TX_RENDERTILE, 0, 512, 1024 / g_ScaleX, -1024);
|
||||
G_TX_RENDERTILE, 0, 512, 1024 / g_UiScaleX, -1024);
|
||||
|
||||
gDPLoadSync(gdl++);
|
||||
gDPTileSync(gdl++);
|
||||
@@ -2059,17 +2059,17 @@ MenuItemHandlerResult filemgr_file_to_copy_or_delete_list_menu_handler(s32 opera
|
||||
x = renderdata->x + 2;
|
||||
y = renderdata->y + 2;
|
||||
|
||||
gdl = text0f153628(gdl);
|
||||
gdl = text_begin(gdl);
|
||||
|
||||
if (file) {
|
||||
filemgr_get_select_name(text, file, g_Menus[g_MpPlayerNum].fm.filetypeplusone - 1);
|
||||
gdl = text_render_projected(gdl, &x, &y, text, g_CharsHandelGothicSm, g_FontHandelGothicSm,
|
||||
gdl = text_render_v2(gdl, &x, &y, text, g_CharsHandelGothicSm, g_FontHandelGothicSm,
|
||||
colour, vi_get_width(), vi_get_height(), 0, 1);
|
||||
y = renderdata->y + 12;
|
||||
x = renderdata->x + 2;
|
||||
}
|
||||
|
||||
gdl = text0f153780(gdl);
|
||||
gdl = text_end(gdl);
|
||||
}
|
||||
|
||||
return (uintptr_t) gdl;
|
||||
@@ -2251,7 +2251,7 @@ MenuItemHandlerResult pak_game_note_list_menu_handler(s32 operation, struct menu
|
||||
sprintf(generalbuffer, "%d:\n", data->list.unk04 + 1);
|
||||
x = renderdata->x + 4;
|
||||
y = renderdata->y + 1;
|
||||
gdl = text_render_projected(gdl, &x, &y, generalbuffer, g_CharsHandelGothicSm, g_FontHandelGothicSm,
|
||||
gdl = text_render_v2(gdl, &x, &y, generalbuffer, g_CharsHandelGothicSm, g_FontHandelGothicSm,
|
||||
renderdata->colour, vi_get_width(), vi_get_height(), 0, 1);
|
||||
|
||||
// Prepare buffers for remaining text
|
||||
@@ -2273,13 +2273,13 @@ MenuItemHandlerResult pak_game_note_list_menu_handler(s32 operation, struct menu
|
||||
// Render note name
|
||||
x = renderdata->x + 20;
|
||||
y = renderdata->y + 1;
|
||||
gdl = text_render_projected(gdl, &x, &y, generalbuffer, g_CharsHandelGothicSm, g_FontHandelGothicSm,
|
||||
gdl = text_render_v2(gdl, &x, &y, generalbuffer, g_CharsHandelGothicSm, g_FontHandelGothicSm,
|
||||
renderdata->colour, vi_get_width(), vi_get_height(), 0, 1);
|
||||
|
||||
// Render ext character (for when a game has multiple notes)
|
||||
x = renderdata->x + (VERSION == VERSION_JPN_FINAL ? 220 : 190);
|
||||
y = renderdata->y + 1;
|
||||
gdl = text_render_projected(gdl, &x, &y, extbuffer, g_CharsHandelGothicSm, g_FontHandelGothicSm,
|
||||
gdl = text_render_v2(gdl, &x, &y, extbuffer, g_CharsHandelGothicSm, g_FontHandelGothicSm,
|
||||
renderdata->colour, vi_get_width(), vi_get_height(), 0, 1);
|
||||
|
||||
// Render number of pages
|
||||
@@ -2287,7 +2287,7 @@ MenuItemHandlerResult pak_game_note_list_menu_handler(s32 operation, struct menu
|
||||
|
||||
x = renderdata->x + renderdata->width - textwidth - 6;
|
||||
y = renderdata->y + 1;
|
||||
gdl = text_render_projected(gdl, &x, &y, pagesbuffer, g_CharsHandelGothicSm, g_FontHandelGothicSm,
|
||||
gdl = text_render_v2(gdl, &x, &y, pagesbuffer, g_CharsHandelGothicSm, g_FontHandelGothicSm,
|
||||
renderdata->colour, vi_get_width(), vi_get_height(), 0, 1);
|
||||
|
||||
return (uintptr_t) gdl;
|
||||
@@ -2656,23 +2656,23 @@ MenuItemHandlerResult filemgr_choose_agent_list_menu_handler(s32 operation, stru
|
||||
TEXEL0, 0, ENVIRONMENT, 0, TEXEL0, 0, ENVIRONMENT, 0);
|
||||
|
||||
gSPTextureRectangle(gdl++,
|
||||
((renderdata->x + 4) << 2) * g_ScaleX,
|
||||
((renderdata->x + 4) << 2) * g_UiScaleX,
|
||||
(renderdata->y + 2) << 2,
|
||||
((renderdata->x + 60) << 2) * g_ScaleX,
|
||||
((renderdata->x + 60) << 2) * g_UiScaleX,
|
||||
(renderdata->y + 38) << 2,
|
||||
G_TX_RENDERTILE, 0, 1152, 1024 / g_ScaleX, -1024);
|
||||
G_TX_RENDERTILE, 0, 1152, 1024 / g_UiScaleX, -1024);
|
||||
|
||||
x = renderdata->x + 62;
|
||||
y = renderdata->y + (VERSION == VERSION_JPN_FINAL ? 3 : 4);
|
||||
gdl = text0f153628(gdl);
|
||||
gdl = text_begin(gdl);
|
||||
|
||||
if (data->list.unk04 == g_FileLists[0]->numfiles) {
|
||||
// "New Agent..."
|
||||
gdl = text_render_projected(gdl, &x, &y, lang_get(L_OPTIONS_403),
|
||||
gdl = text_render_v2(gdl, &x, &y, lang_get(L_OPTIONS_403),
|
||||
g_CharsHandelGothicMd, g_FontHandelGothicMd, renderdata->colour, vi_get_width(), vi_get_height(), 0, 0);
|
||||
} else if (file) {
|
||||
// Render file name
|
||||
gdl = text_render_projected(gdl, &x, &y, name,
|
||||
gdl = text_render_v2(gdl, &x, &y, name,
|
||||
g_CharsHandelGothicMd, g_FontHandelGothicMd, renderdata->colour, vi_get_width(), vi_get_height(), 0, 1);
|
||||
|
||||
// Prepare and render stage name
|
||||
@@ -2689,7 +2689,7 @@ MenuItemHandlerResult filemgr_choose_agent_list_menu_handler(s32 operation, stru
|
||||
}
|
||||
|
||||
strcat(buffer, "\n");
|
||||
gdl = text_render_projected(gdl, &x, &y, buffer,
|
||||
gdl = text_render_v2(gdl, &x, &y, buffer,
|
||||
g_CharsHandelGothicSm, g_FontHandelGothicSm, renderdata->colour, vi_get_width(), vi_get_height(), 0, 0);
|
||||
|
||||
// Prepare and render mission time
|
||||
@@ -2715,17 +2715,17 @@ MenuItemHandlerResult filemgr_choose_agent_list_menu_handler(s32 operation, stru
|
||||
text_measure(&textheight, &textwidth, buffer, g_CharsHandelGothicSm, g_FontHandelGothicSm, 0);
|
||||
#endif
|
||||
|
||||
gdl = text_render_projected(gdl, &x, &y, buffer,
|
||||
gdl = text_render_v2(gdl, &x, &y, buffer,
|
||||
g_CharsHandelGothicSm, g_FontHandelGothicSm, renderdata->colour, vi_get_width(), vi_get_height(), 0, 0);
|
||||
|
||||
// Render seconds part of mission time (uses a smaller font)
|
||||
y += (VERSION == VERSION_JPN_FINAL) ? 3 : 1;
|
||||
x++;
|
||||
sprintf(buffer, ".%02d", seconds);
|
||||
gdl = text_render_projected(gdl, &x, &y, buffer,
|
||||
gdl = text_render_v2(gdl, &x, &y, buffer,
|
||||
g_CharsHandelGothicXs, g_FontHandelGothicXs, renderdata->colour, vi_get_width(), vi_get_height(), 0, 0);
|
||||
}
|
||||
gdl = text0f153780(gdl);
|
||||
gdl = text_end(gdl);
|
||||
return (uintptr_t) gdl;
|
||||
case MENUOP_GETOPTIONHEIGHT:
|
||||
data->list.value = 40;
|
||||
|
||||
@@ -530,9 +530,9 @@ Gfx *healthbar_draw(Gfx *gdl, struct chrdata *chr, s32 offyarg, f32 heightfracar
|
||||
traumacolours++;
|
||||
}
|
||||
|
||||
gdl = text0f153628(gdl);
|
||||
gdl = text0f153a34(gdl, underleft, undertop, underright, underbottom, undercol);
|
||||
gdl = text0f153780(gdl);
|
||||
gdl = text_begin(gdl);
|
||||
gdl = text_draw_box(gdl, underleft, undertop, underright, underbottom, undercol);
|
||||
gdl = text_end(gdl);
|
||||
|
||||
gDPSetRenderMode(gdl++, G_RM_AA_XLU_SURF, G_RM_AA_XLU_SURF2);
|
||||
gDPSetCombineMode(gdl++, G_CC_SHADE, G_CC_SHADE);
|
||||
|
||||
+41
-56
@@ -129,7 +129,7 @@ Gfx *hudmsg_render_mission_timer(Gfx *gdl, u32 alpha)
|
||||
|
||||
textcolour = alpha;
|
||||
|
||||
viewleft = vi_get_view_left() / g_ScaleX;
|
||||
viewleft = vi_get_view_left() / g_UiScaleX;
|
||||
viewtop = vi_get_view_top();
|
||||
viewheight = vi_get_view_height();
|
||||
playercount = PLAYERCOUNT();
|
||||
@@ -190,7 +190,7 @@ Gfx *hudmsg_render_mission_timer(Gfx *gdl, u32 alpha)
|
||||
x = viewleft + g_HudPaddingX + 3;
|
||||
y = timery;
|
||||
|
||||
gdl = text_render(gdl, &x, &y, buffer, g_CharsNumeric, g_FontNumeric, textcolour, 0x000000a0, vi_get_width(), vi_get_height_hack(), 0, 0);
|
||||
gdl = text_render_v1(gdl, &x, &y, buffer, g_CharsNumeric, g_FontNumeric, textcolour, 0x000000a0, vi_get_width(), vi_get_height_hack(), 0, 0);
|
||||
|
||||
return gdl;
|
||||
}
|
||||
@@ -219,8 +219,8 @@ Gfx *hudmsg_render_zoom_range(Gfx *gdl, u32 alpha)
|
||||
|
||||
colour = (alpha * 0xa0 / 255) | 0x00ff0000;
|
||||
viewtop = vi_get_view_top();
|
||||
viewleft = vi_get_view_left() / g_ScaleX;
|
||||
viewhalfwidth = (vi_get_view_width() / g_ScaleX) >> 1;
|
||||
viewleft = vi_get_view_left() / g_UiScaleX;
|
||||
viewhalfwidth = (vi_get_view_width() / g_UiScaleX) >> 1;
|
||||
viewheight = vi_get_view_height();
|
||||
texty = viewheight + viewtop - 1;
|
||||
maxzoom = 1.0f;
|
||||
@@ -272,8 +272,8 @@ Gfx *hudmsg_render_zoom_range(Gfx *gdl, u32 alpha)
|
||||
x2 = x + textwidth;
|
||||
y2 = y + textheight;
|
||||
|
||||
gdl = text0f1538e4(gdl, &x, &y, &x2, &y2);
|
||||
gdl = text_render(gdl, &x, &y, text, g_CharsNumeric, g_FontNumeric, colour, 0x000000a0, vi_get_width(), vi_get_height(), 0, 0);
|
||||
gdl = text_draw_black_uibox(gdl, &x, &y, &x2, &y2);
|
||||
gdl = text_render_v1(gdl, &x, &y, text, g_CharsNumeric, g_FontNumeric, colour, 0x000000a0, vi_get_width(), vi_get_height(), 0, 0);
|
||||
|
||||
// Divider
|
||||
sprintf(text, "/");
|
||||
@@ -284,8 +284,8 @@ Gfx *hudmsg_render_zoom_range(Gfx *gdl, u32 alpha)
|
||||
x2 = x + textwidth;
|
||||
y2 = y + textheight;
|
||||
|
||||
gdl = text0f1538e4(gdl, &x, &y, &x2, &y2);
|
||||
gdl = text_render(gdl, &x, &y, text, g_CharsNumeric, g_FontNumeric, colour, 0x000000a0, vi_get_width(), vi_get_height(), 0, 0);
|
||||
gdl = text_draw_black_uibox(gdl, &x, &y, &x2, &y2);
|
||||
gdl = text_render_v1(gdl, &x, &y, text, g_CharsNumeric, g_FontNumeric, colour, 0x000000a0, vi_get_width(), vi_get_height(), 0, 0);
|
||||
|
||||
// Right side - max zoom level
|
||||
sprintf(text, "%s%s%4.2fX", "", "", maxzoom);
|
||||
@@ -296,8 +296,8 @@ Gfx *hudmsg_render_zoom_range(Gfx *gdl, u32 alpha)
|
||||
x2 = x + textwidth;
|
||||
y2 = y + textheight;
|
||||
|
||||
gdl = text0f1538e4(gdl, &x, &y, &x2, &y2);
|
||||
gdl = text_render(gdl, &x, &y, text, g_CharsNumeric, g_FontNumeric, colour, 0x000000a0, vi_get_width(), vi_get_height(), 0, 0);
|
||||
gdl = text_draw_black_uibox(gdl, &x, &y, &x2, &y2);
|
||||
gdl = text_render_v1(gdl, &x, &y, text, g_CharsNumeric, g_FontNumeric, colour, 0x000000a0, vi_get_width(), vi_get_height(), 0, 0);
|
||||
|
||||
return gdl;
|
||||
}
|
||||
@@ -336,10 +336,10 @@ Gfx *hudmsg_render_box(Gfx *gdl, s32 x1, s32 y1, s32 x2, s32 y2, f32 bgopacity,
|
||||
f32 width = (x1 + x2) * 0.5f;
|
||||
f32 height = (y1 + y2) * 0.5f;
|
||||
|
||||
gdl = text0f153a34(gdl,
|
||||
(s32)((width - f22) + 1.0f) * g_ScaleX,
|
||||
gdl = text_draw_box(gdl,
|
||||
(s32)((width - f22) + 1.0f) * g_UiScaleX,
|
||||
(height - f20) + 1.0f,
|
||||
(s32)(width + f22) * g_ScaleX,
|
||||
(s32)(width + f22) * g_UiScaleX,
|
||||
height + f20,
|
||||
128.0f * textopacity);
|
||||
}
|
||||
@@ -350,7 +350,7 @@ Gfx *hudmsg_render_box(Gfx *gdl, s32 x1, s32 y1, s32 x2, s32 y2, f32 bgopacity,
|
||||
s32 hudmsg0f0ddb1c(s32 *arg0, s32 arg1)
|
||||
{
|
||||
#if VERSION >= VERSION_PAL_FINAL
|
||||
s32 viewwidth = vi_get_view_width() / g_ScaleX;
|
||||
s32 viewwidth = vi_get_view_width() / g_UiScaleX;
|
||||
s32 result = 0;
|
||||
|
||||
*arg0 = 24;
|
||||
@@ -379,7 +379,7 @@ s32 hudmsg0f0ddb1c(s32 *arg0, s32 arg1)
|
||||
#endif
|
||||
}
|
||||
#else
|
||||
s32 viewwidth = g_Vars.currentplayer->viewwidth / g_ScaleX;
|
||||
s32 viewwidth = g_Vars.currentplayer->viewwidth / g_UiScaleX;
|
||||
s32 result = 0;
|
||||
|
||||
*arg0 = 24;
|
||||
@@ -829,9 +829,9 @@ void hudmsg_calculate_position(struct hudmessage *msg)
|
||||
{
|
||||
s32 x;
|
||||
s32 y;
|
||||
s32 viewleft = g_Vars.players[msg->playernum]->viewleft / g_ScaleX;
|
||||
s32 viewleft = g_Vars.players[msg->playernum]->viewleft / g_UiScaleX;
|
||||
s32 viewtop = g_Vars.players[msg->playernum]->viewtop;
|
||||
s32 viewwidth = g_Vars.players[msg->playernum]->viewwidth / g_ScaleX;
|
||||
s32 viewwidth = g_Vars.players[msg->playernum]->viewwidth / g_UiScaleX;
|
||||
s32 viewheight = g_Vars.players[msg->playernum]->viewheight;
|
||||
s32 v0;
|
||||
|
||||
@@ -992,9 +992,9 @@ void hudmsg_create_from_args(char *text, s32 type, s32 conf00, s32 conf01, s32 c
|
||||
}
|
||||
|
||||
#if PAL
|
||||
g_ScaleX = 1;
|
||||
g_UiScaleX = 1;
|
||||
#else
|
||||
g_ScaleX = g_ViRes == VIRES_HI ? 2 : 1;
|
||||
g_UiScaleX = g_ViRes == VIRES_HI ? 2 : 1;
|
||||
#endif
|
||||
|
||||
// Find an unused index for the new message
|
||||
@@ -1092,7 +1092,7 @@ void hudmsg_create_from_args(char *text, s32 type, s32 conf00, s32 conf01, s32 c
|
||||
}
|
||||
}
|
||||
|
||||
g_ScaleX = 1;
|
||||
g_UiScaleX = 1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1120,9 +1120,9 @@ void hudmsgs_tick(void)
|
||||
g_HudmsgsActive = false;
|
||||
|
||||
#if PAL
|
||||
g_ScaleX = 1;
|
||||
g_UiScaleX = 1;
|
||||
#else
|
||||
g_ScaleX = (g_ViRes == VIRES_HI) ? 2 : 1;
|
||||
g_UiScaleX = (g_ViRes == VIRES_HI) ? 2 : 1;
|
||||
#endif
|
||||
|
||||
#if VERSION >= VERSION_NTSC_1_0
|
||||
@@ -1325,7 +1325,7 @@ void hudmsgs_tick(void)
|
||||
}
|
||||
}
|
||||
|
||||
g_ScaleX = 1;
|
||||
g_UiScaleX = 1;
|
||||
}
|
||||
|
||||
void hudmsgs_set_on(u32 reason)
|
||||
@@ -1365,12 +1365,12 @@ Gfx *hudmsgs_render(Gfx *gdl)
|
||||
s32 spdc = true;
|
||||
|
||||
#if PAL
|
||||
g_ScaleX = 1;
|
||||
g_UiScaleX = 1;
|
||||
#else
|
||||
g_ScaleX = g_ViRes == VIRES_HI ? 2 : 1;
|
||||
g_UiScaleX = g_ViRes == VIRES_HI ? 2 : 1;
|
||||
#endif
|
||||
|
||||
gdl = text0f153628(gdl);
|
||||
gdl = text_begin(gdl);
|
||||
|
||||
if ((g_Vars.coopplayernum >= 0 || g_Vars.antiplayernum >= 0)
|
||||
&& g_InCutscene
|
||||
@@ -1430,12 +1430,12 @@ Gfx *hudmsgs_render(Gfx *gdl)
|
||||
if (msg->type == HUDMSGTYPE_CUTSCENESUBTITLE) {
|
||||
#if VERSION >= VERSION_NTSC_1_0
|
||||
gDPSetScissor(gdl++, 0,
|
||||
(x - 4) * g_ScaleX, 0,
|
||||
(x + msg->width + 3) * g_ScaleX, vi_get_buf_height());
|
||||
(x - 4) * g_UiScaleX, 0,
|
||||
(x + msg->width + 3) * g_UiScaleX, vi_get_buf_height());
|
||||
#else
|
||||
gDPSetScissor(gdl++, 0,
|
||||
(x - 4) * g_ScaleX, y - 4,
|
||||
(x + msg->width + 3) * g_ScaleX, y + msg->height + 3);
|
||||
(x - 4) * g_UiScaleX, y - 4,
|
||||
(x + msg->width + 3) * g_UiScaleX, y + msg->height + 3);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -1481,15 +1481,10 @@ Gfx *hudmsgs_render(Gfx *gdl)
|
||||
gdl = hudmsg_render_box(gdl, x - 3, y - 3, x + msg->width + 2, y + msg->height + 2, 1.0f, bordercolour, spc0);
|
||||
#endif
|
||||
|
||||
gdl = text_render_projected(gdl, &x, &y, msg->text, msg->font1, msg->font2, textcolour, vi_get_width(), vi_get_height(), 0, 0);
|
||||
gdl = text_render_v2(gdl, &x, &y, msg->text, msg->font1, msg->font2, textcolour, vi_get_width(), vi_get_height(), 0, 0);
|
||||
} else {
|
||||
gdl = text0f153a34(gdl, x, y, x + msg->width, y + msg->height, 0);
|
||||
|
||||
#if VERSION >= VERSION_JPN_FINAL
|
||||
gdl = func0f1574d0jf(gdl, &x, &y, msg->text, msg->font1, msg->font2, textcolour, glowcolour, vi_get_width(), vi_get_height(), 0, 0);
|
||||
#else
|
||||
gdl = text_render(gdl, &x, &y, msg->text, msg->font1, msg->font2, textcolour, glowcolour, vi_get_width(), vi_get_height(), 0, 0);
|
||||
#endif
|
||||
gdl = text_draw_box(gdl, x, y, x + msg->width, y + msg->height, 0);
|
||||
gdl = text_render_vx(gdl, &x, &y, msg->text, msg->font1, msg->font2, textcolour, glowcolour, vi_get_width(), vi_get_height(), 0, 0);
|
||||
}
|
||||
|
||||
if (msg->alignv == 6) {
|
||||
@@ -1514,15 +1509,10 @@ Gfx *hudmsgs_render(Gfx *gdl)
|
||||
gdl = hudmsg_render_box(gdl, x - 3, y - 3, x + msg->width + 2, y + msg->height + 2, 1.0f, bordercolour, 1.0f);
|
||||
#endif
|
||||
|
||||
gdl = text_render_projected(gdl, &x, &y, msg->text, msg->font1, msg->font2, textcolour, vi_get_width(), vi_get_height(), 0, 0);
|
||||
gdl = text_render_v2(gdl, &x, &y, msg->text, msg->font1, msg->font2, textcolour, vi_get_width(), vi_get_height(), 0, 0);
|
||||
} else {
|
||||
gdl = text0f153a34(gdl, x, y, x + msg->width, y + msg->height, 0);
|
||||
|
||||
#if VERSION >= VERSION_JPN_FINAL
|
||||
gdl = func0f1574d0jf(gdl, &x, &y, msg->text, msg->font1, msg->font2, textcolour, glowcolour, vi_get_width(), vi_get_height(), 0, 0);
|
||||
#else
|
||||
gdl = text_render(gdl, &x, &y, msg->text, msg->font1, msg->font2, textcolour, glowcolour, vi_get_width(), vi_get_height(), 0, 0);
|
||||
#endif
|
||||
gdl = text_draw_box(gdl, x, y, x + msg->width, y + msg->height, 0);
|
||||
gdl = text_render_vx(gdl, &x, &y, msg->text, msg->font1, msg->font2, textcolour, glowcolour, vi_get_width(), vi_get_height(), 0, 0);
|
||||
}
|
||||
if (msg->alignv == 6) {
|
||||
timerthing = 0;
|
||||
@@ -1563,15 +1553,10 @@ Gfx *hudmsgs_render(Gfx *gdl)
|
||||
gdl = hudmsg_render_box(gdl, x - 3, y - 3, x + msg->width + 2, y + msg->height + 2, 1.0f, bordercolour, 1.0f - spa8);
|
||||
#endif
|
||||
|
||||
gdl = text_render_projected(gdl, &x, &y, msg->text, msg->font1, msg->font2, textcolour, vi_get_width(), vi_get_height(), 0, 0);
|
||||
gdl = text_render_v2(gdl, &x, &y, msg->text, msg->font1, msg->font2, textcolour, vi_get_width(), vi_get_height(), 0, 0);
|
||||
} else {
|
||||
gdl = text0f153a34(gdl, x, y, x + msg->width, y + msg->height, 0);
|
||||
|
||||
#if VERSION >= VERSION_JPN_FINAL
|
||||
gdl = func0f1574d0jf(gdl, &x, &y, msg->text, msg->font1, msg->font2, textcolour, glowcolour, vi_get_width(), vi_get_height(), 0, 0);
|
||||
#else
|
||||
gdl = text_render(gdl, &x, &y, msg->text, msg->font1, msg->font2, textcolour, glowcolour, vi_get_width(), vi_get_height(), 0, 0);
|
||||
#endif
|
||||
gdl = text_draw_box(gdl, x, y, x + msg->width, y + msg->height, 0);
|
||||
gdl = text_render_vx(gdl, &x, &y, msg->text, msg->font1, msg->font2, textcolour, glowcolour, vi_get_width(), vi_get_height(), 0, 0);
|
||||
}
|
||||
|
||||
if (msg->alignv == 6) {
|
||||
@@ -1607,9 +1592,9 @@ Gfx *hudmsgs_render(Gfx *gdl)
|
||||
gdl = countdown_timer_render(gdl);
|
||||
}
|
||||
|
||||
gdl = text0f153780(gdl);
|
||||
gdl = text_end(gdl);
|
||||
|
||||
g_ScaleX = 1;
|
||||
g_UiScaleX = 1;
|
||||
|
||||
return gdl;
|
||||
}
|
||||
|
||||
+13
-13
@@ -561,7 +561,7 @@ Gfx *lv_render_fade(Gfx *gdl)
|
||||
vi_get_view_left() + vi_get_view_width() + 1,
|
||||
vi_get_view_top() + vi_get_view_height() - inset + 2);
|
||||
|
||||
return text0f153838(gdl);
|
||||
return text_end_boxmode(gdl);
|
||||
}
|
||||
|
||||
bool lv_is_fade_active(void)
|
||||
@@ -702,24 +702,24 @@ Gfx *lv_render_man_pos_if_enabled(Gfx *gdl)
|
||||
y = vi_get_view_top() + 17;
|
||||
y2 = y + 10;
|
||||
|
||||
gdl = text0f153628(gdl);
|
||||
gdl = text0f153a34(gdl, 0, y - 1, vi_get_width(), y2 + 1, 0x00000064);
|
||||
gdl = text_begin(gdl);
|
||||
gdl = text_draw_box(gdl, 0, y - 1, vi_get_width(), y2 + 1, 0x00000064);
|
||||
|
||||
gdl = text_render_projected(gdl, &x, &y, bufroom, g_CharsHandelGothicSm, g_FontHandelGothicSm, 0xffffffff, vi_get_width(), vi_get_height(), 0, 0);
|
||||
gdl = text_render_v2(gdl, &x, &y, bufroom, g_CharsHandelGothicSm, g_FontHandelGothicSm, 0xffffffff, vi_get_width(), vi_get_height(), 0, 0);
|
||||
|
||||
x = vi_get_view_left() + 87;
|
||||
gdl = text_render_projected(gdl, &x, &y, bufx, g_CharsHandelGothicSm, g_FontHandelGothicSm, 0xffffffff, vi_get_width(), vi_get_height(), 0, 0);
|
||||
gdl = text_render_v2(gdl, &x, &y, bufx, g_CharsHandelGothicSm, g_FontHandelGothicSm, 0xffffffff, vi_get_width(), vi_get_height(), 0, 0);
|
||||
|
||||
x = vi_get_view_left() + 141;
|
||||
gdl = text_render_projected(gdl, &x, &y, bufy, g_CharsHandelGothicSm, g_FontHandelGothicSm, 0xffffffff, vi_get_width(), vi_get_height(), 0, 0);
|
||||
gdl = text_render_v2(gdl, &x, &y, bufy, g_CharsHandelGothicSm, g_FontHandelGothicSm, 0xffffffff, vi_get_width(), vi_get_height(), 0, 0);
|
||||
|
||||
x = vi_get_view_left() + 195;
|
||||
gdl = text_render_projected(gdl, &x, &y, bufz, g_CharsHandelGothicSm, g_FontHandelGothicSm, 0xffffffff, vi_get_width(), vi_get_height(), 0, 0);
|
||||
gdl = text_render_v2(gdl, &x, &y, bufz, g_CharsHandelGothicSm, g_FontHandelGothicSm, 0xffffffff, vi_get_width(), vi_get_height(), 0, 0);
|
||||
|
||||
x = vi_get_view_left() + 249;
|
||||
gdl = text_render_projected(gdl, &x, &y, bufdir, g_CharsHandelGothicSm, g_FontHandelGothicSm, 0xffffffff, vi_get_width(), vi_get_height(), 0, 0);
|
||||
gdl = text_render_v2(gdl, &x, &y, bufdir, g_CharsHandelGothicSm, g_FontHandelGothicSm, 0xffffffff, vi_get_width(), vi_get_height(), 0, 0);
|
||||
|
||||
gdl = text0f153780(gdl);
|
||||
gdl = text_end(gdl);
|
||||
}
|
||||
|
||||
return gdl;
|
||||
@@ -1375,7 +1375,7 @@ Gfx *lv_render(Gfx *gdl)
|
||||
vi_get_view_left() + vi_get_view_width(),
|
||||
vi_get_view_top() + vi_get_view_height());
|
||||
|
||||
gdl = text0f153838(gdl);
|
||||
gdl = text_end_boxmode(gdl);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -1582,12 +1582,12 @@ Gfx *lv_render(Gfx *gdl)
|
||||
}
|
||||
|
||||
if (alpha) {
|
||||
gdl = text0f153628(gdl);
|
||||
gdl = text0f153a34(gdl,
|
||||
gdl = text_begin(gdl);
|
||||
gdl = text_draw_box(gdl,
|
||||
vi_get_view_left(), vi_get_view_top(),
|
||||
vi_get_view_left() + vi_get_view_width(),
|
||||
vi_get_view_top() + vi_get_view_height(), 0xffffff00 | alpha);
|
||||
gdl = text0f153780(gdl);
|
||||
gdl = text_end(gdl);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+13
-13
@@ -1993,9 +1993,9 @@ MenuItemHandlerResult menuhandler_mission_list(s32 operation, struct menuitem *i
|
||||
#endif
|
||||
|
||||
gSPTextureRectangle(gdl++,
|
||||
((renderdata->x + 4) << 2) * g_ScaleX, (renderdata->y + 3) << 2,
|
||||
((renderdata->x + 60) << 2) * g_ScaleX, (renderdata->y + 39) << 2,
|
||||
G_TX_RENDERTILE, 0, 0x0480, 1024 / g_ScaleX, -1024);
|
||||
((renderdata->x + 4) << 2) * g_UiScaleX, (renderdata->y + 3) << 2,
|
||||
((renderdata->x + 60) << 2) * g_UiScaleX, (renderdata->y + 39) << 2,
|
||||
G_TX_RENDERTILE, 0, 0x0480, 1024 / g_UiScaleX, -1024);
|
||||
|
||||
if (g_MissionConfig.isanti) {
|
||||
// No stars
|
||||
@@ -2027,9 +2027,9 @@ MenuItemHandlerResult menuhandler_mission_list(s32 operation, struct menuitem *i
|
||||
}
|
||||
|
||||
gSPTextureRectangle(gdl++,
|
||||
((renderdata->x + relx) << 2) * g_ScaleX, (renderdata->y + 25) << 2,
|
||||
((renderdata->x + relx + 14) << 2) * g_ScaleX, (renderdata->y + 39) << 2,
|
||||
G_TX_RENDERTILE, 0x0010, 0x01c0, 1024 / g_ScaleX, -1024);
|
||||
((renderdata->x + relx) << 2) * g_UiScaleX, (renderdata->y + 25) << 2,
|
||||
((renderdata->x + relx + 14) << 2) * g_UiScaleX, (renderdata->y + 39) << 2,
|
||||
G_TX_RENDERTILE, 0x0010, 0x01c0, 1024 / g_UiScaleX, -1024);
|
||||
}
|
||||
} else {
|
||||
tex_select(&gdl, &g_TexGeneralConfigs[34], 2, 0, 2, true, NULL);
|
||||
@@ -2066,31 +2066,31 @@ MenuItemHandlerResult menuhandler_mission_list(s32 operation, struct menuitem *i
|
||||
}
|
||||
|
||||
gSPTextureRectangle(gdl++,
|
||||
((renderdata->x + relx) << 2) * g_ScaleX, (renderdata->y + 25) << 2,
|
||||
((renderdata->x + relx + 14) << 2) * g_ScaleX, (renderdata->y + 39) << 2,
|
||||
G_TX_RENDERTILE, 0x0010, 0x01c0, 1024 / g_ScaleX, -1024);
|
||||
((renderdata->x + relx) << 2) * g_UiScaleX, (renderdata->y + 25) << 2,
|
||||
((renderdata->x + relx + 14) << 2) * g_UiScaleX, (renderdata->y + 39) << 2,
|
||||
G_TX_RENDERTILE, 0x0010, 0x01c0, 1024 / g_UiScaleX, -1024);
|
||||
}
|
||||
}
|
||||
|
||||
x = renderdata->x + 62;
|
||||
y = renderdata->y + 3;
|
||||
|
||||
gdl = text0f153628(gdl);
|
||||
gdl = text_begin(gdl);
|
||||
|
||||
// Draw first part of name
|
||||
strcpy(text, lang_get(g_SoloStages[stageindex].name1));
|
||||
strcat(text, "\n");
|
||||
|
||||
gdl = text_render_projected(gdl, &x, &y, text, g_CharsHandelGothicMd, g_FontHandelGothicMd,
|
||||
gdl = text_render_v2(gdl, &x, &y, text, g_CharsHandelGothicMd, g_FontHandelGothicMd,
|
||||
renderdata->colour, vi_get_width(), vi_get_height(), 0, 0);
|
||||
|
||||
// Draw last part of name
|
||||
strcpy(text, lang_get(g_SoloStages[stageindex].name2));
|
||||
|
||||
gdl = text_render_projected(gdl, &x, &y, text, g_CharsHandelGothicSm, g_FontHandelGothicSm,
|
||||
gdl = text_render_v2(gdl, &x, &y, text, g_CharsHandelGothicSm, g_FontHandelGothicSm,
|
||||
renderdata->colour, vi_get_width(), vi_get_height(), 0, 0);
|
||||
|
||||
gdl = text0f153780(gdl);
|
||||
gdl = text_end(gdl);
|
||||
|
||||
return (s32) gdl;
|
||||
case MENUOP_GETOPTIONHEIGHT:
|
||||
|
||||
+82
-82
@@ -335,45 +335,45 @@ Gfx *menu_render_banner(Gfx *gdl, s32 x1, s32 y1, s32 x2, s32 y2, bool big, s32
|
||||
bannerbottom = y + textheight + waitheight + 7;
|
||||
|
||||
// Black fill
|
||||
gdl = text_set_prim_colour(gdl, 0x0000007f);
|
||||
gdl = text_begin_boxmode(gdl, 0x0000007f);
|
||||
gDPFillRectangleScaled(gdl++, x1, y1, x2, y2);
|
||||
gdl = text0f153838(gdl);
|
||||
gdl = text_end_boxmode(gdl);
|
||||
|
||||
// Dark blue fill
|
||||
gdl = text_set_prim_colour(gdl, 0x00007f7f);
|
||||
gdl = text_begin_boxmode(gdl, 0x00007f7f);
|
||||
gDPFillRectangleScaled(gdl++, x1, bannertop, x2, bannerbottom);
|
||||
gdl = text0f153838(gdl);
|
||||
gdl = text_end_boxmode(gdl);
|
||||
|
||||
// Top and bottom borders (light blue)
|
||||
gdl = text_set_prim_colour(gdl, 0x7f7fff7f);
|
||||
gdl = text_begin_boxmode(gdl, 0x7f7fff7f);
|
||||
gDPFillRectangleScaled(gdl++, x1, bannerbottom + 2, x2, bannerbottom + 4);
|
||||
gDPFillRectangleScaled(gdl++, x1, bannertop - 4, x2, bannertop - 2);
|
||||
gdl = text0f153838(gdl);
|
||||
gdl = text_end_boxmode(gdl);
|
||||
|
||||
gdl = text0f153628(gdl);
|
||||
gdl = text_begin(gdl);
|
||||
|
||||
// Render the selected message's shadow
|
||||
x = midx - textwidth / 2 + 2;
|
||||
y += 2;
|
||||
gdl = text_render_projected(gdl, &x, &y, lang_get(msgs[msgnum]),
|
||||
gdl = text_render_v2(gdl, &x, &y, lang_get(msgs[msgnum]),
|
||||
chars, font, 0x000000ff, vi_get_width(), vi_get_width(), 0, 0);
|
||||
|
||||
// Render "Please Wait..." shadow
|
||||
x = midx - waitwidth / 2 + 2;
|
||||
y += 3;
|
||||
gdl = text_render_projected(gdl, &x, &y, lang_get(L_MPMENU_495),
|
||||
gdl = text_render_v2(gdl, &x, &y, lang_get(L_MPMENU_495),
|
||||
chars, font, 0x000000ff, vi_get_width(), vi_get_width(), 0, 0);
|
||||
|
||||
// Render the selected message proper
|
||||
x = midx - textwidth / 2;
|
||||
y = texttop;
|
||||
gdl = text_render_projected(gdl, &x, &y, lang_get(msgs[msgnum]),
|
||||
gdl = text_render_v2(gdl, &x, &y, lang_get(msgs[msgnum]),
|
||||
chars, font, 0xbfbfffff, vi_get_width(), vi_get_width(), 0, 0);
|
||||
|
||||
// Render "Please Wait..." proper
|
||||
x = midx - waitwidth / 2;
|
||||
y += 3;
|
||||
gdl = text_render_projected(gdl, &x, &y, lang_get(L_MPMENU_495),
|
||||
gdl = text_render_v2(gdl, &x, &y, lang_get(L_MPMENU_495),
|
||||
chars, font, 0xbfbfffff, vi_get_width(), vi_get_width(), 0, 0);
|
||||
|
||||
#if VERSION >= VERSION_NTSC_1_0 && VERSION < VERSION_JPN_FINAL
|
||||
@@ -381,12 +381,12 @@ Gfx *menu_render_banner(Gfx *gdl, s32 x1, s32 y1, s32 x2, s32 y2, bool big, s32
|
||||
// Render "TM"
|
||||
y = texttop - 1;
|
||||
x = textwidth / 2 + midx - 7;
|
||||
gdl = text_render_projected(gdl, &x, &y, "TM",
|
||||
gdl = text_render_v2(gdl, &x, &y, "TM",
|
||||
g_CharsHandelGothicXs, g_FontHandelGothicXs, 0xbfbfffff, vi_get_width(), vi_get_width(), 0, 0);
|
||||
}
|
||||
#endif
|
||||
|
||||
gdl = text0f153780(gdl);
|
||||
gdl = text_end(gdl);
|
||||
|
||||
return gdl;
|
||||
}
|
||||
@@ -2078,11 +2078,11 @@ Gfx *menu_render_model(Gfx *gdl, struct menumodel *menumodel, s32 modeltype)
|
||||
|
||||
if (modeltype == MENUMODELTYPE_HUDPIECE) {
|
||||
if (IS8MB()) {
|
||||
screenpos[0] = menumodel->curposx * g_ScaleX;
|
||||
screenpos[0] = menumodel->curposx * g_UiScaleX;
|
||||
screenpos[1] = menumodel->curposy;
|
||||
}
|
||||
} else {
|
||||
screenpos[0] = posx * g_ScaleX + vi_get_view_left() + vi_get_view_width() * 0.5f;
|
||||
screenpos[0] = posx * g_UiScaleX + vi_get_view_left() + vi_get_view_width() * 0.5f;
|
||||
screenpos[1] = posy + vi_get_view_top() + vi_get_view_height() * 0.5f;
|
||||
}
|
||||
|
||||
@@ -2192,8 +2192,8 @@ Gfx *menu_render_model(Gfx *gdl, struct menumodel *menumodel, s32 modeltype)
|
||||
|
||||
gdl = func0f0d49c8(gdl);
|
||||
|
||||
vi_set_view_position(g_MenuScissorX1 * g_ScaleX, g_MenuScissorY1);
|
||||
vi_set_fov_aspect_and_size(g_Vars.currentplayer->fovy, aspect, (g_MenuScissorX2 - g_MenuScissorX1) * g_ScaleX, g_MenuScissorY2 - g_MenuScissorY1);
|
||||
vi_set_view_position(g_MenuScissorX1 * g_UiScaleX, g_MenuScissorY1);
|
||||
vi_set_fov_aspect_and_size(g_Vars.currentplayer->fovy, aspect, (g_MenuScissorX2 - g_MenuScissorX1) * g_UiScaleX, g_MenuScissorY2 - g_MenuScissorY1);
|
||||
|
||||
gdl = vi0000af00(gdl, var800a2048[g_MpPlayerNum]);
|
||||
gdl = vi0000aca4(gdl, znear, zfar);
|
||||
@@ -2304,7 +2304,7 @@ Gfx *menu_render_model(Gfx *gdl, struct menumodel *menumodel, s32 modeltype)
|
||||
|
||||
cam0f0b4d04(&pos, screenpos);
|
||||
|
||||
g_MenuProjectFromX = ((s32)screenpos[0] - vi_get_width() / 2) / g_ScaleX;
|
||||
g_MenuProjectFromX = ((s32)screenpos[0] - vi_get_width() / 2) / g_UiScaleX;
|
||||
g_MenuProjectFromY = (s32)screenpos[1] - vi_get_height() / 2;
|
||||
}
|
||||
}
|
||||
@@ -2383,8 +2383,8 @@ Gfx *menu_apply_scissor(Gfx *gdl)
|
||||
gDPPipeSync(gdl++);
|
||||
|
||||
#if VERSION >= VERSION_NTSC_1_0
|
||||
g_ScissorX1 = g_MenuScissorX1 * g_ScaleX;
|
||||
g_ScissorX2 = g_MenuScissorX2 * g_ScaleX;
|
||||
g_ScissorX1 = g_MenuScissorX1 * g_UiScaleX;
|
||||
g_ScissorX2 = g_MenuScissorX2 * g_UiScaleX;
|
||||
g_ScissorY1 = g_MenuScissorY1;
|
||||
g_ScissorY2 = g_MenuScissorY2;
|
||||
|
||||
@@ -2431,8 +2431,8 @@ Gfx *menu_apply_scissor(Gfx *gdl)
|
||||
gDPSetScissor(gdl++, G_SC_NON_INTERLACE, g_ScissorX1, g_ScissorY1, g_ScissorX2, g_ScissorY2);
|
||||
#else
|
||||
gDPSetScissor(gdl++, G_SC_NON_INTERLACE,
|
||||
g_MenuScissorX1 * g_ScaleX, g_MenuScissorY1,
|
||||
g_MenuScissorX2 * g_ScaleX, g_MenuScissorY2);
|
||||
g_MenuScissorX1 * g_UiScaleX, g_MenuScissorY1,
|
||||
g_MenuScissorX2 * g_UiScaleX, g_MenuScissorY2);
|
||||
#endif
|
||||
|
||||
return gdl;
|
||||
@@ -2487,9 +2487,9 @@ Gfx *dialog_render(Gfx *gdl, struct menudialog *dialog, struct menu *menu, bool
|
||||
|
||||
colour1 = MIXCOLOUR(dialog, item_focused_outer);
|
||||
|
||||
text0f156030(colour1);
|
||||
text_set_shadow_colour(colour1);
|
||||
|
||||
var8007fb9c = false;
|
||||
g_TextHoloRayEnabled = false;
|
||||
|
||||
if (g_Menus[g_MpPlayerNum].curdialog == dialog
|
||||
&& (dialog->definition->flags & MENUDIALOGFLAG_0002)
|
||||
@@ -2558,14 +2558,14 @@ Gfx *dialog_render(Gfx *gdl, struct menudialog *dialog, struct menu *menu, bool
|
||||
// Each surface is rendered a second time with the colours swapped.
|
||||
// The order is top, right, bottom, left.
|
||||
if (g_MenuData.root != MENUROOT_MPSETUP && (g_MenuData.root != MENUROOT_MPPAUSE || g_Vars.normmplayerisrunning)) {
|
||||
var800a4634 = menugfx_draw_plane(var800a4634, bgx1, bgy1, bgx2, bgy1, colour4, colour5, MENUPLANE_00);
|
||||
var800a4634 = menugfx_draw_plane(var800a4634, bgx2, bgy1, bgx2, bgy2, colour5, colour4, MENUPLANE_00);
|
||||
var800a4634 = menugfx_draw_plane(var800a4634, bgx2, bgy2, bgx1, bgy2, colour4, colour5, MENUPLANE_00);
|
||||
var800a4634 = menugfx_draw_plane(var800a4634, bgx1, bgy2, bgx1, bgy1, colour5, colour4, MENUPLANE_00);
|
||||
var800a4634 = menugfx_draw_plane(var800a4634, bgx1, bgy1, bgx2, bgy1, colour5, colour4, MENUPLANE_01);
|
||||
var800a4634 = menugfx_draw_plane(var800a4634, bgx2, bgy1, bgx2, bgy2, colour4, colour5, MENUPLANE_01);
|
||||
var800a4634 = menugfx_draw_plane(var800a4634, bgx2, bgy2, bgx1, bgy2, colour5, colour4, MENUPLANE_01);
|
||||
var800a4634 = menugfx_draw_plane(var800a4634, bgx1, bgy2, bgx1, bgy1, colour4, colour5, MENUPLANE_01);
|
||||
g_TextHoloRayGdl = menugfx_draw_plane(g_TextHoloRayGdl, bgx1, bgy1, bgx2, bgy1, colour4, colour5, MENUPLANE_00);
|
||||
g_TextHoloRayGdl = menugfx_draw_plane(g_TextHoloRayGdl, bgx2, bgy1, bgx2, bgy2, colour5, colour4, MENUPLANE_00);
|
||||
g_TextHoloRayGdl = menugfx_draw_plane(g_TextHoloRayGdl, bgx2, bgy2, bgx1, bgy2, colour4, colour5, MENUPLANE_00);
|
||||
g_TextHoloRayGdl = menugfx_draw_plane(g_TextHoloRayGdl, bgx1, bgy2, bgx1, bgy1, colour5, colour4, MENUPLANE_00);
|
||||
g_TextHoloRayGdl = menugfx_draw_plane(g_TextHoloRayGdl, bgx1, bgy1, bgx2, bgy1, colour5, colour4, MENUPLANE_01);
|
||||
g_TextHoloRayGdl = menugfx_draw_plane(g_TextHoloRayGdl, bgx2, bgy1, bgx2, bgy2, colour4, colour5, MENUPLANE_01);
|
||||
g_TextHoloRayGdl = menugfx_draw_plane(g_TextHoloRayGdl, bgx2, bgy2, bgx1, bgy2, colour5, colour4, MENUPLANE_01);
|
||||
g_TextHoloRayGdl = menugfx_draw_plane(g_TextHoloRayGdl, bgx1, bgy2, bgx1, bgy1, colour4, colour5, MENUPLANE_01);
|
||||
}
|
||||
|
||||
// Render the title bar
|
||||
@@ -2583,7 +2583,7 @@ Gfx *dialog_render(Gfx *gdl, struct menudialog *dialog, struct menu *menu, bool
|
||||
x = dialogleft + 2;
|
||||
y = dialogtop + 2;
|
||||
|
||||
gdl = text0f153628(gdl);
|
||||
gdl = text_begin(gdl);
|
||||
|
||||
context.unk18 = false;
|
||||
|
||||
@@ -2607,13 +2607,13 @@ Gfx *dialog_render(Gfx *gdl, struct menudialog *dialog, struct menu *menu, bool
|
||||
x = dialogleft + 3;
|
||||
y = dialogtop + 3;
|
||||
|
||||
gdl = text_render_projected(gdl, &x, &y, title, g_CharsHandelGothicSm, g_FontHandelGothicSm, colour1 & 0xff, dialogwidth, vi_get_height(), 0, 0);
|
||||
gdl = text_render_v2(gdl, &x, &y, title, g_CharsHandelGothicSm, g_FontHandelGothicSm, colour1 & 0xff, dialogwidth, vi_get_height(), 0, 0);
|
||||
|
||||
// Title proper
|
||||
x = dialogleft + 2;
|
||||
y = dialogtop + 2;
|
||||
|
||||
gdl = text_render_projected(gdl, &x, &y, title, g_CharsHandelGothicSm, g_FontHandelGothicSm, colour1, dialogwidth, vi_get_height(), 0, 0);
|
||||
gdl = text_render_v2(gdl, &x, &y, title, g_CharsHandelGothicSm, g_FontHandelGothicSm, colour1, dialogwidth, vi_get_height(), 0, 0);
|
||||
|
||||
// In MP dialogs, render the player number in the top right
|
||||
if (g_MenuData.root == MENUROOT_MPSETUP
|
||||
@@ -2623,11 +2623,11 @@ Gfx *dialog_render(Gfx *gdl, struct menudialog *dialog, struct menu *menu, bool
|
||||
x = dialogright - 9;
|
||||
y = dialogtop + 2;
|
||||
|
||||
gdl = text_render_projected(gdl, &x, &y, sp154[g_MpPlayerNum], g_CharsHandelGothicSm, g_FontHandelGothicSm, colour1, dialogwidth, vi_get_height(), 0, 0);
|
||||
gdl = text_render_v2(gdl, &x, &y, sp154[g_MpPlayerNum], g_CharsHandelGothicSm, g_FontHandelGothicSm, colour1, dialogwidth, vi_get_height(), 0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
gdl = text0f153780(gdl);
|
||||
gdl = text_end(gdl);
|
||||
}
|
||||
|
||||
// Configure things for the redraw effect
|
||||
@@ -2639,7 +2639,7 @@ Gfx *dialog_render(Gfx *gdl, struct menudialog *dialog, struct menu *menu, bool
|
||||
text_set_diagonal_blend(dialog->x, dialog->y, dialog->redrawtimer, DIAGMODE_FADEIN);
|
||||
}
|
||||
|
||||
var8007fb9c = true;
|
||||
g_TextHoloRayEnabled = true;
|
||||
}
|
||||
} else if (dialog->state == MENUDIALOGSTATE_POPULATED) {
|
||||
text_set_menu_blend(dialog->statefrac);
|
||||
@@ -2679,9 +2679,9 @@ Gfx *dialog_render(Gfx *gdl, struct menudialog *dialog, struct menu *menu, bool
|
||||
|
||||
{
|
||||
struct menulayer *layer;
|
||||
s32 viewleft = vi_get_view_left() / g_ScaleX;
|
||||
s32 viewleft = vi_get_view_left() / g_UiScaleX;
|
||||
s32 viewtop = vi_get_view_top();
|
||||
s32 viewright = (vi_get_view_left() + vi_get_view_width()) / g_ScaleX;
|
||||
s32 viewright = (vi_get_view_left() + vi_get_view_width()) / g_UiScaleX;
|
||||
s32 viewbottom = vi_get_view_top() + vi_get_view_height();
|
||||
|
||||
g_MenuScissorX1 = dialogleft + 2;
|
||||
@@ -2844,9 +2844,9 @@ Gfx *dialog_render(Gfx *gdl, struct menudialog *dialog, struct menu *menu, bool
|
||||
colour2 = MIXCOLOUR(dialog, item_focused_outer);
|
||||
colour = colour_blend(colour2, colour2 & 0xffffff00, 127);
|
||||
|
||||
gdl = text_set_prim_colour(gdl, colour);
|
||||
gdl = text_begin_boxmode(gdl, colour);
|
||||
gDPFillRectangleScaled(gdl++, x1, y1, x2, y2);
|
||||
gdl = text0f153838(gdl);
|
||||
gdl = text_end_boxmode(gdl);
|
||||
}
|
||||
|
||||
if (focused) {
|
||||
@@ -2859,10 +2859,10 @@ Gfx *dialog_render(Gfx *gdl, struct menudialog *dialog, struct menu *menu, bool
|
||||
#if VERSION >= VERSION_NTSC_1_0
|
||||
if (!(dialog->transitionfrac >= 0.0f && dialog->type2 == 0)
|
||||
&& !(dialog->transitionfrac < 0.0f && dialog->type == 0)) {
|
||||
text0f156024(1);
|
||||
text_set_shadow_enabled(true);
|
||||
}
|
||||
#else
|
||||
text0f156024(1);
|
||||
text_set_shadow_enabled(true);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -2907,7 +2907,7 @@ Gfx *dialog_render(Gfx *gdl, struct menudialog *dialog, struct menu *menu, bool
|
||||
}
|
||||
|
||||
if (focused) {
|
||||
text0f156024(0);
|
||||
text_set_shadow_enabled(false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2919,7 +2919,7 @@ Gfx *dialog_render(Gfx *gdl, struct menudialog *dialog, struct menu *menu, bool
|
||||
|
||||
// Render overlays, such as dropdown menus
|
||||
if (!lightweight) {
|
||||
gdl = text_set_prim_colour(gdl, 0x00000000);
|
||||
gdl = text_begin_boxmode(gdl, 0x00000000);
|
||||
|
||||
curx = dialogleft;
|
||||
|
||||
@@ -2951,7 +2951,7 @@ Gfx *dialog_render(Gfx *gdl, struct menudialog *dialog, struct menu *menu, bool
|
||||
curx += menu->cols[colindex].width;
|
||||
}
|
||||
|
||||
gdl = text0f153838(gdl);
|
||||
gdl = text_end_boxmode(gdl);
|
||||
}
|
||||
|
||||
gDPSetScissor(gdl++, G_SC_NON_INTERLACE, vi_get_view_left(), vi_get_view_top(),
|
||||
@@ -2991,7 +2991,7 @@ Gfx *dialog_render(Gfx *gdl, struct menudialog *dialog, struct menu *menu, bool
|
||||
text_reset_blends();
|
||||
text_set_rotation90(true);
|
||||
|
||||
gdl = text0f153628(gdl);
|
||||
gdl = text_begin(gdl);
|
||||
|
||||
// Left/previous title
|
||||
previndex = layer->cursibling - 1;
|
||||
@@ -3012,7 +3012,7 @@ Gfx *dialog_render(Gfx *gdl, struct menudialog *dialog, struct menu *menu, bool
|
||||
x -= 3;
|
||||
}
|
||||
|
||||
gdl = text_render_projected(gdl, &y, &x, title, g_CharsHandelGothicXs, g_FontHandelGothicXs, 0xffffffff, dialogwidth, vi_get_height(), 0, 0);
|
||||
gdl = text_render_v2(gdl, &y, &x, title, g_CharsHandelGothicXs, g_FontHandelGothicXs, 0xffffffff, dialogwidth, vi_get_height(), 0, 0);
|
||||
|
||||
// Right/next title
|
||||
nextindex = layer->cursibling + 1;
|
||||
@@ -3037,8 +3037,8 @@ Gfx *dialog_render(Gfx *gdl, struct menudialog *dialog, struct menu *menu, bool
|
||||
x += 3;
|
||||
}
|
||||
|
||||
gdl = text_render_projected(gdl, &y, &x, title, g_CharsHandelGothicXs, g_FontHandelGothicXs, -1, dialogwidth, vi_get_height(), 0, 0);
|
||||
gdl = text0f153780(gdl);
|
||||
gdl = text_render_v2(gdl, &y, &x, title, g_CharsHandelGothicXs, g_FontHandelGothicXs, -1, dialogwidth, vi_get_height(), 0, 0);
|
||||
gdl = text_end(gdl);
|
||||
|
||||
text_set_rotation90(false);
|
||||
}
|
||||
@@ -3165,9 +3165,9 @@ void menu_find_available_size(s32 *leftptr, s32 *topptr, s32 *rightptr, s32 *bot
|
||||
void menu_find_available_size(s32 *leftptr, s32 *topptr, s32 *rightptr, s32 *bottomptr)
|
||||
#endif
|
||||
{
|
||||
s32 left = vi_get_view_left() / g_ScaleX + 20;
|
||||
s32 left = vi_get_view_left() / g_UiScaleX + 20;
|
||||
s32 top = vi_get_view_top() + 4;
|
||||
s32 right = (vi_get_view_left() + vi_get_view_width()) / g_ScaleX - 20;
|
||||
s32 right = (vi_get_view_left() + vi_get_view_width()) / g_UiScaleX - 20;
|
||||
s32 bottom = vi_get_view_top() + vi_get_view_height() - 4;
|
||||
s32 playernum;
|
||||
u32 stack1;
|
||||
@@ -3288,9 +3288,9 @@ void menu_find_available_size(s32 *leftptr, s32 *topptr, s32 *rightptr, s32 *bot
|
||||
case MENUROOT_MPENDSCREEN:
|
||||
case MENUROOT_PICKTARGET:
|
||||
case MENUROOT_4MBFILEMGR:
|
||||
*leftptr = g_Vars.players[g_Menus[g_MpPlayerNum].playernum]->viewleft / g_ScaleX;
|
||||
*leftptr = g_Vars.players[g_Menus[g_MpPlayerNum].playernum]->viewleft / g_UiScaleX;
|
||||
*topptr = g_Vars.players[g_Menus[g_MpPlayerNum].playernum]->viewtop;
|
||||
*rightptr = (g_Vars.players[g_Menus[g_MpPlayerNum].playernum]->viewleft + g_Vars.players[g_Menus[g_MpPlayerNum].playernum]->viewwidth) / g_ScaleX;
|
||||
*rightptr = (g_Vars.players[g_Menus[g_MpPlayerNum].playernum]->viewleft + g_Vars.players[g_Menus[g_MpPlayerNum].playernum]->viewwidth) / g_UiScaleX;
|
||||
*bottomptr = g_Vars.players[g_Menus[g_MpPlayerNum].playernum]->viewtop + g_Vars.players[g_Menus[g_MpPlayerNum].playernum]->viewheight;
|
||||
|
||||
if (PLAYERCOUNT() > 2) {
|
||||
@@ -3364,7 +3364,7 @@ void dialog_calculate_position(struct menudialog *dialog)
|
||||
}
|
||||
|
||||
if (hdir > 0) {
|
||||
dialog->dstx = (vi_get_view_left() + vi_get_view_width()) / g_ScaleX + 4;
|
||||
dialog->dstx = (vi_get_view_left() + vi_get_view_width()) / g_UiScaleX + 4;
|
||||
}
|
||||
|
||||
if (vdir < 0) {
|
||||
@@ -3602,7 +3602,7 @@ Gfx *menu_render_dialogs(Gfx *gdl)
|
||||
if (g_MenuData.root == MENUROOT_MPPAUSE
|
||||
|| g_MenuData.root == MENUROOT_PICKTARGET
|
||||
|| g_MenuData.root == MENUROOT_MPENDSCREEN) {
|
||||
g_MenuProjectFromX = g_Menus[g_MpPlayerNum].curdialog->x + g_Menus[g_MpPlayerNum].curdialog->width / 2 - vi_get_width() / (g_ScaleX * 2);
|
||||
g_MenuProjectFromX = g_Menus[g_MpPlayerNum].curdialog->x + g_Menus[g_MpPlayerNum].curdialog->width / 2 - vi_get_width() / (g_UiScaleX * 2);
|
||||
g_MenuProjectFromY = g_Menus[g_MpPlayerNum].curdialog->y + g_Menus[g_MpPlayerNum].curdialog->height / 2 - vi_get_height() / 2;
|
||||
|
||||
gdl = menu_render_dialog(gdl, g_Menus[g_MpPlayerNum].curdialog, &g_Menus[g_MpPlayerNum], 0);
|
||||
@@ -3670,9 +3670,9 @@ Gfx *menu_render_dialogs(Gfx *gdl)
|
||||
gdl = menu_render_banner(gdl, xmin, ymin, xmax, ymax, false, g_Menus[g_MpPlayerNum].bannernum);
|
||||
#endif
|
||||
} else {
|
||||
s32 xmin = vi_get_view_left() / g_ScaleX;
|
||||
s32 xmin = vi_get_view_left() / g_UiScaleX;
|
||||
s32 ymin = vi_get_view_top();
|
||||
s32 xmax = (vi_get_view_left() + vi_get_view_width()) / g_ScaleX;
|
||||
s32 xmax = (vi_get_view_left() + vi_get_view_width()) / g_UiScaleX;
|
||||
s32 ymax = vi_get_view_top() + vi_get_view_height();
|
||||
|
||||
#if VERSION >= VERSION_NTSC_1_0
|
||||
@@ -5059,18 +5059,18 @@ Gfx *menu_render_background_layer1(Gfx *gdl, u8 bg, f32 frac)
|
||||
{
|
||||
u32 colour = 255 * frac;
|
||||
gSPDisplayList(gdl++, var800613a0);
|
||||
gdl = text_set_prim_colour(gdl, colour);
|
||||
gdl = text_begin_boxmode(gdl, colour);
|
||||
gDPFillRectangle(gdl++, 0, 0, vi_get_width(), vi_get_height());
|
||||
gdl = text0f153838(gdl);
|
||||
gdl = text_end_boxmode(gdl);
|
||||
}
|
||||
break;
|
||||
case MENUBG_SUCCESS:
|
||||
{
|
||||
// Fill with black
|
||||
gSPDisplayList(gdl++, var800613a0);
|
||||
gdl = text_set_prim_colour(gdl, 0x000000ff);
|
||||
gdl = text_begin_boxmode(gdl, 0x000000ff);
|
||||
gDPFillRectangle(gdl++, 0, 0, vi_get_width(), vi_get_height());
|
||||
gdl = text0f153838(gdl);
|
||||
gdl = text_end_boxmode(gdl);
|
||||
|
||||
// Render the success BG
|
||||
gdl = menugfx_render_bg_success(gdl);
|
||||
@@ -5081,9 +5081,9 @@ Gfx *menu_render_background_layer1(Gfx *gdl, u8 bg, f32 frac)
|
||||
|
||||
if (alpha) {
|
||||
gSPDisplayList(gdl++, var800613a0);
|
||||
gdl = text_set_prim_colour(gdl, alpha);
|
||||
gdl = text_begin_boxmode(gdl, alpha);
|
||||
gDPFillRectangle(gdl++, 0, 0, vi_get_width(), vi_get_height());
|
||||
gdl = text0f153838(gdl);
|
||||
gdl = text_end_boxmode(gdl);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5094,9 +5094,9 @@ Gfx *menu_render_background_layer1(Gfx *gdl, u8 bg, f32 frac)
|
||||
u32 stack;
|
||||
u32 channel = (1.0f - frac) * 255;
|
||||
gSPDisplayList(gdl++, var800613a0);
|
||||
gdl = text_set_prim_colour(gdl, channel << 24 | channel << 16 | channel << 8 | 0xff);
|
||||
gdl = text_begin_boxmode(gdl, channel << 24 | channel << 16 | channel << 8 | 0xff);
|
||||
gDPFillRectangle(gdl++, 0, 0, vi_get_width(), vi_get_height());
|
||||
gdl = text0f153838(gdl);
|
||||
gdl = text_end_boxmode(gdl);
|
||||
|
||||
// Render the failure BG
|
||||
gdl = menugfx_render_bg_failure(gdl);
|
||||
@@ -5120,9 +5120,9 @@ Gfx *menu_render_background_layer1(Gfx *gdl, u8 bg, f32 frac)
|
||||
|
||||
gSPDisplayList(gdl++, var800613a0);
|
||||
alpha = (1.0f - frac) * 255;
|
||||
gdl = text_set_prim_colour(gdl, 0xff000000 | alpha);
|
||||
gdl = text_begin_boxmode(gdl, 0xff000000 | alpha);
|
||||
gDPFillRectangle(gdl++, 0, 0, vi_get_width(), vi_get_height());
|
||||
gdl = text0f153838(gdl);
|
||||
gdl = text_end_boxmode(gdl);
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -5162,9 +5162,9 @@ Gfx *menu_render(Gfx *gdl)
|
||||
g_MpPlayerNum = 0;
|
||||
|
||||
#if PAL
|
||||
g_ScaleX = 1;
|
||||
g_UiScaleX = 1;
|
||||
#else
|
||||
g_ScaleX = g_ViRes == VIRES_HI ? 2 : 1;
|
||||
g_UiScaleX = g_ViRes == VIRES_HI ? 2 : 1;
|
||||
#endif
|
||||
|
||||
gdl = func0f0d479c(gdl);
|
||||
@@ -5286,7 +5286,7 @@ Gfx *menu_render(Gfx *gdl)
|
||||
|
||||
if (g_MenuData.count > 0) {
|
||||
// Render dialogs
|
||||
gdl = text0f153ab0(gdl);
|
||||
gdl = text_enable_holo_ray(gdl);
|
||||
|
||||
if (g_MenuData.root == MENUROOT_MPPAUSE || g_MenuData.root == MENUROOT_MPENDSCREEN) {
|
||||
g_MpPlayerNum = g_Vars.currentplayerstats->mpindex;
|
||||
@@ -5305,15 +5305,15 @@ Gfx *menu_render(Gfx *gdl)
|
||||
gSPMatrix(gdl++, osVirtualToPhysical(cam_get_perspective_mtxl()), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
|
||||
gSPDisplayList(gdl++, var800613a0);
|
||||
|
||||
text0f153b40();
|
||||
text_disable_holo_ray();
|
||||
|
||||
// Render corner texts in combat simulator
|
||||
if (g_MenuData.root == MENUROOT_MPSETUP || g_MenuData.root == MENUROOT_4MBMAINMENU) {
|
||||
s32 i;
|
||||
s32 j;
|
||||
s32 viewleft = vi_get_view_left() / g_ScaleX + 20;
|
||||
s32 viewleft = vi_get_view_left() / g_UiScaleX + 20;
|
||||
s32 viewtop = vi_get_view_top() + 4;
|
||||
s32 viewright = (vi_get_view_left() + vi_get_view_width()) / g_ScaleX - 20;
|
||||
s32 viewright = (vi_get_view_left() + vi_get_view_width()) / g_UiScaleX - 20;
|
||||
s32 viewbottom = vi_get_view_top() + vi_get_view_height() - 4;
|
||||
s32 textheight;
|
||||
s32 textwidth;
|
||||
@@ -5325,7 +5325,7 @@ Gfx *menu_render(Gfx *gdl)
|
||||
s32 y;
|
||||
s32 colour;
|
||||
|
||||
gdl = text0f153628(gdl);
|
||||
gdl = text_begin(gdl);
|
||||
|
||||
for (i = 0; i < MAX_PLAYERS; i++) {
|
||||
// Figure out what text will be displayed. The text calculated
|
||||
@@ -5413,7 +5413,7 @@ Gfx *menu_render(Gfx *gdl)
|
||||
x = viewleft + 2;
|
||||
}
|
||||
|
||||
gdl = text_render_projected(gdl, &x, &y, text, g_CharsHandelGothicSm, g_FontHandelGothicSm, g_MenuData.playerjoinalpha[i] | 0x5070ff00, vi_get_width(), vi_get_height(), 0, 0);
|
||||
gdl = text_render_v2(gdl, &x, &y, text, g_CharsHandelGothicSm, g_FontHandelGothicSm, g_MenuData.playerjoinalpha[i] | 0x5070ff00, vi_get_width(), vi_get_height(), 0, 0);
|
||||
|
||||
if (g_Vars.mpsetupmenu == MPSETUPMENU_GENERAL && g_Vars.waitingtojoin[i]) {
|
||||
// "Ready!"
|
||||
@@ -5431,12 +5431,12 @@ Gfx *menu_render(Gfx *gdl)
|
||||
colour = colour_blend(0x00ffff00, 0xffffff00, weight) | g_MenuData.playerjoinalpha[i];
|
||||
}
|
||||
|
||||
gdl = text_render_projected(gdl, &x, &y, text, g_CharsHandelGothicSm, g_FontHandelGothicSm, colour, vi_get_width(), vi_get_height(), 0, 0);
|
||||
gdl = text_render_v2(gdl, &x, &y, text, g_CharsHandelGothicSm, g_FontHandelGothicSm, colour, vi_get_width(), vi_get_height(), 0, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
gdl = text0f153780(gdl);
|
||||
gdl = text_end(gdl);
|
||||
}
|
||||
|
||||
gSPSetGeometryMode(gdl++, G_ZBUFFER);
|
||||
@@ -5445,9 +5445,9 @@ Gfx *menu_render(Gfx *gdl)
|
||||
// Render banner messages, such as "Please Wait...",
|
||||
// "Checking Controller Pak" and some unused game boy camera texts.
|
||||
if (g_MenuData.bannernum != -1) {
|
||||
s32 x1 = vi_get_view_left() / g_ScaleX;
|
||||
s32 x1 = vi_get_view_left() / g_UiScaleX;
|
||||
s32 y1 = vi_get_view_top();
|
||||
s32 x2 = (vi_get_view_left() + vi_get_view_width()) / g_ScaleX;
|
||||
s32 x2 = (vi_get_view_left() + vi_get_view_width()) / g_UiScaleX;
|
||||
s32 y2 = vi_get_view_top() + vi_get_view_height();
|
||||
|
||||
#if VERSION >= VERSION_NTSC_1_0
|
||||
@@ -5494,7 +5494,7 @@ Gfx *menu_render(Gfx *gdl)
|
||||
|
||||
gdl = func0f0d49c8(gdl);
|
||||
|
||||
g_ScaleX = 1;
|
||||
g_UiScaleX = 1;
|
||||
|
||||
return gdl;
|
||||
}
|
||||
|
||||
+15
-15
@@ -63,9 +63,9 @@ void menugfx_create_blur(void)
|
||||
static u32 cccc = 1;
|
||||
|
||||
#if PAL
|
||||
g_ScaleX = 1;
|
||||
g_UiScaleX = 1;
|
||||
#else
|
||||
g_ScaleX = (g_ViRes == VIRES_HI) ? 2 : 1;
|
||||
g_UiScaleX = (g_ViRes == VIRES_HI) ? 2 : 1;
|
||||
#endif
|
||||
|
||||
if (cccc == 1) {
|
||||
@@ -82,7 +82,7 @@ void menugfx_create_blur(void)
|
||||
#if PAL
|
||||
s32 samplestartindex = (((s32) ((f32) dstx * 2 * 4 * 2 * scale) + (s32) (dsty * fbwidthinbytes * 8)) & 0xfffffffe);
|
||||
#else
|
||||
s32 samplestartindex = PXTOBYTES(dstx * SAMPLE_WIDTH) * g_ScaleX + dsty * fbwidthinbytes * SAMPLE_HEIGHT;
|
||||
s32 samplestartindex = PXTOBYTES(dstx * SAMPLE_WIDTH) * g_UiScaleX + dsty * fbwidthinbytes * SAMPLE_HEIGHT;
|
||||
#endif
|
||||
|
||||
r = g = b = 0;
|
||||
@@ -92,7 +92,7 @@ void menugfx_create_blur(void)
|
||||
#if PAL
|
||||
s32 index = (samplestartindex + (s32) (PXTOBYTES((f32) srcx) * scale) + srcy * fbwidthinbytes) & 0xfffffffe;
|
||||
#else
|
||||
s32 index = samplestartindex + PXTOBYTES(srcx) * g_ScaleX + srcy * fbwidthinbytes;
|
||||
s32 index = samplestartindex + PXTOBYTES(srcx) * g_UiScaleX + srcy * fbwidthinbytes;
|
||||
#endif
|
||||
|
||||
colour = fb[index] << 8 | fb[index + 1];
|
||||
@@ -112,7 +112,7 @@ void menugfx_create_blur(void)
|
||||
}
|
||||
}
|
||||
|
||||
g_ScaleX = 1;
|
||||
g_UiScaleX = 1;
|
||||
}
|
||||
|
||||
Gfx *menugfx_render_bg_blur(Gfx *gdl, u32 colour, s16 arg2, s16 arg3)
|
||||
@@ -245,11 +245,11 @@ Gfx *menugfx_render_dialog_background(Gfx *gdl, s32 x1, s32 y1, s32 x2, s32 y2,
|
||||
u32 rightcolour;
|
||||
|
||||
// Render the dialog's background fill
|
||||
gdl = text_set_prim_colour(gdl, colour1);
|
||||
gdl = text_begin_boxmode(gdl, colour1);
|
||||
|
||||
gDPFillRectangleScaled(gdl++, x1, y1, x2, y2);
|
||||
|
||||
gdl = text0f153838(gdl);
|
||||
gdl = text_end_boxmode(gdl);
|
||||
|
||||
if (dialog->transitionfrac < 0.0f) {
|
||||
leftcolour = g_MenuColours[dialog->type].dialog_border1;
|
||||
@@ -443,8 +443,8 @@ Gfx *menugfx_draw_dropdown_background(Gfx *gdl, s32 x1, s32 y1, s32 x2, s32 y2)
|
||||
vertices[4].colour = 8;
|
||||
vertices[5].colour = 8;
|
||||
|
||||
colour1 = text0f1543ac((x1 + x2) / 2, (y2 + y1) / 2, 0xffffffff) & 0xff;
|
||||
colour2 = (text0f1543ac((x1 + x2) / 2, (y2 + y1) / 2, 0xffffff7f) & 0xff) | 0x00006f00;
|
||||
colour1 = text_get_colour_at_pos((x1 + x2) / 2, (y2 + y1) / 2, 0xffffffff) & 0xff;
|
||||
colour2 = (text_get_colour_at_pos((x1 + x2) / 2, (y2 + y1) / 2, 0xffffff7f) & 0xff) | 0x00006f00;
|
||||
|
||||
colours[0].word = colour1 | 0x00006f00;
|
||||
colours[1].word = colour2;
|
||||
@@ -522,8 +522,8 @@ Gfx *menugfx_draw_list_group_header(Gfx *gdl, s32 x1, s32 y1, s32 x2, s32 y2, s3
|
||||
alpha1 = alpha;
|
||||
alpha2 = alpha;
|
||||
#else
|
||||
alpha1 = text0f1543ac((x1 + x2) / 2, (y1 + y2) / 2, 0xffffffff) & 0xff;
|
||||
alpha2 = text0f1543ac((x1 + x2) / 2, (y1 + y2) / 2, 0xffffff7f) & 0xff;
|
||||
alpha1 = text_get_colour_at_pos((x1 + x2) / 2, (y1 + y2) / 2, 0xffffffff) & 0xff;
|
||||
alpha2 = text_get_colour_at_pos((x1 + x2) / 2, (y1 + y2) / 2, 0xffffff7f) & 0xff;
|
||||
#endif
|
||||
|
||||
colours[0].word = 0x00006f00 | alpha1;
|
||||
@@ -1368,19 +1368,19 @@ Gfx *menugfx_draw_dialog_chevron(Gfx *gdl, s32 x, s32 y, s32 size, s32 direction
|
||||
Gfx *menugfx_draw_checkbox(Gfx *gdl, s32 x, s32 y, s32 size, bool fill, u32 bordercolour, u32 fillcolour)
|
||||
{
|
||||
if (fill) {
|
||||
gdl = text_set_prim_colour(gdl, fillcolour);
|
||||
gdl = text_begin_boxmode(gdl, fillcolour);
|
||||
gDPFillRectangleScaled(gdl++, x, y, x + size, y + size);
|
||||
gdl = text0f153838(gdl);
|
||||
gdl = text_end_boxmode(gdl);
|
||||
}
|
||||
|
||||
gdl = text_set_prim_colour(gdl, bordercolour);
|
||||
gdl = text_begin_boxmode(gdl, bordercolour);
|
||||
|
||||
gDPFillRectangleScaled(gdl++, x, y, x + size + 1, y + 1);
|
||||
gDPFillRectangleScaled(gdl++, x, y + size, x + size + 1, y + size + 1);
|
||||
gDPFillRectangleScaled(gdl++, x, y + 1, x + 1, y + size);
|
||||
gDPFillRectangleScaled(gdl++, x + size, y + 1, x + size + 1, y + size);
|
||||
|
||||
gdl = text0f153838(gdl);
|
||||
gdl = text_end_boxmode(gdl);
|
||||
|
||||
return gdl;
|
||||
}
|
||||
|
||||
+125
-125
@@ -168,13 +168,13 @@ Gfx *menuitem_list_render_header(Gfx *gdl, s16 x1, s16 y1, s16 width, s16 arg4,
|
||||
colour = (colour_blend(colour, 0, 0x2c) & 0xffffff00) | (colour & 0xff);
|
||||
}
|
||||
|
||||
gdl = text0f153780(gdl);
|
||||
gdl = text_end(gdl);
|
||||
#if VERSION >= VERSION_NTSC_1_0
|
||||
gdl = menugfx_draw_list_group_header(gdl, x1, y1, x1 + width, y1 + height, x1 + arg4, colour & 0xff);
|
||||
#else
|
||||
gdl = menugfx_draw_list_group_header(gdl, x1, y1, x1 + width, y1 + height, x1 + arg4);
|
||||
#endif
|
||||
gdl = text0f153628(gdl);
|
||||
gdl = text_begin(gdl);
|
||||
|
||||
x = x1 + 3;
|
||||
y = y1 + 2;
|
||||
@@ -187,7 +187,7 @@ Gfx *menuitem_list_render_header(Gfx *gdl, s16 x1, s16 y1, s16 width, s16 arg4,
|
||||
|
||||
text_set_wave_colours(g_MenuWave2Colours[dialog->type].listgroup_headerfg, g_MenuWave1Colours[dialog->type].listgroup_headerfg);
|
||||
|
||||
gdl = text_render_projected(gdl, &x, &y, text, g_CharsHandelGothicSm, g_FontHandelGothicSm, colour, width, height, 0, 0);
|
||||
gdl = text_render_v2(gdl, &x, &y, text, g_CharsHandelGothicSm, g_FontHandelGothicSm, colour, width, height, 0, 0);
|
||||
|
||||
return gdl;
|
||||
}
|
||||
@@ -245,8 +245,8 @@ Gfx *menuitem_list_render(Gfx *gdl, struct menurendercontext *context)
|
||||
}
|
||||
|
||||
#if VERSION >= VERSION_NTSC_1_0
|
||||
g_ScissorX1 = context->x * g_ScaleX;
|
||||
g_ScissorX2 = (context->x + width) * g_ScaleX;
|
||||
g_ScissorX1 = context->x * g_UiScaleX;
|
||||
g_ScissorX2 = (context->x + width) * g_UiScaleX;
|
||||
g_ScissorY1 = context->y;
|
||||
g_ScissorY2 = context->y + context->height;
|
||||
|
||||
@@ -293,8 +293,8 @@ Gfx *menuitem_list_render(Gfx *gdl, struct menurendercontext *context)
|
||||
gDPSetScissor(gdl++, G_SC_NON_INTERLACE, g_ScissorX1, g_ScissorY1, g_ScissorX2, g_ScissorY2);
|
||||
#else
|
||||
gDPSetScissor(gdl++, G_SC_NON_INTERLACE,
|
||||
context->x * g_ScaleX, context->y,
|
||||
(context->x + width) * g_ScaleX, context->y + context->height);
|
||||
context->x * g_UiScaleX, context->y,
|
||||
(context->x + width) * g_UiScaleX, context->y + context->height);
|
||||
#endif
|
||||
|
||||
halfheight = context->height / 2;
|
||||
@@ -333,7 +333,7 @@ Gfx *menuitem_list_render(Gfx *gdl, struct menurendercontext *context)
|
||||
firstonscreenoptionindex = menuitem0f0e5d2c(itemdata->curoffsety - halfheight, context->item);
|
||||
y = context->y + tmp;
|
||||
|
||||
gdl = text0f153628(gdl);
|
||||
gdl = text_begin(gdl);
|
||||
|
||||
optionindex = firstonscreenoptionindex;
|
||||
|
||||
@@ -464,11 +464,11 @@ Gfx *menuitem_list_render(Gfx *gdl, struct menurendercontext *context)
|
||||
// If not transitioning the dialog type
|
||||
if ((!(context->dialog->transitionfrac >= 0.0f) || context->dialog->type2 != 0)
|
||||
&& (!(context->dialog->transitionfrac < 0.0f) || context->dialog->type != 0)) {
|
||||
text0f156024(1);
|
||||
text_set_shadow_enabled(true);
|
||||
spb4 = true;
|
||||
}
|
||||
#else
|
||||
text0f156024(1);
|
||||
text_set_shadow_enabled(true);
|
||||
spb4 = true;
|
||||
#endif
|
||||
}
|
||||
@@ -513,19 +513,19 @@ Gfx *menuitem_list_render(Gfx *gdl, struct menurendercontext *context)
|
||||
}
|
||||
|
||||
// This logic doesn't look right...
|
||||
if (sp94left / g_ScaleX > vi_get_width()) {
|
||||
sp94left = vi_get_width() / g_ScaleX;
|
||||
if (sp94left / g_UiScaleX > vi_get_width()) {
|
||||
sp94left = vi_get_width() / g_UiScaleX;
|
||||
}
|
||||
|
||||
if (sp8cright / g_ScaleX > vi_get_width()) {
|
||||
sp8cright = vi_get_width() / g_ScaleX;
|
||||
if (sp8cright / g_UiScaleX > vi_get_width()) {
|
||||
sp8cright = vi_get_width() / g_UiScaleX;
|
||||
}
|
||||
|
||||
gDPPipeSync(gdl++);
|
||||
|
||||
#if VERSION >= VERSION_NTSC_1_0
|
||||
g_ScissorX1 = sp94left * g_ScaleX;
|
||||
g_ScissorX2 = sp8cright * g_ScaleX;
|
||||
g_ScissorX1 = sp94left * g_UiScaleX;
|
||||
g_ScissorX2 = sp8cright * g_UiScaleX;
|
||||
g_ScissorY1 = sp90top;
|
||||
g_ScissorY2 = sp88bottom;
|
||||
|
||||
@@ -571,7 +571,7 @@ Gfx *menuitem_list_render(Gfx *gdl, struct menurendercontext *context)
|
||||
|
||||
gDPSetScissor(gdl++, G_SC_NON_INTERLACE, g_ScissorX1, g_ScissorY1, g_ScissorX2, g_ScissorY2);
|
||||
#else
|
||||
gDPSetScissor(gdl++, G_SC_NON_INTERLACE, sp94left * g_ScaleX, sp90top, sp8cright * g_ScaleX, sp88bottom);
|
||||
gDPSetScissor(gdl++, G_SC_NON_INTERLACE, sp94left * g_UiScaleX, sp90top, sp8cright * g_UiScaleX, sp88bottom);
|
||||
#endif
|
||||
|
||||
spb8.type19.gdl = gdl;
|
||||
@@ -606,7 +606,7 @@ Gfx *menuitem_list_render(Gfx *gdl, struct menurendercontext *context)
|
||||
height = 0;
|
||||
}
|
||||
|
||||
gdl = text_render_projected(gdl, &x, &y, text2, chars, font, colour, context->width - left + context->x, height, sp128, 0);
|
||||
gdl = text_render_v2(gdl, &x, &y, text2, chars, font, colour, context->width - left + context->x, height, sp128, 0);
|
||||
|
||||
// Consider a checkbox
|
||||
spb8.list.value = optionindex;
|
||||
@@ -620,7 +620,7 @@ Gfx *menuitem_list_render(Gfx *gdl, struct menurendercontext *context)
|
||||
}
|
||||
|
||||
if (spb4) {
|
||||
text0f156024(0);
|
||||
text_set_shadow_enabled(false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -650,10 +650,10 @@ Gfx *menuitem_list_render(Gfx *gdl, struct menurendercontext *context)
|
||||
y = context->y + context->height / 2;
|
||||
|
||||
// "< Empty >"
|
||||
gdl = text_render_projected(gdl, &x, &y, lang_get(L_OPTIONS_313), chars, font, colour, context->width - left + context->x, vi_get_height(), sp128, 0);
|
||||
gdl = text_render_v2(gdl, &x, &y, lang_get(L_OPTIONS_313), chars, font, colour, context->width - left + context->x, vi_get_height(), sp128, 0);
|
||||
}
|
||||
|
||||
gdl = text0f153780(gdl);
|
||||
gdl = text_end(gdl);
|
||||
|
||||
return gdl;
|
||||
}
|
||||
@@ -883,11 +883,11 @@ Gfx *menuitem_dropdown_render(Gfx *gdl, struct menurendercontext *context)
|
||||
text_set_wave_colours(g_MenuWave2Colours[context->dialog->type].item_disabled, g_MenuWave1Colours[context->dialog->type].item_disabled);
|
||||
}
|
||||
|
||||
gdl = text0f153628(gdl);
|
||||
gdl = text_begin(gdl);
|
||||
|
||||
x = context->x + 10;
|
||||
y = context->y + 2;
|
||||
gdl = text_render_projected(gdl, &x, &y, text, g_CharsHandelGothicSm, g_FontHandelGothicSm, colour, context->width, context->height, 0, 0);
|
||||
gdl = text_render_v2(gdl, &x, &y, text, g_CharsHandelGothicSm, g_FontHandelGothicSm, colour, context->width, context->height, 0, 0);
|
||||
|
||||
if (context->dialog->unk6e) {
|
||||
x = context->x + 80;
|
||||
@@ -914,10 +914,10 @@ Gfx *menuitem_dropdown_render(Gfx *gdl, struct menurendercontext *context)
|
||||
text_measure(&textheight, &textwidth, text, g_CharsHandelGothicSm, g_FontHandelGothicSm, 0);
|
||||
|
||||
x = context->x + context->width - textwidth - 10;
|
||||
gdl = text_render_projected(gdl, &x, &y, text, g_CharsHandelGothicSm, g_FontHandelGothicSm, colour, context->width, context->height, 0, 0);
|
||||
gdl = text_render_v2(gdl, &x, &y, text, g_CharsHandelGothicSm, g_FontHandelGothicSm, colour, context->width, context->height, 0, 0);
|
||||
}
|
||||
|
||||
gdl = text0f153780(gdl);
|
||||
gdl = text_end(gdl);
|
||||
|
||||
return gdl;
|
||||
}
|
||||
@@ -1113,7 +1113,7 @@ Gfx *menuitem_keyboard_render(Gfx *gdl, struct menurendercontext *context)
|
||||
g_MenuWave1Colours[context->dialog->type].item_unfocused);
|
||||
|
||||
// Draw input field background
|
||||
gdl = text_set_prim_colour(gdl, 0x0000ff7f);
|
||||
gdl = text_begin_boxmode(gdl, 0x0000ff7f);
|
||||
|
||||
if (context->item->param3 == 0) {
|
||||
// Half width
|
||||
@@ -1128,14 +1128,14 @@ Gfx *menuitem_keyboard_render(Gfx *gdl, struct menurendercontext *context)
|
||||
}
|
||||
|
||||
// Render text value
|
||||
gdl = text0f153838(gdl);
|
||||
gdl = text_end_boxmode(gdl);
|
||||
|
||||
x = context->x + 4;
|
||||
y = context->y + 2;
|
||||
|
||||
gdl = text0f153628(gdl);
|
||||
gdl = text_render_projected(gdl, &x, &y, data->string, g_CharsHandelGothicSm, g_FontHandelGothicSm, 0xffffffff, context->width, context->height, 0, 0);
|
||||
gdl = text0f153780(gdl);
|
||||
gdl = text_begin(gdl);
|
||||
gdl = text_render_v2(gdl, &x, &y, data->string, g_CharsHandelGothicSm, g_FontHandelGothicSm, 0xffffffff, context->width, context->height, 0, 0);
|
||||
gdl = text_end(gdl);
|
||||
|
||||
// Render cursor
|
||||
alpha = menu_get_sin_osc_frac(40) * 255;
|
||||
@@ -1151,11 +1151,11 @@ Gfx *menuitem_keyboard_render(Gfx *gdl, struct menurendercontext *context)
|
||||
|
||||
cursorcolour = colour_blend(colour_blend(0x0000ffff, 0x000000ff, 127), cursorcolour, alpha);
|
||||
|
||||
gdl = text_set_prim_colour(gdl, cursorcolour);
|
||||
gdl = text_begin_boxmode(gdl, cursorcolour);
|
||||
|
||||
gDPFillRectangleScaled(gdl++, x + 1, context->y + 2, x + 3, context->y + 9);
|
||||
|
||||
gdl = text0f153838(gdl);
|
||||
gdl = text_end_boxmode(gdl);
|
||||
|
||||
// Render horizontal grid lines
|
||||
for (row = 0; row < 6; row++) {
|
||||
@@ -1175,7 +1175,7 @@ Gfx *menuitem_keyboard_render(Gfx *gdl, struct menurendercontext *context)
|
||||
context->x + col * 12 + 5, context->y + rowspan * 11 + 14, 0x00ffff7f, 0x00ffff7f);
|
||||
}
|
||||
|
||||
gdl = text0f153628(gdl);
|
||||
gdl = text_begin(gdl);
|
||||
|
||||
x = context->x + 10;
|
||||
y = context->y + 2;
|
||||
@@ -1276,7 +1276,7 @@ Gfx *menuitem_keyboard_render(Gfx *gdl, struct menurendercontext *context)
|
||||
g_MenuWave1Colours[context->dialog->type].item_disabled);
|
||||
}
|
||||
|
||||
gdl = text_render_projected(gdl, &x, &y, lang_get(labels[index]), g_CharsHandelGothicXs, g_FontHandelGothicXs, textcolour, context->width, context->height, 0, 0);
|
||||
gdl = text_render_v2(gdl, &x, &y, lang_get(labels[index]), g_CharsHandelGothicXs, g_FontHandelGothicXs, textcolour, context->width, context->height, 0, 0);
|
||||
|
||||
if (index == 3 && menuitem_keyboard_is_string_empty_or_spaces(data->string)) {
|
||||
text_set_wave_colours(
|
||||
@@ -1295,12 +1295,12 @@ Gfx *menuitem_keyboard_render(Gfx *gdl, struct menurendercontext *context)
|
||||
|
||||
text_measure(&textheight, &textwidth, label, g_CharsHandelGothicSm, g_FontHandelGothicSm, 0);
|
||||
x = (12 - textwidth) / 2 + x;
|
||||
gdl = text_render_projected(gdl, &x, &y, label, g_CharsHandelGothicSm, g_FontHandelGothicSm, textcolour, context->width, context->height, 0, 0);
|
||||
gdl = text_render_v2(gdl, &x, &y, label, g_CharsHandelGothicSm, g_FontHandelGothicSm, textcolour, context->width, context->height, 0, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
gdl = text0f153780(gdl);
|
||||
gdl = text_end(gdl);
|
||||
|
||||
// Highlight border of focused button
|
||||
{
|
||||
@@ -1651,20 +1651,20 @@ Gfx *menuitem_objectives_render_one(Gfx *gdl, struct menudialog *dialog, s32 ind
|
||||
buffer[0] = '\0';
|
||||
|
||||
// Render objective number
|
||||
gdl = text0f153628(gdl);
|
||||
gdl = text_begin(gdl);
|
||||
sprintf(buffer, "%d: ", position);
|
||||
text_measure(&textheight, &textwidth, buffer, g_CharsHandelGothicSm, g_FontHandelGothicSm, 0);
|
||||
x = objx - textwidth + 25;
|
||||
gdl = text_render_projected(gdl, &x, &y, buffer, g_CharsHandelGothicSm, g_FontHandelGothicSm, sp12c, width, height, 0, 0);
|
||||
gdl = text_render_v2(gdl, &x, &y, buffer, g_CharsHandelGothicSm, g_FontHandelGothicSm, sp12c, width, height, 0, 0);
|
||||
|
||||
x = objx + 25;
|
||||
|
||||
if (narrow) {
|
||||
text_wrap(85, sp120, buffer, g_CharsHandelGothicXs, g_FontHandelGothicXs);
|
||||
gdl = text_render_projected(gdl, &x, &y, buffer, g_CharsHandelGothicXs, g_FontHandelGothicXs, sp12c, width, height, 0, 0);
|
||||
gdl = text_render_v2(gdl, &x, &y, buffer, g_CharsHandelGothicXs, g_FontHandelGothicXs, sp12c, width, height, 0, 0);
|
||||
} else {
|
||||
sprintf(buffer, "%s", sp120);
|
||||
gdl = text_render_projected(gdl, &x, &y, buffer, g_CharsHandelGothicSm, g_FontHandelGothicSm, sp12c, width, height, 0, 0);
|
||||
gdl = text_render_v2(gdl, &x, &y, buffer, g_CharsHandelGothicSm, g_FontHandelGothicSm, sp12c, width, height, 0, 0);
|
||||
}
|
||||
|
||||
if (withstatus) {
|
||||
@@ -1701,19 +1701,19 @@ Gfx *menuitem_objectives_render_one(Gfx *gdl, struct menudialog *dialog, s32 ind
|
||||
y = objy + spbc + 9;
|
||||
#endif
|
||||
|
||||
gdl = text_render_projected(gdl, &x, &y, spcc, g_CharsHandelGothicXs, g_FontHandelGothicXs, spc8, width, height, 0, 0);
|
||||
gdl = text_render_v2(gdl, &x, &y, spcc, g_CharsHandelGothicXs, g_FontHandelGothicXs, spc8, width, height, 0, 0);
|
||||
|
||||
#if VERSION != VERSION_JPN_FINAL
|
||||
x = objx + width - textwidth - 10;
|
||||
y = objy + spbc + 9;
|
||||
|
||||
gdl = text_render_projected(gdl, &x, &y, spcc, g_CharsHandelGothicXs, g_FontHandelGothicXs, spc8 & 0xffffff7f, width, height, 0, 0);
|
||||
gdl = text_render_v2(gdl, &x, &y, spcc, g_CharsHandelGothicXs, g_FontHandelGothicXs, spc8 & 0xffffff7f, width, height, 0, 0);
|
||||
#endif
|
||||
|
||||
x = objx + width - textwidth - 13;
|
||||
y = objy + 9;
|
||||
|
||||
gdl = text0f153780(gdl);
|
||||
gdl = text_end(gdl);
|
||||
|
||||
spb4 = objx + 22;
|
||||
spb0 = objy - 2;
|
||||
@@ -1766,7 +1766,7 @@ Gfx *menuitem_objectives_render_one(Gfx *gdl, struct menudialog *dialog, s32 ind
|
||||
sp6c = objx + textwidth + 25;
|
||||
sp58 = (objx * 3 + objx + 66) / 4 - 1;
|
||||
|
||||
gdl = text0f153780(gdl);
|
||||
gdl = text_end(gdl);
|
||||
gdl = menugfx0f0e2498(gdl);
|
||||
|
||||
gdl = menugfx_draw_projected_line(gdl, objx, sp7c, sp80, sp7c + 1, sp12c & 0xffffff00, (sp12c & 0xffffff00) | 0x3f);
|
||||
@@ -1867,7 +1867,7 @@ Gfx *menuitem_label_render(Gfx *gdl, struct menurendercontext *context)
|
||||
s32 x;
|
||||
s32 y;
|
||||
struct menudfc *menudfc;
|
||||
u8 savedvalue = var8007fb9c;
|
||||
u8 savedvalue = g_TextHoloRayEnabled;
|
||||
struct fontchar *font1 = g_CharsHandelGothicSm;
|
||||
struct font *font2 = g_FontHandelGothicSm;
|
||||
|
||||
@@ -1964,7 +1964,7 @@ Gfx *menuitem_label_render(Gfx *gdl, struct menurendercontext *context)
|
||||
|
||||
text_backup_diagonal_blend_settings();
|
||||
text_set_diagonal_blend(x, y, menudfc->unk04 * 300, 0);
|
||||
var8007fb9c = true;
|
||||
g_TextHoloRayEnabled = true;
|
||||
}
|
||||
|
||||
colour2 = colour1;
|
||||
@@ -1985,8 +1985,8 @@ Gfx *menuitem_label_render(Gfx *gdl, struct menurendercontext *context)
|
||||
colour1 = data.label.colour1;
|
||||
}
|
||||
|
||||
gdl = text0f153628(gdl);
|
||||
gdl = text_render_projected(gdl, &x, &y, text,
|
||||
gdl = text_begin(gdl);
|
||||
gdl = text_render_v2(gdl, &x, &y, text,
|
||||
font1, font2, colour1, context->width, context->height, 0, 0);
|
||||
|
||||
if ((context->item->flags & MENUITEMFLAG_LABEL_HASRIGHTTEXT) == 0) {
|
||||
@@ -2013,19 +2013,19 @@ Gfx *menuitem_label_render(Gfx *gdl, struct menurendercontext *context)
|
||||
x += 6;
|
||||
}
|
||||
|
||||
gdl = text_render_projected(gdl, &x, &y, text,
|
||||
gdl = text_render_v2(gdl, &x, &y, text,
|
||||
font1, font2, colour2, context->width, context->height, 0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
gdl = text0f153780(gdl);
|
||||
gdl = text_end(gdl);
|
||||
|
||||
if (menudfc) {
|
||||
if (context->width + 200 < menudfc->unk04 * 300 && context->dialog->redrawtimer < 0) {
|
||||
func0f0f13ec(context->item);
|
||||
}
|
||||
|
||||
var8007fb9c = savedvalue;
|
||||
g_TextHoloRayEnabled = savedvalue;
|
||||
|
||||
text_restore_diagonal_blend_settings();
|
||||
}
|
||||
@@ -2087,23 +2087,23 @@ Gfx *menuitem_meter_render(Gfx *gdl, struct menurendercontext *context)
|
||||
x2 = x1 + a;
|
||||
x3 = x2 + 6;
|
||||
|
||||
gdl = text_set_prim_colour(gdl, colour1);
|
||||
gdl = text_begin_boxmode(gdl, colour1);
|
||||
gDPFillRectangleScaled(gdl++, x1, context->y, x2, context->y + 5);
|
||||
gdl = text0f153838(gdl);
|
||||
gdl = text_end_boxmode(gdl);
|
||||
|
||||
gdl = text_set_prim_colour(gdl, colour2);
|
||||
gdl = text_begin_boxmode(gdl, colour2);
|
||||
gDPFillRectangleScaled(gdl++, x2, context->y, x3, context->y + 5);
|
||||
gdl = text0f153838(gdl);
|
||||
gdl = text_end_boxmode(gdl);
|
||||
|
||||
text = menu_resolve_param2_text(context->item);
|
||||
|
||||
if (text) {
|
||||
gdl = text0f153628(gdl);
|
||||
gdl = text_begin(gdl);
|
||||
x = context->x;
|
||||
y = context->y - 1;
|
||||
gdl = text_render_projected(gdl, &x, &y, text, g_CharsHandelGothicXs, g_FontHandelGothicXs,
|
||||
gdl = text_render_v2(gdl, &x, &y, text, g_CharsHandelGothicXs, g_FontHandelGothicXs,
|
||||
colour2 & 0xffffff7f, context->width, context->height, 0, 0);
|
||||
gdl = text0f153780(gdl);
|
||||
gdl = text_end(gdl);
|
||||
}
|
||||
|
||||
return gdl;
|
||||
@@ -2206,8 +2206,8 @@ Gfx *menuitem_selectable_render(Gfx *gdl, struct menurendercontext *context)
|
||||
y += 6;
|
||||
}
|
||||
|
||||
gdl = text0f153628(gdl);
|
||||
gdl = text_render_projected(gdl, &x, &y, text, font1, font2,
|
||||
gdl = text_begin(gdl);
|
||||
gdl = text_render_v2(gdl, &x, &y, text, font1, font2,
|
||||
leftcolour, context->width, context->height, 0, 0);
|
||||
|
||||
if ((context->item->flags & (MENUITEMFLAG_LABEL_HASRIGHTTEXT | MENUITEMFLAG_BIGFONT)) == 0) {
|
||||
@@ -2223,12 +2223,12 @@ Gfx *menuitem_selectable_render(Gfx *gdl, struct menurendercontext *context)
|
||||
text_measure(&textheight, &textwidth, text, font1, font2, 0);
|
||||
x = context->x + context->width - textwidth - 10;
|
||||
|
||||
gdl = text_render_projected(gdl, &x, &y, text, font1, font2,
|
||||
gdl = text_render_v2(gdl, &x, &y, text, font1, font2,
|
||||
rightcolour, context->width, context->height, 0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
return text0f153780(gdl);
|
||||
return text_end(gdl);
|
||||
}
|
||||
|
||||
bool menuitem_selectable_tick(struct menuitem *item, struct menuinputs *inputs, u32 tickflags)
|
||||
@@ -2344,8 +2344,8 @@ Gfx *menuitem_slider_render(Gfx *gdl, struct menurendercontext *context)
|
||||
text_set_wave_colours(g_MenuWave2Colours[context->dialog->type].item_unfocused, g_MenuWave1Colours[context->dialog->type].item_unfocused);
|
||||
}
|
||||
|
||||
gdl = text0f153628(gdl);
|
||||
gdl = text_render_projected(gdl, &x, &y, label, g_CharsHandelGothicSm, g_FontHandelGothicSm, colour, context->width, context->height, 0, 0);
|
||||
gdl = text_begin(gdl);
|
||||
gdl = text_render_v2(gdl, &x, &y, label, g_CharsHandelGothicSm, g_FontHandelGothicSm, colour, context->width, context->height, 0, 0);
|
||||
|
||||
if ((context->item->flags & MENUITEMFLAG_SLIDER_HIDEVALUE) == 0) {
|
||||
strcpy(buffer, "");
|
||||
@@ -2372,10 +2372,10 @@ Gfx *menuitem_slider_render(Gfx *gdl, struct menurendercontext *context)
|
||||
text_set_wave_colours(g_MenuWave2Colours[context->dialog->type].item_unfocused, g_MenuWave1Colours[context->dialog->type].item_unfocused);
|
||||
|
||||
colour = (colour & 0xffffff00) | ((colour & 0xff) >> 1);
|
||||
gdl = text_render_projected(gdl, &x, &y, buffer, g_CharsHandelGothicSm, g_FontHandelGothicSm, colour, context->width, context->height, 0, 0);
|
||||
gdl = text_render_v2(gdl, &x, &y, buffer, g_CharsHandelGothicSm, g_FontHandelGothicSm, colour, context->width, context->height, 0, 0);
|
||||
}
|
||||
|
||||
gdl = text0f153780(gdl);
|
||||
gdl = text_end(gdl);
|
||||
|
||||
return gdl;
|
||||
}
|
||||
@@ -2660,7 +2660,7 @@ Gfx *menuitem_checkbox_render(Gfx *gdl, struct menurendercontext *context)
|
||||
g_MenuWave1Colours[context->dialog->type].item_unfocused);
|
||||
}
|
||||
|
||||
gdl = text0f153628(gdl);
|
||||
gdl = text_begin(gdl);
|
||||
|
||||
if (context->focused) {
|
||||
// Mismatch: The addiu and lui at ec8fc and ec900 are swapped. The addiu
|
||||
@@ -2714,10 +2714,10 @@ Gfx *menuitem_checkbox_render(Gfx *gdl, struct menurendercontext *context)
|
||||
|
||||
x = context->x + 10;
|
||||
y = context->y + 2;
|
||||
gdl = text_render_projected(gdl, &x, &y, text, font1, font2,
|
||||
gdl = text_render_v2(gdl, &x, &y, text, font1, font2,
|
||||
maincolour, context->width, context->height, 0, 0);
|
||||
|
||||
return text0f153780(gdl);
|
||||
return text_end(gdl);
|
||||
}
|
||||
|
||||
bool menuitem_checkbox_tick(struct menuitem *item, struct menuinputs *inputs, u32 tickflags)
|
||||
@@ -2864,28 +2864,28 @@ Gfx *menuitem_scrollable_render(Gfx *gdl, struct menurendercontext *context)
|
||||
g_MenuWave2Colours[context->dialog->type].item_unfocused,
|
||||
g_MenuWave1Colours[context->dialog->type].item_unfocused);
|
||||
|
||||
gdl = text0f153628(gdl);
|
||||
gdl = text_begin(gdl);
|
||||
|
||||
// Heading text shadow
|
||||
x = context->x + 3;
|
||||
y = context->y + 3;
|
||||
gdl = text_render_projected(gdl, &x, &y, headingtext, g_CharsHandelGothicSm, g_FontHandelGothicSm,
|
||||
gdl = text_render_v2(gdl, &x, &y, headingtext, g_CharsHandelGothicSm, g_FontHandelGothicSm,
|
||||
0x000000ff, context->width - 4, context->height - 4, -data->scrolloffset, 0);
|
||||
|
||||
// Heading text (red)
|
||||
x = context->x + 2;
|
||||
y = context->y + 2;
|
||||
gdl = text_render_projected(gdl, &x, &y, headingtext, g_CharsHandelGothicSm, g_FontHandelGothicSm,
|
||||
gdl = text_render_v2(gdl, &x, &y, headingtext, g_CharsHandelGothicSm, g_FontHandelGothicSm,
|
||||
0xff4444ff, context->width - 4, context->height - 4, -data->scrolloffset, 0);
|
||||
|
||||
// Body text
|
||||
x = menu_is_scrollable_unscrollable(context->item) ? context->x + 5 : context->x + 12;
|
||||
y = context->y + 2;
|
||||
|
||||
gdl = text_render_projected(gdl, &x, &y, bodytext, g_CharsHandelGothicSm, g_FontHandelGothicSm,
|
||||
gdl = text_render_v2(gdl, &x, &y, bodytext, g_CharsHandelGothicSm, g_FontHandelGothicSm,
|
||||
colour, context->width - 4, context->height - 1, -data->scrolloffset, 0);
|
||||
|
||||
return text0f153780(gdl);
|
||||
return text_end(gdl);
|
||||
}
|
||||
|
||||
bool menuitem_scrollable_tick(struct menuitem *item, struct menudialog *dialog, struct menuinputs *inputs, u32 tickflags, union menuitemdata *data)
|
||||
@@ -3090,8 +3090,8 @@ Gfx *menuitem_marquee_render(Gfx *gdl, struct menurendercontext *context)
|
||||
}
|
||||
|
||||
#if VERSION >= VERSION_NTSC_1_0
|
||||
g_ScissorX1 = context->x * g_ScaleX;
|
||||
g_ScissorX2 = (context->x + context->width) * g_ScaleX;
|
||||
g_ScissorX1 = context->x * g_UiScaleX;
|
||||
g_ScissorX2 = (context->x + context->width) * g_UiScaleX;
|
||||
g_ScissorY1 = context->y;
|
||||
g_ScissorY2 = context->y + context->height - 1;
|
||||
|
||||
@@ -3138,8 +3138,8 @@ Gfx *menuitem_marquee_render(Gfx *gdl, struct menurendercontext *context)
|
||||
gDPSetScissor(gdl++, G_SC_NON_INTERLACE, g_ScissorX1, g_ScissorY1, g_ScissorX2, g_ScissorY2);
|
||||
#else
|
||||
gDPSetScissor(gdl++, G_SC_NON_INTERLACE,
|
||||
context->x * g_ScaleX, context->y,
|
||||
(context->x + context->width) * g_ScaleX, context->y + context->height - 1);
|
||||
context->x * g_UiScaleX, context->y,
|
||||
(context->x + context->width) * g_UiScaleX, context->y + context->height - 1);
|
||||
#endif
|
||||
|
||||
text_backup_and_reset_blends();
|
||||
@@ -3154,10 +3154,10 @@ Gfx *menuitem_marquee_render(Gfx *gdl, struct menurendercontext *context)
|
||||
text_set_horizontal_blend(context->x, context->x, 14);
|
||||
}
|
||||
|
||||
gdl = text0f153628(gdl);
|
||||
gdl = text_render_projected(gdl, &x, &y, &text[i], font1, font2, colour,
|
||||
gdl = text_begin(gdl);
|
||||
gdl = text_render_v2(gdl, &x, &y, &text[i], font1, font2, colour,
|
||||
context->width + context->x - x, context->height, 0, 0);
|
||||
gdl = text0f153780(gdl);
|
||||
gdl = text_end(gdl);
|
||||
gdl = menu_apply_scissor(gdl);
|
||||
|
||||
text_restore_blends();
|
||||
@@ -3263,7 +3263,7 @@ Gfx *menuitem_ranking_render(Gfx *gdl, struct menurendercontext *context)
|
||||
numrows = mp_get_player_rankings(rankings);
|
||||
}
|
||||
|
||||
gdl = text0f153628(gdl);
|
||||
gdl = text_begin(gdl);
|
||||
|
||||
// Gap from last item to bottom of dialog + header height
|
||||
#if VERSION >= VERSION_JPN_FINAL
|
||||
@@ -3298,7 +3298,7 @@ Gfx *menuitem_ranking_render(Gfx *gdl, struct menurendercontext *context)
|
||||
text_measure(&textheight, &textwidth, lang_get(L_MPMENU_277), g_CharsHandelGothicXs, g_FontHandelGothicXs, 0);
|
||||
x = (context->x - textwidth) + 91;
|
||||
y = context->y + 1;
|
||||
gdl = text_render_projected(gdl, &x, &y, lang_get(L_MPMENU_277), g_CharsHandelGothicXs, g_FontHandelGothicXs,
|
||||
gdl = text_render_v2(gdl, &x, &y, lang_get(L_MPMENU_277), g_CharsHandelGothicXs, g_FontHandelGothicXs,
|
||||
textcolour, context->width, context->height, 0, 0);
|
||||
}
|
||||
|
||||
@@ -3306,9 +3306,9 @@ Gfx *menuitem_ranking_render(Gfx *gdl, struct menurendercontext *context)
|
||||
text_measure(&textheight, &textwidth, lang_get(L_MPMENU_278), g_CharsHandelGothicXs, g_FontHandelGothicXs, 0);
|
||||
x = (context->x - textwidth) + 120;
|
||||
y = context->y + 1;
|
||||
gdl = text_render_projected(gdl, &x, &y, lang_get(L_MPMENU_278), g_CharsHandelGothicXs, g_FontHandelGothicXs,
|
||||
gdl = text_render_v2(gdl, &x, &y, lang_get(L_MPMENU_278), g_CharsHandelGothicXs, g_FontHandelGothicXs,
|
||||
textcolour, context->width, context->height, 0, 0);
|
||||
gdl = text0f153780(gdl);
|
||||
gdl = text_end(gdl);
|
||||
|
||||
dialog = context->dialog;
|
||||
|
||||
@@ -3351,8 +3351,8 @@ Gfx *menuitem_ranking_render(Gfx *gdl, struct menurendercontext *context)
|
||||
gDPPipeSync(gdl++);
|
||||
|
||||
#if VERSION >= VERSION_NTSC_1_0
|
||||
g_ScissorX1 = context->x * g_ScaleX;
|
||||
g_ScissorX2 = (context->x + context->width) * g_ScaleX;
|
||||
g_ScissorX1 = context->x * g_UiScaleX;
|
||||
g_ScissorX2 = (context->x + context->width) * g_UiScaleX;
|
||||
g_ScissorY1 = context->y + (VERSION == VERSION_JPN_FINAL ? 14 : 10);
|
||||
g_ScissorY2 = context->y + context->height - 1;
|
||||
|
||||
@@ -3399,13 +3399,13 @@ Gfx *menuitem_ranking_render(Gfx *gdl, struct menurendercontext *context)
|
||||
gDPSetScissor(gdl++, G_SC_NON_INTERLACE, g_ScissorX1, g_ScissorY1, g_ScissorX2, g_ScissorY2);
|
||||
#else
|
||||
gDPSetScissor(gdl++, G_SC_NON_INTERLACE,
|
||||
context->x * g_ScaleX,
|
||||
context->x * g_UiScaleX,
|
||||
context->y + 10,
|
||||
(context->x + context->width) * g_ScaleX,
|
||||
(context->x + context->width) * g_UiScaleX,
|
||||
context->y + context->height - 1);
|
||||
#endif
|
||||
|
||||
gdl = text0f153628(gdl);
|
||||
gdl = text_begin(gdl);
|
||||
|
||||
for (i = 0; i < numrows; i++) {
|
||||
struct ranking *ranking = &rankings[i];
|
||||
@@ -3429,10 +3429,10 @@ Gfx *menuitem_ranking_render(Gfx *gdl, struct menurendercontext *context)
|
||||
#endif
|
||||
|
||||
if (team) {
|
||||
gdl = text_render_projected(gdl, &x, &y, g_BossFile.teamnames[ranking->teamnum],
|
||||
gdl = text_render_v2(gdl, &x, &y, g_BossFile.teamnames[ranking->teamnum],
|
||||
g_CharsHandelGothicSm, g_FontHandelGothicSm, textcolour, context->width, context->height, 0, 0);
|
||||
} else {
|
||||
gdl = text_render_projected(gdl, &x, &y, ranking->mpchr->name,
|
||||
gdl = text_render_v2(gdl, &x, &y, ranking->mpchr->name,
|
||||
g_CharsHandelGothicSm, g_FontHandelGothicSm, textcolour, context->width, context->height, 0, 0);
|
||||
}
|
||||
|
||||
@@ -3447,7 +3447,7 @@ Gfx *menuitem_ranking_render(Gfx *gdl, struct menurendercontext *context)
|
||||
#else
|
||||
y = context->y + i * 10 - data->scrolloffset + 14;
|
||||
#endif
|
||||
gdl = text_render_projected(gdl, &x, &y, valuebuffer, g_CharsHandelGothicSm, g_FontHandelGothicSm,
|
||||
gdl = text_render_v2(gdl, &x, &y, valuebuffer, g_CharsHandelGothicSm, g_FontHandelGothicSm,
|
||||
textcolour, context->width, context->height, 0, 0);
|
||||
}
|
||||
|
||||
@@ -3461,11 +3461,11 @@ Gfx *menuitem_ranking_render(Gfx *gdl, struct menurendercontext *context)
|
||||
#else
|
||||
y = context->y + i * 10 - data->scrolloffset + 14;
|
||||
#endif
|
||||
gdl = text_render_projected(gdl, &x, &y, valuebuffer, g_CharsHandelGothicSm, g_FontHandelGothicSm,
|
||||
gdl = text_render_v2(gdl, &x, &y, valuebuffer, g_CharsHandelGothicSm, g_FontHandelGothicSm,
|
||||
textcolour, context->width, context->height, 0, 0);
|
||||
}
|
||||
|
||||
return text0f153780(gdl);
|
||||
return text_end(gdl);
|
||||
}
|
||||
|
||||
bool menuitem_ranking_tick(struct menuinputs *inputs, u32 tickflags, union menuitemdata *data)
|
||||
@@ -3528,7 +3528,7 @@ Gfx *menuitem_player_stats_render(Gfx *gdl, struct menurendercontext *context)
|
||||
|
||||
mpchr = MPCHR(playernum);
|
||||
|
||||
gdl = text0f153628(gdl);
|
||||
gdl = text_begin(gdl);
|
||||
|
||||
// Write selected player's name
|
||||
weight = menu_get_sin_osc_frac(40) * 255;
|
||||
@@ -3546,7 +3546,7 @@ Gfx *menuitem_player_stats_render(Gfx *gdl, struct menurendercontext *context)
|
||||
x = context->x + 2;
|
||||
y = context->y + 1;
|
||||
|
||||
gdl = text_render_projected(gdl, &x, &y, mpchr->name, g_CharsHandelGothicSm, g_FontHandelGothicSm,
|
||||
gdl = text_render_v2(gdl, &x, &y, mpchr->name, g_CharsHandelGothicSm, g_FontHandelGothicSm,
|
||||
selectioncolour, context->width, context->height, 0, 0);
|
||||
|
||||
// "Suicides" heading
|
||||
@@ -3571,7 +3571,7 @@ Gfx *menuitem_player_stats_render(Gfx *gdl, struct menurendercontext *context)
|
||||
#endif
|
||||
y = context->y + 1;
|
||||
|
||||
gdl = text_render_projected(gdl, &x, &y, lang_get(L_MPMENU_281), g_CharsHandelGothicXs, g_FontHandelGothicXs,
|
||||
gdl = text_render_v2(gdl, &x, &y, lang_get(L_MPMENU_281), g_CharsHandelGothicXs, g_FontHandelGothicXs,
|
||||
maincolour, context->width, context->height, 0, 0);
|
||||
|
||||
// Num suicides
|
||||
@@ -3591,7 +3591,7 @@ Gfx *menuitem_player_stats_render(Gfx *gdl, struct menurendercontext *context)
|
||||
y++;
|
||||
#endif
|
||||
|
||||
gdl = text_render_projected(gdl, &x, &y, buffer, g_CharsHandelGothicSm, g_FontHandelGothicSm,
|
||||
gdl = text_render_v2(gdl, &x, &y, buffer, g_CharsHandelGothicSm, g_FontHandelGothicSm,
|
||||
0xffff00ff, context->width, context->height, 0, 0);
|
||||
|
||||
// Move ypos past top row
|
||||
@@ -3619,7 +3619,7 @@ Gfx *menuitem_player_stats_render(Gfx *gdl, struct menurendercontext *context)
|
||||
text_measure(&textheight, &textwidth, lang_get(L_MPMENU_282), g_CharsHandelGothicXs, g_FontHandelGothicXs, 0);
|
||||
x = context->x - textwidth + 120;
|
||||
y = context->y + ypos;
|
||||
gdl = text_render_projected(gdl, &x, &y, lang_get(L_MPMENU_282), g_CharsHandelGothicXs, g_FontHandelGothicXs,
|
||||
gdl = text_render_v2(gdl, &x, &y, lang_get(L_MPMENU_282), g_CharsHandelGothicXs, g_FontHandelGothicXs,
|
||||
maincolour, context->width, context->height, 0, 0);
|
||||
|
||||
// "Kills" heading
|
||||
@@ -3632,7 +3632,7 @@ Gfx *menuitem_player_stats_render(Gfx *gdl, struct menurendercontext *context)
|
||||
#endif
|
||||
|
||||
y = context->y + ypos;
|
||||
gdl = text_render_projected(gdl, &x, &y, lang_get(L_MPMENU_283), g_CharsHandelGothicXs, g_FontHandelGothicXs,
|
||||
gdl = text_render_v2(gdl, &x, &y, lang_get(L_MPMENU_283), g_CharsHandelGothicXs, g_FontHandelGothicXs,
|
||||
maincolour, context->width, context->height, 0, 0);
|
||||
|
||||
// Move ypos past heading row
|
||||
@@ -3661,8 +3661,8 @@ Gfx *menuitem_player_stats_render(Gfx *gdl, struct menurendercontext *context)
|
||||
gDPPipeSync(gdl++);
|
||||
|
||||
#if VERSION >= VERSION_NTSC_1_0
|
||||
g_ScissorX1 = context->x * g_ScaleX;
|
||||
g_ScissorX2 = (context->x + context->width) * g_ScaleX;
|
||||
g_ScissorX1 = context->x * g_UiScaleX;
|
||||
g_ScissorX2 = (context->x + context->width) * g_UiScaleX;
|
||||
g_ScissorY1 = context->y + ypos;
|
||||
g_ScissorY2 = context->y + context->height;
|
||||
|
||||
@@ -3709,9 +3709,9 @@ Gfx *menuitem_player_stats_render(Gfx *gdl, struct menurendercontext *context)
|
||||
gDPSetScissor(gdl++, G_SC_NON_INTERLACE, g_ScissorX1, g_ScissorY1, g_ScissorX2, g_ScissorY2);
|
||||
#else
|
||||
gDPSetScissor(gdl++, G_SC_NON_INTERLACE,
|
||||
context->x * g_ScaleX,
|
||||
context->x * g_UiScaleX,
|
||||
context->y + ypos,
|
||||
(context->x + context->width) * g_ScaleX,
|
||||
(context->x + context->width) * g_UiScaleX,
|
||||
context->y + context->height);
|
||||
#endif
|
||||
|
||||
@@ -3725,7 +3725,7 @@ Gfx *menuitem_player_stats_render(Gfx *gdl, struct menurendercontext *context)
|
||||
// Name
|
||||
x = context->x + 29;
|
||||
y = context->y + ypos;
|
||||
gdl = text_render_projected(gdl, &x, &y, loopmpchr->name, g_CharsHandelGothicSm, g_FontHandelGothicSm,
|
||||
gdl = text_render_v2(gdl, &x, &y, loopmpchr->name, g_CharsHandelGothicSm, g_FontHandelGothicSm,
|
||||
0x00ffffff, context->width, context->height, 0, 0);
|
||||
|
||||
// Num deaths
|
||||
@@ -3733,7 +3733,7 @@ Gfx *menuitem_player_stats_render(Gfx *gdl, struct menurendercontext *context)
|
||||
text_measure(&textheight, &textwidth, buffer, g_CharsHandelGothicSm, g_FontHandelGothicSm, 0);
|
||||
x = context->x - textwidth + 120;
|
||||
y = context->y + ypos;
|
||||
gdl = text_render_projected(gdl, &x, &y, buffer, g_CharsHandelGothicSm, g_FontHandelGothicSm,
|
||||
gdl = text_render_v2(gdl, &x, &y, buffer, g_CharsHandelGothicSm, g_FontHandelGothicSm,
|
||||
0xff4040ff, context->width, context->height, 0, 0);
|
||||
|
||||
// Num kills
|
||||
@@ -3747,7 +3747,7 @@ Gfx *menuitem_player_stats_render(Gfx *gdl, struct menurendercontext *context)
|
||||
#endif
|
||||
|
||||
y = context->y + ypos;
|
||||
gdl = text_render_projected(gdl, &x, &y, buffer, g_CharsHandelGothicSm, g_FontHandelGothicSm,
|
||||
gdl = text_render_v2(gdl, &x, &y, buffer, g_CharsHandelGothicSm, g_FontHandelGothicSm,
|
||||
0x00ff00ff, context->width, context->height, 0, 0);
|
||||
|
||||
#if VERSION == VERSION_JPN_FINAL
|
||||
@@ -3760,7 +3760,7 @@ Gfx *menuitem_player_stats_render(Gfx *gdl, struct menurendercontext *context)
|
||||
}
|
||||
}
|
||||
|
||||
return text0f153780(gdl);
|
||||
return text_end(gdl);
|
||||
}
|
||||
|
||||
bool menuitem_player_stats_tick(struct menuitem *item, struct menudialog *dialog, struct menuinputs *inputs, u32 tickflags, union menuitemdata *data)
|
||||
@@ -3820,12 +3820,12 @@ Gfx *menuitem_controller_render_line(Gfx *gdl, s32 speed, s32 x1, s32 y1, s32 x2
|
||||
speed = speed + (x1 % 4);
|
||||
|
||||
gSPTextureRectangle(gdl++,
|
||||
x1 * 4 * g_ScaleX, y1 * 4,
|
||||
x2 * 4 * g_ScaleX, y2 * 4,
|
||||
x1 * 4 * g_UiScaleX, y1 * 4,
|
||||
x2 * 4 * g_UiScaleX, y2 * 4,
|
||||
G_TX_RENDERTILE,
|
||||
speed * 32,
|
||||
(y1 % 4) * 32,
|
||||
1024 / g_ScaleX, 1024);
|
||||
1024 / g_UiScaleX, 1024);
|
||||
|
||||
return gdl;
|
||||
}
|
||||
@@ -3853,9 +3853,9 @@ Gfx *menuitem_controller_render_texture(Gfx *gdl, s32 x, s32 y, s32 texturenum,
|
||||
gDPSetColor(gdl++, G_SETENVCOLOR, 0xffffff00 | alpha);
|
||||
|
||||
gSPTextureRectangle(gdl++,
|
||||
(x << 2) * g_ScaleX, y << 2,
|
||||
((x + 32) << 2) * g_ScaleX, (y + 32) << 2,
|
||||
0, 16, 1008, 1024 / g_ScaleX, 0xfc00);
|
||||
(x << 2) * g_UiScaleX, y << 2,
|
||||
((x + 32) << 2) * g_UiScaleX, (y + 32) << 2,
|
||||
0, 16, 1008, 1024 / g_UiScaleX, 0xfc00);
|
||||
|
||||
return gdl;
|
||||
}
|
||||
@@ -4085,7 +4085,7 @@ Gfx *menuitem_controller_render_text(Gfx *gdl, s32 curmode, struct menurendercon
|
||||
|
||||
s32 i;
|
||||
|
||||
gdl = text0f153628(gdl);
|
||||
gdl = text_begin(gdl);
|
||||
|
||||
for (i = 0; i < ARRAYCOUNT(labels); i++) {
|
||||
#if VERSION == VERSION_JPN_FINAL
|
||||
@@ -4103,7 +4103,7 @@ Gfx *menuitem_controller_render_text(Gfx *gdl, s32 curmode, struct menurendercon
|
||||
#if VERSION < VERSION_NTSC_1_0
|
||||
ry = i * 7 + context->y + pady;
|
||||
#endif
|
||||
gdl = text_render_projected(gdl, &rx, &ry, lang_get(labels[i]),
|
||||
gdl = text_render_v2(gdl, &rx, &ry, lang_get(labels[i]),
|
||||
g_CharsHandelGothicXs, g_FontHandelGothicXs, labelcolour, vi_get_width(), vi_get_height(), 0, 0);
|
||||
}
|
||||
|
||||
@@ -4138,11 +4138,11 @@ Gfx *menuitem_controller_render_text(Gfx *gdl, s32 curmode, struct menurendercon
|
||||
colour |= 0xffffff00;
|
||||
}
|
||||
|
||||
gdl = text_render_projected(gdl, &rx, &ry, lang_get(textnum),
|
||||
gdl = text_render_v2(gdl, &rx, &ry, lang_get(textnum),
|
||||
g_CharsHandelGothicXs, g_FontHandelGothicXs, colour, vi_get_width(), vi_get_height(), 0, 0);
|
||||
}
|
||||
|
||||
return text0f153780(gdl);
|
||||
return text_end(gdl);
|
||||
}
|
||||
|
||||
Gfx *menuitem_controller_render_pad(Gfx *gdl, struct menurendercontext *context, s32 padx, s32 pady, s32 curmode, u32 alpha, u32 colour1, u32 colour2, s8 prevmode)
|
||||
@@ -4233,7 +4233,7 @@ Gfx *menuitem_controller_render(Gfx *gdl, struct menurendercontext *context)
|
||||
|
||||
textalpha = data->textfadetimer;
|
||||
contalpha = data->contfadetimer;
|
||||
gdl = text0f153628(gdl);
|
||||
gdl = text_begin(gdl);
|
||||
|
||||
if (dialog->transitionfrac < 0) {
|
||||
colour = g_MenuColours[dialog->type].item_unfocused;
|
||||
@@ -4264,9 +4264,9 @@ Gfx *menuitem_controller_render(Gfx *gdl, struct menurendercontext *context)
|
||||
|
||||
x = context->x + 2;
|
||||
y = context->y + 2;
|
||||
gdl = text_render_projected(gdl, &x, &y, text,
|
||||
gdl = text_render_v2(gdl, &x, &y, text,
|
||||
g_CharsHandelGothicSm, g_FontHandelGothicSm, colour, vi_get_width(), vi_get_height(), 0, 0);
|
||||
gdl = text0f153780(gdl);
|
||||
gdl = text_end(gdl);
|
||||
|
||||
textcolour = colour_blend(colour, colour & 0xffffff00, textalpha);
|
||||
colour = colour_blend(colour, colour & 0xffffff00, contalpha);
|
||||
@@ -4290,10 +4290,10 @@ Gfx *menuitem_controller_render(Gfx *gdl, struct menurendercontext *context)
|
||||
y += 34;
|
||||
#endif
|
||||
|
||||
gdl = text0f153628(gdl);
|
||||
gdl = text_render_projected(gdl, &x, &y, lang_get(L_MPWEAPONS_216), // "Hold weapon button for ..."
|
||||
gdl = text_begin(gdl);
|
||||
gdl = text_render_v2(gdl, &x, &y, lang_get(L_MPWEAPONS_216), // "Hold weapon button for ..."
|
||||
g_CharsHandelGothicSm, g_FontHandelGothicSm, colour, vi_get_width(), vi_get_height(), 0, 0);
|
||||
gdl = text0f153780(gdl);
|
||||
gdl = text_end(gdl);
|
||||
}
|
||||
|
||||
text_restore_blends();
|
||||
|
||||
+3
-3
@@ -64,9 +64,9 @@ void menu_tick(void)
|
||||
s32 anyopen = false;
|
||||
|
||||
#if PAL
|
||||
g_ScaleX = 1;
|
||||
g_UiScaleX = 1;
|
||||
#else
|
||||
g_ScaleX = g_ViRes == VIRES_HI ? 2 : 1;
|
||||
g_UiScaleX = g_ViRes == VIRES_HI ? 2 : 1;
|
||||
#endif
|
||||
|
||||
menu_tick_timers();
|
||||
@@ -750,6 +750,6 @@ void menu_tick(void)
|
||||
}
|
||||
}
|
||||
|
||||
g_ScaleX = 1;
|
||||
g_UiScaleX = 1;
|
||||
g_MenuData.unk5d5_06 = sp344 ? true : false;
|
||||
}
|
||||
|
||||
@@ -680,18 +680,18 @@ MenuItemHandlerResult mp_awards_menu_handler(s32 operation, struct menuitem *ite
|
||||
|
||||
#if VERSION == VERSION_JPN_FINAL
|
||||
gSPTextureRectangle(gdl++,
|
||||
(x << 2) * g_ScaleX,
|
||||
(x << 2) * g_UiScaleX,
|
||||
(renderdata->y - 6) << 2,
|
||||
((x + 11) << 2) * g_ScaleX,
|
||||
((x + 11) << 2) * g_UiScaleX,
|
||||
(renderdata->y + 5) << 2,
|
||||
G_TX_RENDERTILE, 0x0010, 0x0150, 1024 / g_ScaleX, -1024);
|
||||
G_TX_RENDERTILE, 0x0010, 0x0150, 1024 / g_UiScaleX, -1024);
|
||||
#else
|
||||
gSPTextureRectangle(gdl++,
|
||||
(x << 2) * g_ScaleX,
|
||||
(x << 2) * g_UiScaleX,
|
||||
(renderdata->y - 2) << 2,
|
||||
((x + 11) << 2) * g_ScaleX,
|
||||
((x + 11) << 2) * g_UiScaleX,
|
||||
(renderdata->y + 9) << 2,
|
||||
G_TX_RENDERTILE, 0x0010, 0x0150, 1024 / g_ScaleX, -1024);
|
||||
G_TX_RENDERTILE, 0x0010, 0x0150, 1024 / g_UiScaleX, -1024);
|
||||
#endif
|
||||
|
||||
x -= 14;
|
||||
|
||||
+17
-29
@@ -1194,8 +1194,8 @@ void mp_set_paused(u8 mode)
|
||||
* Render "Paused" in the middle of the viewport if paused,
|
||||
* or "Press START" if player has finished their death animation.
|
||||
*
|
||||
* @bug: When calling text_render(), vi_get_width() is used twice but it should be
|
||||
* vi_get_view_width() and vi_get_view_height(). These arguments to text_render() set
|
||||
* @bug: When calling text_render_v1(), vi_get_width() is used twice but it should be
|
||||
* vi_get_view_width() and vi_get_view_height(). These arguments to text_render_v1() set
|
||||
* the crop box for the text, but the text doesn't extend past the box anyway
|
||||
* so it has no effect.
|
||||
*/
|
||||
@@ -1209,21 +1209,21 @@ Gfx *mp_render_modal_text(Gfx *gdl)
|
||||
s32 stack1;
|
||||
|
||||
#if VERSION >= VERSION_JPN_FINAL
|
||||
g_ScaleX = g_ViRes == VIRES_HI ? 2 : 1;
|
||||
g_UiScaleX = g_ViRes == VIRES_HI ? 2 : 1;
|
||||
#endif
|
||||
|
||||
if (g_MpSetup.paused == MPPAUSEMODE_PAUSED) {
|
||||
s32 red = (s32) ((1.0f - g_20SecIntervalFrac) * 20.0f * 255.0f) % 255;
|
||||
s32 stack2;
|
||||
|
||||
gdl = text0f153628(gdl);
|
||||
gdl = text_begin(gdl);
|
||||
|
||||
strcpy(text, lang_get(L_MPWEAPONS_040)); // "Paused"
|
||||
|
||||
x = vi_get_view_left() + vi_get_view_width() / 2;
|
||||
|
||||
#if VERSION >= VERSION_JPN_FINAL
|
||||
x = x / g_ScaleX;
|
||||
x = x / g_UiScaleX;
|
||||
#endif
|
||||
|
||||
#if VERSION >= VERSION_NTSC_1_0
|
||||
@@ -1237,9 +1237,7 @@ Gfx *mp_render_modal_text(Gfx *gdl)
|
||||
y = vi_get_view_top() + vi_get_view_height() / 2;
|
||||
}
|
||||
|
||||
#if VERSION >= VERSION_JPN_FINAL
|
||||
text_measure(&textheight, &textwidth, text, g_CharsHandelGothicSm, g_FontHandelGothicSm, 0);
|
||||
#elif PAL
|
||||
#if VERSION >= VERSION_PAL_BETA
|
||||
// Use smaller fonts
|
||||
text_measure(&textheight, &textwidth, text, g_CharsHandelGothicSm, g_FontHandelGothicSm, 0);
|
||||
#else
|
||||
@@ -1247,15 +1245,13 @@ Gfx *mp_render_modal_text(Gfx *gdl)
|
||||
#endif
|
||||
x -= textwidth / 2;
|
||||
|
||||
#if VERSION >= VERSION_JPN_FINAL
|
||||
gdl = func0f1574d0jf(gdl, &x, &y, text, g_CharsHandelGothicSm, g_FontHandelGothicSm, (red << 24) | 0x00ff00ff, 0x000000ff, vi_get_width(), vi_get_width(), 0, 0);
|
||||
#elif PAL
|
||||
gdl = text_render(gdl, &x, &y, text, g_CharsHandelGothicSm, g_FontHandelGothicSm, (red << 24) | 0x00ff00ff, 0x000000ff, vi_get_width(), vi_get_width(), 0, 0);
|
||||
#if VERSION >= VERSION_PAL_BETA
|
||||
gdl = text_render_vx(gdl, &x, &y, text, g_CharsHandelGothicSm, g_FontHandelGothicSm, (red << 24) | 0x00ff00ff, 0x000000ff, vi_get_width(), vi_get_width(), 0, 0);
|
||||
#else
|
||||
gdl = text_render(gdl, &x, &y, text, g_CharsHandelGothicMd, g_FontHandelGothicMd, (red << 24) | 0x00ff00ff, 0x000000ff, vi_get_width(), vi_get_width(), 0, 0);
|
||||
gdl = text_render_vx(gdl, &x, &y, text, g_CharsHandelGothicMd, g_FontHandelGothicMd, (red << 24) | 0x00ff00ff, 0x000000ff, vi_get_width(), vi_get_width(), 0, 0);
|
||||
#endif
|
||||
|
||||
gdl = text0f153780(gdl);
|
||||
gdl = text_end(gdl);
|
||||
} else if (!g_MainIsEndscreen
|
||||
&& g_MpSetup.paused == MPPAUSEMODE_UNPAUSED
|
||||
&& g_Vars.currentplayer->isdead
|
||||
@@ -1265,14 +1261,14 @@ Gfx *mp_render_modal_text(Gfx *gdl)
|
||||
&& !(g_Vars.antiplayernum >= 0 && ((g_Vars.currentplayer != g_Vars.anti || g_InCutscene)))
|
||||
&& g_NumReasonsToEndMpMatch == 0) {
|
||||
// Render "Press START" text
|
||||
gdl = text0f153628(gdl);
|
||||
gdl = text_begin(gdl);
|
||||
|
||||
strcpy(text, lang_get(L_MPWEAPONS_039));
|
||||
|
||||
x = vi_get_view_left() + vi_get_view_width() / 2;
|
||||
|
||||
#if VERSION >= VERSION_JPN_FINAL
|
||||
x = x / g_ScaleX;
|
||||
x = x / g_UiScaleX;
|
||||
#endif
|
||||
|
||||
y = vi_get_view_top() + vi_get_view_height() / 2;
|
||||
@@ -1280,11 +1276,7 @@ Gfx *mp_render_modal_text(Gfx *gdl)
|
||||
text_measure(&textheight, &textwidth, text, g_CharsHandelGothicSm, g_FontHandelGothicSm, 0);
|
||||
x -= textwidth / 2;
|
||||
|
||||
#if VERSION >= VERSION_JPN_FINAL
|
||||
gdl = func0f1574d0jf(gdl, &x, &y, text, g_CharsHandelGothicSm, g_FontHandelGothicSm, 0xff0000ff, 0x000000ff, vi_get_width(), vi_get_width(), 0, 0);
|
||||
#else
|
||||
gdl = text_render(gdl, &x, &y, text, g_CharsHandelGothicSm, g_FontHandelGothicSm, 0xff0000ff, 0x000000ff, vi_get_width(), vi_get_width(), 0, 0);
|
||||
#endif
|
||||
gdl = text_render_vx(gdl, &x, &y, text, g_CharsHandelGothicSm, g_FontHandelGothicSm, 0xff0000ff, 0x000000ff, vi_get_width(), vi_get_width(), 0, 0);
|
||||
|
||||
if (g_Vars.currentplayer->deadtimer > 0) {
|
||||
// Render countdown timer
|
||||
@@ -1292,7 +1284,7 @@ Gfx *mp_render_modal_text(Gfx *gdl)
|
||||
s32 countdownx = vi_get_view_left() + vi_get_view_width() / 2;
|
||||
|
||||
#if VERSION >= VERSION_JPN_FINAL
|
||||
countdownx = countdownx / g_ScaleX;
|
||||
countdownx = countdownx / g_UiScaleX;
|
||||
#endif
|
||||
sprintf(text, "%d\n", (g_Vars.currentplayer->deadtimer + TICKS(60) - 1) / TICKS(60));
|
||||
|
||||
@@ -1300,20 +1292,16 @@ Gfx *mp_render_modal_text(Gfx *gdl)
|
||||
x = countdownx - textwidth / 2;
|
||||
y = countdowny;
|
||||
|
||||
#if VERSION >= VERSION_JPN_FINAL
|
||||
gdl = func0f1574d0jf(gdl, &x, &y, text, g_CharsHandelGothicSm, g_FontHandelGothicSm, 0xff0000ff, 0x000000ff, vi_get_width(), vi_get_width(), 0, 0);
|
||||
#else
|
||||
gdl = text_render(gdl, &x, &y, text, g_CharsHandelGothicSm, g_FontHandelGothicSm, 0xff0000ff, 0x000000ff, vi_get_width(), vi_get_width(), 0, 0);
|
||||
#endif
|
||||
gdl = text_render_vx(gdl, &x, &y, text, g_CharsHandelGothicSm, g_FontHandelGothicSm, 0xff0000ff, 0x000000ff, vi_get_width(), vi_get_width(), 0, 0);
|
||||
}
|
||||
|
||||
gdl = text0f153780(gdl);
|
||||
gdl = text_end(gdl);
|
||||
|
||||
g_Menus[g_Vars.currentplayerstats->mpindex].openinhibit = 10;
|
||||
}
|
||||
|
||||
#if VERSION >= VERSION_JPN_FINAL
|
||||
g_ScaleX = 1;
|
||||
g_UiScaleX = 1;
|
||||
#endif
|
||||
|
||||
return gdl;
|
||||
|
||||
@@ -592,13 +592,13 @@ Gfx *htm_render_hud(Gfx *gdl)
|
||||
barright = t6 + a1 / 2;
|
||||
s1 = barleft + (s32) (a1 * (dltime / TICKS(4800.0f)));
|
||||
|
||||
gdl = text0f153628(gdl);
|
||||
gdl = text_set_prim_colour(gdl, 0x60000060);
|
||||
gdl = text_begin(gdl);
|
||||
gdl = text_begin_boxmode(gdl, 0x60000060);
|
||||
|
||||
gDPFillRectangle(gdl++, barleft, viewtop + 8, barright, viewtop + 16);
|
||||
|
||||
gdl = text0f153838(gdl);
|
||||
gdl = text_set_prim_colour(gdl, 0xc00000d0);
|
||||
gdl = text_end_boxmode(gdl);
|
||||
gdl = text_begin_boxmode(gdl, 0xc00000d0);
|
||||
|
||||
v1 = barleft + 1;
|
||||
a0 = barleft;
|
||||
@@ -609,8 +609,8 @@ Gfx *htm_render_hud(Gfx *gdl)
|
||||
a0 += 2;
|
||||
}
|
||||
|
||||
gdl = text0f153838(gdl);
|
||||
gdl = text0f153780(gdl);
|
||||
gdl = text_end_boxmode(gdl);
|
||||
gdl = text_end(gdl);
|
||||
}
|
||||
|
||||
return gdl;
|
||||
|
||||
@@ -416,7 +416,7 @@ Gfx *htb_render_hud(Gfx *gdl)
|
||||
sprintf(text, "%d:%02d", mins, secs);
|
||||
#endif
|
||||
|
||||
gdl = text0f153628(gdl);
|
||||
gdl = text_begin(gdl);
|
||||
text_measure(&textheight, &textwidth, text, g_CharsHandelGothicXs, g_FontHandelGothicXs, 0);
|
||||
|
||||
x -= textwidth / 2;
|
||||
@@ -424,14 +424,14 @@ Gfx *htb_render_hud(Gfx *gdl)
|
||||
textheight += y;
|
||||
|
||||
#if VERSION >= VERSION_NTSC_1_0
|
||||
gdl = text0f153990(gdl, x, y, textwidth, textheight);
|
||||
gdl = text_render(gdl, &x, &y, text, g_CharsNumeric, g_FontNumeric, 0x00ff00a0, 0xa0, vi_get_width(), vi_get_height(), 0, 0);
|
||||
gdl = text_draw_black_textbox(gdl, x, y, textwidth, textheight);
|
||||
gdl = text_render_v1(gdl, &x, &y, text, g_CharsNumeric, g_FontNumeric, 0x00ff00a0, 0xa0, vi_get_width(), vi_get_height(), 0, 0);
|
||||
#else
|
||||
gdl = text0f153858(gdl, &x, &y, &textwidth, &textheight);
|
||||
gdl = text_render(gdl, &x, &y, text, g_CharsNumeric, g_FontNumeric, 0x00ff00a0, 0x88, vi_get_width(), vi_get_height(), 0, 0);
|
||||
gdl = text_draw_black_box(gdl, &x, &y, &textwidth, &textheight);
|
||||
gdl = text_render_v1(gdl, &x, &y, text, g_CharsNumeric, g_FontNumeric, 0x00ff00a0, 0x88, vi_get_width(), vi_get_height(), 0, 0);
|
||||
#endif
|
||||
|
||||
gdl = text0f153780(gdl);
|
||||
gdl = text_end(gdl);
|
||||
}
|
||||
|
||||
return gdl;
|
||||
|
||||
@@ -582,7 +582,7 @@ Gfx *koh_render_hud(Gfx *gdl)
|
||||
sprintf(text, "%02d", secs);
|
||||
}
|
||||
|
||||
gdl = text0f153628(gdl);
|
||||
gdl = text_begin(gdl);
|
||||
text_measure(&textheight, &textwidth, text, g_CharsHandelGothicXs, g_FontHandelGothicXs, 0);
|
||||
|
||||
x -= textwidth / 2;
|
||||
@@ -590,13 +590,13 @@ Gfx *koh_render_hud(Gfx *gdl)
|
||||
textheight += y;
|
||||
|
||||
#if VERSION >= VERSION_NTSC_1_0
|
||||
gdl = text0f153990(gdl, x, y, textwidth, textheight);
|
||||
gdl = text_render(gdl, &x, &y, text, g_CharsNumeric, g_FontNumeric, 0x00ff00a0, 0xa0, vi_get_width(), vi_get_height(), 0, 0);
|
||||
gdl = text_draw_black_textbox(gdl, x, y, textwidth, textheight);
|
||||
gdl = text_render_v1(gdl, &x, &y, text, g_CharsNumeric, g_FontNumeric, 0x00ff00a0, 0xa0, vi_get_width(), vi_get_height(), 0, 0);
|
||||
#else
|
||||
gdl = text0f153858(gdl, &x, &y, &textwidth, &textheight);
|
||||
gdl = text_render(gdl, &x, &y, text, g_CharsNumeric, g_FontNumeric, 0x00ff00a0, 0x88, vi_get_width(), vi_get_height(), 0, 0);
|
||||
gdl = text_draw_black_box(gdl, &x, &y, &textwidth, &textheight);
|
||||
gdl = text_render_v1(gdl, &x, &y, text, g_CharsNumeric, g_FontNumeric, 0x00ff00a0, 0x88, vi_get_width(), vi_get_height(), 0, 0);
|
||||
#endif
|
||||
gdl = text0f153780(gdl);
|
||||
gdl = text_end(gdl);
|
||||
}
|
||||
|
||||
return gdl;
|
||||
|
||||
@@ -311,7 +311,7 @@ Gfx *pac_render_hud(Gfx *gdl)
|
||||
secs = (time240 + (TICKS(240) - 1)) / TICKS(240);
|
||||
sprintf(text, "%d:%02d", mins, secs);
|
||||
|
||||
gdl = text0f153628(gdl);
|
||||
gdl = text_begin(gdl);
|
||||
text_measure(&textheight, &textwidth, text, g_CharsHandelGothicXs, g_FontHandelGothicXs, 0);
|
||||
|
||||
x -= textwidth / 2;
|
||||
@@ -319,13 +319,13 @@ Gfx *pac_render_hud(Gfx *gdl)
|
||||
textheight += y;
|
||||
|
||||
#if VERSION >= VERSION_NTSC_1_0
|
||||
gdl = text0f153990(gdl, x, y, textwidth, textheight);
|
||||
gdl = text_render(gdl, &x, &y, text, g_CharsNumeric, g_FontNumeric, 0x00ff00a0, 0xa0, vi_get_width(), vi_get_height(), 0, 0);
|
||||
gdl = text_draw_black_textbox(gdl, x, y, textwidth, textheight);
|
||||
gdl = text_render_v1(gdl, &x, &y, text, g_CharsNumeric, g_FontNumeric, 0x00ff00a0, 0xa0, vi_get_width(), vi_get_height(), 0, 0);
|
||||
#else
|
||||
gdl = text0f153858(gdl, &x, &y, &textwidth, &textheight);
|
||||
gdl = text_render(gdl, &x, &y, text, g_CharsNumeric, g_FontNumeric, 0x00ff00a0, 0x88, vi_get_width(), vi_get_height(), 0, 0);
|
||||
gdl = text_draw_black_box(gdl, &x, &y, &textwidth, &textheight);
|
||||
gdl = text_render_v1(gdl, &x, &y, text, g_CharsNumeric, g_FontNumeric, 0x00ff00a0, 0x88, vi_get_width(), vi_get_height(), 0, 0);
|
||||
#endif
|
||||
gdl = text0f153780(gdl);
|
||||
gdl = text_end(gdl);
|
||||
}
|
||||
|
||||
return gdl;
|
||||
|
||||
+15
-15
@@ -711,15 +711,15 @@ MenuItemHandlerResult mp_challenges_list_handler(s32 operation, struct menuitem
|
||||
x = renderdata->x + 10;
|
||||
y = renderdata->y + 1;
|
||||
|
||||
gdl = text0f153628(gdl);
|
||||
gdl = text_begin(gdl);
|
||||
|
||||
name = challenge_get_name2(g_MpPlayerNum, challengeindex);
|
||||
|
||||
gdl = text_render_projected(gdl, &x, &y, name,
|
||||
gdl = text_render_v2(gdl, &x, &y, name,
|
||||
g_CharsHandelGothicSm, g_FontHandelGothicSm, renderdata->colour,
|
||||
vi_get_width(), vi_get_height(), 0, 0);
|
||||
|
||||
gdl = text0f153780(gdl);
|
||||
gdl = text_end(gdl);
|
||||
|
||||
gDPPipeSync(gdl++);
|
||||
gDPSetTexturePersp(gdl++, G_TP_NONE);
|
||||
@@ -754,12 +754,12 @@ MenuItemHandlerResult mp_challenges_list_handler(s32 operation, struct menuitem
|
||||
TEXEL0, 0, ENVIRONMENT, 0);
|
||||
|
||||
gSPTextureRectangle(gdl++,
|
||||
((renderdata->x + loopx) << 2) * g_ScaleX,
|
||||
((renderdata->x + loopx) << 2) * g_UiScaleX,
|
||||
(renderdata->y + size) << 2,
|
||||
((renderdata->x + size + loopx) << 2) * g_ScaleX,
|
||||
((renderdata->x + size + loopx) << 2) * g_UiScaleX,
|
||||
(renderdata->y + size * 2) << 2,
|
||||
G_TX_RENDERTILE,
|
||||
0, 0x0160, 0x0400 / g_ScaleX, 0xfc00);
|
||||
0, 0x0160, 0x0400 / g_UiScaleX, 0xfc00);
|
||||
|
||||
loopx += 13;
|
||||
}
|
||||
@@ -994,9 +994,9 @@ MenuItemHandlerResult mp_medal_menu_handler(s32 operation, struct menuitem *item
|
||||
TEXEL0, 0, ENVIRONMENT, 0);
|
||||
|
||||
gSPTextureRectangle(gdl++,
|
||||
((renderdata->x + 9) << 2) * g_ScaleX, renderdata->y << 2,
|
||||
((renderdata->x + 20) << 2) * g_ScaleX, (renderdata->y + 11) << 2,
|
||||
G_TX_RENDERTILE, 0, 0x0160, 1024 / g_ScaleX, -1024);
|
||||
((renderdata->x + 9) << 2) * g_UiScaleX, renderdata->y << 2,
|
||||
((renderdata->x + 20) << 2) * g_UiScaleX, (renderdata->y + 11) << 2,
|
||||
G_TX_RENDERTILE, 0, 0x0160, 1024 / g_UiScaleX, -1024);
|
||||
|
||||
return (s32) gdl;
|
||||
}
|
||||
@@ -4526,9 +4526,9 @@ MenuItemHandlerResult mp_challenges_list_menu_handler(s32 operation, struct menu
|
||||
x = renderdata->x + 10;
|
||||
y = renderdata->y + 1;
|
||||
|
||||
gdl = text0f153628(gdl);
|
||||
gdl = text_render_projected(gdl, &x, &y, challenge_get_name_by_slot(data->type19.unk04), g_CharsHandelGothicSm, g_FontHandelGothicSm, renderdata->colour, vi_get_width(), vi_get_height(), 0, 0);
|
||||
gdl = text0f153780(gdl);
|
||||
gdl = text_begin(gdl);
|
||||
gdl = text_render_v2(gdl, &x, &y, challenge_get_name_by_slot(data->type19.unk04), g_CharsHandelGothicSm, g_FontHandelGothicSm, renderdata->colour, vi_get_width(), vi_get_height(), 0, 0);
|
||||
gdl = text_end(gdl);
|
||||
|
||||
gDPPipeSync(gdl++);
|
||||
gDPSetTexturePersp(gdl++, G_TP_NONE);
|
||||
@@ -4563,9 +4563,9 @@ MenuItemHandlerResult mp_challenges_list_menu_handler(s32 operation, struct menu
|
||||
TEXEL0, 0, ENVIRONMENT, 0);
|
||||
|
||||
gSPTextureRectangle(gdl++,
|
||||
((renderdata->x + marginleft) << 2) * g_ScaleX, (renderdata->y + 11) << 2,
|
||||
((renderdata->x + marginleft + 11) << 2) * g_ScaleX, (renderdata->y + 22) << 2,
|
||||
G_TX_RENDERTILE, 0, 0x0160, 1024 / g_ScaleX, -1024);
|
||||
((renderdata->x + marginleft) << 2) * g_UiScaleX, (renderdata->y + 11) << 2,
|
||||
((renderdata->x + marginleft + 11) << 2) * g_UiScaleX, (renderdata->y + 22) << 2,
|
||||
G_TX_RENDERTILE, 0, 0x0160, 1024 / g_UiScaleX, -1024);
|
||||
|
||||
marginleft += 13;
|
||||
}
|
||||
|
||||
+10
-10
@@ -3117,7 +3117,7 @@ void player_configure_vi(void)
|
||||
f32 ratio = player_get_aspect_ratio();
|
||||
g_ViRes = VIRES_LO;
|
||||
|
||||
text0f1531dc(false);
|
||||
text_set_hires(false);
|
||||
|
||||
#if VERSION >= VERSION_JPN_FINAL
|
||||
var800800f0jf = 0;
|
||||
@@ -3149,12 +3149,12 @@ void player_tick(bool arg0)
|
||||
}
|
||||
|
||||
#if PAL
|
||||
text0f1531dc(false);
|
||||
text_set_hires(false);
|
||||
#else
|
||||
if (g_ViRes == VIRES_HI) {
|
||||
text0f1531dc(true);
|
||||
text_set_hires(true);
|
||||
} else {
|
||||
text0f1531dc(false);
|
||||
text_set_hires(false);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -4526,9 +4526,9 @@ Gfx *player_render_hud(Gfx *gdl)
|
||||
s32 c = vi_get_view_left() + vi_get_view_width();
|
||||
s32 d = vi_get_view_top() + vi_get_view_height();
|
||||
|
||||
gdl = text0f153628(gdl);
|
||||
gdl = text0f153a34(gdl, a, b, c, d, 0x000000a0);
|
||||
gdl = text0f153780(gdl);
|
||||
gdl = text_begin(gdl);
|
||||
gdl = text_draw_box(gdl, a, b, c, d, 0x000000a0);
|
||||
gdl = text_end(gdl);
|
||||
}
|
||||
|
||||
if (g_Vars.currentplayer->cameramode != CAMERAMODE_EYESPY
|
||||
@@ -4776,9 +4776,9 @@ Gfx *player_render_hud(Gfx *gdl)
|
||||
s32 c = vi_get_view_left() + vi_get_view_width();
|
||||
s32 d = vi_get_view_top() + vi_get_view_height();
|
||||
|
||||
gdl = text0f153628(gdl);
|
||||
gdl = text0f153a34(gdl, a, b, c, d, 0x000000a0);
|
||||
gdl = text0f153780(gdl);
|
||||
gdl = text_begin(gdl);
|
||||
gdl = text_draw_box(gdl, a, b, c, d, 0x000000a0);
|
||||
gdl = text_end(gdl);
|
||||
}
|
||||
|
||||
gdl = hudmsgs_render(gdl);
|
||||
|
||||
+2
-2
@@ -20931,7 +20931,7 @@ Gfx *countdown_timer_render(Gfx *gdl)
|
||||
secs = (s32)floorf(value60 * (1.0f / 60.0f)) - mins * 60;
|
||||
ms = (s32)floorf(value60 * 1.6666666269302f) - mins * 6000 - secs * 100;
|
||||
|
||||
gdl = text0f153628(gdl);
|
||||
gdl = text_begin(gdl);
|
||||
gdl = bgun_draw_hud_integer(gdl, (mins % 100) / 10, viewright - 18, HUDHALIGN_MIDDLE, y, HUDVALIGN_MIDDLE, 0x00ff00a0);
|
||||
gdl = bgun_draw_hud_integer(gdl, mins % 10, viewright - 14, HUDHALIGN_MIDDLE, y, HUDVALIGN_MIDDLE, 0x00ff00a0);
|
||||
gdl = bgun_draw_hud_string(gdl, fmt, viewright - 8, HUDHALIGN_MIDDLE, y, HUDVALIGN_MIDDLE, 0x00ff00a0);
|
||||
@@ -20940,7 +20940,7 @@ Gfx *countdown_timer_render(Gfx *gdl)
|
||||
gdl = bgun_draw_hud_string(gdl, fmt, viewright + 8, HUDHALIGN_MIDDLE, y, HUDVALIGN_MIDDLE, 0x00ff00a0);
|
||||
gdl = bgun_draw_hud_integer(gdl, (ms % 100) / 10, viewright + 14, HUDHALIGN_MIDDLE, y, HUDVALIGN_MIDDLE, 0x00ff00a0);
|
||||
gdl = bgun_draw_hud_integer(gdl, ms % 10, viewright + 18, HUDHALIGN_MIDDLE, y, HUDVALIGN_MIDDLE, 0x00ff00a0);
|
||||
gdl = text0f153780(gdl);
|
||||
gdl = text_end(gdl);
|
||||
}
|
||||
|
||||
return gdl;
|
||||
|
||||
+41
-41
@@ -70,14 +70,14 @@ Gfx *radar_render_background(Gfx *gdl, struct textureconfig *tconfig, s32 arg2,
|
||||
gDPSetPrimColorViaWord(gdl++, 0, 0, 0x00000000);
|
||||
|
||||
gDPFillRectangle(gdl++,
|
||||
arg2 * g_ScaleX,
|
||||
arg2 * g_UiScaleX,
|
||||
arg3,
|
||||
(arg2 + tconfig->width) * g_ScaleX,
|
||||
(arg2 + tconfig->width) * g_UiScaleX,
|
||||
arg3 + tconfig->width);
|
||||
|
||||
spb0[0] = arg2 * g_ScaleX;
|
||||
spb0[0] = arg2 * g_UiScaleX;
|
||||
spb0[1] = arg3;
|
||||
spa8[0] = arg4 * g_ScaleX;
|
||||
spa8[0] = arg4 * g_UiScaleX;
|
||||
spa8[1] = arg4;
|
||||
|
||||
tex_select(&gdl, tconfig, 2, 0, 0, 1, NULL);
|
||||
@@ -147,94 +147,94 @@ Gfx *radar_draw_dot(Gfx *gdl, struct prop *prop, struct coord *dist, u32 colour1
|
||||
if (swapcolours) {
|
||||
if (prop == g_Vars.currentplayer->prop) {
|
||||
// Box
|
||||
gdl = text_set_prim_colour(gdl, (0xff >> shiftamount) + colour1);
|
||||
gdl = text_begin_boxmode(gdl, (0xff >> shiftamount) + colour1);
|
||||
gDPFillRectangleScaled(gdl++, x - 2, y + 2, x + 1, y + 3);
|
||||
gDPFillRectangleScaled(gdl++, x - 3, y - 1, x + 2, y + 2);
|
||||
gDPFillRectangleScaled(gdl++, x - 2, y - 2, x + 1, y - 1);
|
||||
gdl = text0f153838(gdl);
|
||||
gdl = text_end_boxmode(gdl);
|
||||
|
||||
gdl = text_set_prim_colour(gdl, (0xff >> shiftamount) + colour2);
|
||||
gdl = text_begin_boxmode(gdl, (0xff >> shiftamount) + colour2);
|
||||
gDPFillRectangleScaled(gdl++, x - 1, y + 1, x + 0, y + 2);
|
||||
gDPFillRectangleScaled(gdl++, x - 2, y + 0, x + 1, y + 1);
|
||||
gDPFillRectangleScaled(gdl++, x - 1, y - 1, x + 0, y + 0);
|
||||
gdl = text0f153838(gdl);
|
||||
gdl = text_end_boxmode(gdl);
|
||||
} else if (g_RadarYIndicatorsEnabled && dist->y > 250) {
|
||||
// Up triangle
|
||||
gdl = text_set_prim_colour(gdl, (0xff >> shiftamount) + colour1);
|
||||
gdl = text_begin_boxmode(gdl, (0xff >> shiftamount) + colour1);
|
||||
gDPFillRectangleScaled(gdl++, x - 3, y - 1, x + 2, y + 2);
|
||||
gDPFillRectangleScaled(gdl++, x - 2, y - 2, x + 1, y - 1);
|
||||
gdl = text0f153838(gdl);
|
||||
gdl = text_end_boxmode(gdl);
|
||||
|
||||
gdl = text_set_prim_colour(gdl, (0xff >> shiftamount) + colour2);
|
||||
gdl = text_begin_boxmode(gdl, (0xff >> shiftamount) + colour2);
|
||||
gDPFillRectangleScaled(gdl++, x - 2, y + 0, x + 1, y + 1);
|
||||
gDPFillRectangleScaled(gdl++, x - 1, y - 1, x + 0, y + 0);
|
||||
gdl = text0f153838(gdl);
|
||||
gdl = text_end_boxmode(gdl);
|
||||
} else if (g_RadarYIndicatorsEnabled && dist->y < -250) {
|
||||
// Down triangle
|
||||
gdl = text_set_prim_colour(gdl, (0xff >> shiftamount) + colour1);
|
||||
gdl = text_begin_boxmode(gdl, (0xff >> shiftamount) + colour1);
|
||||
gDPFillRectangleScaled(gdl++, x - 3, y - 2, x + 2, y + 1);
|
||||
gDPFillRectangleScaled(gdl++, x - 2, y + 1, x + 1, y + 2);
|
||||
gdl = text0f153838(gdl);
|
||||
gdl = text_end_boxmode(gdl);
|
||||
|
||||
gdl = text_set_prim_colour(gdl, (0xff >> shiftamount) + colour2);
|
||||
gdl = text_begin_boxmode(gdl, (0xff >> shiftamount) + colour2);
|
||||
gDPFillRectangleScaled(gdl++, x - 2, y - 1, x + 1, y + 0);
|
||||
gDPFillRectangleScaled(gdl++, x - 1, y + 0, x + 0, y + 1);
|
||||
gdl = text0f153838(gdl);
|
||||
gdl = text_end_boxmode(gdl);
|
||||
} else {
|
||||
// Dot
|
||||
gdl = text_set_prim_colour(gdl, (0xff >> shiftamount) + colour1);
|
||||
gdl = text_begin_boxmode(gdl, (0xff >> shiftamount) + colour1);
|
||||
gDPFillRectangleScaled(gdl++, x - 2, y - 2, x + 2, y + 2);
|
||||
gdl = text0f153838(gdl);
|
||||
gdl = text_end_boxmode(gdl);
|
||||
|
||||
gdl = text_set_prim_colour(gdl, (0xff >> shiftamount) + colour2);
|
||||
gdl = text_begin_boxmode(gdl, (0xff >> shiftamount) + colour2);
|
||||
gDPFillRectangleScaled(gdl++, x - 1, y - 1, x + 1, y + 1);
|
||||
gdl = text0f153838(gdl);
|
||||
gdl = text_end_boxmode(gdl);
|
||||
}
|
||||
} else {
|
||||
if (prop == g_Vars.currentplayer->prop) {
|
||||
// Box
|
||||
gdl = text_set_prim_colour(gdl, (0xff >> shiftamount) + colour2);
|
||||
gdl = text_begin_boxmode(gdl, (0xff >> shiftamount) + colour2);
|
||||
gDPFillRectangleScaled(gdl++, x - 2, y + 2, x + 1, y + 3);
|
||||
gDPFillRectangleScaled(gdl++, x - 3, y - 1, x + 2, y + 2);
|
||||
gDPFillRectangleScaled(gdl++, x - 2, y - 2, x + 1, y - 1);
|
||||
gdl = text0f153838(gdl);
|
||||
gdl = text_end_boxmode(gdl);
|
||||
|
||||
gdl = text_set_prim_colour(gdl, (0xff >> shiftamount) + colour1);
|
||||
gdl = text_begin_boxmode(gdl, (0xff >> shiftamount) + colour1);
|
||||
gDPFillRectangleScaled(gdl++, x - 1, y + 1, x + 0, y + 2);
|
||||
gDPFillRectangleScaled(gdl++, x - 2, y + 0, x + 1, y + 1);
|
||||
gDPFillRectangleScaled(gdl++, x - 1, y - 1, x + 0, y + 0);
|
||||
gdl = text0f153838(gdl);
|
||||
gdl = text_end_boxmode(gdl);
|
||||
} else if (g_RadarYIndicatorsEnabled && dist->y > 250) {
|
||||
// Up triangle
|
||||
gdl = text_set_prim_colour(gdl, (0xff >> shiftamount) + colour2);
|
||||
gdl = text_begin_boxmode(gdl, (0xff >> shiftamount) + colour2);
|
||||
gDPFillRectangleScaled(gdl++, x - 3, y - 1, x + 2, y + 2);
|
||||
gDPFillRectangleScaled(gdl++, x - 2, y - 2, x + 1, y - 1);
|
||||
gdl = text0f153838(gdl);
|
||||
gdl = text_end_boxmode(gdl);
|
||||
|
||||
gdl = text_set_prim_colour(gdl, (0xff >> shiftamount) + colour1);
|
||||
gdl = text_begin_boxmode(gdl, (0xff >> shiftamount) + colour1);
|
||||
gDPFillRectangleScaled(gdl++, x - 2, y + 0, x + 1, y + 1);
|
||||
gDPFillRectangleScaled(gdl++, x - 1, y - 1, x + 0, y + 0);
|
||||
gdl = text0f153838(gdl);
|
||||
gdl = text_end_boxmode(gdl);
|
||||
} else if (g_RadarYIndicatorsEnabled && dist->y < -250) {
|
||||
// Down triangle
|
||||
gdl = text_set_prim_colour(gdl, (0xff >> shiftamount) + colour2);
|
||||
gdl = text_begin_boxmode(gdl, (0xff >> shiftamount) + colour2);
|
||||
gDPFillRectangleScaled(gdl++, x - 3, y - 2, x + 2, y + 1);
|
||||
gDPFillRectangleScaled(gdl++, x - 2, y + 1, x + 1, y + 2);
|
||||
gdl = text0f153838(gdl);
|
||||
gdl = text_end_boxmode(gdl);
|
||||
|
||||
gdl = text_set_prim_colour(gdl, (0xff >> shiftamount) + colour1);
|
||||
gdl = text_begin_boxmode(gdl, (0xff >> shiftamount) + colour1);
|
||||
gDPFillRectangleScaled(gdl++, x - 2, y - 1, x + 1, y + 0);
|
||||
gDPFillRectangleScaled(gdl++, x - 1, y + 0, x + 0, y + 1);
|
||||
gdl = text0f153838(gdl);
|
||||
gdl = text_end_boxmode(gdl);
|
||||
} else {
|
||||
// Dot
|
||||
gdl = text_set_prim_colour(gdl, (0xff >> shiftamount) + colour2);
|
||||
gdl = text_begin_boxmode(gdl, (0xff >> shiftamount) + colour2);
|
||||
gDPFillRectangleScaled(gdl++, x - 2, y - 2, x + 2, y + 2);
|
||||
gdl = text0f153838(gdl);
|
||||
gdl = text_end_boxmode(gdl);
|
||||
|
||||
gdl = text_set_prim_colour(gdl, (0xff >> shiftamount) + colour1);
|
||||
gdl = text_begin_boxmode(gdl, (0xff >> shiftamount) + colour1);
|
||||
gDPFillRectangleScaled(gdl++, x - 1, y - 1, x + 1, y + 1);
|
||||
gdl = text0f153838(gdl);
|
||||
gdl = text_end_boxmode(gdl);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -275,16 +275,16 @@ Gfx *radar_render(Gfx *gdl)
|
||||
}
|
||||
|
||||
#if PAL
|
||||
g_ScaleX = 1;
|
||||
g_UiScaleX = 1;
|
||||
#else
|
||||
if (g_ViRes == VIRES_HI) {
|
||||
g_ScaleX = 2;
|
||||
g_UiScaleX = 2;
|
||||
} else {
|
||||
g_ScaleX = 1;
|
||||
g_UiScaleX = 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
g_RadarX = (vi_get_view_left() + vi_get_view_width()) / g_ScaleX - 41;
|
||||
g_RadarX = (vi_get_view_left() + vi_get_view_width()) / g_UiScaleX - 41;
|
||||
|
||||
if (playercount == 2) {
|
||||
if (IS4MB() || options_get_screen_split() == SCREENSPLIT_VERTICAL) {
|
||||
@@ -414,7 +414,7 @@ Gfx *radar_render(Gfx *gdl)
|
||||
gdl = radar_draw_dot(gdl, g_Vars.currentplayer->prop, &pos, colour, 0, 0);
|
||||
}
|
||||
|
||||
g_ScaleX = 1;
|
||||
g_UiScaleX = 1;
|
||||
|
||||
return gdl;
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ void func0f0d4690(Mtxf *mtx)
|
||||
mtx4_set_translation(&pos, mtx);
|
||||
mtx00015e4c(-1, mtx);
|
||||
|
||||
if (g_ScaleX == 2) {
|
||||
if (g_UiScaleX == 2) {
|
||||
mtx00015df0(2, mtx);
|
||||
}
|
||||
}
|
||||
|
||||
+44
-54
@@ -343,9 +343,9 @@ s32 sight_calculate_box_bound(s32 targetx, s32 viewleft, s32 timeelapsed, s32 ti
|
||||
*/
|
||||
Gfx *sight_draw_target_box(Gfx *gdl, struct trackedprop *trackedprop, s32 textid, s32 time)
|
||||
{
|
||||
s32 viewleft = vi_get_view_left() / g_ScaleX;
|
||||
s32 viewleft = vi_get_view_left() / g_UiScaleX;
|
||||
s32 viewtop = vi_get_view_top();
|
||||
s32 viewwidth = vi_get_view_width() / g_ScaleX;
|
||||
s32 viewwidth = vi_get_view_width() / g_UiScaleX;
|
||||
s32 viewheight = vi_get_view_height();
|
||||
s32 viewright = viewleft + viewwidth - 1;
|
||||
s32 viewbottom = viewtop + viewheight - 1;
|
||||
@@ -360,15 +360,15 @@ Gfx *sight_draw_target_box(Gfx *gdl, struct trackedprop *trackedprop, s32 textid
|
||||
time = TICKS(512);
|
||||
}
|
||||
|
||||
boxleft = sight_calculate_box_bound(trackedprop->x1 / g_ScaleX, viewleft, time, TICKS(80));
|
||||
boxleft = sight_calculate_box_bound(trackedprop->x1 / g_UiScaleX, viewleft, time, TICKS(80));
|
||||
boxtop = sight_calculate_box_bound(trackedprop->y1, viewtop, time, TICKS(80));
|
||||
boxright = sight_calculate_box_bound(trackedprop->x2 / g_ScaleX, viewright, time, TICKS(80));
|
||||
boxright = sight_calculate_box_bound(trackedprop->x2 / g_UiScaleX, viewright, time, TICKS(80));
|
||||
boxbottom = sight_calculate_box_bound(trackedprop->y2, viewbottom, time, TICKS(80));
|
||||
|
||||
if (trackedprop->prop) {
|
||||
colour = sight_is_prop_friendly(trackedprop->prop) ? 0x000ff60 : 0xff000060;
|
||||
|
||||
gdl = text_set_prim_colour(gdl, colour);
|
||||
gdl = text_begin_boxmode(gdl, colour);
|
||||
|
||||
// Left
|
||||
if (boxleft >= viewleft && boxleft <= viewright && boxtop <= viewbottom && boxbottom >= viewtop) {
|
||||
@@ -402,7 +402,7 @@ Gfx *sight_draw_target_box(Gfx *gdl, struct trackedprop *trackedprop, s32 textid
|
||||
(boxright < viewright ? boxright : viewright), boxbottom);
|
||||
}
|
||||
|
||||
gdl = text0f153838(gdl);
|
||||
gdl = text_end_boxmode(gdl);
|
||||
|
||||
if (textid != 0 && textonscreen) {
|
||||
s32 x = boxright + 3;
|
||||
@@ -414,14 +414,10 @@ Gfx *sight_draw_target_box(Gfx *gdl, struct trackedprop *trackedprop, s32 textid
|
||||
// textid 1 writes '0'
|
||||
label[0] = textid + 0x2f;
|
||||
|
||||
gdl = text_render(gdl, &x, &y, label, g_CharsNumeric, g_FontNumeric, 0x00ff00a0, 0x000000a0, vi_get_width(), vi_get_height(), 0, 0);
|
||||
gdl = text_render_v1(gdl, &x, &y, label, g_CharsNumeric, g_FontNumeric, 0x00ff00a0, 0x000000a0, vi_get_width(), vi_get_height(), 0, 0);
|
||||
} else {
|
||||
char *text = lang_get(textid);
|
||||
#if VERSION >= VERSION_JPN_FINAL
|
||||
gdl = func0f1574d0jf(gdl, &x, &y, text, g_CharsHandelGothicXs, g_FontHandelGothicXs, 0x00ff00a0, 0x000000a0, vi_get_width(), vi_get_height(), 0, 0);
|
||||
#else
|
||||
gdl = text_render(gdl, &x, &y, text, g_CharsHandelGothicXs, g_FontHandelGothicXs, 0x00ff00a0, 0x000000a0, vi_get_width(), vi_get_height(), 0, 0);
|
||||
#endif
|
||||
gdl = text_render_vx(gdl, &x, &y, text, g_CharsHandelGothicXs, g_FontHandelGothicXs, 0x00ff00a0, 0x000000a0, vi_get_width(), vi_get_height(), 0, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -431,14 +427,14 @@ Gfx *sight_draw_target_box(Gfx *gdl, struct trackedprop *trackedprop, s32 textid
|
||||
|
||||
Gfx *sight_draw_aimer(Gfx *gdl, s32 x, s32 y, s32 radius, s32 cornergap, u32 colour)
|
||||
{
|
||||
s32 viewleft = vi_get_view_left() / g_ScaleX;
|
||||
s32 viewleft = vi_get_view_left() / g_UiScaleX;
|
||||
s32 viewtop = vi_get_view_top();
|
||||
s32 viewwidth = vi_get_view_width() / g_ScaleX;
|
||||
s32 viewwidth = vi_get_view_width() / g_UiScaleX;
|
||||
s32 viewheight = vi_get_view_height();
|
||||
s32 viewright = viewleft + viewwidth - 1;
|
||||
s32 viewbottom = viewtop + viewheight - 1;
|
||||
|
||||
gdl = text_set_prim_colour(gdl, 0x00ff0028);
|
||||
gdl = text_begin_boxmode(gdl, 0x00ff0028);
|
||||
|
||||
// Draw the lines that span most of the viewport
|
||||
if (PLAYERCOUNT() == 1) {
|
||||
@@ -453,8 +449,8 @@ Gfx *sight_draw_aimer(Gfx *gdl, s32 x, s32 y, s32 radius, s32 cornergap, u32 col
|
||||
gDPHudRectangle(gdl++, x, y + radius - 2, x, viewbottom);
|
||||
}
|
||||
|
||||
gdl = text0f153838(gdl);
|
||||
gdl = text_set_prim_colour(gdl, colour);
|
||||
gdl = text_end_boxmode(gdl);
|
||||
gdl = text_begin_boxmode(gdl, colour);
|
||||
|
||||
// Draw the box
|
||||
gDPHudRectangle(gdl++, x - radius, y - radius, x - radius, y + radius);
|
||||
@@ -472,7 +468,7 @@ Gfx *sight_draw_aimer(Gfx *gdl, s32 x, s32 y, s32 radius, s32 cornergap, u32 col
|
||||
gDPHudRectangle(gdl++, x - radius, y + radius, x - cornergap, y + radius);
|
||||
gDPHudRectangle(gdl++, x + cornergap, y + radius, x + radius, y + radius);
|
||||
|
||||
gdl = text0f153838(gdl);
|
||||
gdl = text_end_boxmode(gdl);
|
||||
|
||||
return gdl;
|
||||
}
|
||||
@@ -584,16 +580,16 @@ Gfx *sight_draw_delayed_aimer(Gfx *gdl, s32 x, s32 y, s32 radius, s32 cornergap,
|
||||
boxx = xpos;
|
||||
boxy = ypos;
|
||||
|
||||
gdl = text_set_prim_colour(gdl, 0x00ff0028);
|
||||
gdl = text_begin_boxmode(gdl, 0x00ff0028);
|
||||
|
||||
// Fill a 3x3 box at the live crosshair
|
||||
gDPHudRectangle(gdl++, x - 1, y - 1, x + 1, y - 1);
|
||||
gDPHudRectangle(gdl++, x - 1, y + 0, x + 1, y + 0);
|
||||
gDPHudRectangle(gdl++, x - 1, y + 1, x + 1, y + 1);
|
||||
|
||||
gdl = text0f153838(gdl);
|
||||
gdl = text_end_boxmode(gdl);
|
||||
|
||||
gdl = text_set_prim_colour(gdl, colour);
|
||||
gdl = text_begin_boxmode(gdl, colour);
|
||||
|
||||
// Draw the box
|
||||
gDPHudRectangle(gdl++, boxx - radius, boxy - radius, boxx - radius, boxy + radius);
|
||||
@@ -611,7 +607,7 @@ Gfx *sight_draw_delayed_aimer(Gfx *gdl, s32 x, s32 y, s32 radius, s32 cornergap,
|
||||
gDPHudRectangle(gdl++, boxx - radius, boxy + radius, boxx - cornergap, boxy + radius);
|
||||
gDPHudRectangle(gdl++, boxx + cornergap, boxy + radius, boxx + radius, boxy + radius);
|
||||
|
||||
gdl = text0f153838(gdl);
|
||||
gdl = text_end_boxmode(gdl);
|
||||
|
||||
return gdl;
|
||||
}
|
||||
@@ -621,7 +617,7 @@ Gfx *sight_draw_default(Gfx *gdl, bool sighton)
|
||||
s32 radius;
|
||||
s32 cornergap;
|
||||
u32 colour;
|
||||
s32 x = (s32) g_Vars.currentplayer->crosspos[0] / g_ScaleX;
|
||||
s32 x = (s32) g_Vars.currentplayer->crosspos[0] / g_UiScaleX;
|
||||
s32 y = g_Vars.currentplayer->crosspos[1];
|
||||
struct trackedprop *trackedprop;
|
||||
s32 i;
|
||||
@@ -629,7 +625,7 @@ Gfx *sight_draw_default(Gfx *gdl, bool sighton)
|
||||
static s32 sight = 0;
|
||||
static s32 identifytimer = 0;
|
||||
|
||||
gdl = text0f153628(gdl);
|
||||
gdl = text_begin(gdl);
|
||||
|
||||
if (1);
|
||||
|
||||
@@ -693,15 +689,9 @@ Gfx *sight_draw_default(Gfx *gdl, bool sighton)
|
||||
|
||||
if (identifytimer & 0x80) {
|
||||
// "Identify"
|
||||
#if VERSION == VERSION_JPN_FINAL
|
||||
gdl = func0f1574d0jf(gdl, &textx, &texty, lang_get(L_MISC_439),
|
||||
gdl = text_render_vx(gdl, &textx, &texty, lang_get(L_MISC_439),
|
||||
g_CharsHandelGothicXs, g_FontHandelGothicXs, 0x00ff00a0, 0x000000a0,
|
||||
vi_get_width(), vi_get_height(), 0, 0);
|
||||
#else
|
||||
gdl = text_render(gdl, &textx, &texty, lang_get(L_MISC_439),
|
||||
g_CharsHandelGothicXs, g_FontHandelGothicXs, 0x00ff00a0, 0x000000a0,
|
||||
vi_get_width(), vi_get_height(), 0, 0);
|
||||
#endif
|
||||
}
|
||||
|
||||
gdl = sight_draw_aimer(gdl, x, y, radius, cornergap, colour);
|
||||
@@ -807,7 +797,7 @@ Gfx *sight_draw_default(Gfx *gdl, bool sighton)
|
||||
break;
|
||||
}
|
||||
|
||||
gdl = text0f153780(gdl);
|
||||
gdl = text_end(gdl);
|
||||
|
||||
return gdl;
|
||||
}
|
||||
@@ -851,7 +841,7 @@ Gfx *sight_draw_classic(Gfx *gdl, bool sighton)
|
||||
spc4[0] = x;
|
||||
spc4[1] = y;
|
||||
|
||||
spbc[0] = (tconfig->width >> 1) * (f32)g_ScaleX;
|
||||
spbc[0] = (tconfig->width >> 1) * (f32)g_UiScaleX;
|
||||
spbc[1] = tconfig->height >> 1;
|
||||
|
||||
tex_select(&gdl, tconfig, 2, 0, 0, 1, NULL);
|
||||
@@ -965,15 +955,15 @@ Gfx *sight_draw_skedar_triangle(Gfx *gdl, s32 x, s32 y, s32 dir, u32 colour)
|
||||
|
||||
Gfx *sight_draw_skedar(Gfx *gdl, bool sighton)
|
||||
{
|
||||
s32 viewleft = vi_get_view_left() / g_ScaleX;
|
||||
s32 viewleft = vi_get_view_left() / g_UiScaleX;
|
||||
s32 viewtop = vi_get_view_top();
|
||||
s32 viewwidth = vi_get_view_width() / g_ScaleX;
|
||||
s32 viewwidth = vi_get_view_width() / g_UiScaleX;
|
||||
s32 viewheight = vi_get_view_height();
|
||||
s32 viewright = viewleft + viewwidth - 1;
|
||||
s32 viewbottom = viewtop + viewheight - 1;
|
||||
s32 paddingy = viewheight / 4;
|
||||
s32 paddingx = viewwidth / 4;
|
||||
s32 x = (s32) (g_Vars.currentplayer->crosspos[0] / g_ScaleX);
|
||||
s32 x = (s32) (g_Vars.currentplayer->crosspos[0] / g_UiScaleX);
|
||||
s32 trix1;
|
||||
s32 trix2;
|
||||
s32 y = g_Vars.currentplayer->crosspos[1];
|
||||
@@ -1149,9 +1139,9 @@ Gfx *sight_draw_skedar(Gfx *gdl, bool sighton)
|
||||
|
||||
Gfx *sight_draw_zoom(Gfx *gdl, bool sighton)
|
||||
{
|
||||
s32 viewleft = vi_get_view_left() / g_ScaleX;
|
||||
s32 viewleft = vi_get_view_left() / g_UiScaleX;
|
||||
s32 viewtop = vi_get_view_top();
|
||||
s32 viewhalfwidth = (vi_get_view_width() / g_ScaleX) >> 1;
|
||||
s32 viewhalfwidth = (vi_get_view_width() / g_UiScaleX) >> 1;
|
||||
s32 viewhalfheight = vi_get_view_height() >> 1;
|
||||
s32 viewright = viewleft + viewhalfwidth * 2 - 1;
|
||||
s32 viewbottom = viewtop + viewhalfheight * 2 - 1;
|
||||
@@ -1198,8 +1188,8 @@ Gfx *sight_draw_zoom(Gfx *gdl, bool sighton)
|
||||
}
|
||||
|
||||
if (showzoomrange) {
|
||||
gdl = text0f153628(gdl);
|
||||
gdl = text_set_prim_colour(gdl, 0x00ff0028);
|
||||
gdl = text_begin(gdl);
|
||||
gdl = text_begin_boxmode(gdl, 0x00ff0028);
|
||||
|
||||
if (frac < 0.2f) {
|
||||
cornerwidth *= 0.2f;
|
||||
@@ -1276,8 +1266,8 @@ Gfx *sight_draw_zoom(Gfx *gdl, bool sighton)
|
||||
gDPHudRectangle(gdl++, BOXRIGHT - cornerwidth, BOXBOTTOM, BOXRIGHT, BOXBOTTOM);
|
||||
gDPHudRectangle(gdl++, BOXRIGHT, BOXBOTTOM - cornerheight, BOXRIGHT, BOXBOTTOM);
|
||||
|
||||
gdl = text0f153838(gdl);
|
||||
gdl = text0f153780(gdl);
|
||||
gdl = text_end_boxmode(gdl);
|
||||
gdl = text_end(gdl);
|
||||
}
|
||||
|
||||
gdl = sight_draw_default(gdl, sighton);
|
||||
@@ -1287,13 +1277,13 @@ Gfx *sight_draw_zoom(Gfx *gdl, bool sighton)
|
||||
|
||||
Gfx *sight_draw_maian(Gfx *gdl, bool sighton)
|
||||
{
|
||||
s32 viewleft = vi_get_view_left() / g_ScaleX;
|
||||
s32 viewleft = vi_get_view_left() / g_UiScaleX;
|
||||
s32 viewtop = vi_get_view_top();
|
||||
s32 viewwidth = vi_get_view_width() / g_ScaleX;
|
||||
s32 viewwidth = vi_get_view_width() / g_UiScaleX;
|
||||
s32 viewheight = vi_get_view_height();
|
||||
s32 viewright = viewleft + viewwidth - 1;
|
||||
s32 viewbottom = viewtop + viewheight - 1;
|
||||
s32 x = (s32)g_Vars.currentplayer->crosspos[0] / g_ScaleX;
|
||||
s32 x = (s32)g_Vars.currentplayer->crosspos[0] / g_UiScaleX;
|
||||
s32 y = g_Vars.currentplayer->crosspos[1];
|
||||
Vtx *vertices;
|
||||
Col *colours;
|
||||
@@ -1369,7 +1359,7 @@ Gfx *sight_draw_maian(Gfx *gdl, bool sighton)
|
||||
gSPTri4(gdl++, 0, 4, 5, 5, 3, 6, 7, 6, 1, 4, 7, 2);
|
||||
|
||||
gdl = func0f0d49c8(gdl);
|
||||
gdl = text_set_prim_colour(gdl, 0x00ff0028);
|
||||
gdl = text_begin_boxmode(gdl, 0x00ff0028);
|
||||
|
||||
// Draw border over inner points
|
||||
gDPHudRectangle(gdl++, x - 4, y - 4, x - 4, y + 4); // left
|
||||
@@ -1377,14 +1367,14 @@ Gfx *sight_draw_maian(Gfx *gdl, bool sighton)
|
||||
gDPHudRectangle(gdl++, x - 4, y - 4, x + 4, y - 4); // top
|
||||
gDPHudRectangle(gdl++, x - 4, y + 4, x + 4, y + 4); // bottom
|
||||
|
||||
gdl = text0f153838(gdl);
|
||||
gdl = text_end_boxmode(gdl);
|
||||
|
||||
return gdl;
|
||||
}
|
||||
|
||||
Gfx *sight_draw_target(Gfx *gdl)
|
||||
{
|
||||
s32 x = (s32)g_Vars.currentplayer->crosspos[0] / g_ScaleX;
|
||||
s32 x = (s32)g_Vars.currentplayer->crosspos[0] / g_UiScaleX;
|
||||
s32 y = g_Vars.currentplayer->crosspos[1];
|
||||
|
||||
static u32 var80070f9c = 0x00ff00ff;
|
||||
@@ -1393,7 +1383,7 @@ Gfx *sight_draw_target(Gfx *gdl)
|
||||
main_override_variable("sout", &var80070f9c);
|
||||
main_override_variable("sin", &var80070fa0);
|
||||
|
||||
gdl = text_set_prim_colour(gdl, 0x00ff0028);
|
||||
gdl = text_begin_boxmode(gdl, 0x00ff0028);
|
||||
|
||||
gDPHudRectangle(gdl++, x + 2, y + 0, x + 6, y + 0);
|
||||
gDPHudRectangle(gdl++, x + 2, y + 0, x + 4, y + 0);
|
||||
@@ -1404,7 +1394,7 @@ Gfx *sight_draw_target(Gfx *gdl)
|
||||
gDPHudRectangle(gdl++, x + 0, y - 6, x + 0, y - 2);
|
||||
gDPHudRectangle(gdl++, x + 0, y - 4, x + 0, y - 2);
|
||||
|
||||
gdl = text0f153838(gdl);
|
||||
gdl = text_end_boxmode(gdl);
|
||||
|
||||
return gdl;
|
||||
}
|
||||
@@ -1434,12 +1424,12 @@ Gfx *sight_draw(Gfx *gdl, bool sighton, s32 sight)
|
||||
}
|
||||
|
||||
#if PAL
|
||||
g_ScaleX = 1;
|
||||
g_UiScaleX = 1;
|
||||
#else
|
||||
if (g_ViRes == VIRES_HI) {
|
||||
g_ScaleX = 2;
|
||||
g_UiScaleX = 2;
|
||||
} else {
|
||||
g_ScaleX = 1;
|
||||
g_UiScaleX = 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1485,7 +1475,7 @@ Gfx *sight_draw(Gfx *gdl, bool sighton, s32 sight)
|
||||
}
|
||||
}
|
||||
|
||||
g_ScaleX = 1;
|
||||
g_UiScaleX = 1;
|
||||
|
||||
return gdl;
|
||||
}
|
||||
|
||||
+2
-2
@@ -262,7 +262,7 @@ Gfx *stars_render(Gfx *gdl)
|
||||
sp148.f[1] = g_Vars.currentplayer->cam_look.f[1];
|
||||
sp148.f[2] = g_Vars.currentplayer->cam_look.f[2];
|
||||
|
||||
gdl = text_set_prim_colour(gdl, 0xffffffff);
|
||||
gdl = text_begin_boxmode(gdl, 0xffffffff);
|
||||
|
||||
gDPSetRenderMode(gdl++, G_RM_CLD_SURF, G_RM_CLD_SURF2);
|
||||
|
||||
@@ -330,7 +330,7 @@ Gfx *stars_render(Gfx *gdl)
|
||||
}
|
||||
}
|
||||
|
||||
gdl = text0f153838(gdl);
|
||||
gdl = text_end_boxmode(gdl);
|
||||
|
||||
return gdl;
|
||||
}
|
||||
|
||||
+468
-438
File diff suppressed because it is too large
Load Diff
+44
-44
@@ -237,7 +237,7 @@ Gfx *title0f0165f0(Gfx *gdl, s32 xcentre, s32 ycentre, s32 xscale, s32 yscale, c
|
||||
x = xcentre - xscale * textwidth / 2;
|
||||
y = ycentre - yscale * textheight / 2;
|
||||
|
||||
gdl = text_render_projected(gdl, &x, &y, text, font1, font2, colour, vi_get_width(), vi_get_height(), 0, 0);
|
||||
gdl = text_render_v2(gdl, &x, &y, text, font1, font2, colour, vi_get_width(), vi_get_height(), 0, 0);
|
||||
|
||||
return gdl;
|
||||
}
|
||||
@@ -333,7 +333,7 @@ Gfx *title_render_legal(Gfx *gdl)
|
||||
#if VERSION == VERSION_JPN_FINAL
|
||||
gdl = func0f0d479c(gdl);
|
||||
#endif
|
||||
gdl = text0f153628(gdl);
|
||||
gdl = text_begin(gdl);
|
||||
|
||||
elem = g_LegalElements;
|
||||
end = &g_LegalElements[ARRAYCOUNT(g_LegalElements)];
|
||||
@@ -383,15 +383,15 @@ Gfx *title_render_legal(Gfx *gdl)
|
||||
}
|
||||
|
||||
if (elem->type == LEGALELEMENTTYPE_LINE) {
|
||||
gdl = text0f153780(gdl);
|
||||
gdl = text_end(gdl);
|
||||
#if VERSION == VERSION_JPN_FINAL
|
||||
gdl = text0f153a34(gdl, elem->x, elem->y - 1, vi_get_width(), elem->y + 1, 0x7f7fff7f);
|
||||
gdl = text_draw_box(gdl, elem->x, elem->y - 1, vi_get_width(), elem->y + 1, 0x7f7fff7f);
|
||||
#else
|
||||
gdl = text0f153a34(gdl, elem->x, elem->y, vi_get_width(), elem->y + 2, 0x7f7fff7f);
|
||||
gdl = text_draw_box(gdl, elem->x, elem->y, vi_get_width(), elem->y + 2, 0x7f7fff7f);
|
||||
#endif
|
||||
gdl = text0f153628(gdl);
|
||||
gdl = text_begin(gdl);
|
||||
} else if (elem->type == LEGALELEMENTTYPE_DOLBYLOGO) {
|
||||
gdl = text0f153780(gdl);
|
||||
gdl = text_end(gdl);
|
||||
|
||||
gDPPipeSync(gdl++);
|
||||
gDPSetTexturePersp(gdl++, G_TP_NONE);
|
||||
@@ -412,9 +412,9 @@ Gfx *title_render_legal(Gfx *gdl)
|
||||
(elem->y + 24) << 2,
|
||||
G_TX_RENDERTILE, 0, 0x0300, 0x0400, -0x0400);
|
||||
|
||||
gdl = text0f153628(gdl);
|
||||
gdl = text_begin(gdl);
|
||||
} else if (elem->type == LEGALELEMENTTYPE_RARELOGO) {
|
||||
gdl = text0f153780(gdl);
|
||||
gdl = text_end(gdl);
|
||||
|
||||
gDPPipeSync(gdl++);
|
||||
gDPSetTexturePersp(gdl++, G_TP_NONE);
|
||||
@@ -435,7 +435,7 @@ Gfx *title_render_legal(Gfx *gdl)
|
||||
(elem->y + 42) << 2,
|
||||
G_TX_RENDERTILE, 0, 0x0540, 0x0400, -0x0400);
|
||||
|
||||
gdl = text0f153628(gdl);
|
||||
gdl = text_begin(gdl);
|
||||
} else {
|
||||
#if VERSION == VERSION_JPN_FINAL
|
||||
u32 stack;
|
||||
@@ -445,23 +445,23 @@ Gfx *title_render_legal(Gfx *gdl)
|
||||
if (elem->type == LEGALELEMENTTYPE_WHITETEXTLG || elem->type == LEGALELEMENTTYPE_WHITETEXTSM) {
|
||||
y -= 3;
|
||||
|
||||
var8007fad0 = 2;
|
||||
g_TextScaleX = 2;
|
||||
var80080108jf = 2;
|
||||
|
||||
if (elem->x == -1) {
|
||||
x += 24;
|
||||
}
|
||||
|
||||
gdl = text_render_projected(gdl, &x, &y, lang_get(elem->textid), font1, font2, colour, vi_get_width(), vi_get_height(), 0, 0);
|
||||
gdl = text_render_v2(gdl, &x, &y, lang_get(elem->textid), font1, font2, colour, vi_get_width(), vi_get_height(), 0, 0);
|
||||
|
||||
var8007fad0 = 1;
|
||||
g_TextScaleX = 1;
|
||||
var80080108jf = 1;
|
||||
} else {
|
||||
gdl = text_render_projected(gdl, &x, &y, lang_get(elem->textid), font1, font2, (colour & 0xffffff00) | ((colour & 0xff) * 2 / 3), vi_get_width(), vi_get_height(), 0, 0);
|
||||
gdl = text_render_v2(gdl, &x, &y, lang_get(elem->textid), font1, font2, (colour & 0xffffff00) | ((colour & 0xff) * 2 / 3), vi_get_width(), vi_get_height(), 0, 0);
|
||||
|
||||
x = elem->x == -1 ? prevx : elem->x;
|
||||
y = elem->y;
|
||||
gdl = text_render_projected(gdl, &x, &y, lang_get(elem->textid), font1, font2, colour, vi_get_width(), vi_get_height(), 0, 0);
|
||||
gdl = text_render_v2(gdl, &x, &y, lang_get(elem->textid), font1, font2, colour, vi_get_width(), vi_get_height(), 0, 0);
|
||||
|
||||
prevx = x;
|
||||
}
|
||||
@@ -470,28 +470,28 @@ Gfx *title_render_legal(Gfx *gdl)
|
||||
// Render a darker copy of the text one pixel above
|
||||
x = elem->x == -1 ? prevx : elem->x;
|
||||
y = elem->y - 1;
|
||||
gdl = text_render_projected(gdl, &x, &y, lang_get(elem->textid), font1, font2, (colour & 0xffffff00) | ((colour & 0xff) * 2 / 3), vi_get_width(), vi_get_height(), 0, 0);
|
||||
gdl = text_render_v2(gdl, &x, &y, lang_get(elem->textid), font1, font2, (colour & 0xffffff00) | ((colour & 0xff) * 2 / 3), vi_get_width(), vi_get_height(), 0, 0);
|
||||
|
||||
// Render the text properly
|
||||
x = elem->x == -1 ? prevx : elem->x;
|
||||
y = elem->y;
|
||||
gdl = text_render_projected(gdl, &x, &y, lang_get(elem->textid), font1, font2, colour, vi_get_width(), vi_get_height(), 0, 0);
|
||||
gdl = text_render_v2(gdl, &x, &y, lang_get(elem->textid), font1, font2, colour, vi_get_width(), vi_get_height(), 0, 0);
|
||||
|
||||
prevx = x;
|
||||
#elif VERSION >= VERSION_PAL_BETA
|
||||
x = elem->x == -1 ? prevx : elem->x;
|
||||
y = elem->y;
|
||||
gdl = text_render_projected(gdl, &x, &y, lang_get(elem->textid), font1, font2, colour, vi_get_width(), vi_get_height(), 0, 0);
|
||||
gdl = text_render_v2(gdl, &x, &y, lang_get(elem->textid), font1, font2, colour, vi_get_width(), vi_get_height(), 0, 0);
|
||||
prevx = x;
|
||||
#else
|
||||
x = elem->x;
|
||||
y = elem->y;
|
||||
gdl = text_render_projected(gdl, &x, &y, lang_get(elem->textid), font1, font2, colour, vi_get_width(), vi_get_height(), 0, 0);
|
||||
gdl = text_render_v2(gdl, &x, &y, lang_get(elem->textid), font1, font2, colour, vi_get_width(), vi_get_height(), 0, 0);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
gdl = text0f153780(gdl);
|
||||
gdl = text_end(gdl);
|
||||
}
|
||||
|
||||
return gdl;
|
||||
@@ -1702,7 +1702,7 @@ Gfx *title_render_typewriter_text(Gfx *gdl, s32 *x, s32 *y, u16 textnum, s32 tim
|
||||
*colourcomponent = tmp = (60 - remaining) * 255 / 60;
|
||||
|
||||
buffer[0] = text[i];
|
||||
gdl = text_render_projected(gdl, x, y, buffer, g_CharsHandelGothicLg, g_FontHandelGothicLg,
|
||||
gdl = text_render_v2(gdl, x, y, buffer, g_CharsHandelGothicLg, g_FontHandelGothicLg,
|
||||
0x7f7fffff | (tmp << 8) | (tmp << 16), vi_get_width(), vi_get_height(), 0, 0);
|
||||
}
|
||||
|
||||
@@ -1716,7 +1716,7 @@ Gfx *title_render_rare_presents(Gfx *gdl)
|
||||
s32 colourcomponent = 255;
|
||||
|
||||
gdl = title_clear(gdl);
|
||||
gdl = text0f153628(gdl);
|
||||
gdl = text_begin(gdl);
|
||||
|
||||
x = vi_get_view_left() + 50;
|
||||
y = vi_get_view_top() + vi_get_view_height() - 80;
|
||||
@@ -1735,7 +1735,7 @@ Gfx *title_render_rare_presents(Gfx *gdl)
|
||||
gdl = title_render_typewriter_text(gdl, &x, &y, L_OPTIONS_007, g_TitleTimer - 35, &colourcomponent); // "rare presents"
|
||||
}
|
||||
|
||||
gdl = text0f153780(gdl);
|
||||
gdl = text_end(gdl);
|
||||
|
||||
if (g_TitleTypewriterFinishing) {
|
||||
if (g_TitleAudioHandle == NULL) {
|
||||
@@ -1751,7 +1751,7 @@ Gfx *title_render_rare_presents(Gfx *gdl)
|
||||
|
||||
if (((s32)(g_20SecIntervalFrac * 80.0f) % 2) == 0) {
|
||||
u32 colour = (colourcomponent << 8) | 0x7f7fffff | (colourcomponent << 16);
|
||||
gdl = text0f153a34(gdl, x + 2, y, x + 12, y + 20, colour);
|
||||
gdl = text_draw_box(gdl, x + 2, y, x + 12, y + 20, colour);
|
||||
}
|
||||
|
||||
gdl = bview_draw_intro_text(gdl);
|
||||
@@ -1760,7 +1760,7 @@ Gfx *title_render_rare_presents(Gfx *gdl)
|
||||
f32 alpha = ((g_TitleTimer - TICKS(222.0f)) / TICKS(78.0f));
|
||||
u32 stack;
|
||||
|
||||
gdl = text0f153a34(gdl, vi_get_view_left(), vi_get_view_top(),
|
||||
gdl = text_draw_box(gdl, vi_get_view_left(), vi_get_view_top(),
|
||||
vi_get_view_left() + vi_get_view_width(),
|
||||
vi_get_view_top() + vi_get_view_height(),
|
||||
255.0f * alpha);
|
||||
@@ -2277,12 +2277,12 @@ Gfx *title_render_no_controller(Gfx *gdl)
|
||||
joy_get_connected_controllers();
|
||||
|
||||
gdl = title_clear(gdl);
|
||||
gdl = text0f153628(gdl);
|
||||
gdl = text_begin(gdl);
|
||||
|
||||
#if VERSION >= VERSION_JPN_FINAL
|
||||
y = g_TitleViewHeight / 2 - 50;
|
||||
|
||||
var8007fad0 = 2;
|
||||
g_TextScaleX = 2;
|
||||
var80080108jf = 2;
|
||||
|
||||
// Line 1
|
||||
@@ -2290,7 +2290,7 @@ Gfx *title_render_no_controller(Gfx *gdl)
|
||||
text_measure(&textheight, &textwidth, text, g_CharsHandelGothicLg, g_FontHandelGothicLg, 0);
|
||||
|
||||
x = 288 - textwidth;
|
||||
gdl = text_render_projected(gdl, &x, &y, text, g_CharsHandelGothicLg, g_FontHandelGothicLg, 0xffffffff, vi_get_width(), vi_get_height(), 0, 0);
|
||||
gdl = text_render_v2(gdl, &x, &y, text, g_CharsHandelGothicLg, g_FontHandelGothicLg, 0xffffffff, vi_get_width(), vi_get_height(), 0, 0);
|
||||
y += 18;
|
||||
|
||||
// Line 2
|
||||
@@ -2298,7 +2298,7 @@ Gfx *title_render_no_controller(Gfx *gdl)
|
||||
text_measure(&textheight, &textwidth, text, g_CharsHandelGothicLg, g_FontHandelGothicLg, 0);
|
||||
|
||||
x = 288 - textwidth;
|
||||
gdl = text_render_projected(gdl, &x, &y, text, g_CharsHandelGothicLg, g_FontHandelGothicLg, 0xffffffff, vi_get_width(), vi_get_height(), 0, 0);
|
||||
gdl = text_render_v2(gdl, &x, &y, text, g_CharsHandelGothicLg, g_FontHandelGothicLg, 0xffffffff, vi_get_width(), vi_get_height(), 0, 0);
|
||||
y += 28;
|
||||
|
||||
// Line 3
|
||||
@@ -2306,7 +2306,7 @@ Gfx *title_render_no_controller(Gfx *gdl)
|
||||
text_measure(&textheight, &textwidth, text, g_CharsHandelGothicLg, g_FontHandelGothicLg, 0);
|
||||
|
||||
x = 288 - textwidth;
|
||||
gdl = text_render_projected(gdl, &x, &y, text, g_CharsHandelGothicLg, g_FontHandelGothicLg, 0xffffffff, vi_get_width(), vi_get_height(), 0, 0);
|
||||
gdl = text_render_v2(gdl, &x, &y, text, g_CharsHandelGothicLg, g_FontHandelGothicLg, 0xffffffff, vi_get_width(), vi_get_height(), 0, 0);
|
||||
y += 18;
|
||||
|
||||
// Line 4
|
||||
@@ -2314,10 +2314,10 @@ Gfx *title_render_no_controller(Gfx *gdl)
|
||||
text_measure(&textheight, &textwidth, text, g_CharsHandelGothicLg, g_FontHandelGothicLg, 0);
|
||||
|
||||
x = 288 - textwidth;
|
||||
gdl = text_render_projected(gdl, &x, &y, text, g_CharsHandelGothicLg, g_FontHandelGothicLg, 0xffffffff, vi_get_width(), vi_get_height(), 0, 0);
|
||||
gdl = text_render_v2(gdl, &x, &y, text, g_CharsHandelGothicLg, g_FontHandelGothicLg, 0xffffffff, vi_get_width(), vi_get_height(), 0, 0);
|
||||
y += 18;
|
||||
|
||||
var8007fad0 = 1;
|
||||
g_TextScaleX = 1;
|
||||
var80080108jf = 1;
|
||||
#else
|
||||
// Line 1
|
||||
@@ -2329,10 +2329,10 @@ Gfx *title_render_no_controller(Gfx *gdl)
|
||||
|
||||
if (g_Jpn) {
|
||||
width = vi_get_width();
|
||||
gdl = text_render(gdl, &x, &y, text, g_CharsHandelGothicLg, g_FontHandelGothicLg, 0xffffffff, 0x008000ff, width, vi_get_height(), 0, 0);
|
||||
gdl = text_render_v1(gdl, &x, &y, text, g_CharsHandelGothicLg, g_FontHandelGothicLg, 0xffffffff, 0x008000ff, width, vi_get_height(), 0, 0);
|
||||
} else {
|
||||
width = vi_get_width();
|
||||
gdl = text_render_projected(gdl, &x, &y, text, g_CharsHandelGothicLg, g_FontHandelGothicLg, 0xffffffff, width, vi_get_height(), 0, 0);
|
||||
gdl = text_render_v2(gdl, &x, &y, text, g_CharsHandelGothicLg, g_FontHandelGothicLg, 0xffffffff, width, vi_get_height(), 0, 0);
|
||||
}
|
||||
|
||||
// Line 2
|
||||
@@ -2344,14 +2344,14 @@ Gfx *title_render_no_controller(Gfx *gdl)
|
||||
|
||||
if (g_Jpn) {
|
||||
width = vi_get_width();
|
||||
gdl = text_render(gdl, &x, &y, text, g_CharsHandelGothicLg, g_FontHandelGothicLg, 0xffffffff, 0x008000ff, width, vi_get_height(), 0, 0);
|
||||
gdl = text_render_v1(gdl, &x, &y, text, g_CharsHandelGothicLg, g_FontHandelGothicLg, 0xffffffff, 0x008000ff, width, vi_get_height(), 0, 0);
|
||||
} else {
|
||||
width = vi_get_width();
|
||||
gdl = text_render_projected(gdl, &x, &y, text, g_CharsHandelGothicLg, g_FontHandelGothicLg, 0xffffffff, width, vi_get_height(), 0, 0);
|
||||
gdl = text_render_v2(gdl, &x, &y, text, g_CharsHandelGothicLg, g_FontHandelGothicLg, 0xffffffff, width, vi_get_height(), 0, 0);
|
||||
}
|
||||
#endif
|
||||
|
||||
gdl = text0f153780(gdl);
|
||||
gdl = text_end(gdl);
|
||||
|
||||
return gdl;
|
||||
}
|
||||
@@ -2401,39 +2401,39 @@ Gfx *title_render_no_expansion(Gfx *gdl)
|
||||
joy_get_connected_controllers();
|
||||
|
||||
gdl = title_clear(gdl);
|
||||
gdl = text0f153628(gdl);
|
||||
gdl = text_begin(gdl);
|
||||
|
||||
x = 50;
|
||||
y = g_TitleViewHeight / 2 - 36;
|
||||
|
||||
var8007fad0 = 2;
|
||||
g_TextScaleX = 2;
|
||||
var80080108jf = 2;
|
||||
|
||||
text = lang_get(L_MPWEAPONS_281);
|
||||
text_measure(&textheight, &textwidth, text, g_CharsHandelGothicLg, g_FontHandelGothicLg, 0);
|
||||
x = 288 - textwidth;
|
||||
width = vi_get_width();
|
||||
gdl = text_render_projected(gdl, &x, &y, text, g_CharsHandelGothicLg, g_FontHandelGothicLg, 0xffffffff, width, vi_get_height(), 0, 0);
|
||||
gdl = text_render_v2(gdl, &x, &y, text, g_CharsHandelGothicLg, g_FontHandelGothicLg, 0xffffffff, width, vi_get_height(), 0, 0);
|
||||
y += 18;
|
||||
|
||||
text = lang_get(L_MPWEAPONS_282);
|
||||
text_measure(&textheight, &textwidth, text, g_CharsHandelGothicLg, g_FontHandelGothicLg, 0);
|
||||
x = 288 - textwidth;
|
||||
width = vi_get_width();
|
||||
gdl = text_render_projected(gdl, &x, &y, text, g_CharsHandelGothicLg, g_FontHandelGothicLg, 0xffffffff, width, vi_get_height(), 0, 0);
|
||||
gdl = text_render_v2(gdl, &x, &y, text, g_CharsHandelGothicLg, g_FontHandelGothicLg, 0xffffffff, width, vi_get_height(), 0, 0);
|
||||
y += 18;
|
||||
|
||||
text = lang_get(L_MPWEAPONS_284);
|
||||
text_measure(&textheight, &textwidth, text, g_CharsHandelGothicLg, g_FontHandelGothicLg, 0);
|
||||
x = 288 - textwidth;
|
||||
width = vi_get_width();
|
||||
gdl = text_render_projected(gdl, &x, &y, text, g_CharsHandelGothicLg, g_FontHandelGothicLg, 0xffffffff, width, vi_get_height(), 0, 0);
|
||||
gdl = text_render_v2(gdl, &x, &y, text, g_CharsHandelGothicLg, g_FontHandelGothicLg, 0xffffffff, width, vi_get_height(), 0, 0);
|
||||
y += 18;
|
||||
|
||||
var8007fad0 = 1;
|
||||
g_TextScaleX = 1;
|
||||
var80080108jf = 1;
|
||||
|
||||
gdl = text0f153780(gdl);
|
||||
gdl = text_end(gdl);
|
||||
|
||||
return gdl;
|
||||
}
|
||||
|
||||
+13
-18
@@ -3668,13 +3668,13 @@ Gfx *fr_render_hud_element(Gfx *gdl, s32 x, s32 y, char *string1, char *string2,
|
||||
|
||||
x2 = x - (textwidth >> 1);
|
||||
y2 = y;
|
||||
gdl = text0f153858(gdl, &x2, &y2, &textwidth, &textheight);
|
||||
gdl = text_draw_black_box(gdl, &x2, &y2, &textwidth, &textheight);
|
||||
|
||||
#if VERSION >= VERSION_JPN_FINAL
|
||||
gdl = func0f1574d0jf(gdl, &x2, &y2, string1,
|
||||
gdl = text_render_vx(gdl, &x2, &y2, string1,
|
||||
g_CharsHandelGothicMd, g_FontHandelGothicMd, fullcolour, halfalpha, vi_get_width(), vi_get_height(), 0, 0);
|
||||
|
||||
if (string2) {
|
||||
#if VERSION >= VERSION_JPN_FINAL
|
||||
s32 textheight2;
|
||||
s32 textwidth2;
|
||||
s32 textheight3;
|
||||
@@ -3689,9 +3689,9 @@ Gfx *fr_render_hud_element(Gfx *gdl, s32 x, s32 y, char *string1, char *string2,
|
||||
y2 = y;
|
||||
y2 += 17;
|
||||
|
||||
gdl = text0f153858(gdl, &x2, &y2, &textwidth, &textheight);
|
||||
gdl = text_draw_black_box(gdl, &x2, &y2, &textwidth, &textheight);
|
||||
|
||||
gdl = func0f1574d0jf(gdl, &x2, &y2, string2,
|
||||
gdl = text_render_vx(gdl, &x2, &y2, string2,
|
||||
g_CharsHandelGothicSm, g_FontHandelGothicSm, fullcolour, halfalpha, vi_get_width(), vi_get_height(), 0, 0);
|
||||
|
||||
y2 = y;
|
||||
@@ -3699,24 +3699,19 @@ Gfx *fr_render_hud_element(Gfx *gdl, s32 x, s32 y, char *string1, char *string2,
|
||||
y2++;
|
||||
x2 -= 4;
|
||||
|
||||
gdl = func0f1574d0jf(gdl, &x2, &y2, string3,
|
||||
gdl = text_render_vx(gdl, &x2, &y2, string3,
|
||||
g_CharsHandelGothicSm, g_FontHandelGothicSm, fullcolour, halfalpha, vi_get_width(), vi_get_height(), 0, 0);
|
||||
}
|
||||
#else
|
||||
gdl = text_render(gdl, &x2, &y2, string1,
|
||||
g_CharsHandelGothicMd, g_FontHandelGothicMd, fullcolour, halfalpha, vi_get_width(), vi_get_height(), 0, 0);
|
||||
|
||||
if (string2) {
|
||||
text_measure(&textheight, &textwidth, string2, g_CharsHandelGothicXs, g_FontHandelGothicXs, 0);
|
||||
|
||||
x2 = x - (textwidth >> 1);
|
||||
y2 = y + 17;
|
||||
gdl = text0f153858(gdl, &x2, &y2, &textwidth, &textheight);
|
||||
gdl = text_draw_black_box(gdl, &x2, &y2, &textwidth, &textheight);
|
||||
|
||||
gdl = text_render(gdl, &x2, &y2, string2,
|
||||
gdl = text_render_vx(gdl, &x2, &y2, string2,
|
||||
g_CharsHandelGothicXs, g_FontHandelGothicXs, fullcolour, halfalpha, vi_get_width(), vi_get_height(), 0, 0);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
return gdl;
|
||||
}
|
||||
@@ -3746,7 +3741,7 @@ Gfx *fr_render_hud(Gfx *gdl)
|
||||
alpha = (f32)(g_FrData.menucountdown * 160) / TICKS(60.0f);
|
||||
}
|
||||
|
||||
gdl = text0f153628(gdl);
|
||||
gdl = text_begin(gdl);
|
||||
|
||||
// Time
|
||||
red = fr_format_time(string1);
|
||||
@@ -3790,7 +3785,7 @@ Gfx *fr_render_hud(Gfx *gdl)
|
||||
string1, string2, string3, 0x00ff00a0, alpha);
|
||||
}
|
||||
|
||||
return text0f153780(gdl);
|
||||
return text_end(gdl);
|
||||
}
|
||||
#else
|
||||
Gfx *fr_render_hud(Gfx *gdl)
|
||||
@@ -3816,7 +3811,7 @@ Gfx *fr_render_hud(Gfx *gdl)
|
||||
alpha = (f32)(g_FrData.menucountdown * 160) / TICKS(60.0f);
|
||||
}
|
||||
|
||||
gdl = text0f153628(gdl);
|
||||
gdl = text_begin(gdl);
|
||||
|
||||
// Time
|
||||
red = fr_format_time(string1);
|
||||
@@ -3858,6 +3853,6 @@ Gfx *fr_render_hud(Gfx *gdl)
|
||||
string1, string2, 0x00ff00a0, alpha);
|
||||
}
|
||||
|
||||
return text0f153780(gdl);
|
||||
return text_end(gdl);
|
||||
}
|
||||
#endif
|
||||
|
||||
+66
-66
@@ -154,9 +154,9 @@ MenuItemHandlerResult fr_weapon_list_menu_handler(s32 operation, struct menuitem
|
||||
y++;
|
||||
#endif
|
||||
|
||||
gdl = text0f153628(gdl);
|
||||
gdl = text_render_projected(gdl, &x, &y, bgun_get_name(weaponnum2), g_CharsHandelGothicSm, g_FontHandelGothicSm, renderdata->colour, vi_get_width(), vi_get_height(), 0, 0);
|
||||
gdl = text0f153780(gdl);
|
||||
gdl = text_begin(gdl);
|
||||
gdl = text_render_v2(gdl, &x, &y, bgun_get_name(weaponnum2), g_CharsHandelGothicSm, g_FontHandelGothicSm, renderdata->colour, vi_get_width(), vi_get_height(), 0, 0);
|
||||
gdl = text_end(gdl);
|
||||
|
||||
// Prepare the star texture for the difficulties
|
||||
gDPPipeSync(gdl++);
|
||||
@@ -201,9 +201,9 @@ MenuItemHandlerResult fr_weapon_list_menu_handler(s32 operation, struct menuitem
|
||||
TEXEL0, 0, ENVIRONMENT, 0, TEXEL0, 0, ENVIRONMENT, 0);
|
||||
|
||||
gSPTextureRectangle(gdl++,
|
||||
(((renderdata->x + i * 13) + 125) << 2) * g_ScaleX, (renderdata->y) << 2,
|
||||
(((renderdata->x + i * 13) + 136) << 2) * g_ScaleX, (renderdata->y + 11) << 2,
|
||||
G_TX_RENDERTILE, 0, 0x0160, 1024 / g_ScaleX, -1024);
|
||||
(((renderdata->x + i * 13) + 125) << 2) * g_UiScaleX, (renderdata->y) << 2,
|
||||
(((renderdata->x + i * 13) + 136) << 2) * g_UiScaleX, (renderdata->y + 11) << 2,
|
||||
G_TX_RENDERTILE, 0, 0x0160, 1024 / g_UiScaleX, -1024);
|
||||
}
|
||||
|
||||
return (s32)gdl;
|
||||
@@ -645,33 +645,33 @@ MenuItemHandlerResult fr_scoring_menu_handler(s32 operation, struct menuitem *it
|
||||
|
||||
// Top left quarter of target
|
||||
gSPTextureRectangle(gdl++,
|
||||
((renderdata->x + 10) << 2) * g_ScaleX, (renderdata->y + 5) << 2,
|
||||
((renderdata->x + 42) << 2) * g_ScaleX, (renderdata->y + 37) << 2,
|
||||
G_TX_RENDERTILE, 16, 1024, 1024 / g_ScaleX, -1024);
|
||||
((renderdata->x + 10) << 2) * g_UiScaleX, (renderdata->y + 5) << 2,
|
||||
((renderdata->x + 42) << 2) * g_UiScaleX, (renderdata->y + 37) << 2,
|
||||
G_TX_RENDERTILE, 16, 1024, 1024 / g_UiScaleX, -1024);
|
||||
|
||||
// Top right quarter of target
|
||||
gSPTextureRectangle(gdl++,
|
||||
((renderdata->x + 41) << 2) * g_ScaleX, (renderdata->y + 5) << 2,
|
||||
((renderdata->x + 73) << 2) * g_ScaleX, (renderdata->y + 37) << 2,
|
||||
G_TX_RENDERTILE, 16, 1024, -1024 / g_ScaleX, -1024);
|
||||
((renderdata->x + 41) << 2) * g_UiScaleX, (renderdata->y + 5) << 2,
|
||||
((renderdata->x + 73) << 2) * g_UiScaleX, (renderdata->y + 37) << 2,
|
||||
G_TX_RENDERTILE, 16, 1024, -1024 / g_UiScaleX, -1024);
|
||||
|
||||
// Bottom left quarter of target
|
||||
gSPTextureRectangle(gdl++,
|
||||
((renderdata->x + 10) << 2) * g_ScaleX, (renderdata->y + 36) << 2,
|
||||
((renderdata->x + 42) << 2) * g_ScaleX, (renderdata->y + 68) << 2,
|
||||
G_TX_RENDERTILE, 16, 1024, 1024 / g_ScaleX, 1024);
|
||||
((renderdata->x + 10) << 2) * g_UiScaleX, (renderdata->y + 36) << 2,
|
||||
((renderdata->x + 42) << 2) * g_UiScaleX, (renderdata->y + 68) << 2,
|
||||
G_TX_RENDERTILE, 16, 1024, 1024 / g_UiScaleX, 1024);
|
||||
|
||||
// Bottom right quarter of target
|
||||
gSPTextureRectangle(gdl++,
|
||||
((renderdata->x + 41) << 2) * g_ScaleX, (renderdata->y + 36) << 2,
|
||||
((renderdata->x + 73) << 2) * g_ScaleX, (renderdata->y + 68) << 2,
|
||||
G_TX_RENDERTILE, 16, 1024, -1024 / g_ScaleX, 1024);
|
||||
((renderdata->x + 41) << 2) * g_UiScaleX, (renderdata->y + 36) << 2,
|
||||
((renderdata->x + 73) << 2) * g_UiScaleX, (renderdata->y + 68) << 2,
|
||||
G_TX_RENDERTILE, 16, 1024, -1024 / g_UiScaleX, 1024);
|
||||
|
||||
#if VERSION >= VERSION_NTSC_1_0
|
||||
gdl = text_set_prim_colour(gdl, ((failed ? 0xff000055 : 0x00ff0055) & 0xffffff00) | (((failed ? 0xff000055 : 0x00ff0055) & 0xff) * (renderdata->colour & 0xff) >> 8));
|
||||
gdl = text_begin_boxmode(gdl, ((failed ? 0xff000055 : 0x00ff0055) & 0xffffff00) | (((failed ? 0xff000055 : 0x00ff0055) & 0xff) * (renderdata->colour & 0xff) >> 8));
|
||||
colour = ((failed ? 0xff6969aa : renderdata->colour) & 0xffffff00) | ((((failed ? 0xff6969aa : renderdata->colour) & 0xff) * (renderdata->colour & 0xff)) >> 8);
|
||||
#else
|
||||
gdl = text_set_prim_colour(gdl, failed ? 0xff000055 : 0x00ff0055);
|
||||
gdl = text_begin_boxmode(gdl, failed ? 0xff000055 : 0x00ff0055);
|
||||
#endif
|
||||
|
||||
// NTSC beta uses a static alpha channel, while newer versions take the
|
||||
@@ -691,90 +691,90 @@ MenuItemHandlerResult fr_scoring_menu_handler(s32 operation, struct menuitem *it
|
||||
sprintf(text, "%d\n", frdata->numhitsbullseye);
|
||||
x = renderdata->x + 93;
|
||||
y = renderdata->y + (VERSION == VERSION_JPN_FINAL ? 15 : 14);
|
||||
gdl = text0f153858(gdl, &x, &y, &textheight, &textwidth);
|
||||
gdl = text_render_projected(gdl, &x, &y, text, g_CharsHandelGothicSm, g_FontHandelGothicSm, COLOUR(), vi_get_width(), vi_get_height(), 0, 0);
|
||||
gdl = text_draw_black_box(gdl, &x, &y, &textheight, &textwidth);
|
||||
gdl = text_render_v2(gdl, &x, &y, text, g_CharsHandelGothicSm, g_FontHandelGothicSm, COLOUR(), vi_get_width(), vi_get_height(), 0, 0);
|
||||
|
||||
// "Bull's-eye"
|
||||
sprintf(text, lang_get(L_MPMENU_461));
|
||||
x = renderdata->x + 122;
|
||||
y = renderdata->y + 14;
|
||||
gdl = text0f153858(gdl, &x, &y, &textheight, &textwidth);
|
||||
gdl = text_render_projected(gdl, &x, &y, text, g_CharsHandelGothicSm, g_FontHandelGothicSm, COLOUR(), vi_get_width(), vi_get_height(), 0, 0);
|
||||
gdl = text_draw_black_box(gdl, &x, &y, &textheight, &textwidth);
|
||||
gdl = text_render_v2(gdl, &x, &y, text, g_CharsHandelGothicSm, g_FontHandelGothicSm, COLOUR(), vi_get_width(), vi_get_height(), 0, 0);
|
||||
|
||||
// Bull's-eye score
|
||||
sprintf(text, "%d\n", frdata->numhitsbullseye * 10);
|
||||
text_measure(&textheight, &textwidth, text, g_CharsHandelGothicSm, g_FontHandelGothicSm, 0);
|
||||
x = renderdata->x - textheight + (VERSION == VERSION_JPN_FINAL ? 192 : 182);
|
||||
y = renderdata->y + (VERSION == VERSION_JPN_FINAL ? 15 : 14);
|
||||
gdl = text0f153858(gdl, &x, &y, &textheight, &textwidth);
|
||||
gdl = text_render_projected(gdl, &x, &y, text, g_CharsHandelGothicSm, g_FontHandelGothicSm, COLOUR(), vi_get_width(), vi_get_height(), 0, 0);
|
||||
gdl = text_draw_black_box(gdl, &x, &y, &textheight, &textwidth);
|
||||
gdl = text_render_v2(gdl, &x, &y, text, g_CharsHandelGothicSm, g_FontHandelGothicSm, COLOUR(), vi_get_width(), vi_get_height(), 0, 0);
|
||||
|
||||
// Zone 1 count
|
||||
sprintf(text, "%d\n", frdata->numhitsring1);
|
||||
x = renderdata->x + 93;
|
||||
y = renderdata->y + (VERSION == VERSION_JPN_FINAL ? 27 : 25);
|
||||
gdl = text0f153858(gdl, &x, &y, &textheight, &textwidth);
|
||||
gdl = text_render_projected(gdl, &x, &y, text, g_CharsHandelGothicSm, g_FontHandelGothicSm, COLOUR(), vi_get_width(), vi_get_height(), 0, 0);
|
||||
gdl = text_draw_black_box(gdl, &x, &y, &textheight, &textwidth);
|
||||
gdl = text_render_v2(gdl, &x, &y, text, g_CharsHandelGothicSm, g_FontHandelGothicSm, COLOUR(), vi_get_width(), vi_get_height(), 0, 0);
|
||||
|
||||
// "Zone 1"
|
||||
sprintf(text, lang_get(L_MPMENU_462));
|
||||
x = renderdata->x + 122;
|
||||
y = renderdata->y + (VERSION == VERSION_JPN_FINAL ? 26 : 25);
|
||||
gdl = text0f153858(gdl, &x, &y, &textheight, &textwidth);
|
||||
gdl = text_render_projected(gdl, &x, &y, text, g_CharsHandelGothicSm, g_FontHandelGothicSm, COLOUR(), vi_get_width(), vi_get_height(), 0, 0);
|
||||
gdl = text_draw_black_box(gdl, &x, &y, &textheight, &textwidth);
|
||||
gdl = text_render_v2(gdl, &x, &y, text, g_CharsHandelGothicSm, g_FontHandelGothicSm, COLOUR(), vi_get_width(), vi_get_height(), 0, 0);
|
||||
|
||||
// Zone 1 score
|
||||
sprintf(text, "%d\n", frdata->numhitsring1 * 5);
|
||||
text_measure(&textheight, &textwidth, text, g_CharsHandelGothicSm, g_FontHandelGothicSm, 0);
|
||||
x = renderdata->x - textheight + (VERSION == VERSION_JPN_FINAL ? 192 : 182);
|
||||
y = renderdata->y + (VERSION == VERSION_JPN_FINAL ? 27 : 25);
|
||||
gdl = text0f153858(gdl, &x, &y, &textheight, &textwidth);
|
||||
gdl = text_render_projected(gdl, &x, &y, text, g_CharsHandelGothicSm, g_FontHandelGothicSm, COLOUR(), vi_get_width(), vi_get_height(), 0, 0);
|
||||
gdl = text_draw_black_box(gdl, &x, &y, &textheight, &textwidth);
|
||||
gdl = text_render_v2(gdl, &x, &y, text, g_CharsHandelGothicSm, g_FontHandelGothicSm, COLOUR(), vi_get_width(), vi_get_height(), 0, 0);
|
||||
|
||||
// Zone 2 count
|
||||
sprintf(text, "%d\n", frdata->numhitsring2);
|
||||
x = renderdata->x + 93;
|
||||
y = renderdata->y + (VERSION == VERSION_JPN_FINAL ? 39 : 36);
|
||||
gdl = text0f153858(gdl, &x, &y, &textheight, &textwidth);
|
||||
gdl = text_render_projected(gdl, &x, &y, text, g_CharsHandelGothicSm, g_FontHandelGothicSm, COLOUR(), vi_get_width(), vi_get_height(), 0, 0);
|
||||
gdl = text_draw_black_box(gdl, &x, &y, &textheight, &textwidth);
|
||||
gdl = text_render_v2(gdl, &x, &y, text, g_CharsHandelGothicSm, g_FontHandelGothicSm, COLOUR(), vi_get_width(), vi_get_height(), 0, 0);
|
||||
|
||||
// "Zone 2"
|
||||
sprintf(text, lang_get(L_MPMENU_463));
|
||||
x = renderdata->x + 122;
|
||||
y = renderdata->y + (VERSION == VERSION_JPN_FINAL ? 38 : 36);
|
||||
gdl = text0f153858(gdl, &x, &y, &textheight, &textwidth);
|
||||
gdl = text_render_projected(gdl, &x, &y, text, g_CharsHandelGothicSm, g_FontHandelGothicSm, COLOUR(), vi_get_width(), vi_get_height(), 0, 0);
|
||||
gdl = text_draw_black_box(gdl, &x, &y, &textheight, &textwidth);
|
||||
gdl = text_render_v2(gdl, &x, &y, text, g_CharsHandelGothicSm, g_FontHandelGothicSm, COLOUR(), vi_get_width(), vi_get_height(), 0, 0);
|
||||
|
||||
// Zone 2 score
|
||||
sprintf(text, "%d\n", frdata->numhitsring2 * 2);
|
||||
text_measure(&textheight, &textwidth, text, g_CharsHandelGothicSm, g_FontHandelGothicSm, 0);
|
||||
x = renderdata->x - textheight + (VERSION == VERSION_JPN_FINAL ? 192 : 182);
|
||||
y = renderdata->y + (VERSION == VERSION_JPN_FINAL ? 39 : 36);
|
||||
gdl = text0f153858(gdl, &x, &y, &textheight, &textwidth);
|
||||
gdl = text_render_projected(gdl, &x, &y, text, g_CharsHandelGothicSm, g_FontHandelGothicSm, COLOUR(), vi_get_width(), vi_get_height(), 0, 0);
|
||||
gdl = text_draw_black_box(gdl, &x, &y, &textheight, &textwidth);
|
||||
gdl = text_render_v2(gdl, &x, &y, text, g_CharsHandelGothicSm, g_FontHandelGothicSm, COLOUR(), vi_get_width(), vi_get_height(), 0, 0);
|
||||
|
||||
// Zone 3 count
|
||||
sprintf(text, "%d\n", frdata->numhitsring3);
|
||||
x = renderdata->x + 93;
|
||||
y = renderdata->y + (VERSION == VERSION_JPN_FINAL ? 51 : 47);
|
||||
gdl = text0f153858(gdl, &x, &y, &textheight, &textwidth);
|
||||
gdl = text_render_projected(gdl, &x, &y, text, g_CharsHandelGothicSm, g_FontHandelGothicSm, COLOUR(), vi_get_width(), vi_get_height(), 0, 0);
|
||||
gdl = text_draw_black_box(gdl, &x, &y, &textheight, &textwidth);
|
||||
gdl = text_render_v2(gdl, &x, &y, text, g_CharsHandelGothicSm, g_FontHandelGothicSm, COLOUR(), vi_get_width(), vi_get_height(), 0, 0);
|
||||
|
||||
// "Zone 3"
|
||||
// Note: developers forgot to remove last argument when copy/pasting
|
||||
sprintf(text, lang_get(L_MPMENU_464), frdata->numhitsring3);
|
||||
x = renderdata->x + 122;
|
||||
y = renderdata->y + (VERSION == VERSION_JPN_FINAL ? 50 : 47);
|
||||
gdl = text0f153858(gdl, &x, &y, &textheight, &textwidth);
|
||||
gdl = text_render_projected(gdl, &x, &y, text, g_CharsHandelGothicSm, g_FontHandelGothicSm, COLOUR(), vi_get_width(), vi_get_height(), 0, 0);
|
||||
gdl = text_draw_black_box(gdl, &x, &y, &textheight, &textwidth);
|
||||
gdl = text_render_v2(gdl, &x, &y, text, g_CharsHandelGothicSm, g_FontHandelGothicSm, COLOUR(), vi_get_width(), vi_get_height(), 0, 0);
|
||||
|
||||
// Zone 3 score
|
||||
sprintf(text, "%d\n", frdata->numhitsring3);
|
||||
text_measure(&textheight, &textwidth, text, g_CharsHandelGothicSm, g_FontHandelGothicSm, 0);
|
||||
x = renderdata->x - textheight + (VERSION == VERSION_JPN_FINAL ? 192 : 182);
|
||||
y = renderdata->y + (VERSION == VERSION_JPN_FINAL ? 51 : 47);
|
||||
gdl = text0f153858(gdl, &x, &y, &textheight, &textwidth);
|
||||
gdl = text_render_projected(gdl, &x, &y, text, g_CharsHandelGothicSm, g_FontHandelGothicSm, COLOUR(), vi_get_width(), vi_get_height(), 0, 0);
|
||||
gdl = text_draw_black_box(gdl, &x, &y, &textheight, &textwidth);
|
||||
gdl = text_render_v2(gdl, &x, &y, text, g_CharsHandelGothicSm, g_FontHandelGothicSm, COLOUR(), vi_get_width(), vi_get_height(), 0, 0);
|
||||
|
||||
// "Hit total"
|
||||
sprintf(text, lang_get(L_MPMENU_465));
|
||||
@@ -786,8 +786,8 @@ MenuItemHandlerResult fr_scoring_menu_handler(s32 operation, struct menuitem *it
|
||||
y += 3;
|
||||
#endif
|
||||
|
||||
gdl = text0f153858(gdl, &x, &y, &textheight, &textwidth);
|
||||
gdl = text_render_projected(gdl, &x, &y, text, g_CharsHandelGothicSm, g_FontHandelGothicSm, COLOUR(), vi_get_width(), vi_get_height(), 0, 0);
|
||||
gdl = text_draw_black_box(gdl, &x, &y, &textheight, &textwidth);
|
||||
gdl = text_render_v2(gdl, &x, &y, text, g_CharsHandelGothicSm, g_FontHandelGothicSm, COLOUR(), vi_get_width(), vi_get_height(), 0, 0);
|
||||
|
||||
// Hit total count
|
||||
sprintf(text, "%d\n", frdata->numhitsring3 + frdata->numhitsbullseye + frdata->numhitsring1 + frdata->numhitsring2);
|
||||
@@ -800,45 +800,45 @@ MenuItemHandlerResult fr_scoring_menu_handler(s32 operation, struct menuitem *it
|
||||
y += 3;
|
||||
#endif
|
||||
|
||||
gdl = text0f153858(gdl, &x, &y, &textheight, &textwidth);
|
||||
gdl = text_render_projected(gdl, &x, &y, text, g_CharsHandelGothicSm, g_FontHandelGothicSm, COLOUR(), vi_get_width(), vi_get_height(), 0, 0);
|
||||
gdl = text_draw_black_box(gdl, &x, &y, &textheight, &textwidth);
|
||||
gdl = text_render_v2(gdl, &x, &y, text, g_CharsHandelGothicSm, g_FontHandelGothicSm, COLOUR(), vi_get_width(), vi_get_height(), 0, 0);
|
||||
|
||||
// "Scoring"
|
||||
sprintf(text, lang_get(L_MPMENU_466));
|
||||
x = renderdata->x + 83;
|
||||
y = renderdata->y + 1;
|
||||
gdl = text0f153858(gdl, &x, &y, &textheight, &textwidth);
|
||||
gdl = text_render_projected(gdl, &x, &y, text, g_CharsHandelGothicSm, g_FontHandelGothicSm, COLOUR(), vi_get_width(), vi_get_height(), 0, 0);
|
||||
gdl = text_draw_black_box(gdl, &x, &y, &textheight, &textwidth);
|
||||
gdl = text_render_v2(gdl, &x, &y, text, g_CharsHandelGothicSm, g_FontHandelGothicSm, COLOUR(), vi_get_width(), vi_get_height(), 0, 0);
|
||||
|
||||
// "10"
|
||||
sprintf(text, lang_get(L_MPMENU_467));
|
||||
x = renderdata->x + 38;
|
||||
y = renderdata->y + 35;
|
||||
gdl = text0f153858(gdl, &x, &y, &textheight, &textwidth);
|
||||
gdl = text_render_projected(gdl, &x, &y, text, g_CharsNumeric, g_FontNumeric, COLOURWHITE(), vi_get_width(), vi_get_height(), 0, 0);
|
||||
gdl = text_draw_black_box(gdl, &x, &y, &textheight, &textwidth);
|
||||
gdl = text_render_v2(gdl, &x, &y, text, g_CharsNumeric, g_FontNumeric, COLOURWHITE(), vi_get_width(), vi_get_height(), 0, 0);
|
||||
|
||||
// "5"
|
||||
sprintf(text, lang_get(L_MPMENU_468));
|
||||
x = renderdata->x + 32;
|
||||
y = renderdata->y + 26;
|
||||
gdl = text0f153858(gdl, &x, &y, &textheight, &textwidth);
|
||||
gdl = text_render_projected(gdl, &x, &y, text, g_CharsNumeric, g_FontNumeric, COLOURWHITE(), vi_get_width(), vi_get_height(), 0, 0);
|
||||
gdl = text_draw_black_box(gdl, &x, &y, &textheight, &textwidth);
|
||||
gdl = text_render_v2(gdl, &x, &y, text, g_CharsNumeric, g_FontNumeric, COLOURWHITE(), vi_get_width(), vi_get_height(), 0, 0);
|
||||
|
||||
// "2"
|
||||
sprintf(text, lang_get(L_MPMENU_469));
|
||||
x = renderdata->x + 24;
|
||||
y = renderdata->y + 16;
|
||||
gdl = text0f153858(gdl, &x, &y, &textheight, &textwidth);
|
||||
gdl = text_render_projected(gdl, &x, &y, text, g_CharsNumeric, g_FontNumeric, COLOURWHITE(), vi_get_width(), vi_get_height(), 0, 0);
|
||||
gdl = text_draw_black_box(gdl, &x, &y, &textheight, &textwidth);
|
||||
gdl = text_render_v2(gdl, &x, &y, text, g_CharsNumeric, g_FontNumeric, COLOURWHITE(), vi_get_width(), vi_get_height(), 0, 0);
|
||||
|
||||
// "1"
|
||||
sprintf(text, lang_get(L_MPMENU_470));
|
||||
x = renderdata->x + 14;
|
||||
y = renderdata->y + 4;
|
||||
gdl = text0f153858(gdl, &x, &y, &textheight, &textwidth);
|
||||
gdl = text_render_projected(gdl, &x, &y, text, g_CharsNumeric, g_FontNumeric, COLOURWHITE(), vi_get_width(), vi_get_height(), 0, 0);
|
||||
gdl = text_draw_black_box(gdl, &x, &y, &textheight, &textwidth);
|
||||
gdl = text_render_v2(gdl, &x, &y, text, g_CharsNumeric, g_FontNumeric, COLOURWHITE(), vi_get_width(), vi_get_height(), 0, 0);
|
||||
|
||||
gdl = text0f153838(gdl);
|
||||
gdl = text_end_boxmode(gdl);
|
||||
|
||||
// Render lines between the score table and the target texture
|
||||
|
||||
@@ -2565,9 +2565,9 @@ MenuItemHandlerResult ci_hangar_title_menu_handler(s32 operation, struct menuite
|
||||
#endif
|
||||
|
||||
gSPTextureRectangle(gdl++,
|
||||
((renderdata->x + 6) << 2) * g_ScaleX, (renderdata->y + 3) << 2,
|
||||
((renderdata->x + 60) << 2) * g_ScaleX, (renderdata->y + 39) << 2,
|
||||
G_TX_RENDERTILE, 0, 0x0480, 1024 / g_ScaleX, -1024);
|
||||
((renderdata->x + 6) << 2) * g_UiScaleX, (renderdata->y + 3) << 2,
|
||||
((renderdata->x + 60) << 2) * g_UiScaleX, (renderdata->y + 39) << 2,
|
||||
G_TX_RENDERTILE, 0, 0x0480, 1024 / g_UiScaleX, -1024);
|
||||
|
||||
leftmargin = -1;
|
||||
} else {
|
||||
@@ -2575,7 +2575,7 @@ MenuItemHandlerResult ci_hangar_title_menu_handler(s32 operation, struct menuite
|
||||
leftmargin = item->param2 / 2;
|
||||
}
|
||||
|
||||
gdl = text0f153628(gdl);
|
||||
gdl = text_begin(gdl);
|
||||
|
||||
// Render title
|
||||
text = bio_menu_text_name(NULL);
|
||||
@@ -2588,7 +2588,7 @@ MenuItemHandlerResult ci_hangar_title_menu_handler(s32 operation, struct menuite
|
||||
}
|
||||
|
||||
textheight = renderdata->y + 8;
|
||||
gdl = text_render_projected(gdl, &textwidth, &textheight, text, g_CharsHandelGothicMd, g_FontHandelGothicMd, renderdata->colour, vi_get_width(), vi_get_height(), 0, 0);
|
||||
gdl = text_render_v2(gdl, &textwidth, &textheight, text, g_CharsHandelGothicMd, g_FontHandelGothicMd, renderdata->colour, vi_get_width(), vi_get_height(), 0, 0);
|
||||
|
||||
// Render subheading
|
||||
text = ci_menu_text_hangar_bio_subheading(NULL);
|
||||
@@ -2601,9 +2601,9 @@ MenuItemHandlerResult ci_hangar_title_menu_handler(s32 operation, struct menuite
|
||||
}
|
||||
|
||||
textheight = renderdata->y + 25;
|
||||
gdl = text_render_projected(gdl, &textwidth, &textheight, text, g_CharsHandelGothicSm, g_FontHandelGothicSm, renderdata->colour, vi_get_width(), vi_get_height(), 0, 0);
|
||||
gdl = text_render_v2(gdl, &textwidth, &textheight, text, g_CharsHandelGothicSm, g_FontHandelGothicSm, renderdata->colour, vi_get_width(), vi_get_height(), 0, 0);
|
||||
|
||||
gdl = text0f153780(gdl);
|
||||
gdl = text_end(gdl);
|
||||
|
||||
return (s32)gdl;
|
||||
}
|
||||
|
||||
+1
-1
@@ -211,7 +211,7 @@ extern struct wallhit *g_FreeWallhits;
|
||||
extern struct wallhit *g_ActiveWallhits;
|
||||
extern s32 g_MaxShards;
|
||||
extern struct shard *g_Shards;
|
||||
extern Gfx *var800a4634;
|
||||
extern Gfx *g_TextHoloRayGdl;
|
||||
extern struct room *g_Rooms;
|
||||
extern u8 *g_MpRoomVisibility;
|
||||
extern struct bgroom *g_BgRooms;
|
||||
|
||||
+3
-3
@@ -410,9 +410,9 @@ extern struct weatherdata *g_WeatherData;
|
||||
extern s32 g_NextShardNum;
|
||||
extern bool g_ShardsActive;
|
||||
extern s32 var800800f0jf;
|
||||
extern s32 g_ScaleX;
|
||||
extern s32 g_UiScaleX;
|
||||
extern s32 var80080108jf;
|
||||
extern s32 var8007fad0;
|
||||
extern s32 g_TextScaleX;
|
||||
extern struct font *g_FontNumeric;
|
||||
extern struct fontchar *g_CharsNumeric;
|
||||
extern struct font *g_FontHandelGothicXs;
|
||||
@@ -423,7 +423,7 @@ extern struct font *g_FontHandelGothicMd;
|
||||
extern struct fontchar *g_CharsHandelGothicMd;
|
||||
extern struct font *g_FontHandelGothicLg;
|
||||
extern struct fontchar *g_CharsHandelGothicLg;
|
||||
extern bool var8007fb9c;
|
||||
extern bool g_TextHoloRayEnabled;
|
||||
extern s32 g_StageIndex;
|
||||
extern s16 var8007fc0c;
|
||||
extern struct drawslot *g_BgSpecialDrawSlot;
|
||||
|
||||
+22
-18
@@ -10,18 +10,18 @@
|
||||
|
||||
void text_init(void);
|
||||
void text_set_rotation90(bool rotated);
|
||||
void text0f1531dc(bool arg0);
|
||||
void text_set_hires(bool hires);
|
||||
void text_reset(void);
|
||||
Gfx *text0f153628(Gfx *gdl);
|
||||
Gfx *text0f153780(Gfx *gdl);
|
||||
Gfx *text_set_prim_colour(Gfx *gdl, u32 colour);
|
||||
Gfx *text0f153838(Gfx *gdl);
|
||||
Gfx *text0f153858(Gfx *gdl, s32 *x1, s32 *y1, s32 *x2, s32 *y2);
|
||||
Gfx *text0f1538e4(Gfx *gdl, s32 *x1, s32 *y1, s32 *x2, s32 *y2);
|
||||
Gfx *text0f153990(Gfx *gdl, s32 left, s32 top, s32 width, s32 height);
|
||||
Gfx *text0f153a34(Gfx *gdl, s32 x1, s32 y1, s32 x2, s32 y2, u32 colour);
|
||||
Gfx *text0f153ab0(Gfx *gdl);
|
||||
void text0f153b40(void);
|
||||
Gfx *text_begin(Gfx *gdl);
|
||||
Gfx *text_end(Gfx *gdl);
|
||||
Gfx *text_begin_boxmode(Gfx *gdl, u32 colour);
|
||||
Gfx *text_end_boxmode(Gfx *gdl);
|
||||
Gfx *text_draw_black_box(Gfx *gdl, s32 *x1, s32 *y1, s32 *x2, s32 *y2);
|
||||
Gfx *text_draw_black_uibox(Gfx *gdl, s32 *x1, s32 *y1, s32 *x2, s32 *y2);
|
||||
Gfx *text_draw_black_textbox(Gfx *gdl, s32 left, s32 top, s32 width, s32 height);
|
||||
Gfx *text_draw_box(Gfx *gdl, s32 x1, s32 y1, s32 x2, s32 y2, u32 colour);
|
||||
Gfx *text_enable_holo_ray(Gfx *gdl);
|
||||
void text_disable_holo_ray(void);
|
||||
void text_set_diagonal_blend(s32 x, s32 y, f32 redrawtimer, u8 populated);
|
||||
void text_backup_diagonal_blend_settings(void);
|
||||
void text_restore_diagonal_blend_settings(void);
|
||||
@@ -34,15 +34,19 @@ void text_set_wave_colours(u32 colour1, u32 colour2);
|
||||
void text_reset_blends(void);
|
||||
bool text_has_diagonal_blend(void);
|
||||
u32 text_apply_projection_colour(s32 x, s32 y, u32 colour);
|
||||
u32 text0f1543ac(s32 x, s32 y, u32 colour);
|
||||
Gfx *text0f1552d4(Gfx *gdl, f32 x, f32 y, f32 widthscale, f32 heightscale, char *text, struct fontchar *chars, struct font *font, u32 colour, s32 hdir, s32 vdir);
|
||||
void text0f156024(s32 arg0);
|
||||
void text0f156030(u32 colour);
|
||||
Gfx *text_render_projected(Gfx *gdl, s32 *x, s32 *y, char *text, struct fontchar *chars, struct font *font, s32 colour, s32 width, s32 height, s32 arg9, s32 lineheight);
|
||||
Gfx *text_render(Gfx *gdl, s32 *x, s32 *y, char *text, struct fontchar *font1, struct font *font2, u32 arg6, u32 colour, s32 width, s32 height, u32 arg10, s32 arg11);
|
||||
u32 text_get_colour_at_pos(s32 x, s32 y, u32 colour);
|
||||
Gfx *text_render_credits(Gfx *gdl, f32 x, f32 y, f32 widthscale, f32 heightscale, char *text, struct fontchar *chars, struct font *font, u32 colour, s32 hdir, s32 vdir);
|
||||
void text_set_shadow_enabled(bool enabled);
|
||||
void text_set_shadow_colour(u32 colour);
|
||||
Gfx *text_render_v2(Gfx *gdl, s32 *x, s32 *y, char *text, struct fontchar *chars, struct font *font, u32 textcolour, s32 width, s32 height, s32 shadowoffset, s32 lineheight);
|
||||
Gfx *text_render_v1(Gfx *gdl, s32 *x, s32 *y, char *text, struct fontchar *font1, struct font *font2, u32 textcolour, u32 shadowcolour, s32 width, s32 height, s32 shadowoffset, s32 lineheight);
|
||||
void text_measure(s32 *textheight, s32 *textwidth, char *text, struct fontchar *font1, struct font *font2, s32 lineheight);
|
||||
void text_wrap(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);
|
||||
#if VERSION == VERSION_JPN_FINAL
|
||||
Gfx *text_render_vx(Gfx *gdl, s32 *x, s32 *y, char *text, struct fontchar *font1, struct font *font2, u32 textcolour, u32 shadowcolour, s32 width, s32 height, s32 shadowoffset, s32 lineheight);
|
||||
#else
|
||||
#define text_render_vx text_render_v1
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
+4
-4
@@ -92,13 +92,13 @@
|
||||
|
||||
/**
|
||||
* gDPFillRectangleScaled - a wrapper around gDPFillRectangle which applies
|
||||
* g_ScaleX to the X coordinates.
|
||||
* g_UiScaleX to the X coordinates.
|
||||
*
|
||||
* g_ScaleX is normally 1, but 2 when using hi-res.
|
||||
* g_UiScaleX is normally 1, but 2 when using hi-res.
|
||||
*/
|
||||
#define gDPFillRectangleScaled(pkt, x1, y1, x2, y2) gDPFillRectangle(pkt, (x1) * g_ScaleX, y1, (x2) * g_ScaleX, y2)
|
||||
#define gDPFillRectangleScaled(pkt, x1, y1, x2, y2) gDPFillRectangle(pkt, (x1) * g_UiScaleX, y1, (x2) * g_UiScaleX, y2)
|
||||
|
||||
#define gDPHudRectangle(pkt, x1, y1, x2, y2) gDPFillRectangle(pkt, (x1) * g_ScaleX, y1, ((x2 + 1)) * g_ScaleX, (y2) + 1)
|
||||
#define gDPHudRectangle(pkt, x1, y1, x2, y2) gDPFillRectangle(pkt, (x1) * g_UiScaleX, y1, ((x2 + 1)) * g_UiScaleX, (y2) + 1)
|
||||
|
||||
/**
|
||||
* Custom combiner modes.
|
||||
|
||||
Reference in New Issue
Block a user