mirror of
https://github.com/pmret/papermario.git
synced 2024-11-27 07:30:30 +00:00
Draw box (#897)
* wip * matched draw_box * cleaning up * renamed file * fixed warning * PR comments
This commit is contained in:
parent
207f4400b6
commit
e6de400efa
@ -2121,9 +2121,8 @@ typedef struct MenuPanel {
|
||||
|
||||
typedef struct WindowBackground {
|
||||
/* 0x00 */ IMG_PTR imgData;
|
||||
/* 0x04 */ s8 packedTileFormat; // upper = fmt, lower = depth; e.g., 31 = CI-8
|
||||
// /* 0x04 */ u8 packedTileFormatHigh : 4;
|
||||
// /* 0x04 */ u8 packedTileFormatLow : 4;
|
||||
/* 0x04 */ u8 fmt : 4;
|
||||
/* 0x04 */ u8 bitDepth : 4;
|
||||
/* 0x05 */ u8 width;
|
||||
/* 0x06 */ u8 height;
|
||||
/* 0x07 */ char unk_07[4];
|
||||
@ -2132,13 +2131,12 @@ typedef struct WindowBackground {
|
||||
|
||||
typedef struct WindowCorners {
|
||||
/* 0x00 */ IMG_PTR imgData;
|
||||
/* 0x04 */ s8 packedTileFormat; // upper = fmt, lower = depth; e.g., 31 = CI-8
|
||||
// /* 0x04 */ u8 packedTileFormatHigh : 4;
|
||||
// /* 0x04 */ u8 packedTileFormatLow : 4;
|
||||
/* 0x05 */ Vec2b size1;
|
||||
/* 0x07 */ Vec2b size2;
|
||||
/* 0x09 */ Vec2b size3;
|
||||
/* 0x0B */ Vec2b size4;
|
||||
/* 0x04 */ u8 fmt : 4;
|
||||
/* 0x04 */ u8 bitDepth : 4;
|
||||
/* 0x05 */ Vec2bu size1;
|
||||
/* 0x07 */ Vec2bu size2;
|
||||
/* 0x09 */ Vec2bu size3;
|
||||
/* 0x0B */ Vec2bu size4;
|
||||
/* 0x0D */ char unk_0D[3];
|
||||
} WindowCorners; // size = 0x10
|
||||
|
||||
|
@ -4896,19 +4896,6 @@ enum EncounterStatusFlags {
|
||||
ENCOUNTER_STATUS_FLAGS_80000000 = 0x80000000,
|
||||
};
|
||||
|
||||
enum WindowImageFormat {
|
||||
WINDOW_IMG_RGBA_16 = 0x02,
|
||||
WINDOW_IMG_RGBA_32 = 0x03,
|
||||
WINDOW_IMG_YUV_16 = 0x12,
|
||||
WINDOW_IMG_CI_4 = 0x20,
|
||||
WINDOW_IMG_CI_8 = 0x21,
|
||||
WINDOW_IMG_IA_4 = 0x30,
|
||||
WINDOW_IMG_IA_8 = 0x31,
|
||||
WINDOW_IMG_IA_16 = 0x32,
|
||||
WINDOW_IMG_I_4 = 0x40,
|
||||
WINDOW_IMG_I_8 = 0x41,
|
||||
};
|
||||
|
||||
enum WindowFlags {
|
||||
WINDOW_FLAGS_INITIALIZED = 0x00000001,
|
||||
WINDOW_FLAGS_FPUPDATE_CHANGED = 0x00000002,
|
||||
@ -4921,8 +4908,8 @@ enum WindowFlags {
|
||||
|
||||
enum DrawFlags {
|
||||
DRAW_FLAGS_ROTSCALE = 0x00000001,
|
||||
DRAW_FLAGS_2 = 0x00000002,
|
||||
DRAW_FLAGS_CLIP = 0x00000004,
|
||||
DRAW_FLAGS_ANIMATED_BACKGROUND = 0x00000002,
|
||||
DRAW_FLAGS_NO_CLIP = 0x00000004,
|
||||
DRAW_FLAGS_CULL_BACK = 0x00000008,
|
||||
};
|
||||
|
||||
@ -5920,4 +5907,31 @@ enum BattleDarknessState {
|
||||
BTL_DARKNESS_STATE_WATT_BASED = 1,
|
||||
};
|
||||
|
||||
enum WindowStyles {
|
||||
WINDOW_STYLE_0 = 0,
|
||||
WINDOW_STYLE_1 = 1,
|
||||
WINDOW_STYLE_2 = 2,
|
||||
WINDOW_STYLE_3 = 3,
|
||||
WINDOW_STYLE_4 = 4,
|
||||
WINDOW_STYLE_5 = 5,
|
||||
WINDOW_STYLE_6 = 6,
|
||||
WINDOW_STYLE_7 = 7,
|
||||
WINDOW_STYLE_8 = 8,
|
||||
WINDOW_STYLE_9 = 9,
|
||||
WINDOW_STYLE_10 = 10,
|
||||
WINDOW_STYLE_11 = 11,
|
||||
WINDOW_STYLE_12 = 12,
|
||||
WINDOW_STYLE_13 = 13,
|
||||
WINDOW_STYLE_14 = 14,
|
||||
WINDOW_STYLE_15 = 15,
|
||||
WINDOW_STYLE_16 = 16,
|
||||
WINDOW_STYLE_17 = 17,
|
||||
WINDOW_STYLE_18 = 18,
|
||||
WINDOW_STYLE_19 = 19,
|
||||
WINDOW_STYLE_20 = 20,
|
||||
WINDOW_STYLE_21 = 21,
|
||||
WINDOW_STYLE_22 = 22,
|
||||
WINDOW_STYLE_MAX = 22,
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -205,8 +205,8 @@ Npc* peach_make_disguise_npc(s32 peachDisguise);
|
||||
void peach_set_disguise_anim(AnimID);
|
||||
|
||||
s32 draw_box(s32 flags, WindowStyle windowStyle, s32 posX, s32 posY, s32 posZ, s32 width, s32 height, u8 opacity,
|
||||
u8 darkening, f32 scaleX, f32 scaleY, f32 rotX, f32 rotY, f32 rotZ, void (*fpDrawContents)(void*),
|
||||
void* drawContentsArg0, Matrix4f rotScaleMtx, s32 translateX, s32 translateY, f32 (*outMtx)[4]);
|
||||
u8 darkening, f32 scaleX, f32 scaleY, f32 rotX, f32 rotY, f32 rotZ, void (*fpDrawContents)(s32, s32, s32, s32, s32, s32, s32),
|
||||
void* drawContentsArg0, Matrix4f rotScaleMtx, s32 translateX, s32 translateY, Matrix4f outMtx);
|
||||
s32 get_msg_width(s32 msgID, u16 charset);
|
||||
|
||||
s32 partner_player_can_pause(void);
|
||||
|
@ -1037,7 +1037,7 @@ void btl_update_starpoints_display(void) {
|
||||
posY = D_8029DA44 + (one * 14.0f);
|
||||
if (gBattleStatus.flags2 & 1) {
|
||||
if (ones != 0) {
|
||||
draw_box(0, 4, posX - 100, posY - 5, 0, 110, 12, 120, 0, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, NULL, NULL,
|
||||
draw_box(0, WINDOW_STYLE_4, posX - 100, posY - 5, 0, 110, 12, 120, 0, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, NULL, NULL,
|
||||
NULL, SCREEN_WIDTH, SCREEN_HEIGHT, NULL);
|
||||
}
|
||||
}
|
||||
|
@ -1207,13 +1207,13 @@ void btl_draw_upgrade_windows(s32 arg0) {
|
||||
}
|
||||
|
||||
hud_element_get_render_pos(D_8029FA80[0], &x, &y);
|
||||
draw_box(0, 0xF, x - 22, y - 22, 0, 44, 44, 255, d1, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, NULL, NULL, NULL,
|
||||
draw_box(0, WINDOW_STYLE_15, x - 22, y - 22, 0, 44, 44, 255, d1, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, NULL, NULL, NULL,
|
||||
SCREEN_WIDTH, SCREEN_HEIGHT, NULL);
|
||||
hud_element_get_render_pos(D_8029FA80[3], &x, &y);
|
||||
draw_box(0, 0xF, x - 22, y - 22, 0, 44, 44, 255, d2, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, NULL, NULL, NULL,
|
||||
draw_box(0, WINDOW_STYLE_15, x - 22, y - 22, 0, 44, 44, 255, d2, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, NULL, NULL, NULL,
|
||||
SCREEN_WIDTH, SCREEN_HEIGHT, NULL);
|
||||
hud_element_get_render_pos(D_8029FA80[2], &x, &y);
|
||||
draw_box(0, 0xF, x - 22, y - 22, 0, 44, 44, 255, d3, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, NULL, NULL, NULL,
|
||||
draw_box(0, WINDOW_STYLE_15, x - 22, y - 22, 0, 44, 44, 255, d3, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, NULL, NULL, NULL,
|
||||
SCREEN_WIDTH, SCREEN_HEIGHT, NULL);
|
||||
}
|
||||
|
||||
|
@ -5146,7 +5146,7 @@ void btl_state_draw_select_target(void) {
|
||||
}
|
||||
}
|
||||
|
||||
draw_box(0, 4, screenX + D_802ACC68, screenY, 0, msgWidth, 20, 255, 0,
|
||||
draw_box(0, WINDOW_STYLE_4, screenX + D_802ACC68, screenY, 0, msgWidth, 20, 255, 0,
|
||||
0.0f, 0.0f, 0.0f, 0.0f, 0.0f, NULL, NULL, NULL, SCREEN_WIDTH, SCREEN_HEIGHT, NULL);
|
||||
|
||||
screenX += 4;
|
||||
|
@ -691,8 +691,8 @@ void update_status_menu(void) {
|
||||
gDPSetScissor(gMasterGfxPos++, G_SC_NON_INTERLACE, 12, 20, SCREEN_WIDTH - 12, SCREEN_HEIGHT - 20);
|
||||
fp = uiStatus->drawPosX;
|
||||
s5 = uiStatus->drawPosY;
|
||||
draw_box(0, 5, fp, s5, 0, 174, 35, 255, 0, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, NULL, NULL, NULL, 320, 240, NULL);
|
||||
draw_box(0, 6, fp + 174, s5, 0, 122, 25, 255, 0, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, NULL, NULL, NULL, 320, 240, NULL);
|
||||
draw_box(0, WINDOW_STYLE_5, fp, s5, 0, 174, 35, 255, 0, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, NULL, NULL, NULL, 320, 240, NULL);
|
||||
draw_box(0, WINDOW_STYLE_6, fp + 174, s5, 0, 122, 25, 255, 0, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, NULL, NULL, NULL, 320, 240, NULL);
|
||||
|
||||
if (uiStatus->hpBlinkTimer > 0) {
|
||||
uiStatus->hpBlinkTimer--;
|
||||
|
@ -1,851 +0,0 @@
|
||||
#include "common.h"
|
||||
#include "nu/nusys.h"
|
||||
|
||||
typedef struct DefaultWindowStyle {
|
||||
/* 0x00 */ u8 bgIndex;
|
||||
/* 0x01 */ u8 cornersIndex;
|
||||
/* 0x02 */ u8 unk_2;
|
||||
/* 0x03 */ Color_RGBA8 color1;
|
||||
/* 0x07 */ Color_RGBA8 color2;
|
||||
} DefaultWindowStyle; // size = 0x0B
|
||||
|
||||
typedef struct UnkDrawStruct {
|
||||
Vtx vert[16];
|
||||
} UnkDrawStruct; // size = 0x100
|
||||
|
||||
static UnkDrawStruct D_8010D6B0[];
|
||||
|
||||
DefaultWindowStyle D_801098E0[] = {
|
||||
{
|
||||
.bgIndex = 1,
|
||||
.cornersIndex = 0,
|
||||
.unk_2 = 0,
|
||||
.color1 = { .r = 200, .g = 191, .b = 164, .a = 255 },
|
||||
.color2 = { .r = 128, .g = 128, .b = 128, .a = 255 }
|
||||
},
|
||||
{
|
||||
.bgIndex = 1,
|
||||
.cornersIndex = 1,
|
||||
.unk_2 = 1,
|
||||
.color1 = { .r = 255, .g = 200, .b = 128, .a = 255 },
|
||||
.color2 = { .r = 128, .g = 128, .b = 128, .a = 255 }
|
||||
},
|
||||
{
|
||||
.bgIndex = 1,
|
||||
.cornersIndex = 2,
|
||||
.unk_2 = 1,
|
||||
.color1 = { .r = 232, .g = 196, .b = 77, .a = 255 },
|
||||
.color2 = { .r = 163, .g = 123, .b = 0, .a = 255 }
|
||||
},
|
||||
{
|
||||
.bgIndex = 0,
|
||||
.cornersIndex = 3,
|
||||
.unk_2 = 1,
|
||||
.color1 = { .r = 226, .g = 225, .b = 216, .a = 255 },
|
||||
.color2 = { .r = 217, .g = 208, .b = 201, .a = 255 }
|
||||
},
|
||||
{
|
||||
.bgIndex = 1,
|
||||
.cornersIndex = 4,
|
||||
.unk_2 = 1,
|
||||
.color1 = { .r = 61, .g = 74, .b = 188, .a = 255 },
|
||||
.color2 = { .r = 0, .g = 25, .b = 28, .a = 255 }
|
||||
},
|
||||
{
|
||||
.bgIndex = 1,
|
||||
.cornersIndex = 5,
|
||||
.unk_2 = 1,
|
||||
.color1 = { .r = 235, .g = 230, .b = 119, .a = 255 },
|
||||
.color2 = { .r = 142, .g = 90, .b = 37, .a = 255 }
|
||||
},
|
||||
{
|
||||
.bgIndex = 1,
|
||||
.cornersIndex = 6,
|
||||
.unk_2 = 1,
|
||||
.color1 = { .r = 235, .g = 230, .b = 119, .a = 255 },
|
||||
.color2 = { .r = 142, .g = 99, .b = 37, .a = 255 }
|
||||
},
|
||||
{
|
||||
.bgIndex = 1,
|
||||
.cornersIndex = 4,
|
||||
.unk_2 = 1,
|
||||
.color1 = { .r = 215, .g = 191, .b = 116, .a = 255 },
|
||||
.color2 = { .r = 132, .g = 70, .b = 50, .a = 255 }
|
||||
},
|
||||
{
|
||||
.bgIndex = 1,
|
||||
.cornersIndex = 4,
|
||||
.unk_2 = 1,
|
||||
.color1 = { .r = 215, .g = 191, .b = 116, .a = 255 },
|
||||
.color2 = { .r = 132, .g = 70, .b = 50, .a = 255 }
|
||||
},
|
||||
{
|
||||
.bgIndex = 1,
|
||||
.cornersIndex = 4,
|
||||
.unk_2 = 1,
|
||||
.color1 = { .r = 141, .g = 143, .b = 255, .a = 255 },
|
||||
.color2 = { .r = 43, .g = 69, .b = 102, .a = 255 }
|
||||
},
|
||||
{
|
||||
.bgIndex = 1,
|
||||
.cornersIndex = 8,
|
||||
.unk_2 = 1,
|
||||
.color1 = { .r = 141, .g = 143, .b = 255, .a = 255 },
|
||||
.color2 = { .r = 43, .g = 69, .b = 102, .a = 255 }
|
||||
},
|
||||
{
|
||||
.bgIndex = 1,
|
||||
.cornersIndex = 4,
|
||||
.unk_2 = 1,
|
||||
.color1 = { .r = 170, .g = 208, .b = 128, .a = 255 },
|
||||
.color2 = { .r = 71, .g = 123, .b = 83, .a = 255 }
|
||||
},
|
||||
{
|
||||
.bgIndex = 1,
|
||||
.cornersIndex = 8,
|
||||
.unk_2 = 1,
|
||||
.color1 = { .r = 170, .g = 208, .b = 128, .a = 255 },
|
||||
.color2 = { .r = 71, .g = 123, .b = 83, .a = 255 }
|
||||
},
|
||||
{
|
||||
.bgIndex = 1,
|
||||
.cornersIndex = 4,
|
||||
.unk_2 = 1,
|
||||
.color1 = { .r = 200, .g = 200, .b = 90, .a = 255 },
|
||||
.color2 = { .r = 140, .g = 140, .b = 0, .a = 255 }
|
||||
},
|
||||
{
|
||||
.bgIndex = 1,
|
||||
.cornersIndex = 8,
|
||||
.unk_2 = 1,
|
||||
.color1 = { .r = 200, .g = 200, .b = 90, .a = 255 },
|
||||
.color2 = { .r = 140, .g = 140, .b = 0, .a = 255 }
|
||||
},
|
||||
{
|
||||
.bgIndex = 1,
|
||||
.cornersIndex = 4,
|
||||
.unk_2 = 1,
|
||||
.color1 = { .r = 235, .g = 230, .b = 119, .a = 255 },
|
||||
.color2 = { .r = 142, .g = 90, .b = 37, .a = 255 }
|
||||
},
|
||||
{
|
||||
.bgIndex = 1,
|
||||
.cornersIndex = 4,
|
||||
.unk_2 = 1,
|
||||
.color1 = { .r = 142, .g = 212, .b = 236, .a = 255 },
|
||||
.color2 = { .r = 67, .g = 98, .b = 69, .a = 255 }
|
||||
},
|
||||
{
|
||||
.bgIndex = 1,
|
||||
.cornersIndex = 4,
|
||||
.unk_2 = 1,
|
||||
.color1 = { .r = 167, .g = 151, .b = 119, .a = 255 },
|
||||
.color2 = { .r = 98, .g = 55, .b = 154, .a = 255 }
|
||||
},
|
||||
{
|
||||
.bgIndex = 1,
|
||||
.cornersIndex = 7,
|
||||
.unk_2 = 1,
|
||||
.color1 = { .r = 17, .g = 151, .b = 29, .a = 255 },
|
||||
.color2 = { .r = 8, .g = 55, .b = 14, .a = 255 }
|
||||
},
|
||||
{
|
||||
.bgIndex = 1,
|
||||
.cornersIndex = 7,
|
||||
.unk_2 = 1,
|
||||
.color1 = { .r = 110, .g = 110, .b = 200, .a = 255 },
|
||||
.color2 = { .r = 10, .g = 10, .b = 100, .a = 255 }
|
||||
},
|
||||
{
|
||||
.bgIndex = 1,
|
||||
.cornersIndex = 4,
|
||||
.unk_2 = 1,
|
||||
.color1 = { .r = 181, .g = 60, .b = 60, .a = 255 },
|
||||
.color2 = { .r = 76, .g = 10, .b = 0, .a = 255 }
|
||||
},
|
||||
{
|
||||
.bgIndex = 1,
|
||||
.cornersIndex = 4,
|
||||
.unk_2 = 1,
|
||||
.color1 = { .r = 174, .g = 227, .b = 235, .a = 255 },
|
||||
.color2 = { .r = 76, .g = 110, .b = 60, .a = 255 }
|
||||
},
|
||||
{
|
||||
.bgIndex = 0,
|
||||
.cornersIndex = 3,
|
||||
.unk_2 = 1,
|
||||
.color1 = { .r = 126, .g = 125, .b = 216, .a = 255 },
|
||||
.color2 = { .r = 217, .g = 108, .b = 201, .a = 255 }
|
||||
}
|
||||
};
|
||||
|
||||
#include "ui/box/corners9.png.inc.c"
|
||||
#include "ui/box/corners8.png.inc.c"
|
||||
#include "ui/box/corners6.png.inc.c"
|
||||
#include "ui/box/corners7.png.inc.c"
|
||||
#include "ui/box/corners3.png.inc.c"
|
||||
#include "ui/box/corners5.png.inc.c"
|
||||
#include "ui/box/corners4.png.inc.c"
|
||||
#include "ui/box/bg_tile.png.inc.c"
|
||||
#include "ui/box/corners1.png.inc.c"
|
||||
#include "ui/box/corners2.png.inc.c"
|
||||
#include "ui/box/bg_flat.png.inc.c"
|
||||
|
||||
WindowBackground D_8010BAE8[] = {
|
||||
{
|
||||
.imgData = ui_box_bg_tile_png,
|
||||
.packedTileFormat = 0x40,
|
||||
.width = 16,
|
||||
.height = 16,
|
||||
.unk_07 = { 0, 0, 0, 0},
|
||||
.size = 128
|
||||
},
|
||||
{
|
||||
.imgData = ui_box_bg_flat_png,
|
||||
.packedTileFormat = 0x40,
|
||||
.width = 16,
|
||||
.height = 1,
|
||||
.unk_07 = { 0, 0, 0, 0},
|
||||
.size = 8
|
||||
}
|
||||
};
|
||||
|
||||
WindowCorners D_8010BB00[] = {
|
||||
{
|
||||
.imgData = ui_box_corners1_png,
|
||||
.packedTileFormat = 0x31,
|
||||
.size1 = { 16, 16},
|
||||
.size2 = { 16, 16},
|
||||
.size3 = { 16, 16},
|
||||
.size4 = { 16, 16},
|
||||
.unk_0D = { 0, 0, 0}
|
||||
},
|
||||
{
|
||||
.imgData = ui_box_corners2_png,
|
||||
.packedTileFormat = 0x40,
|
||||
.size1 = { 16, 16},
|
||||
.size2 = { 16, 16},
|
||||
.size3 = { 16, 16},
|
||||
.size4 = { 16, 16},
|
||||
.unk_0D = { 0, 0, 0}
|
||||
},
|
||||
{
|
||||
.imgData = ui_box_corners3_png,
|
||||
.packedTileFormat = 0x31,
|
||||
.size1 = { 16, 32},
|
||||
.size2 = { 16, 32},
|
||||
.size3 = { 16, 16},
|
||||
.size4 = { 16, 16},
|
||||
.unk_0D = { 0, 0, 0}
|
||||
},
|
||||
{
|
||||
.imgData = ui_box_corners4_png,
|
||||
.packedTileFormat = 0x31,
|
||||
.size1 = { 8, 8},
|
||||
.size2 = { 8, 8},
|
||||
.size3 = { 8, 8},
|
||||
.size4 = { 8, 8},
|
||||
.unk_0D = { 0, 0, 0}
|
||||
},
|
||||
{
|
||||
.imgData = ui_box_corners5_png,
|
||||
.packedTileFormat = 0x31,
|
||||
.size1 = { 16, 8},
|
||||
.size2 = { 16, 8},
|
||||
.size3 = { 16, 8},
|
||||
.size4 = { 16, 8},
|
||||
.unk_0D = { 0, 0, 0}
|
||||
},
|
||||
{
|
||||
.imgData = ui_box_corners6_png,
|
||||
.packedTileFormat = 0x31,
|
||||
.size1 = { 16, 8},
|
||||
.size2 = { 16, 8},
|
||||
.size3 = { 16, 8},
|
||||
.size4 = { 16, 16},
|
||||
.unk_0D = { 0, 0, 0}
|
||||
},
|
||||
{
|
||||
.imgData = ui_box_corners7_png,
|
||||
.packedTileFormat = 0x31,
|
||||
.size1 = { 16, 8},
|
||||
.size2 = { 16, 8},
|
||||
.size3 = { 16, 8},
|
||||
.size4 = { 16, 8},
|
||||
.unk_0D = { 0, 0, 0}
|
||||
},
|
||||
{
|
||||
.imgData = ui_box_corners8_png,
|
||||
.packedTileFormat = 0x31,
|
||||
.size1 = { 24, 24},
|
||||
.size2 = { 24, 24},
|
||||
.size3 = { 24, 24},
|
||||
.size4 = { 24, 24},
|
||||
.unk_0D = { 0, 0, 0}
|
||||
},
|
||||
{
|
||||
.imgData = ui_box_corners9_png,
|
||||
.packedTileFormat = 0x31,
|
||||
.size1 = { 16, 16},
|
||||
.size2 = { 16, 16},
|
||||
.size3 = { 16, 16},
|
||||
.size4 = { 16, 16},
|
||||
.unk_0D = { 0, 0, 0}
|
||||
}
|
||||
};
|
||||
|
||||
Gfx D_8010BB90[] = {
|
||||
gsDPSetCombineLERP(TEXEL0, 0, PRIMITIVE, 0, 0, 0, 0, TEXEL1, TEXEL0, ENVIRONMENT, ENV_ALPHA, COMBINED, 0, 0, 0, COMBINED),
|
||||
gsDPSetCombineLERP(TEXEL0, 0, TEXEL1, 0, 0, 0, 0, TEXEL1, PRIMITIVE, ENVIRONMENT, COMBINED, ENVIRONMENT, 0, 0, 0, COMBINED),
|
||||
gsDPSetCombineLERP(TEXEL0, 0, PRIMITIVE, 0, TEXEL1, 0, PRIMITIVE, 0, TEXEL0, ENVIRONMENT, ENV_ALPHA, COMBINED, 0, 0, 0, COMBINED),
|
||||
gsDPSetCombineLERP(TEXEL0, 0, TEXEL1, 0, TEXEL1, 0, PRIMITIVE, 0, PRIMITIVE, ENVIRONMENT, COMBINED, ENVIRONMENT, 0, 0, 0, COMBINED)
|
||||
};
|
||||
s32 D_8010BBB0 = 0;
|
||||
s32 D_8010BBB4 = 0;
|
||||
Vp D_8010BBB8 = {
|
||||
.vp = {
|
||||
.vscale = { 640, 480, 511, 0 },
|
||||
.vtrans = { 640, 480, 511, 0 }
|
||||
}
|
||||
};
|
||||
|
||||
#include "vtx/drawbox1.vtx.inc.c"
|
||||
|
||||
/*
|
||||
| 0.0 0.0 0.0 0.0|
|
||||
| 0.0 0.0 0.0 0.0|
|
||||
| 0.0 0.0 0.0 0.0|
|
||||
|-6.0 0.0 0.0 0.0|
|
||||
*/
|
||||
Mtx D_8010BC08 = {
|
||||
.m = {
|
||||
// integer portion
|
||||
{ 0x00000000, 0x00000000,
|
||||
0x00000000, 0x00000000 },
|
||||
{ 0x00000000, 0x00000000,
|
||||
0xFFFA0000, 0x00000000 },
|
||||
//fractional portion
|
||||
{ 0x00000000, 0x00000000,
|
||||
0x00000000, 0x00000000 },
|
||||
{ 0x00000000, 0x00000000,
|
||||
0x00000000, 0x00000000 }
|
||||
}
|
||||
};
|
||||
|
||||
// ordering and stack
|
||||
#ifdef NON_MATCHING
|
||||
#define _INTEGER_LOG2(x) ( \
|
||||
(x) <= 1 ? 0 : \
|
||||
(x) <= 2 ? 1 : \
|
||||
(x) <= 4 ? 2 : \
|
||||
(x) <= 8 ? 3 : \
|
||||
(x) <= 16 ? 4 : \
|
||||
(x) <= 32 ? 5 : \
|
||||
(x) <= 64 ? 6 : \
|
||||
(x) <= 128 ? 7 : \
|
||||
(x) <= 256 ? 8 : \
|
||||
(x) <= 512 ? 9 : 10)
|
||||
|
||||
s32 draw_box(s32 flags, WindowStyleCustom* windowStyle, s32 posX, s32 posY, s32 posZ, s32 width, s32 height, u8 opacity,
|
||||
u8 darkening, f32 scaleX, f32 scaleY, f32 rotX, f32 rotY, f32 rotZ,
|
||||
void (*fpDrawContents)(s32, s32, s32, s32, s32, s32, s32), s32 drawContentsArg0,
|
||||
Matrix4f rotScaleMtx, s32 translateX, s32 translateY, Matrix4f outMtx)
|
||||
{
|
||||
Matrix4f sp20;
|
||||
Matrix4f sp60;
|
||||
Matrix4f spA0;
|
||||
|
||||
u8 spF7;
|
||||
u8 spFF;
|
||||
u8 sp107;
|
||||
u8 sp10F;
|
||||
u8 sp117;
|
||||
u8 sp11F;
|
||||
u8 sp127;
|
||||
u8 sp12F;
|
||||
|
||||
u8* backgroundImageData;
|
||||
u8* sp13C;
|
||||
s32 sp140;
|
||||
s32 sp144;
|
||||
Vec2bu* sp148;
|
||||
u32 sp14C;
|
||||
u32 packedTileFormat;
|
||||
Mtx* sp154;
|
||||
|
||||
WindowCorners* corners;
|
||||
WindowBackground* background;
|
||||
u32 bgWidth, bgHeight;
|
||||
u32 cornerWidth, cornerHeight;
|
||||
s32 a3;
|
||||
s32 t0;
|
||||
s32 s6;
|
||||
Vtx* fp;
|
||||
s32 i, j, k;
|
||||
Gfx* combineMode;
|
||||
s32 tmem = 0x100;
|
||||
u32 bgScrollOffset;
|
||||
DefaultWindowStyle* defaultStyle = NULL;
|
||||
WindowStyleCustom* customStyle = NULL;
|
||||
s32 alpha = opacity;
|
||||
s32 new_var;
|
||||
|
||||
if ((u32)windowStyle < 23) {
|
||||
defaultStyle = &D_801098E0[(u32)windowStyle];
|
||||
|
||||
spF7 = defaultStyle->color1.r;
|
||||
spFF = defaultStyle->color1.g;
|
||||
sp107 = defaultStyle->color1.b;
|
||||
sp10F = defaultStyle->color1.a * alpha / 255;
|
||||
sp117 = defaultStyle->color2.r;
|
||||
sp11F = defaultStyle->color2.g;
|
||||
sp127 = defaultStyle->color2.b;
|
||||
sp12F = defaultStyle->color2.a;
|
||||
|
||||
background = &D_8010BAE8[defaultStyle->bgIndex];
|
||||
corners = &D_8010BB00[defaultStyle->cornersIndex];
|
||||
} else {
|
||||
spF7 = windowStyle->color1.r;
|
||||
spFF = windowStyle->color1.g;
|
||||
sp107 = windowStyle->color1.b;
|
||||
sp10F = windowStyle->color1.a * alpha / 255;
|
||||
sp117 = windowStyle->color2.r;
|
||||
sp11F = windowStyle->color2.g;
|
||||
sp127 = windowStyle->color2.b;
|
||||
sp12F = windowStyle->color2.a;
|
||||
|
||||
customStyle = windowStyle;
|
||||
background = &windowStyle->background;
|
||||
corners = &windowStyle->corners;
|
||||
}
|
||||
|
||||
backgroundImageData = background->imgData;
|
||||
|
||||
bgWidth = background->width;
|
||||
bgHeight = background->height;
|
||||
sp13C = corners->imgData;
|
||||
sp140 = background->packedTileFormatHigh;
|
||||
new_var = 1; // TODO hack
|
||||
sp144 = _INTEGER_LOG2(bgWidth);
|
||||
s6 = _INTEGER_LOG2(bgHeight);
|
||||
|
||||
fp = NULL;
|
||||
sp154 = NULL;
|
||||
sp148 = (Vec2bu*)&corners->size1;
|
||||
sp14C = corners->packedTileFormatHigh;
|
||||
packedTileFormat = corners->packedTileFormatLow;
|
||||
|
||||
if (width <= 0 || height <= 0 || opacity == 0 || posX <= -768 || posY <= -768) {
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if (posX >= SCREEN_WIDTH || posY >= SCREEN_HEIGHT) {
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if (posX + width >= 768 || posY + height >= 768 || posX + width <= 0 || posY + height <= 0) {
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if (flags & DRAW_FLAGS_ROTSCALE) {
|
||||
fp = D_8010D6B0[D_8010BBB0++].vert;
|
||||
if (D_8010BBB0 > 20) {
|
||||
D_8010BBB0 = 0;
|
||||
}
|
||||
}
|
||||
|
||||
gDPPipeSync(gMasterGfxPos++);
|
||||
gDPSetCycleType(gMasterGfxPos++, G_CYC_2CYCLE);
|
||||
gDPSetBlendColor(gMasterGfxPos++, 0, 0, 0, 0);
|
||||
gDPSetFogColor(gMasterGfxPos++, 0, 0, 0, darkening);
|
||||
gDPSetRenderMode(gMasterGfxPos++, GBL_c1(G_BL_CLR_BL, G_BL_A_FOG, G_BL_CLR_IN, G_BL_1MA), G_RM_XLU_SURF2);
|
||||
if (!(flags & DRAW_FLAGS_CLIP)) {
|
||||
gDPSetScissor(gMasterGfxPos++, G_SC_NON_INTERLACE, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT);
|
||||
}
|
||||
|
||||
if (defaultStyle != NULL) {
|
||||
Gfx* gfxPos = gMasterGfxPos;
|
||||
*gfxPos = D_8010BB90[defaultStyle->unk_2 + (sp10F != 255 ? 2 : 0)];
|
||||
} else {
|
||||
Gfx* gfxPos = gMasterGfxPos;
|
||||
if (sp10F != 255) {
|
||||
*gfxPos = customStyle->transparentCombineMode;
|
||||
} else {
|
||||
*gfxPos = customStyle->opaqueCombineMode;
|
||||
}
|
||||
}
|
||||
|
||||
gMasterGfxPos++;
|
||||
gDPSetTextureFilter(gMasterGfxPos++, G_TF_POINT);
|
||||
|
||||
if (fp) {
|
||||
gSPViewport(gMasterGfxPos++, &D_8010BBB8);
|
||||
guFrustumF(sp20, -80.0f, 80.0f, 60.0f, -60.0f, 160.0f, 480.0f, 1.0f);
|
||||
guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||
sp154 = &gDisplayContext->matrixStack[gMatrixListPos];
|
||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
|
||||
guPositionF(sp20, rotX, rotY, rotZ, 1.0f, posX + width / 2, posY + height / 2, posZ);
|
||||
if ((scaleX != 1.0f) || (scaleY != 1.0f)) {
|
||||
guScaleF(sp60, scaleX, scaleY, 1.0f);
|
||||
guMtxCatF(sp60, sp20, sp20);
|
||||
}
|
||||
if (rotScaleMtx != 0) {
|
||||
guTranslateF(sp60, -translateX / 2, -translateY / 2, 0.0f);
|
||||
guMtxCatF(sp20, sp60, sp60);
|
||||
guMtxCatF(sp60, rotScaleMtx, sp20);
|
||||
}
|
||||
if (outMtx) {
|
||||
for (k = 0; k < 4; k++) {
|
||||
for (j = 0; j < 4; j++) {
|
||||
outMtx[k][j] = sp20[k][j];
|
||||
}
|
||||
}
|
||||
}
|
||||
guTranslateF(sp60, -160.0f, -120.0f, -320.0f);
|
||||
guMtxCatF(sp20, sp60, sp20);
|
||||
gSPClearGeometryMode(gMasterGfxPos++, G_CULL_BOTH | G_LIGHTING);
|
||||
if (flags & DRAW_FLAGS_CULL_BACK) {
|
||||
gSPSetGeometryMode(gMasterGfxPos++, G_CULL_BACK);
|
||||
}
|
||||
guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gDPSetTexturePersp(gMasterGfxPos++, G_TP_PERSP);
|
||||
gSPPerspNormalize(gMasterGfxPos++, 20);
|
||||
} else {
|
||||
gDPSetTexturePersp(gMasterGfxPos++, G_TP_NONE);
|
||||
}
|
||||
|
||||
gSPTexture(gMasterGfxPos++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON);
|
||||
gDPSetTextureLUT(gMasterGfxPos++, G_TT_NONE);
|
||||
gDPSetTextureDetail(gMasterGfxPos++, G_TD_CLAMP);
|
||||
gDPSetTextureLOD(gMasterGfxPos++, G_TL_TILE);
|
||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, spF7, spFF, sp107, sp10F);
|
||||
gDPSetEnvColor(gMasterGfxPos++, sp117, sp11F, sp127, sp12F);
|
||||
if (backgroundImageData) {
|
||||
switch (background->packedTileFormatLow) {
|
||||
case G_IM_SIZ_4b:
|
||||
gDPLoadTextureTile_4b(gMasterGfxPos++, backgroundImageData, sp140, bgWidth, bgHeight, 0, 0, bgWidth - 1, bgHeight - 1, 0, G_TX_WRAP, G_TX_WRAP, sp144, s6, G_TX_NOLOD, G_TX_NOLOD);
|
||||
break;
|
||||
case G_IM_SIZ_8b:
|
||||
gDPLoadTextureTile(gMasterGfxPos++, backgroundImageData, sp140, G_IM_SIZ_8b, bgWidth, bgHeight, 0, 0, bgWidth - 1, bgHeight - 1, 0, G_TX_WRAP, G_TX_WRAP, sp144, s6, G_TX_NOLOD, G_TX_NOLOD);
|
||||
break;
|
||||
case G_IM_SIZ_16b:
|
||||
gDPLoadTextureTile(gMasterGfxPos++, backgroundImageData, sp140, G_IM_SIZ_16b, bgWidth, bgHeight, 0, 0, bgWidth - 1, bgHeight - 1, 0, G_TX_WRAP, G_TX_WRAP, sp144, s6, G_TX_NOLOD, G_TX_NOLOD);
|
||||
break;
|
||||
case G_IM_SIZ_32b:
|
||||
gDPLoadTextureTile(gMasterGfxPos++, backgroundImageData, sp140, G_IM_SIZ_32b, bgWidth, bgHeight, 0, 0, bgWidth - 1, bgHeight - 1, 0, G_TX_WRAP, G_TX_WRAP, sp144, s6, G_TX_NOLOD, G_TX_NOLOD);
|
||||
break;
|
||||
}
|
||||
|
||||
if (flags & DRAW_FLAGS_2) {
|
||||
bgScrollOffset = 511 - ((gGameStatusPtr->frameCounter * 4) & 0x1FF);
|
||||
gDPSetTileSize(gMasterGfxPos++, G_TX_RENDERTILE,
|
||||
(width / 2 * 4) + (bgScrollOffset),
|
||||
(height / 2 * 4) + (bgScrollOffset),
|
||||
(width / 2 + bgWidth - 1) * 4 + (bgScrollOffset),
|
||||
(height / 2 + bgHeight - 1) * 4 + (bgScrollOffset));
|
||||
} else {
|
||||
gDPSetTileSize(gMasterGfxPos++, G_TX_RENDERTILE, (width / 2 * 4), (height / 2 * 4), (width / 2 + bgWidth - new_var) * 4, (height / 2 + bgHeight - 1)* 4);
|
||||
}
|
||||
}
|
||||
|
||||
if (sp13C != NULL) {
|
||||
for (i = 0; i < 4; i++) {
|
||||
cornerWidth = sp148[i].x;
|
||||
cornerHeight = sp148[i].y;
|
||||
a3 = _INTEGER_LOG2(cornerWidth);
|
||||
t0 = _INTEGER_LOG2(cornerHeight);
|
||||
|
||||
|
||||
switch (packedTileFormat) {
|
||||
case G_IM_SIZ_4b:
|
||||
gDPLoadMultiTile_4b(gMasterGfxPos++, sp13C, tmem, 1, sp14C, cornerWidth, cornerHeight, 0, 0, cornerWidth - 1, cornerHeight - 1, 0, G_TX_CLAMP, G_TX_CLAMP, a3, t0, G_TX_NOLOD, G_TX_NOLOD);
|
||||
sp13C += cornerWidth * cornerHeight / 2;
|
||||
break;
|
||||
case G_IM_SIZ_8b:
|
||||
gDPLoadMultiTile(gMasterGfxPos++, sp13C, tmem, 1, sp14C, G_IM_SIZ_8b, cornerWidth, cornerHeight, 0, 0, cornerWidth - 1, cornerHeight - 1, 0, G_TX_CLAMP, G_TX_CLAMP, a3, t0, G_TX_NOLOD, G_TX_NOLOD);
|
||||
sp13C += cornerWidth * cornerHeight;
|
||||
break;
|
||||
case G_IM_SIZ_16b:
|
||||
gDPLoadMultiTile(gMasterGfxPos++, sp13C, tmem, 1, sp14C, G_IM_SIZ_16b, cornerWidth, cornerHeight, 0, 0, cornerWidth - 1, cornerHeight - 1, 0, G_TX_CLAMP, G_TX_CLAMP, a3, t0, G_TX_NOLOD, G_TX_NOLOD);
|
||||
sp13C += cornerWidth * cornerHeight * 2;
|
||||
break;
|
||||
case G_IM_SIZ_32b:
|
||||
gDPLoadMultiTile(gMasterGfxPos++, sp13C, tmem, 1, sp14C, G_IM_SIZ_32b, cornerWidth, cornerHeight, 0, 0, cornerWidth - 1, cornerHeight - 1, 0, G_TX_CLAMP, G_TX_CLAMP, a3, t0, G_TX_NOLOD, G_TX_NOLOD);
|
||||
sp13C += cornerWidth * cornerHeight * 4;
|
||||
break;
|
||||
}
|
||||
|
||||
switch (i) {
|
||||
case 1:
|
||||
gDPSetTileSize(gMasterGfxPos++, 1, (width - cornerWidth) * 4, 0, (width - 1) * 4, (cornerHeight - 1) * 4);
|
||||
break;
|
||||
case 2:
|
||||
gDPSetTileSize(gMasterGfxPos++, 1, 0, (height - cornerHeight) * 4, (cornerWidth - 1) * 4, (height - 1) * 4);
|
||||
break;
|
||||
case 3:
|
||||
gDPSetTileSize(gMasterGfxPos++, 1, (width - cornerWidth) * 4, (height - cornerHeight) * 4, (width - 1) * 4, (height - 1) * 4);
|
||||
break;
|
||||
}
|
||||
|
||||
if (fp) {
|
||||
switch (i) {
|
||||
case 0:
|
||||
fp[0].v.ob[0] = -width / 2;
|
||||
fp[0].v.ob[1] = -height / 2;
|
||||
fp[0].v.ob[2] = 0;
|
||||
|
||||
fp[1].v.ob[0] = 0;
|
||||
fp[1].v.ob[1] = -height / 2;
|
||||
fp[1].v.ob[2] = 0;
|
||||
|
||||
fp[2].v.ob[0] = -width / 2;
|
||||
fp[2].v.ob[1] = 0;
|
||||
fp[2].v.ob[2] = 0;
|
||||
|
||||
fp[3].v.ob[0] = 0;
|
||||
fp[3].v.ob[1] = 0;
|
||||
fp[3].v.ob[2] = 0;
|
||||
|
||||
fp[0].v.tc[0] = 0;
|
||||
fp[0].v.tc[1] = 0;
|
||||
|
||||
fp[1].v.tc[0] = (width / 2) * 32;
|
||||
fp[1].v.tc[1] = 0;
|
||||
|
||||
fp[2].v.tc[0] = 0;
|
||||
fp[2].v.tc[1] = (height / 2) * 32;
|
||||
|
||||
fp[3].v.tc[0] = (width / 2) * 32;
|
||||
fp[3].v.tc[1] = (height / 2) * 32;
|
||||
break;
|
||||
case 1:
|
||||
fp[4].v.ob[0] = 0;
|
||||
fp[4].v.ob[1] = -height / 2;
|
||||
fp[4].v.ob[2] = 0;
|
||||
|
||||
fp[5].v.ob[0] = (-width / 2) + width;
|
||||
fp[5].v.ob[1] = -height / 2;
|
||||
fp[5].v.ob[2] = 0;
|
||||
|
||||
fp[6].v.ob[0] = 0;
|
||||
fp[6].v.ob[1] = 0;
|
||||
fp[6].v.ob[2] = 0;
|
||||
|
||||
fp[7].v.ob[0] = (-width / 2) + width;
|
||||
fp[7].v.ob[1] = 0;
|
||||
fp[7].v.ob[2] = 0;
|
||||
|
||||
fp[4].v.tc[0] = (width / 2) * 32;
|
||||
fp[4].v.tc[1] = 0;
|
||||
|
||||
fp[5].v.tc[0] = width * 32;
|
||||
fp[5].v.tc[1] = 0;
|
||||
|
||||
fp[6].v.tc[0] = (width / 2) * 32;
|
||||
fp[6].v.tc[1] = (height / 2) * 32;
|
||||
|
||||
fp[7].v.tc[0] = width * 32;
|
||||
fp[7].v.tc[1] = (height / 2) * 32;
|
||||
|
||||
fp += 4;
|
||||
break;
|
||||
case 2:
|
||||
fp[8].v.ob[0] = -width / 2;
|
||||
fp[8].v.ob[1] = 0;
|
||||
fp[8].v.ob[2] = 0;
|
||||
|
||||
fp[9].v.ob[0] = 0;
|
||||
fp[9].v.ob[1] = 0;
|
||||
fp[9].v.ob[2] = 0;
|
||||
|
||||
fp[10].v.ob[0] = -width / 2;
|
||||
fp[10].v.ob[1] = height / 2;
|
||||
fp[10].v.ob[2] = 0;
|
||||
|
||||
fp[11].v.ob[0] = 0;
|
||||
fp[11].v.ob[1] = height / 2;
|
||||
fp[11].v.ob[2] = 0;
|
||||
|
||||
fp[8].v.tc[0] = 0;
|
||||
fp[8].v.tc[1] = (height / 2) * 32;
|
||||
|
||||
fp[9].v.tc[0] = (width / 2) * 32;
|
||||
fp[9].v.tc[1] = (height / 2) * 32;
|
||||
|
||||
fp[10].v.tc[0] = 0;
|
||||
fp[10].v.tc[1] = height * 32;
|
||||
|
||||
fp[11].v.tc[0] = (width / 2) * 32;
|
||||
fp[11].v.tc[1] = height * 32;
|
||||
|
||||
fp += 8;
|
||||
break;
|
||||
case 3:
|
||||
fp[12].v.ob[0] = 0;
|
||||
fp[12].v.ob[1] = 0;
|
||||
fp[12].v.ob[2] = 0;
|
||||
|
||||
fp[13].v.ob[0] = (-width / 2) + width;
|
||||
fp[13].v.ob[1] = 0;
|
||||
fp[13].v.ob[2] = 0;
|
||||
|
||||
fp[14].v.ob[0] = 0;
|
||||
fp[14].v.ob[1] = height / 2;
|
||||
fp[14].v.ob[2] = 0;
|
||||
|
||||
fp[15].v.ob[0] = (-width / 2) + width;
|
||||
fp[15].v.ob[1] = height / 2;
|
||||
fp[15].v.ob[2] = 0;
|
||||
|
||||
fp[12].v.tc[0] = (width / 2) * 32;
|
||||
fp[12].v.tc[1] = (height / 2) * 32;
|
||||
|
||||
fp[13].v.tc[0] = width * 32;
|
||||
fp[13].v.tc[1] = (height / 2) * 32;
|
||||
|
||||
fp[14].v.tc[0] = (width / 2) * 32;
|
||||
fp[14].v.tc[1] = height * 32;
|
||||
|
||||
fp[15].v.tc[0] = width * 32;
|
||||
fp[15].v.tc[1] = height * 32;
|
||||
|
||||
fp += 12;
|
||||
break;
|
||||
}
|
||||
gSPVertex(gMasterGfxPos++, fp, 4, 0);
|
||||
gSP2Triangles(gMasterGfxPos++, 0, 3, 1, 0, 0, 2, 3, 0);
|
||||
} else {
|
||||
switch (i) {
|
||||
case 0:
|
||||
gSPScisTextureRectangle(gMasterGfxPos++, posX * 4, posY * 4, (posX + width / 2) * 4, (posY + height / 2) * 4, G_TX_RENDERTILE, 0, 0, 0x400, 0x400);
|
||||
break;
|
||||
case 1:
|
||||
gSPScisTextureRectangle(gMasterGfxPos++, (posX + width / 2) * 4, posY * 4, (posX + width) * 4, (posY + height / 2) * 4, G_TX_RENDERTILE, (width / 2) * 32, 0, 0x400, 0x400);
|
||||
break;
|
||||
case 2:
|
||||
gSPScisTextureRectangle(gMasterGfxPos++, posX * 4, (posY + height / 2) * 4, (posX + width / 2) * 4, (posY + height) * 4, G_TX_RENDERTILE, 0, (height / 2) * 32, 0x400, 0x400);
|
||||
break;
|
||||
case 3:
|
||||
gSPScisTextureRectangle(gMasterGfxPos++, (posX + width / 2) * 4, (posY + height / 2) * 4, (posX + width) * 4, (posY + height) * 4, G_TX_RENDERTILE, (width / 2) * 32, (height / 2) * 32, 0x400, 0x400);
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
gDPPipeSync(gMasterGfxPos++);
|
||||
}
|
||||
} else if (backgroundImageData != NULL) {
|
||||
if (fp != NULL) {
|
||||
fp[0].v.ob[0] = -width / 2;
|
||||
fp[0].v.ob[1] = -height / 2;
|
||||
fp[0].v.ob[2] = 0;
|
||||
|
||||
fp[1].v.ob[0] = (-width / 2) + width;
|
||||
fp[1].v.ob[1] = -height / 2;
|
||||
fp[1].v.ob[2] = 0;
|
||||
|
||||
fp[2].v.ob[0] = -width / 2;
|
||||
fp[2].v.ob[1] = height / 2;
|
||||
fp[2].v.ob[2] = 0;
|
||||
|
||||
fp[3].v.ob[0] = (-width / 2) + width;
|
||||
fp[3].v.ob[1] = height / 2;
|
||||
fp[3].v.ob[2] = 0;
|
||||
|
||||
|
||||
fp[0].v.tc[0] = 0;
|
||||
fp[0].v.tc[1] = 0;
|
||||
|
||||
fp[1].v.tc[1] = 0;
|
||||
fp[1].v.tc[0] = width * 32;
|
||||
|
||||
fp[2].v.tc[0] = 0;
|
||||
fp[2].v.tc[1] = height * 32;
|
||||
|
||||
fp[3].v.tc[0] = width * 32;
|
||||
fp[3].v.tc[1] = height * 32;
|
||||
|
||||
gSPVertex(gMasterGfxPos++, &fp[0], 4, 0);
|
||||
gSP2Triangles(gMasterGfxPos++, 0, 3, 1, 0, 0, 2, 3, 0);
|
||||
} else {
|
||||
gSPScisTextureRectangle(gMasterGfxPos++, posX * 4, posY * 4, (posX + width) * 4, (posY + height) * 4,
|
||||
G_TX_RENDERTILE, 0, 0, 0x0400, 0x0400);
|
||||
}
|
||||
gDPPipeSync(gMasterGfxPos++);
|
||||
}
|
||||
|
||||
gDPSetTexturePersp(gMasterGfxPos++, G_TP_NONE);
|
||||
gDPSetCycleType(gMasterGfxPos++, G_CYC_1CYCLE);
|
||||
if (fpDrawContents != NULL) {
|
||||
if (fp != NULL) {
|
||||
s32 mdl_address = mdl_get_next_texture_address(width * height * 2);
|
||||
if (mdl_address != 0) {
|
||||
gDPSetColorImage(gMasterGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, width, OS_K0_TO_PHYSICAL(mdl_address));
|
||||
gDPSetScissorFrac(gMasterGfxPos++, G_SC_NON_INTERLACE, 0, 0, width * 4.0f, height * 4.0f);
|
||||
gDPSetCycleType(gMasterGfxPos++, G_CYC_FILL);
|
||||
gDPSetFillColor(gMasterGfxPos++, PACK_FILL_COLOR(spF7, spFF, sp107, 0));
|
||||
gDPSetRenderMode(gMasterGfxPos++, G_RM_NOOP, G_RM_NOOP2);
|
||||
gDPFillRectangle(gMasterGfxPos++, 0, 0, width - 1, height - 1);
|
||||
gDPPipeSync(gMasterGfxPos++);
|
||||
gDPSetScissorFrac(gMasterGfxPos++, G_SC_NON_INTERLACE, 4, 4, (width - 1) * 4.0f, (height - 1) * 4.0f);
|
||||
gDPSetCycleType(gMasterGfxPos++, G_CYC_1CYCLE);
|
||||
|
||||
fpDrawContents(drawContentsArg0, 0, 0, width, height, opacity, darkening);
|
||||
|
||||
gDPPipeSync(gMasterGfxPos++);
|
||||
gDPSetColorImage(gMasterGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 320, OS_K0_TO_PHYSICAL(nuGfxCfb_ptr));
|
||||
gDPSetScissor(gMasterGfxPos++, G_SC_NON_INTERLACE, 0, 0, 320, 240);
|
||||
gSPViewport(gMasterGfxPos++, &D_8010BBB8);
|
||||
gSPMatrix(gMasterGfxPos++, sp154, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
|
||||
gSPTexture(gMasterGfxPos++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON);
|
||||
gDPSetCycleType(gMasterGfxPos++, G_CYC_1CYCLE);
|
||||
gDPSetTextureLUT(gMasterGfxPos++, G_TT_NONE);
|
||||
gDPSetCombineMode(gMasterGfxPos++, G_CC_DECALRGBA, G_CC_DECALRGBA);
|
||||
gDPSetRenderMode(gMasterGfxPos++, G_RM_CLD_SURF, G_RM_NOOP2);
|
||||
gDPSetTexturePersp(gMasterGfxPos++, G_TP_PERSP);
|
||||
gDPSetTextureFilter(gMasterGfxPos++, G_TF_BILERP);
|
||||
guTranslateF(spA0, 0.0f, 6.0f, 0.0f);
|
||||
guMtxF2L(spA0, &D_8010BC08);
|
||||
guTranslateF(spA0, 0.0f, -height / 2, 0.0f);
|
||||
guMtxF2L(spA0, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++],
|
||||
G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
||||
for (i = 0; i < height / 6; i++) {
|
||||
s32 v0, a2;
|
||||
if (i == height / 6 - 1) {
|
||||
v0 = 0;
|
||||
if (height % 6 != 0) {
|
||||
v0 = 1;
|
||||
}
|
||||
} else {
|
||||
v0 = 1;
|
||||
}
|
||||
a2 = v0 + 5;
|
||||
gDPLoadTextureTile(gMasterGfxPos++, OS_K0_TO_PHYSICAL(mdl_address), G_IM_FMT_RGBA, G_IM_SIZ_16b, width, 0,
|
||||
0, i * 6, width - 1, i * 6 + a2, 0,
|
||||
G_TX_CLAMP, G_TX_CLAMP, 9, 3, G_TX_NOLOD, G_TX_NOLOD);
|
||||
gDPSetTileSize(gMasterGfxPos++, G_TX_RENDERTILE, (160 - width / 2) * 4, 0, ((160 - width / 2) + width - 1) * 4, a2 * 4);
|
||||
gSPVertex(gMasterGfxPos++, &vtx_drawbox1, 4, 0);
|
||||
gSP2Triangles(gMasterGfxPos++, 0, 3, 1, 0, 0, 2, 3, 0);
|
||||
gDPPipeSync(gMasterGfxPos++);
|
||||
gSPMatrix(gMasterGfxPos++, &D_8010BC08, G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
fpDrawContents(drawContentsArg0, posX, posY, width, height, opacity, darkening);
|
||||
}
|
||||
}
|
||||
if (fp != NULL) {
|
||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
||||
gDPSetTexturePersp(gMasterGfxPos++, G_TP_NONE);
|
||||
gDPPipeSync(gMasterGfxPos++);
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
#else
|
||||
INCLUDE_ASM(void, "8e790_len_2850", draw_box, s32 flags, WindowStyle windowStyle, s32 posX, s32 posY, s32 posZ, s32 width,
|
||||
s32 height, s32 opacity, s32 darkening, f32 scaleX, f32 scaleY, f32 rotX, f32 rotY, f32 rotZ,
|
||||
void (*fpDrawContents)(s32),s32 drawContentsArg0, Matrix4f rotScaleMtx, s32 translateX, s32 translateY,
|
||||
f32 (*outMtx)[4]);
|
||||
#endif
|
@ -25,7 +25,7 @@ void N(func_802A123C_72C7EC(void)) {
|
||||
|
||||
if (D_802A25E4 < 6) {
|
||||
if (D_802A25E4 > 0) {
|
||||
draw_box(0, 7, 106, 86, 0, 36, 36, 255, 0, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, NULL, NULL, NULL, SCREEN_WIDTH, SCREEN_HEIGHT, NULL);
|
||||
draw_box(0, WINDOW_STYLE_7, 106, 86, 0, 36, 36, 255, 0, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, NULL, NULL, NULL, SCREEN_WIDTH, SCREEN_HEIGHT, NULL);
|
||||
gDPSetScissor(gMasterGfxPos++, G_SC_NON_INTERLACE, 108, 90, 139, 118);
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(D_802A25C8); i++) {
|
||||
|
@ -26,7 +26,7 @@ void N(func_802A123C_73153C(void)) {
|
||||
|
||||
if (D_802A2DEC < 6) {
|
||||
if (D_802A2DEC > 0) {
|
||||
draw_box(0, 7, 106, 86, 0, 36, 36, 255, 0, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, NULL, NULL, NULL, SCREEN_WIDTH, SCREEN_HEIGHT, NULL);
|
||||
draw_box(0, WINDOW_STYLE_7, 106, 86, 0, 36, 36, 255, 0, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, NULL, NULL, NULL, SCREEN_WIDTH, SCREEN_HEIGHT, NULL);
|
||||
gDPSetScissor(gMasterGfxPos++, G_SC_NON_INTERLACE, 108, 90, 139, 118);
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(D_802A2DD8); i++) {
|
||||
|
829
src/draw_box.c
Normal file
829
src/draw_box.c
Normal file
@ -0,0 +1,829 @@
|
||||
#include "common.h"
|
||||
#include "nu/nusys.h"
|
||||
|
||||
#define INTEGER_LOG2(x) ((x) <= 1 ? 0 : (x) <= 2 ? 1 : (x) <= 4 ? 2 : (x) <= 8 ? 3 : (x) <= 16 ? 4 : (x) <= 32 ? 5 : (x) <= 64 ? 6 : (x) <= 128 ? 7 : (x) <= 256 ? 8 : (x) <= 512 ? 9 : 10)
|
||||
|
||||
typedef struct DefaultWindowStyle {
|
||||
/* 0x00 */ u8 bgIndex;
|
||||
/* 0x01 */ u8 cornersIndex;
|
||||
/* 0x02 */ u8 combineModeIndex;
|
||||
/* 0x03 */ Color_RGBA8 color1;
|
||||
/* 0x07 */ Color_RGBA8 color2;
|
||||
} DefaultWindowStyle; // size = 0x0B
|
||||
|
||||
static Vtx gBoxQuadBuffer[][16];
|
||||
|
||||
DefaultWindowStyle gBoxDefaultStyles[] = {
|
||||
{
|
||||
.bgIndex = 1,
|
||||
.cornersIndex = 0,
|
||||
.combineModeIndex = 0,
|
||||
.color1 = { .r = 200, .g = 191, .b = 164, .a = 255 },
|
||||
.color2 = { .r = 128, .g = 128, .b = 128, .a = 255 }
|
||||
},
|
||||
{
|
||||
.bgIndex = 1,
|
||||
.cornersIndex = 1,
|
||||
.combineModeIndex = 1,
|
||||
.color1 = { .r = 255, .g = 200, .b = 128, .a = 255 },
|
||||
.color2 = { .r = 128, .g = 128, .b = 128, .a = 255 }
|
||||
},
|
||||
{
|
||||
.bgIndex = 1,
|
||||
.cornersIndex = 2,
|
||||
.combineModeIndex = 1,
|
||||
.color1 = { .r = 232, .g = 196, .b = 77, .a = 255 },
|
||||
.color2 = { .r = 163, .g = 123, .b = 0, .a = 255 }
|
||||
},
|
||||
{
|
||||
.bgIndex = 0,
|
||||
.cornersIndex = 3,
|
||||
.combineModeIndex = 1,
|
||||
.color1 = { .r = 226, .g = 225, .b = 216, .a = 255 },
|
||||
.color2 = { .r = 217, .g = 208, .b = 201, .a = 255 }
|
||||
},
|
||||
{
|
||||
.bgIndex = 1,
|
||||
.cornersIndex = 4,
|
||||
.combineModeIndex = 1,
|
||||
.color1 = { .r = 61, .g = 74, .b = 188, .a = 255 },
|
||||
.color2 = { .r = 0, .g = 25, .b = 28, .a = 255 }
|
||||
},
|
||||
{
|
||||
.bgIndex = 1,
|
||||
.cornersIndex = 5,
|
||||
.combineModeIndex = 1,
|
||||
.color1 = { .r = 235, .g = 230, .b = 119, .a = 255 },
|
||||
.color2 = { .r = 142, .g = 90, .b = 37, .a = 255 }
|
||||
},
|
||||
{
|
||||
.bgIndex = 1,
|
||||
.cornersIndex = 6,
|
||||
.combineModeIndex = 1,
|
||||
.color1 = { .r = 235, .g = 230, .b = 119, .a = 255 },
|
||||
.color2 = { .r = 142, .g = 99, .b = 37, .a = 255 }
|
||||
},
|
||||
{
|
||||
.bgIndex = 1,
|
||||
.cornersIndex = 4,
|
||||
.combineModeIndex = 1,
|
||||
.color1 = { .r = 215, .g = 191, .b = 116, .a = 255 },
|
||||
.color2 = { .r = 132, .g = 70, .b = 50, .a = 255 }
|
||||
},
|
||||
{
|
||||
.bgIndex = 1,
|
||||
.cornersIndex = 4,
|
||||
.combineModeIndex = 1,
|
||||
.color1 = { .r = 215, .g = 191, .b = 116, .a = 255 },
|
||||
.color2 = { .r = 132, .g = 70, .b = 50, .a = 255 }
|
||||
},
|
||||
{
|
||||
.bgIndex = 1,
|
||||
.cornersIndex = 4,
|
||||
.combineModeIndex = 1,
|
||||
.color1 = { .r = 141, .g = 143, .b = 255, .a = 255 },
|
||||
.color2 = { .r = 43, .g = 69, .b = 102, .a = 255 }
|
||||
},
|
||||
{
|
||||
.bgIndex = 1,
|
||||
.cornersIndex = 8,
|
||||
.combineModeIndex = 1,
|
||||
.color1 = { .r = 141, .g = 143, .b = 255, .a = 255 },
|
||||
.color2 = { .r = 43, .g = 69, .b = 102, .a = 255 }
|
||||
},
|
||||
{
|
||||
.bgIndex = 1,
|
||||
.cornersIndex = 4,
|
||||
.combineModeIndex = 1,
|
||||
.color1 = { .r = 170, .g = 208, .b = 128, .a = 255 },
|
||||
.color2 = { .r = 71, .g = 123, .b = 83, .a = 255 }
|
||||
},
|
||||
{
|
||||
.bgIndex = 1,
|
||||
.cornersIndex = 8,
|
||||
.combineModeIndex = 1,
|
||||
.color1 = { .r = 170, .g = 208, .b = 128, .a = 255 },
|
||||
.color2 = { .r = 71, .g = 123, .b = 83, .a = 255 }
|
||||
},
|
||||
{
|
||||
.bgIndex = 1,
|
||||
.cornersIndex = 4,
|
||||
.combineModeIndex = 1,
|
||||
.color1 = { .r = 200, .g = 200, .b = 90, .a = 255 },
|
||||
.color2 = { .r = 140, .g = 140, .b = 0, .a = 255 }
|
||||
},
|
||||
{
|
||||
.bgIndex = 1,
|
||||
.cornersIndex = 8,
|
||||
.combineModeIndex = 1,
|
||||
.color1 = { .r = 200, .g = 200, .b = 90, .a = 255 },
|
||||
.color2 = { .r = 140, .g = 140, .b = 0, .a = 255 }
|
||||
},
|
||||
{
|
||||
.bgIndex = 1,
|
||||
.cornersIndex = 4,
|
||||
.combineModeIndex = 1,
|
||||
.color1 = { .r = 235, .g = 230, .b = 119, .a = 255 },
|
||||
.color2 = { .r = 142, .g = 90, .b = 37, .a = 255 }
|
||||
},
|
||||
{
|
||||
.bgIndex = 1,
|
||||
.cornersIndex = 4,
|
||||
.combineModeIndex = 1,
|
||||
.color1 = { .r = 142, .g = 212, .b = 236, .a = 255 },
|
||||
.color2 = { .r = 67, .g = 98, .b = 69, .a = 255 }
|
||||
},
|
||||
{
|
||||
.bgIndex = 1,
|
||||
.cornersIndex = 4,
|
||||
.combineModeIndex = 1,
|
||||
.color1 = { .r = 167, .g = 151, .b = 119, .a = 255 },
|
||||
.color2 = { .r = 98, .g = 55, .b = 154, .a = 255 }
|
||||
},
|
||||
{
|
||||
.bgIndex = 1,
|
||||
.cornersIndex = 7,
|
||||
.combineModeIndex = 1,
|
||||
.color1 = { .r = 17, .g = 151, .b = 29, .a = 255 },
|
||||
.color2 = { .r = 8, .g = 55, .b = 14, .a = 255 }
|
||||
},
|
||||
{
|
||||
.bgIndex = 1,
|
||||
.cornersIndex = 7,
|
||||
.combineModeIndex = 1,
|
||||
.color1 = { .r = 110, .g = 110, .b = 200, .a = 255 },
|
||||
.color2 = { .r = 10, .g = 10, .b = 100, .a = 255 }
|
||||
},
|
||||
{
|
||||
.bgIndex = 1,
|
||||
.cornersIndex = 4,
|
||||
.combineModeIndex = 1,
|
||||
.color1 = { .r = 181, .g = 60, .b = 60, .a = 255 },
|
||||
.color2 = { .r = 76, .g = 10, .b = 0, .a = 255 }
|
||||
},
|
||||
{
|
||||
.bgIndex = 1,
|
||||
.cornersIndex = 4,
|
||||
.combineModeIndex = 1,
|
||||
.color1 = { .r = 174, .g = 227, .b = 235, .a = 255 },
|
||||
.color2 = { .r = 76, .g = 110, .b = 60, .a = 255 }
|
||||
},
|
||||
{
|
||||
.bgIndex = 0,
|
||||
.cornersIndex = 3,
|
||||
.combineModeIndex = 1,
|
||||
.color1 = { .r = 126, .g = 125, .b = 216, .a = 255 },
|
||||
.color2 = { .r = 217, .g = 108, .b = 201, .a = 255 }
|
||||
}
|
||||
};
|
||||
|
||||
#include "ui/box/corners9.png.inc.c"
|
||||
#include "ui/box/corners8.png.inc.c"
|
||||
#include "ui/box/corners6.png.inc.c"
|
||||
#include "ui/box/corners7.png.inc.c"
|
||||
#include "ui/box/corners3.png.inc.c"
|
||||
#include "ui/box/corners5.png.inc.c"
|
||||
#include "ui/box/corners4.png.inc.c"
|
||||
#include "ui/box/bg_tile.png.inc.c"
|
||||
#include "ui/box/corners1.png.inc.c"
|
||||
#include "ui/box/corners2.png.inc.c"
|
||||
#include "ui/box/bg_flat.png.inc.c"
|
||||
|
||||
WindowBackground gBoxBackground[] = {
|
||||
{
|
||||
.imgData = ui_box_bg_tile_png,
|
||||
.fmt = G_IM_FMT_I,
|
||||
.bitDepth = G_IM_SIZ_4b,
|
||||
.width = 16,
|
||||
.height = 16,
|
||||
.unk_07 = { 0, 0, 0, 0},
|
||||
.size = 128
|
||||
},
|
||||
{
|
||||
.imgData = ui_box_bg_flat_png,
|
||||
.fmt = G_IM_FMT_I,
|
||||
.bitDepth = G_IM_SIZ_4b,
|
||||
.width = 16,
|
||||
.height = 1,
|
||||
.unk_07 = { 0, 0, 0, 0},
|
||||
.size = 8
|
||||
}
|
||||
};
|
||||
|
||||
WindowCorners gBoxCorners[] = {
|
||||
{
|
||||
.imgData = ui_box_corners1_png,
|
||||
.fmt = G_IM_FMT_IA,
|
||||
.bitDepth = G_IM_SIZ_8b,
|
||||
.size1 = { 16, 16},
|
||||
.size2 = { 16, 16},
|
||||
.size3 = { 16, 16},
|
||||
.size4 = { 16, 16},
|
||||
.unk_0D = { 0, 0, 0}
|
||||
},
|
||||
{
|
||||
.imgData = ui_box_corners2_png,
|
||||
.fmt = G_IM_FMT_I,
|
||||
.bitDepth = G_IM_SIZ_4b,
|
||||
.size1 = { 16, 16},
|
||||
.size2 = { 16, 16},
|
||||
.size3 = { 16, 16},
|
||||
.size4 = { 16, 16},
|
||||
.unk_0D = { 0, 0, 0}
|
||||
},
|
||||
{
|
||||
.imgData = ui_box_corners3_png,
|
||||
.fmt = G_IM_FMT_IA,
|
||||
.bitDepth = G_IM_SIZ_8b,
|
||||
.size1 = { 16, 32},
|
||||
.size2 = { 16, 32},
|
||||
.size3 = { 16, 16},
|
||||
.size4 = { 16, 16},
|
||||
.unk_0D = { 0, 0, 0}
|
||||
},
|
||||
{
|
||||
.imgData = ui_box_corners4_png,
|
||||
.fmt = G_IM_FMT_IA,
|
||||
.bitDepth = G_IM_SIZ_8b,
|
||||
.size1 = { 8, 8},
|
||||
.size2 = { 8, 8},
|
||||
.size3 = { 8, 8},
|
||||
.size4 = { 8, 8},
|
||||
.unk_0D = { 0, 0, 0}
|
||||
},
|
||||
{
|
||||
.imgData = ui_box_corners5_png,
|
||||
.fmt = G_IM_FMT_IA,
|
||||
.bitDepth = G_IM_SIZ_8b,
|
||||
.size1 = { 16, 8},
|
||||
.size2 = { 16, 8},
|
||||
.size3 = { 16, 8},
|
||||
.size4 = { 16, 8},
|
||||
.unk_0D = { 0, 0, 0}
|
||||
},
|
||||
{
|
||||
.imgData = ui_box_corners6_png,
|
||||
.fmt = G_IM_FMT_IA,
|
||||
.bitDepth = G_IM_SIZ_8b,
|
||||
.size1 = { 16, 8},
|
||||
.size2 = { 16, 8},
|
||||
.size3 = { 16, 8},
|
||||
.size4 = { 16, 16},
|
||||
.unk_0D = { 0, 0, 0}
|
||||
},
|
||||
{
|
||||
.imgData = ui_box_corners7_png,
|
||||
.fmt = G_IM_FMT_IA,
|
||||
.bitDepth = G_IM_SIZ_8b,
|
||||
.size1 = { 16, 8},
|
||||
.size2 = { 16, 8},
|
||||
.size3 = { 16, 8},
|
||||
.size4 = { 16, 8},
|
||||
.unk_0D = { 0, 0, 0}
|
||||
},
|
||||
{
|
||||
.imgData = ui_box_corners8_png,
|
||||
.fmt = G_IM_FMT_IA,
|
||||
.bitDepth = G_IM_SIZ_8b,
|
||||
.size1 = { 24, 24},
|
||||
.size2 = { 24, 24},
|
||||
.size3 = { 24, 24},
|
||||
.size4 = { 24, 24},
|
||||
.unk_0D = { 0, 0, 0}
|
||||
},
|
||||
{
|
||||
.imgData = ui_box_corners9_png,
|
||||
.fmt = G_IM_FMT_IA,
|
||||
.bitDepth = G_IM_SIZ_8b,
|
||||
.size1 = { 16, 16},
|
||||
.size2 = { 16, 16},
|
||||
.size3 = { 16, 16},
|
||||
.size4 = { 16, 16},
|
||||
.unk_0D = { 0, 0, 0}
|
||||
}
|
||||
};
|
||||
|
||||
Gfx gBoxCombineModes[] = {
|
||||
gsDPSetCombineLERP(TEXEL0, 0, PRIMITIVE, 0, 0, 0, 0, TEXEL1, TEXEL0, ENVIRONMENT, ENV_ALPHA, COMBINED, 0, 0, 0, COMBINED),
|
||||
gsDPSetCombineLERP(TEXEL0, 0, TEXEL1, 0, 0, 0, 0, TEXEL1, PRIMITIVE, ENVIRONMENT, COMBINED, ENVIRONMENT, 0, 0, 0, COMBINED),
|
||||
gsDPSetCombineLERP(TEXEL0, 0, PRIMITIVE, 0, TEXEL1, 0, PRIMITIVE, 0, TEXEL0, ENVIRONMENT, ENV_ALPHA, COMBINED, 0, 0, 0, COMBINED),
|
||||
gsDPSetCombineLERP(TEXEL0, 0, TEXEL1, 0, TEXEL1, 0, PRIMITIVE, 0, PRIMITIVE, ENVIRONMENT, COMBINED, ENVIRONMENT, 0, 0, 0, COMBINED)
|
||||
};
|
||||
s32 gBoxQuadIndex = 0;
|
||||
Vp gBoxViewport = {
|
||||
.vp = {
|
||||
.vscale = { 640, 480, 511, 0 },
|
||||
.vtrans = { 640, 480, 511, 0 }
|
||||
}
|
||||
};
|
||||
|
||||
#include "vtx/drawbox1.vtx.inc.c"
|
||||
|
||||
/*
|
||||
| 0.0 0.0 0.0 0.0|
|
||||
| 0.0 0.0 0.0 0.0|
|
||||
| 0.0 0.0 0.0 0.0|
|
||||
|-6.0 0.0 0.0 0.0|
|
||||
*/
|
||||
Mtx gBoxMatrix = {
|
||||
.m = {
|
||||
// integer portion
|
||||
{ 0x00000000, 0x00000000,
|
||||
0x00000000, 0x00000000 },
|
||||
{ 0x00000000, 0x00000000,
|
||||
0xFFFA0000, 0x00000000 },
|
||||
// fractional portion
|
||||
{ 0x00000000, 0x00000000,
|
||||
0x00000000, 0x00000000 },
|
||||
{ 0x00000000, 0x00000000,
|
||||
0x00000000, 0x00000000 }
|
||||
}
|
||||
};
|
||||
|
||||
s32 draw_box(s32 flags, WindowStyle windowStyle, s32 posX, s32 posY, s32 posZ, s32 width, s32 height, u8 opacity,
|
||||
u8 darkening, f32 scaleX, f32 scaleY, f32 rotX, f32 rotY, f32 rotZ, void (*fpDrawContents)(s32, s32, s32, s32, s32, s32, s32),
|
||||
void* drawContentsArg0, Matrix4f rotScaleMtx, s32 translateX, s32 translateY, Matrix4f outMtx) {
|
||||
Matrix4f mtx1, mtx2, mtx3;
|
||||
u8 primR, primG, primB, primA, envR, envG, envB, envA;
|
||||
DefaultWindowStyle* defaultStyle = NULL;
|
||||
WindowStyleCustom* customStyle = NULL;
|
||||
WindowCorners* corners;
|
||||
WindowBackground* background;
|
||||
u32 bgWidth, bgHeight;
|
||||
u32 cornerWidth, cornerHeight;
|
||||
s32 masks, maskt;
|
||||
Vtx* quads;
|
||||
s32 idx;
|
||||
s32 i, j;
|
||||
s32 tmem = 0x100;
|
||||
u32 bgScrollOffsetX, bgScrollOffsetY;
|
||||
|
||||
s32 foo;
|
||||
s32 alpha = foo * opacity / 255;
|
||||
|
||||
if (windowStyle.defaultStyleID <= WINDOW_STYLE_MAX && windowStyle.defaultStyleID >= 0) {
|
||||
defaultStyle = &gBoxDefaultStyles[windowStyle.defaultStyleID];
|
||||
|
||||
primR = defaultStyle->color1.r;
|
||||
primG = defaultStyle->color1.g;
|
||||
primB = defaultStyle->color1.b;
|
||||
primA = defaultStyle->color1.a * opacity / 255;
|
||||
envR = defaultStyle->color2.r;
|
||||
envG = defaultStyle->color2.g;
|
||||
envB = defaultStyle->color2.b;
|
||||
envA = defaultStyle->color2.a;
|
||||
|
||||
background = &gBoxBackground[defaultStyle->bgIndex];
|
||||
corners = &gBoxCorners[defaultStyle->cornersIndex];
|
||||
} else {
|
||||
primR = windowStyle.customStyle->color1.r;
|
||||
primG = windowStyle.customStyle->color1.g;
|
||||
primB = windowStyle.customStyle->color1.b;
|
||||
primA = windowStyle.customStyle->color1.a * opacity / 255;
|
||||
envR = windowStyle.customStyle->color2.r;
|
||||
envG = windowStyle.customStyle->color2.g;
|
||||
envB = windowStyle.customStyle->color2.b;
|
||||
envA = windowStyle.customStyle->color2.a;
|
||||
|
||||
customStyle = windowStyle.customStyle;
|
||||
background = &windowStyle.customStyle->background;
|
||||
corners = &windowStyle.customStyle->corners;
|
||||
}
|
||||
{
|
||||
u8* bgImage;
|
||||
u8* cornersImage;
|
||||
s32 bgFmt;
|
||||
s32 bgMasks;
|
||||
s32 bgMaskt;
|
||||
Vec2bu* cornersSizes;
|
||||
u32 cornersFmt;
|
||||
u32 cornersBitDepth;
|
||||
Mtx* sp154;
|
||||
|
||||
bgFmt = background->fmt;
|
||||
cornersImage = corners->imgData;
|
||||
|
||||
do {} while (0);
|
||||
|
||||
bgWidth = background->width;
|
||||
bgImage = background->imgData;
|
||||
bgHeight = background->height;
|
||||
|
||||
bgMasks = INTEGER_LOG2(bgWidth);
|
||||
bgMaskt = INTEGER_LOG2(bgHeight);
|
||||
|
||||
quads = NULL;
|
||||
sp154 = NULL;
|
||||
cornersSizes = (Vec2bu*)&corners->size1;
|
||||
cornersFmt = corners->fmt;
|
||||
cornersBitDepth = corners->bitDepth;
|
||||
|
||||
if (width <= 0 || height <= 0 || opacity == 0 || posX <= -768 || posY <= -768) {
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if (posX >= SCREEN_WIDTH || posY >= SCREEN_HEIGHT) {
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if (posX + width >= 768 || posY + height >= 768 || posX + width <= 0 || posY + height <= 0) {
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if (flags & DRAW_FLAGS_ROTSCALE) {
|
||||
quads = gBoxQuadBuffer[gBoxQuadIndex++];
|
||||
if (gBoxQuadIndex > 20) {
|
||||
gBoxQuadIndex = 0;
|
||||
}
|
||||
}
|
||||
|
||||
gDPPipeSync(gMasterGfxPos++);
|
||||
gDPSetCycleType(gMasterGfxPos++, G_CYC_2CYCLE);
|
||||
gDPSetBlendColor(gMasterGfxPos++, 0, 0, 0, 0);
|
||||
gDPSetFogColor(gMasterGfxPos++, 0, 0, 0, darkening);
|
||||
gDPSetRenderMode(gMasterGfxPos++, GBL_c1(G_BL_CLR_BL, G_BL_A_FOG, G_BL_CLR_IN, G_BL_1MA), G_RM_XLU_SURF2);
|
||||
if (!(flags & DRAW_FLAGS_NO_CLIP)) {
|
||||
gDPSetScissor(gMasterGfxPos++, G_SC_NON_INTERLACE, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT);
|
||||
}
|
||||
|
||||
if (defaultStyle != NULL) {
|
||||
Gfx* gfxPos = gMasterGfxPos;
|
||||
*gfxPos = gBoxCombineModes[defaultStyle->combineModeIndex + (primA != 255 ? 2 : 0)];
|
||||
} else {
|
||||
Gfx* gfxPos = gMasterGfxPos;
|
||||
if (primA != 255) {
|
||||
*gfxPos = customStyle->transparentCombineMode;
|
||||
} else {
|
||||
*gfxPos = customStyle->opaqueCombineMode;
|
||||
}
|
||||
}
|
||||
|
||||
gMasterGfxPos++;
|
||||
gDPSetTextureFilter(gMasterGfxPos++, G_TF_POINT);
|
||||
|
||||
if (quads != NULL) {
|
||||
gSPViewport(gMasterGfxPos++, &gBoxViewport);
|
||||
guFrustumF(mtx1, -80.0f, 80.0f, 60.0f, -60.0f, 160.0f, 480.0f, 1.0f);
|
||||
guMtxF2L(mtx1, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||
sp154 = &gDisplayContext->matrixStack[gMatrixListPos];
|
||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
|
||||
guPositionF(mtx1, rotX, rotY, rotZ, 1.0f, posX + width / 2, posY + height / 2, posZ);
|
||||
if (scaleX != 1.0f || scaleY != 1.0f) {
|
||||
guScaleF(mtx2, scaleX, scaleY, 1.0f);
|
||||
guMtxCatF(mtx2, mtx1, mtx1);
|
||||
}
|
||||
if (rotScaleMtx != 0) {
|
||||
guTranslateF(mtx2, -translateX / 2, -translateY / 2, 0.0f);
|
||||
guMtxCatF(mtx1, mtx2, mtx2);
|
||||
guMtxCatF(mtx2, rotScaleMtx, mtx1);
|
||||
}
|
||||
if (outMtx) {
|
||||
for (i = 0; i < 4; i++) {
|
||||
for (j = 0; j < 4; j++) {
|
||||
outMtx[i][j] = mtx1[i][j];
|
||||
}
|
||||
}
|
||||
}
|
||||
guTranslateF(mtx2, -160.0f, -120.0f, -320.0f);
|
||||
guMtxCatF(mtx1, mtx2, mtx1);
|
||||
gSPClearGeometryMode(gMasterGfxPos++, G_CULL_BOTH | G_LIGHTING);
|
||||
if (flags & DRAW_FLAGS_CULL_BACK) {
|
||||
gSPSetGeometryMode(gMasterGfxPos++, G_CULL_BACK);
|
||||
}
|
||||
guMtxF2L(mtx1, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gDPSetTexturePersp(gMasterGfxPos++, G_TP_PERSP);
|
||||
gSPPerspNormalize(gMasterGfxPos++, 20);
|
||||
} else {
|
||||
gDPSetTexturePersp(gMasterGfxPos++, G_TP_NONE);
|
||||
}
|
||||
|
||||
gSPTexture(gMasterGfxPos++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON);
|
||||
gDPSetTextureLUT(gMasterGfxPos++, G_TT_NONE);
|
||||
gDPSetTextureDetail(gMasterGfxPos++, G_TD_CLAMP);
|
||||
gDPSetTextureLOD(gMasterGfxPos++, G_TL_TILE);
|
||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, primR, primG, primB, primA);
|
||||
gDPSetEnvColor(gMasterGfxPos++, envR, envG, envB, envA);
|
||||
if (bgImage != NULL) {
|
||||
switch (background->bitDepth) {
|
||||
case G_IM_SIZ_4b:
|
||||
gDPLoadTextureTile_4b(gMasterGfxPos++, bgImage, bgFmt, bgWidth, bgHeight, 0, 0, bgWidth - 1, bgHeight - 1, 0, G_TX_WRAP, G_TX_WRAP, bgMasks, bgMaskt, G_TX_NOLOD, G_TX_NOLOD);
|
||||
break;
|
||||
case G_IM_SIZ_8b:
|
||||
gDPLoadTextureTile(gMasterGfxPos++, bgImage, bgFmt, G_IM_SIZ_8b, bgWidth, bgHeight, 0, 0, bgWidth - 1, bgHeight - 1, 0, G_TX_WRAP, G_TX_WRAP, bgMasks, bgMaskt, G_TX_NOLOD, G_TX_NOLOD);
|
||||
break;
|
||||
case G_IM_SIZ_16b:
|
||||
gDPLoadTextureTile(gMasterGfxPos++, bgImage, bgFmt, G_IM_SIZ_16b, bgWidth, bgHeight, 0, 0, bgWidth - 1, bgHeight - 1, 0, G_TX_WRAP, G_TX_WRAP, bgMasks, bgMaskt, G_TX_NOLOD, G_TX_NOLOD);
|
||||
break;
|
||||
case G_IM_SIZ_32b:
|
||||
gDPLoadTextureTile(gMasterGfxPos++, bgImage, bgFmt, G_IM_SIZ_32b, bgWidth, bgHeight, 0, 0, bgWidth - 1, bgHeight - 1, 0, G_TX_WRAP, G_TX_WRAP, bgMasks, bgMaskt, G_TX_NOLOD, G_TX_NOLOD);
|
||||
break;
|
||||
}
|
||||
|
||||
if (flags & DRAW_FLAGS_ANIMATED_BACKGROUND) {
|
||||
bgScrollOffsetY = (gGameStatusPtr->frameCounter * 4) & 0x1FF;
|
||||
bgScrollOffsetX = 511 - bgScrollOffsetY;
|
||||
gDPSetTileSize(gMasterGfxPos++, G_TX_RENDERTILE,
|
||||
width / 2 * 4 + bgScrollOffsetX,
|
||||
height / 2 * 4 + bgScrollOffsetY,
|
||||
(width / 2 + bgWidth - 1) * 4 + bgScrollOffsetX,
|
||||
(height / 2 + bgHeight - 1) * 4 + bgScrollOffsetY);
|
||||
} else {
|
||||
gDPSetTileSize(gMasterGfxPos++, G_TX_RENDERTILE, width / 2 * 4, height / 2 * 4,
|
||||
(width / 2 + bgWidth - 1) * 4, (height / 2 + bgHeight - 1)* 4);
|
||||
}
|
||||
}
|
||||
|
||||
if (cornersImage != NULL) {
|
||||
for (idx = 0; idx < 4; idx++) {
|
||||
cornerWidth = cornersSizes[idx].x;
|
||||
cornerHeight = cornersSizes[idx].y;
|
||||
masks = INTEGER_LOG2(cornerWidth);
|
||||
maskt = INTEGER_LOG2(cornerHeight);
|
||||
|
||||
|
||||
switch (cornersBitDepth) {
|
||||
case G_IM_SIZ_4b:
|
||||
gDPLoadMultiTile_4b(gMasterGfxPos++, cornersImage, tmem, 1, cornersFmt, cornerWidth, cornerHeight, 0, 0, cornerWidth - 1, cornerHeight - 1, 0, G_TX_CLAMP, G_TX_CLAMP, masks, maskt, G_TX_NOLOD, G_TX_NOLOD);
|
||||
cornersImage += cornerWidth * cornerHeight / 2;
|
||||
break;
|
||||
case G_IM_SIZ_8b:
|
||||
gDPLoadMultiTile(gMasterGfxPos++, cornersImage, tmem, 1, cornersFmt, G_IM_SIZ_8b, cornerWidth, cornerHeight, 0, 0, cornerWidth - 1, cornerHeight - 1, 0, G_TX_CLAMP, G_TX_CLAMP, masks, maskt, G_TX_NOLOD, G_TX_NOLOD);
|
||||
cornersImage += cornerWidth * cornerHeight;
|
||||
break;
|
||||
case G_IM_SIZ_16b:
|
||||
gDPLoadMultiTile(gMasterGfxPos++, cornersImage, tmem, 1, cornersFmt, G_IM_SIZ_16b, cornerWidth, cornerHeight, 0, 0, cornerWidth - 1, cornerHeight - 1, 0, G_TX_CLAMP, G_TX_CLAMP, masks, maskt, G_TX_NOLOD, G_TX_NOLOD);
|
||||
cornersImage += cornerWidth * cornerHeight * 2;
|
||||
break;
|
||||
case G_IM_SIZ_32b:
|
||||
gDPLoadMultiTile(gMasterGfxPos++, cornersImage, tmem, 1, cornersFmt, G_IM_SIZ_32b, cornerWidth, cornerHeight, 0, 0, cornerWidth - 1, cornerHeight - 1, 0, G_TX_CLAMP, G_TX_CLAMP, masks, maskt, G_TX_NOLOD, G_TX_NOLOD);
|
||||
cornersImage += cornerWidth * cornerHeight * 4;
|
||||
break;
|
||||
}
|
||||
|
||||
switch(idx) {
|
||||
case 1:
|
||||
gDPSetTileSize(gMasterGfxPos++, 1, (width - cornerWidth) * 4, 0, (width - 1) * 4, (cornerHeight - 1) * 4);
|
||||
break;
|
||||
case 2:
|
||||
gDPSetTileSize(gMasterGfxPos++, 1, 0, (height - cornerHeight) * 4, (cornerWidth - 1) * 4, (height - 1) * 4);
|
||||
break;
|
||||
case 3:
|
||||
gDPSetTileSize(gMasterGfxPos++, 1, (width - cornerWidth) * 4, (height - cornerHeight) * 4, (width - 1) * 4, (height - 1) * 4);
|
||||
break;
|
||||
}
|
||||
|
||||
if (quads != NULL) {
|
||||
switch(idx) {
|
||||
case 0:
|
||||
quads[0].v.ob[0] = -width / 2;
|
||||
quads[0].v.ob[1] = -height / 2;
|
||||
quads[0].v.ob[2] = 0;
|
||||
|
||||
quads[1].v.ob[0] = 0;
|
||||
quads[1].v.ob[1] = -height / 2;
|
||||
quads[1].v.ob[2] = 0;
|
||||
|
||||
quads[2].v.ob[0] = -width / 2;
|
||||
quads[2].v.ob[1] = 0;
|
||||
quads[2].v.ob[2] = 0;
|
||||
|
||||
quads[3].v.ob[0] = 0;
|
||||
quads[3].v.ob[1] = 0;
|
||||
quads[3].v.ob[2] = 0;
|
||||
|
||||
quads[0].v.tc[0] = 0;
|
||||
quads[0].v.tc[1] = 0;
|
||||
|
||||
quads[1].v.tc[0] = (width / 2) * 32;
|
||||
quads[1].v.tc[1] = 0;
|
||||
|
||||
quads[2].v.tc[0] = 0;
|
||||
quads[2].v.tc[1] = (height / 2) * 32;
|
||||
|
||||
quads[3].v.tc[0] = (width / 2) * 32;
|
||||
quads[3].v.tc[1] = (height / 2) * 32;
|
||||
break;
|
||||
case 1:
|
||||
quads[4].v.ob[0] = 0;
|
||||
quads[4].v.ob[1] = -height / 2;
|
||||
quads[4].v.ob[2] = 0;
|
||||
|
||||
quads[5].v.ob[0] = (-width / 2) + width;
|
||||
quads[5].v.ob[1] = -height / 2;
|
||||
quads[5].v.ob[2] = 0;
|
||||
|
||||
quads[6].v.ob[0] = 0;
|
||||
quads[6].v.ob[1] = 0;
|
||||
quads[6].v.ob[2] = 0;
|
||||
|
||||
quads[7].v.ob[0] = (-width / 2) + width;
|
||||
quads[7].v.ob[1] = 0;
|
||||
quads[7].v.ob[2] = 0;
|
||||
|
||||
quads[4].v.tc[0] = (width / 2) * 32;
|
||||
quads[4].v.tc[1] = 0;
|
||||
|
||||
quads[5].v.tc[0] = width * 32;
|
||||
quads[5].v.tc[1] = 0;
|
||||
|
||||
quads[6].v.tc[0] = (width / 2) * 32;
|
||||
quads[6].v.tc[1] = (height / 2) * 32;
|
||||
|
||||
quads[7].v.tc[0] = width * 32;
|
||||
quads[7].v.tc[1] = (height / 2) * 32;
|
||||
|
||||
quads += 4;
|
||||
break;
|
||||
case 2:
|
||||
quads[8].v.ob[0] = -width / 2;
|
||||
quads[8].v.ob[1] = 0;
|
||||
quads[8].v.ob[2] = 0;
|
||||
|
||||
quads[9].v.ob[0] = 0;
|
||||
quads[9].v.ob[1] = 0;
|
||||
quads[9].v.ob[2] = 0;
|
||||
|
||||
quads[10].v.ob[0] = -width / 2;
|
||||
quads[10].v.ob[1] = height / 2;
|
||||
quads[10].v.ob[2] = 0;
|
||||
|
||||
quads[11].v.ob[0] = 0;
|
||||
quads[11].v.ob[1] = height / 2;
|
||||
quads[11].v.ob[2] = 0;
|
||||
|
||||
quads[8].v.tc[0] = 0;
|
||||
quads[8].v.tc[1] = (height / 2) * 32;
|
||||
|
||||
quads[9].v.tc[0] = (width / 2) * 32;
|
||||
quads[9].v.tc[1] = (height / 2) * 32;
|
||||
|
||||
quads[10].v.tc[0] = 0;
|
||||
quads[10].v.tc[1] = height * 32;
|
||||
|
||||
quads[11].v.tc[0] = (width / 2) * 32;
|
||||
quads[11].v.tc[1] = height * 32;
|
||||
|
||||
quads += 8;
|
||||
break;
|
||||
case 3:
|
||||
quads[12].v.ob[0] = 0;
|
||||
quads[12].v.ob[1] = 0;
|
||||
quads[12].v.ob[2] = 0;
|
||||
|
||||
quads[13].v.ob[0] = (-width / 2) + width;
|
||||
quads[13].v.ob[1] = 0;
|
||||
quads[13].v.ob[2] = 0;
|
||||
|
||||
quads[14].v.ob[0] = 0;
|
||||
quads[14].v.ob[1] = height / 2;
|
||||
quads[14].v.ob[2] = 0;
|
||||
|
||||
quads[15].v.ob[0] = (-width / 2) + width;
|
||||
quads[15].v.ob[1] = height / 2;
|
||||
quads[15].v.ob[2] = 0;
|
||||
|
||||
quads[12].v.tc[0] = (width / 2) * 32;
|
||||
quads[12].v.tc[1] = (height / 2) * 32;
|
||||
|
||||
quads[13].v.tc[0] = width * 32;
|
||||
quads[13].v.tc[1] = (height / 2) * 32;
|
||||
|
||||
quads[14].v.tc[0] = (width / 2) * 32;
|
||||
quads[14].v.tc[1] = height * 32;
|
||||
|
||||
quads[15].v.tc[0] = width * 32;
|
||||
quads[15].v.tc[1] = height * 32;
|
||||
|
||||
quads += 12;
|
||||
break;
|
||||
}
|
||||
gSPVertex(gMasterGfxPos++, quads, 4, 0);
|
||||
gSP2Triangles(gMasterGfxPos++, 0, 3, 1, 0, 0, 2, 3, 0);
|
||||
} else {
|
||||
switch (idx) {
|
||||
case 0:
|
||||
gSPScisTextureRectangle(gMasterGfxPos++, posX * 4, posY * 4, (posX + width / 2) * 4, (posY + height / 2) * 4, G_TX_RENDERTILE, 0, 0, 0x400, 0x400);
|
||||
break;
|
||||
case 1:
|
||||
gSPScisTextureRectangle(gMasterGfxPos++, (posX + width / 2) * 4, posY * 4, (posX + width) * 4, (posY + height / 2) * 4, G_TX_RENDERTILE, (width / 2) * 32, 0, 0x400, 0x400);
|
||||
break;
|
||||
case 2:
|
||||
gSPScisTextureRectangle(gMasterGfxPos++, posX * 4, (posY + height / 2) * 4, (posX + width / 2) * 4, (posY + height) * 4, G_TX_RENDERTILE, 0, (height / 2) * 32, 0x400, 0x400);
|
||||
break;
|
||||
case 3:
|
||||
gSPScisTextureRectangle(gMasterGfxPos++, (posX + width / 2) * 4, (posY + height / 2) * 4, (posX + width) * 4, (posY + height) * 4, G_TX_RENDERTILE, (width / 2) * 32, (height / 2) * 32, 0x400, 0x400);
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
gDPPipeSync(gMasterGfxPos++);
|
||||
}
|
||||
} else if (bgImage != NULL) {
|
||||
if (quads != NULL) {
|
||||
quads[0].v.ob[0] = -width / 2;
|
||||
quads[0].v.ob[1] = -height / 2;
|
||||
quads[0].v.ob[2] = 0;
|
||||
|
||||
quads[1].v.ob[0] = (-width / 2) + width;
|
||||
quads[1].v.ob[1] = -height / 2;
|
||||
quads[1].v.ob[2] = 0;
|
||||
|
||||
quads[2].v.ob[0] = -width / 2;
|
||||
quads[2].v.ob[1] = height / 2;
|
||||
quads[2].v.ob[2] = 0;
|
||||
|
||||
quads[3].v.ob[0] = (-width / 2) + width;
|
||||
quads[3].v.ob[1] = height / 2;
|
||||
quads[3].v.ob[2] = 0;
|
||||
|
||||
|
||||
quads[0].v.tc[0] = 0;
|
||||
quads[0].v.tc[1] = 0;
|
||||
|
||||
quads[1].v.tc[1] = 0;
|
||||
quads[1].v.tc[0] = width * 32;
|
||||
|
||||
quads[2].v.tc[0] = 0;
|
||||
quads[2].v.tc[1] = height * 32;
|
||||
|
||||
quads[3].v.tc[0] = width * 32;
|
||||
quads[3].v.tc[1] = height * 32;
|
||||
|
||||
gSPVertex(gMasterGfxPos++, &quads[0], 4, 0);
|
||||
gSP2Triangles(gMasterGfxPos++, 0, 3, 1, 0, 0, 2, 3, 0);
|
||||
} else {
|
||||
gSPScisTextureRectangle(gMasterGfxPos++, posX * 4, posY * 4, (posX + width) * 4, (posY + height) * 4, G_TX_RENDERTILE, 0, 0, 0x0400, 0x0400);
|
||||
}
|
||||
gDPPipeSync(gMasterGfxPos++);
|
||||
}
|
||||
|
||||
gDPSetTexturePersp(gMasterGfxPos++, G_TP_NONE);
|
||||
gDPSetCycleType(gMasterGfxPos++, G_CYC_1CYCLE);
|
||||
if(fpDrawContents != NULL) {
|
||||
if(quads != NULL) {
|
||||
void* mdl_address = mdl_get_next_texture_address(width * height * 2);
|
||||
if(mdl_address != 0) {
|
||||
gDPSetColorImage(gMasterGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, width, OS_K0_TO_PHYSICAL(mdl_address));
|
||||
gDPSetScissor(gMasterGfxPos++, G_SC_NON_INTERLACE, 0, 0, width, height);
|
||||
gDPSetCycleType(gMasterGfxPos++, G_CYC_FILL);
|
||||
gDPSetFillColor(gMasterGfxPos++, PACK_FILL_COLOR(primR, primG, primB, 0));
|
||||
gDPSetRenderMode(gMasterGfxPos++, G_RM_NOOP, G_RM_NOOP2);
|
||||
gDPFillRectangle(gMasterGfxPos++, 0, 0, width - 1, height - 1);
|
||||
gDPPipeSync(gMasterGfxPos++);
|
||||
gDPSetScissorFrac(gMasterGfxPos++, G_SC_NON_INTERLACE, 4, 4, (width - 1) * 4.0f, (height - 1) * 4.0f);
|
||||
gDPSetCycleType(gMasterGfxPos++, G_CYC_1CYCLE);
|
||||
|
||||
fpDrawContents((s32)drawContentsArg0, 0, 0, width, height, opacity, darkening);
|
||||
|
||||
gDPPipeSync(gMasterGfxPos++);
|
||||
gDPSetColorImage(gMasterGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 320, OS_K0_TO_PHYSICAL(nuGfxCfb_ptr));
|
||||
gDPSetScissor(gMasterGfxPos++, G_SC_NON_INTERLACE, 0, 0, 320, 240);
|
||||
gSPViewport(gMasterGfxPos++, &gBoxViewport);
|
||||
gSPMatrix(gMasterGfxPos++, sp154, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
|
||||
gSPTexture(gMasterGfxPos++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON);
|
||||
gDPSetCycleType(gMasterGfxPos++, G_CYC_1CYCLE);
|
||||
gDPSetTextureLUT(gMasterGfxPos++, G_TT_NONE);
|
||||
gDPSetCombineMode(gMasterGfxPos++, G_CC_DECALRGBA, G_CC_DECALRGBA);
|
||||
gDPSetRenderMode(gMasterGfxPos++, G_RM_CLD_SURF, G_RM_NOOP2);
|
||||
gDPSetTexturePersp(gMasterGfxPos++, G_TP_PERSP);
|
||||
gDPSetTextureFilter(gMasterGfxPos++, G_TF_BILERP);
|
||||
guTranslateF(mtx3, 0.0f, 6.0f, 0.0f);
|
||||
guMtxF2L(mtx3, &gBoxMatrix);
|
||||
guTranslateF(mtx3, 0.0f, -height / 2, 0.0f);
|
||||
guMtxF2L(mtx3, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
||||
for (idx = 0; idx < height / 6; idx++) {
|
||||
s32 extraHeight, lineHeight;
|
||||
if (idx == height / 6 - 1) {
|
||||
extraHeight = 0;
|
||||
if (height % 6 != 0) {
|
||||
extraHeight = 1;
|
||||
}
|
||||
} else {
|
||||
extraHeight = 1;
|
||||
}
|
||||
lineHeight = extraHeight + 5;
|
||||
gDPLoadTextureTile(gMasterGfxPos++, OS_K0_TO_PHYSICAL(mdl_address), G_IM_FMT_RGBA, G_IM_SIZ_16b, width, 0,
|
||||
0, idx * 6, width - 1, idx * 6 + lineHeight, 0,
|
||||
G_TX_CLAMP, G_TX_CLAMP, 9, 3, G_TX_NOLOD, G_TX_NOLOD);
|
||||
gDPSetTileSize(gMasterGfxPos++, G_TX_RENDERTILE, (160 - width / 2) * 4, 0, ((160 - width / 2) + width - 1) * 4, lineHeight * 4);
|
||||
gSPVertex(gMasterGfxPos++, &vtx_drawbox1, 4, 0);
|
||||
gSP2Triangles(gMasterGfxPos++, 0, 3, 1, 0, 0, 2, 3, 0);
|
||||
gDPPipeSync(gMasterGfxPos++);
|
||||
gSPMatrix(gMasterGfxPos++, &gBoxMatrix, G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
fpDrawContents((s32)drawContentsArg0, posX, posY, width, height, opacity, darkening);
|
||||
}
|
||||
}
|
||||
if (quads != NULL) {
|
||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
||||
gDPSetTexturePersp(gMasterGfxPos++, G_TP_NONE);
|
||||
gDPPipeSync(gMasterGfxPos++);
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
@ -19,7 +19,8 @@ WindowStyleCustom D_E00D87E0 = {
|
||||
.background = {0},
|
||||
.corners = {
|
||||
.imgData = D_09000000_3D7040,
|
||||
.packedTileFormat = 0x31,
|
||||
.fmt = G_IM_FMT_IA,
|
||||
.bitDepth = G_IM_SIZ_8b,
|
||||
.size1 = {16, 8},
|
||||
.size2 = {16, 8},
|
||||
.size3 = {16, 8},
|
||||
|
@ -1531,14 +1531,14 @@ void show_first_strike_message(void) {
|
||||
case 4:
|
||||
width = get_msg_width(MSG_Menus_PlayerFirstStrike, 0) + 24;
|
||||
posX = (xOffset + screenWidthHalf) - (width / 2);
|
||||
draw_box(0, 0x14, posX, 69, 0, width, 28, 255, 0, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, NULL, 0, NULL,
|
||||
draw_box(0, WINDOW_STYLE_20, posX, 69, 0, width, 28, 255, 0, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, NULL, 0, NULL,
|
||||
SCREEN_WIDTH, SCREEN_HEIGHT, NULL);
|
||||
draw_msg(MSG_Menus_PlayerFirstStrike, posX + 11, 75, 0xFF, MSG_PAL_STANDARD, 0);
|
||||
break;
|
||||
case 6:
|
||||
width = get_msg_width(MSG_Menus_PartnerFirstStrike, 0) + 24;
|
||||
posX = (xOffset + screenWidthHalf) - (width / 2);
|
||||
draw_box(0, 0x14, posX, 69, 0, width, 28, 255, 0, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, NULL, 0, NULL,
|
||||
draw_box(0, WINDOW_STYLE_20, posX, 69, 0, width, 28, 255, 0, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, NULL, 0, NULL,
|
||||
SCREEN_WIDTH, SCREEN_HEIGHT, NULL);
|
||||
draw_msg(MSG_Menus_PartnerFirstStrike, posX + 11, 75, 0xFF, MSG_PAL_STANDARD, 0);
|
||||
break;
|
||||
@ -1548,7 +1548,7 @@ void show_first_strike_message(void) {
|
||||
if (!is_ability_active(ABILITY_CHILL_OUT)) {
|
||||
width = get_msg_width(MSG_Menus_EnemyFirstStrike, 0) + 24;
|
||||
posX = (xOffset + screenWidthHalf) - (width / 2);
|
||||
draw_box(0, 4, posX, 69, 0, width, 28, 255, 0, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, NULL, 0, NULL,
|
||||
draw_box(0, WINDOW_STYLE_4, posX, 69, 0, width, 28, 255, 0, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, NULL, 0, NULL,
|
||||
SCREEN_WIDTH, SCREEN_HEIGHT, NULL);
|
||||
draw_msg(MSG_Menus_EnemyFirstStrike, posX + 11, 75, 0xFF, MSG_PAL_STANDARD, 0);
|
||||
}
|
||||
|
@ -7,7 +7,8 @@ WindowStyleCustom filemenu_windowStyles[] = {
|
||||
{
|
||||
.background = {
|
||||
.imgData = NULL,
|
||||
.packedTileFormat = 0,
|
||||
.fmt = G_IM_FMT_RGBA,
|
||||
.bitDepth = G_IM_SIZ_4b,
|
||||
.width = 0,
|
||||
.height = 0,
|
||||
.unk_07 = { 0, 0, 0, 0},
|
||||
@ -15,7 +16,8 @@ WindowStyleCustom filemenu_windowStyles[] = {
|
||||
},
|
||||
.corners = {
|
||||
.imgData = NULL,
|
||||
.packedTileFormat = 0,
|
||||
.fmt = G_IM_FMT_RGBA,
|
||||
.bitDepth = G_IM_SIZ_4b,
|
||||
.size1 = { .x = 0, .y = 0},
|
||||
.size2 = { .x = 0, .y = 0},
|
||||
.size3 = { .x = 0, .y = 0},
|
||||
@ -31,7 +33,8 @@ WindowStyleCustom filemenu_windowStyles[] = {
|
||||
{
|
||||
.background = {
|
||||
.imgData = NULL,
|
||||
.packedTileFormat = 0x40,
|
||||
.fmt = G_IM_FMT_I,
|
||||
.bitDepth = G_IM_SIZ_4b,
|
||||
.width = 16,
|
||||
.height = 16,
|
||||
.unk_07 = { 0, 0, 0, 0},
|
||||
@ -39,7 +42,8 @@ WindowStyleCustom filemenu_windowStyles[] = {
|
||||
},
|
||||
.corners = {
|
||||
.imgData = NULL,
|
||||
.packedTileFormat = 0x31,
|
||||
.fmt = G_IM_FMT_IA,
|
||||
.bitDepth = G_IM_SIZ_8b,
|
||||
.size1 = { .x = 8, .y = 8},
|
||||
.size2 = { .x = 8, .y = 8},
|
||||
.size3 = { .x = 8, .y = 8},
|
||||
@ -55,7 +59,8 @@ WindowStyleCustom filemenu_windowStyles[] = {
|
||||
{
|
||||
.background = {
|
||||
.imgData = NULL,
|
||||
.packedTileFormat = 0,
|
||||
.fmt = G_IM_FMT_RGBA,
|
||||
.bitDepth = G_IM_SIZ_4b,
|
||||
.width = 0,
|
||||
.height = 0,
|
||||
.unk_07 = { 0, 0, 0, 0},
|
||||
@ -63,7 +68,8 @@ WindowStyleCustom filemenu_windowStyles[] = {
|
||||
},
|
||||
.corners = {
|
||||
.imgData = NULL,
|
||||
.packedTileFormat = 0,
|
||||
.fmt = G_IM_FMT_RGBA,
|
||||
.bitDepth = G_IM_SIZ_4b,
|
||||
.size1 = { .x = 0, .y = 0},
|
||||
.size2 = { .x = 0, .y = 0},
|
||||
.size3 = { .x = 0, .y = 0},
|
||||
@ -79,7 +85,8 @@ WindowStyleCustom filemenu_windowStyles[] = {
|
||||
{
|
||||
.background = {
|
||||
.imgData = NULL,
|
||||
.packedTileFormat = 0,
|
||||
.fmt = G_IM_FMT_RGBA,
|
||||
.bitDepth = G_IM_SIZ_4b,
|
||||
.width = 0,
|
||||
.height = 0,
|
||||
.unk_07 = { 0, 0, 0, 0},
|
||||
@ -87,7 +94,8 @@ WindowStyleCustom filemenu_windowStyles[] = {
|
||||
},
|
||||
.corners = {
|
||||
.imgData = D_8024A400,
|
||||
.packedTileFormat = 0x03,
|
||||
.fmt = G_IM_FMT_RGBA,
|
||||
.bitDepth = G_IM_SIZ_32b,
|
||||
.size1 = { .x = 16, .y = 16},
|
||||
.size2 = { .x = 16, .y = 16},
|
||||
.size3 = { .x = 16, .y = 16},
|
||||
@ -103,7 +111,8 @@ WindowStyleCustom filemenu_windowStyles[] = {
|
||||
{
|
||||
.background = {
|
||||
.imgData = NULL,
|
||||
.packedTileFormat = 0,
|
||||
.fmt = G_IM_FMT_RGBA,
|
||||
.bitDepth = G_IM_SIZ_4b,
|
||||
.width = 0,
|
||||
.height = 0,
|
||||
.unk_07 = { 0, 0, 0, 0},
|
||||
@ -111,7 +120,8 @@ WindowStyleCustom filemenu_windowStyles[] = {
|
||||
},
|
||||
.corners = {
|
||||
.imgData = D_8024B400,
|
||||
.packedTileFormat = 0x31,
|
||||
.fmt = G_IM_FMT_IA,
|
||||
.bitDepth = G_IM_SIZ_8b,
|
||||
.size1 = { .x = 16, .y = 8},
|
||||
.size2 = { .x = 16, .y = 8},
|
||||
.size3 = { .x = 16, .y = 8},
|
||||
@ -127,7 +137,8 @@ WindowStyleCustom filemenu_windowStyles[] = {
|
||||
{
|
||||
.background = {
|
||||
.imgData = NULL,
|
||||
.packedTileFormat = 0,
|
||||
.fmt = G_IM_FMT_RGBA,
|
||||
.bitDepth = G_IM_SIZ_4b,
|
||||
.width = 0,
|
||||
.height = 0,
|
||||
.unk_07 = { 0, 0, 0, 0},
|
||||
@ -135,7 +146,8 @@ WindowStyleCustom filemenu_windowStyles[] = {
|
||||
},
|
||||
.corners = {
|
||||
.imgData = D_8024B400,
|
||||
.packedTileFormat = 0x31,
|
||||
.fmt = G_IM_FMT_IA,
|
||||
.bitDepth = G_IM_SIZ_8b,
|
||||
.size1 = { .x = 16, .y = 8},
|
||||
.size2 = { .x = 16, .y = 8},
|
||||
.size3 = { .x = 16, .y = 8},
|
||||
@ -151,7 +163,8 @@ WindowStyleCustom filemenu_windowStyles[] = {
|
||||
{
|
||||
.background = {
|
||||
.imgData = NULL,
|
||||
.packedTileFormat = 0,
|
||||
.fmt = G_IM_FMT_RGBA,
|
||||
.bitDepth = G_IM_SIZ_4b,
|
||||
.width = 0,
|
||||
.height = 0,
|
||||
.unk_07 = { 0, 0, 0, 0},
|
||||
@ -159,7 +172,8 @@ WindowStyleCustom filemenu_windowStyles[] = {
|
||||
},
|
||||
.corners = {
|
||||
.imgData = D_8024B400,
|
||||
.packedTileFormat = 0x31,
|
||||
.fmt = G_IM_FMT_IA,
|
||||
.bitDepth = G_IM_SIZ_8b,
|
||||
.size1 = { .x = 16, .y = 8},
|
||||
.size2 = { .x = 16, .y = 8},
|
||||
.size3 = { .x = 16, .y = 8},
|
||||
@ -175,7 +189,8 @@ WindowStyleCustom filemenu_windowStyles[] = {
|
||||
{
|
||||
.background = {
|
||||
.imgData = NULL,
|
||||
.packedTileFormat = 0,
|
||||
.fmt = G_IM_FMT_RGBA,
|
||||
.bitDepth = G_IM_SIZ_4b,
|
||||
.width = 0,
|
||||
.height = 0,
|
||||
.unk_07 = { 0, 0, 0, 0},
|
||||
@ -183,7 +198,8 @@ WindowStyleCustom filemenu_windowStyles[] = {
|
||||
},
|
||||
.corners = {
|
||||
.imgData = D_8024B400,
|
||||
.packedTileFormat = 0x31,
|
||||
.fmt = G_IM_FMT_IA,
|
||||
.bitDepth = G_IM_SIZ_8b,
|
||||
.size1 = { .x = 16, .y = 8},
|
||||
.size2 = { .x = 16, .y = 8},
|
||||
.size3 = { .x = 16, .y = 8},
|
||||
@ -199,7 +215,8 @@ WindowStyleCustom filemenu_windowStyles[] = {
|
||||
{
|
||||
.background = {
|
||||
.imgData = NULL,
|
||||
.packedTileFormat = 0,
|
||||
.fmt = G_IM_FMT_RGBA,
|
||||
.bitDepth = G_IM_SIZ_4b,
|
||||
.width = 0,
|
||||
.height = 0,
|
||||
.unk_07 = { 0, 0, 0, 0},
|
||||
@ -207,7 +224,8 @@ WindowStyleCustom filemenu_windowStyles[] = {
|
||||
},
|
||||
.corners = {
|
||||
.imgData = D_8024B400,
|
||||
.packedTileFormat = 0x31,
|
||||
.fmt = G_IM_FMT_IA,
|
||||
.bitDepth = G_IM_SIZ_8b,
|
||||
.size1 = { .x = 16, .y = 8},
|
||||
.size2 = { .x = 16, .y = 8},
|
||||
.size3 = { .x = 16, .y = 8},
|
||||
@ -223,7 +241,8 @@ WindowStyleCustom filemenu_windowStyles[] = {
|
||||
{
|
||||
.background = {
|
||||
.imgData = NULL,
|
||||
.packedTileFormat = 0,
|
||||
.fmt = G_IM_FMT_RGBA,
|
||||
.bitDepth = G_IM_SIZ_4b,
|
||||
.width = 0,
|
||||
.height = 0,
|
||||
.unk_07 = { 0, 0, 0, 0},
|
||||
@ -231,7 +250,8 @@ WindowStyleCustom filemenu_windowStyles[] = {
|
||||
},
|
||||
.corners = {
|
||||
.imgData = D_8024B400,
|
||||
.packedTileFormat = 0x31,
|
||||
.fmt = G_IM_FMT_IA,
|
||||
.bitDepth = G_IM_SIZ_8b,
|
||||
.size1 = { .x = 16, .y = 8},
|
||||
.size2 = { .x = 16, .y = 8},
|
||||
.size3 = { .x = 16, .y = 8},
|
||||
@ -247,7 +267,8 @@ WindowStyleCustom filemenu_windowStyles[] = {
|
||||
{
|
||||
.background = {
|
||||
.imgData = NULL,
|
||||
.packedTileFormat = 0,
|
||||
.fmt = G_IM_FMT_RGBA,
|
||||
.bitDepth = G_IM_SIZ_4b,
|
||||
.width = 0,
|
||||
.height = 0,
|
||||
.unk_07 = { 0, 0, 0, 0},
|
||||
@ -255,7 +276,8 @@ WindowStyleCustom filemenu_windowStyles[] = {
|
||||
},
|
||||
.corners = {
|
||||
.imgData = D_8024B400,
|
||||
.packedTileFormat = 0x31,
|
||||
.fmt = G_IM_FMT_IA,
|
||||
.bitDepth = G_IM_SIZ_8b,
|
||||
.size1 = { .x = 16, .y = 8},
|
||||
.size2 = { .x = 16, .y = 8},
|
||||
.size3 = { .x = 16, .y = 8},
|
||||
@ -271,7 +293,8 @@ WindowStyleCustom filemenu_windowStyles[] = {
|
||||
{
|
||||
.background = {
|
||||
.imgData = NULL,
|
||||
.packedTileFormat = 0,
|
||||
.fmt = G_IM_FMT_RGBA,
|
||||
.bitDepth = G_IM_SIZ_4b,
|
||||
.width = 0,
|
||||
.height = 0,
|
||||
.unk_07 = { 0, 0, 0, 0},
|
||||
@ -279,7 +302,8 @@ WindowStyleCustom filemenu_windowStyles[] = {
|
||||
},
|
||||
.corners = {
|
||||
.imgData = D_8024B400,
|
||||
.packedTileFormat = 0x31,
|
||||
.fmt = G_IM_FMT_IA,
|
||||
.bitDepth = G_IM_SIZ_8b,
|
||||
.size1 = { .x = 16, .y = 8},
|
||||
.size2 = { .x = 16, .y = 8},
|
||||
.size3 = { .x = 16, .y = 8},
|
||||
@ -295,7 +319,8 @@ WindowStyleCustom filemenu_windowStyles[] = {
|
||||
{
|
||||
.background = {
|
||||
.imgData = NULL,
|
||||
.packedTileFormat = 0,
|
||||
.fmt = G_IM_FMT_RGBA,
|
||||
.bitDepth = G_IM_SIZ_4b,
|
||||
.width = 0,
|
||||
.height = 0,
|
||||
.unk_07 = { 0, 0, 0, 0},
|
||||
@ -303,7 +328,8 @@ WindowStyleCustom filemenu_windowStyles[] = {
|
||||
},
|
||||
.corners = {
|
||||
.imgData = D_8024B400,
|
||||
.packedTileFormat = 0x31,
|
||||
.fmt = G_IM_FMT_IA,
|
||||
.bitDepth = G_IM_SIZ_8b,
|
||||
.size1 = { .x = 16, .y = 8},
|
||||
.size2 = { .x = 16, .y = 8},
|
||||
.size3 = { .x = 16, .y = 8},
|
||||
@ -319,7 +345,8 @@ WindowStyleCustom filemenu_windowStyles[] = {
|
||||
{
|
||||
.background = {
|
||||
.imgData = NULL,
|
||||
.packedTileFormat = 0,
|
||||
.fmt = G_IM_FMT_RGBA,
|
||||
.bitDepth = G_IM_SIZ_4b,
|
||||
.width = 0,
|
||||
.height = 0,
|
||||
.unk_07 = { 0, 0, 0, 0},
|
||||
@ -327,7 +354,8 @@ WindowStyleCustom filemenu_windowStyles[] = {
|
||||
},
|
||||
.corners = {
|
||||
.imgData = D_8024B400,
|
||||
.packedTileFormat = 0x31,
|
||||
.fmt = G_IM_FMT_IA,
|
||||
.bitDepth = G_IM_SIZ_8b,
|
||||
.size1 = { .x = 16, .y = 8},
|
||||
.size2 = { .x = 16, .y = 8},
|
||||
.size3 = { .x = 16, .y = 8},
|
||||
@ -343,7 +371,8 @@ WindowStyleCustom filemenu_windowStyles[] = {
|
||||
{
|
||||
.background = {
|
||||
.imgData = NULL,
|
||||
.packedTileFormat = 0,
|
||||
.fmt = G_IM_FMT_RGBA,
|
||||
.bitDepth = G_IM_SIZ_4b,
|
||||
.width = 0,
|
||||
.height = 0,
|
||||
.unk_07 = { 0, 0, 0, 0},
|
||||
@ -351,7 +380,8 @@ WindowStyleCustom filemenu_windowStyles[] = {
|
||||
},
|
||||
.corners = {
|
||||
.imgData = D_8024B400,
|
||||
.packedTileFormat = 0x31,
|
||||
.fmt = G_IM_FMT_IA,
|
||||
.bitDepth = G_IM_SIZ_8b,
|
||||
.size1 = { .x = 16, .y = 8},
|
||||
.size2 = { .x = 16, .y = 8},
|
||||
.size3 = { .x = 16, .y = 8},
|
||||
@ -367,7 +397,8 @@ WindowStyleCustom filemenu_windowStyles[] = {
|
||||
{
|
||||
.background = {
|
||||
.imgData = NULL,
|
||||
.packedTileFormat = 0,
|
||||
.fmt = G_IM_FMT_RGBA,
|
||||
.bitDepth = G_IM_SIZ_4b,
|
||||
.width = 0,
|
||||
.height = 0,
|
||||
.unk_07 = { 0, 0, 0, 0},
|
||||
@ -375,7 +406,8 @@ WindowStyleCustom filemenu_windowStyles[] = {
|
||||
},
|
||||
.corners = {
|
||||
.imgData = D_8024B400,
|
||||
.packedTileFormat = 0x31,
|
||||
.fmt = G_IM_FMT_IA,
|
||||
.bitDepth = G_IM_SIZ_8b,
|
||||
.size1 = { .x = 16, .y = 8},
|
||||
.size2 = { .x = 16, .y = 8},
|
||||
.size3 = { .x = 16, .y = 8},
|
||||
@ -391,7 +423,8 @@ WindowStyleCustom filemenu_windowStyles[] = {
|
||||
{
|
||||
.background = {
|
||||
.imgData = NULL,
|
||||
.packedTileFormat = 0,
|
||||
.fmt = G_IM_FMT_RGBA,
|
||||
.bitDepth = G_IM_SIZ_4b,
|
||||
.width = 0,
|
||||
.height = 0,
|
||||
.unk_07 = { 0, 0, 0, 0},
|
||||
@ -399,7 +432,8 @@ WindowStyleCustom filemenu_windowStyles[] = {
|
||||
},
|
||||
.corners = {
|
||||
.imgData = D_8024B400,
|
||||
.packedTileFormat = 0x31,
|
||||
.fmt = G_IM_FMT_IA,
|
||||
.bitDepth = G_IM_SIZ_8b,
|
||||
.size1 = { .x = 16, .y = 8},
|
||||
.size2 = { .x = 16, .y = 8},
|
||||
.size3 = { .x = 16, .y = 8},
|
||||
@ -415,7 +449,8 @@ WindowStyleCustom filemenu_windowStyles[] = {
|
||||
{
|
||||
.background = {
|
||||
.imgData = NULL,
|
||||
.packedTileFormat = 0,
|
||||
.fmt = G_IM_FMT_RGBA,
|
||||
.bitDepth = G_IM_SIZ_4b,
|
||||
.width = 0,
|
||||
.height = 0,
|
||||
.unk_07 = { 0, 0, 0, 0},
|
||||
@ -423,7 +458,8 @@ WindowStyleCustom filemenu_windowStyles[] = {
|
||||
},
|
||||
.corners = {
|
||||
.imgData = D_8024B400,
|
||||
.packedTileFormat = 0x31,
|
||||
.fmt = G_IM_FMT_IA,
|
||||
.bitDepth = G_IM_SIZ_8b,
|
||||
.size1 = { .x = 16, .y = 8},
|
||||
.size2 = { .x = 16, .y = 8},
|
||||
.size3 = { .x = 16, .y = 8},
|
||||
@ -439,7 +475,8 @@ WindowStyleCustom filemenu_windowStyles[] = {
|
||||
{
|
||||
.background = {
|
||||
.imgData = NULL,
|
||||
.packedTileFormat = 0,
|
||||
.fmt = G_IM_FMT_RGBA,
|
||||
.bitDepth = G_IM_SIZ_4b,
|
||||
.width = 0,
|
||||
.height = 0,
|
||||
.unk_07 = { 0, 0, 0, 0},
|
||||
@ -447,7 +484,8 @@ WindowStyleCustom filemenu_windowStyles[] = {
|
||||
},
|
||||
.corners = {
|
||||
.imgData = D_8024B400,
|
||||
.packedTileFormat = 0x31,
|
||||
.fmt = G_IM_FMT_IA,
|
||||
.bitDepth = G_IM_SIZ_8b,
|
||||
.size1 = { .x = 16, .y = 8},
|
||||
.size2 = { .x = 16, .y = 8},
|
||||
.size3 = { .x = 16, .y = 8},
|
||||
@ -463,7 +501,8 @@ WindowStyleCustom filemenu_windowStyles[] = {
|
||||
{
|
||||
.background = {
|
||||
.imgData = NULL,
|
||||
.packedTileFormat = 0,
|
||||
.fmt = G_IM_FMT_RGBA,
|
||||
.bitDepth = G_IM_SIZ_4b,
|
||||
.width = 0,
|
||||
.height = 0,
|
||||
.unk_07 = { 0, 0, 0, 0},
|
||||
@ -471,7 +510,8 @@ WindowStyleCustom filemenu_windowStyles[] = {
|
||||
},
|
||||
.corners = {
|
||||
.imgData = D_8024A400,
|
||||
.packedTileFormat = 0x03,
|
||||
.fmt = G_IM_FMT_RGBA,
|
||||
.bitDepth = G_IM_SIZ_32b,
|
||||
.size1 = { .x = 16, .y = 16},
|
||||
.size2 = { .x = 16, .y = 16},
|
||||
.size3 = { .x = 16, .y = 16},
|
||||
@ -487,7 +527,8 @@ WindowStyleCustom filemenu_windowStyles[] = {
|
||||
{
|
||||
.background = {
|
||||
.imgData = NULL,
|
||||
.packedTileFormat = 0,
|
||||
.fmt = G_IM_FMT_RGBA,
|
||||
.bitDepth = G_IM_SIZ_4b,
|
||||
.width = 0,
|
||||
.height = 0,
|
||||
.unk_07 = { 0, 0, 0, 0},
|
||||
@ -495,7 +536,8 @@ WindowStyleCustom filemenu_windowStyles[] = {
|
||||
},
|
||||
.corners = {
|
||||
.imgData = D_8024A400,
|
||||
.packedTileFormat = 0x03,
|
||||
.fmt = G_IM_FMT_RGBA,
|
||||
.bitDepth = G_IM_SIZ_32b,
|
||||
.size1 = { .x = 16, .y = 16},
|
||||
.size2 = { .x = 16, .y = 16},
|
||||
.size3 = { .x = 16, .y = 16},
|
||||
@ -511,7 +553,8 @@ WindowStyleCustom filemenu_windowStyles[] = {
|
||||
{
|
||||
.background = {
|
||||
.imgData = NULL,
|
||||
.packedTileFormat = 0,
|
||||
.fmt = G_IM_FMT_RGBA,
|
||||
.bitDepth = G_IM_SIZ_4b,
|
||||
.width = 0,
|
||||
.height = 0,
|
||||
.unk_07 = { 0, 0, 0, 0},
|
||||
@ -519,7 +562,8 @@ WindowStyleCustom filemenu_windowStyles[] = {
|
||||
},
|
||||
.corners = {
|
||||
.imgData = D_8024A400,
|
||||
.packedTileFormat = 0x03,
|
||||
.fmt = G_IM_FMT_RGBA,
|
||||
.bitDepth = G_IM_SIZ_32b,
|
||||
.size1 = { .x = 16, .y = 16},
|
||||
.size2 = { .x = 16, .y = 16},
|
||||
.size3 = { .x = 16, .y = 16},
|
||||
@ -535,7 +579,8 @@ WindowStyleCustom filemenu_windowStyles[] = {
|
||||
{
|
||||
.background = {
|
||||
.imgData = NULL,
|
||||
.packedTileFormat = 0,
|
||||
.fmt = G_IM_FMT_RGBA,
|
||||
.bitDepth = G_IM_SIZ_4b,
|
||||
.width = 0,
|
||||
.height = 0,
|
||||
.unk_07 = { 0, 0, 0, 0},
|
||||
@ -543,7 +588,8 @@ WindowStyleCustom filemenu_windowStyles[] = {
|
||||
},
|
||||
.corners = {
|
||||
.imgData = D_8024B400,
|
||||
.packedTileFormat = 0x31,
|
||||
.fmt = G_IM_FMT_IA,
|
||||
.bitDepth = G_IM_SIZ_8b,
|
||||
.size1 = { .x = 16, .y = 8},
|
||||
.size2 = { .x = 16, .y = 8},
|
||||
.size3 = { .x = 16, .y = 8},
|
||||
|
10
src/msg.c
10
src/msg.c
@ -2226,8 +2226,8 @@ void draw_number(s32 value, s32 x, s32 y, s32 charset, s32 palette, s32 opacity,
|
||||
gDPPipeSync(gMasterGfxPos++);
|
||||
}
|
||||
|
||||
void drawbox_message_delegate(void* data) {
|
||||
MessagePrintState* printer = data;
|
||||
void drawbox_message_delegate(s32 data, s32 baseX, s32 baseY, s32 width, s32 height, s32 opacity, s32 darkening) {
|
||||
MessagePrintState* printer = (MessagePrintState*)data;
|
||||
|
||||
appendGfx_message(printer, 0, 0, 0, 0, 4, 0);
|
||||
}
|
||||
@ -2260,7 +2260,7 @@ void draw_message_window(MessagePrintState* printer) {
|
||||
case MSG_WINDOW_STATE_E:
|
||||
printer->windowBasePos.x = 160 - (printer->windowSize.x / 2);
|
||||
printer->windowBasePos.y = 56;
|
||||
draw_box(DRAW_FLAGS_ROTSCALE, 0, printer->windowBasePos.x, 56, 0, printer->windowSize.x, printer->windowSize.y, 255, 0,
|
||||
draw_box(DRAW_FLAGS_ROTSCALE, WINDOW_STYLE_0, printer->windowBasePos.x, 56, 0, printer->windowSize.x, printer->windowSize.y, 255, 0,
|
||||
scale, scale, 0.0f, 0.0f, rotZ, drawbox_message_delegate, printer, NULL, SCREEN_WIDTH,
|
||||
SCREEN_HEIGHT, NULL);
|
||||
break;
|
||||
@ -2830,7 +2830,7 @@ void appendGfx_message(MessagePrintState* printer, s16 posX, s16 posY, u16 addit
|
||||
} else {
|
||||
printer->windowBasePos.x = 160 - printer->windowSize.x / 2;
|
||||
printer->windowBasePos.y = 56;
|
||||
draw_box(0, 0, printer->windowBasePos.x, 56, 0, printer->windowSize.x,
|
||||
draw_box(0, WINDOW_STYLE_0, printer->windowBasePos.x, 56, 0, printer->windowSize.x,
|
||||
printer->windowSize.y, 255, 0, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, NULL, 0, NULL,
|
||||
SCREEN_WIDTH, SCREEN_HEIGHT, NULL);
|
||||
}
|
||||
@ -3577,7 +3577,7 @@ void appendGfx_message(MessagePrintState* printer, s16 posX, s16 posY, u16 addit
|
||||
|
||||
if (varImgFinalAlpha > 0) {
|
||||
if (varImgHasBorder) {
|
||||
draw_box(0, 15, printer->varImageScreenPos.x - 7, printer->varImageScreenPos.y - 7, 0,
|
||||
draw_box(0, WINDOW_STYLE_15, printer->varImageScreenPos.x - 7, printer->varImageScreenPos.y - 7, 0,
|
||||
msgVarImage->width + 15, msgVarImage->height + 14, varImgFinalAlpha, 0, 0.0f, 0.0f, 0.0f, 0.0f,
|
||||
0.0f, NULL, 0, NULL, SCREEN_WIDTH, SCREEN_HEIGHT, NULL);
|
||||
}
|
||||
|
@ -309,7 +309,7 @@ void pause_badges_draw_contents(MenuPanel* menu, s32 baseX, s32 baseY, s32 width
|
||||
currentBadgeColumn = gPauseBadgesSelectedIndex / currentPage->numCols;
|
||||
currentBadgeRow = gPauseBadgesSelectedIndex % currentPage->numCols;
|
||||
|
||||
draw_box(DRAW_FLAGS_CLIP, &gPauseWS_15, baseX + 84, baseY, 0, width - 84, height, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0);
|
||||
draw_box(DRAW_FLAGS_NO_CLIP, &gPauseWS_15, baseX + 84, baseY, 0, width - 84, height, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0);
|
||||
hud_element_set_render_pos(gPauseBadgesIconIDs[20], baseX + 241, baseY + 11);
|
||||
palette = MSG_PAL_STANDARD;
|
||||
hud_element_draw_without_clipping(gPauseBadgesIconIDs[20]);
|
||||
@ -406,7 +406,7 @@ void pause_badges_draw_contents(MenuPanel* menu, s32 baseX, s32 baseY, s32 width
|
||||
}
|
||||
|
||||
if (isEquipped) {
|
||||
draw_box(DRAW_FLAGS_CLIP, &gPauseWS_14, badgeListX + pause_badges_scroll_offset_x(posX) - 20,
|
||||
draw_box(DRAW_FLAGS_NO_CLIP, &gPauseWS_14, badgeListX + pause_badges_scroll_offset_x(posX) - 20,
|
||||
baseY + pause_badges_scroll_offset_y(posY) + 17, 0, 200, 13, 255, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0);
|
||||
} else if (cannotBeEquipped) {
|
||||
@ -610,7 +610,7 @@ void pause_badges_draw_contents(MenuPanel* menu, s32 baseX, s32 baseY, s32 width
|
||||
gDPPipeSync(gMasterGfxPos++);
|
||||
}
|
||||
|
||||
draw_box(DRAW_FLAGS_CLIP, &gPauseWS_13, gPauseBadgesCurrentTab == 0 ? baseX + 9 : baseX, baseY + 7, 0,
|
||||
draw_box(DRAW_FLAGS_NO_CLIP, &gPauseWS_13, gPauseBadgesCurrentTab == 0 ? baseX + 9 : baseX, baseY + 7, 0,
|
||||
91, 34, 255, gPauseBadgesCurrentTab == 1 ? 128 : 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0);
|
||||
|
||||
@ -626,7 +626,7 @@ void pause_badges_draw_contents(MenuPanel* menu, s32 baseX, s32 baseY, s32 width
|
||||
}
|
||||
draw_msg(msg, msgX, msgY, msgOpacity, MSG_PAL_WHITE, DRAW_MSG_STYLE_MENU);
|
||||
|
||||
draw_box(DRAW_FLAGS_CLIP, &gPauseWS_13, gPauseBadgesCurrentTab == 1 ? baseX + 9 : baseX, baseY + 37, 0, 91, 34, 255,
|
||||
draw_box(DRAW_FLAGS_NO_CLIP, &gPauseWS_13, gPauseBadgesCurrentTab == 1 ? baseX + 9 : baseX, baseY + 37, 0, 91, 34, 255,
|
||||
gPauseBadgesCurrentTab == 0 ? 128 : 0, 0, 0, 0, 0, 0, 0, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0);
|
||||
|
||||
msg = pause_get_menu_msg(0x48);
|
||||
@ -678,10 +678,10 @@ void pause_badges_draw_contents(MenuPanel* menu, s32 baseX, s32 baseY, s32 width
|
||||
if (gPauseBadgesShowNotEnoughBP != 0) {
|
||||
pause_set_cursor_opacity(0);
|
||||
if (gPauseBadgesShowNotEnoughBP == 1) {
|
||||
draw_box(DRAW_FLAGS_CLIP, &gPauseWS_13, baseX + 67, baseY + 60, 0, 137, 26, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0);
|
||||
draw_box(DRAW_FLAGS_NO_CLIP, &gPauseWS_13, baseX + 67, baseY + 60, 0, 137, 26, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0);
|
||||
draw_msg(pause_get_menu_msg(0x4A), baseX + 86, baseY + 66, 255, MSG_PAL_WHITE, DRAW_MSG_STYLE_MENU);
|
||||
} else {
|
||||
draw_box(DRAW_FLAGS_CLIP, &gPauseWS_13, baseX + 67, baseY + 60, 0, 173, 26, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0);
|
||||
draw_box(DRAW_FLAGS_NO_CLIP, &gPauseWS_13, baseX + 67, baseY + 60, 0, 173, 26, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0);
|
||||
draw_msg(pause_get_menu_msg(0x4B), baseX + 90, baseY + 66, 255, MSG_PAL_WHITE, DRAW_MSG_STYLE_MENU);
|
||||
}
|
||||
}
|
||||
|
@ -129,7 +129,7 @@ void pause_items_draw_contents(MenuPanel* menu, s32 baseX, s32 baseY, s32 width,
|
||||
palette = MSG_PAL_STANDARD;
|
||||
currentItemColumn = gPauseItemsSelectedIndex / gPauseItemsPages[gPauseItemsCurrentPage].numCols;
|
||||
currentItemRow = gPauseItemsSelectedIndex % gPauseItemsPages[gPauseItemsCurrentPage].numCols;
|
||||
draw_box(DRAW_FLAGS_CLIP, &gPauseWS_18, baseX + 68, baseY, 0, width - 68, height, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0);
|
||||
draw_box(DRAW_FLAGS_NO_CLIP, &gPauseWS_18, baseX + 68, baseY, 0, width - 68, height, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0);
|
||||
|
||||
x1 = baseX + 1;
|
||||
y1 = baseY + 7;
|
||||
@ -292,7 +292,7 @@ void pause_items_draw_contents(MenuPanel* menu, s32 baseX, s32 baseY, s32 width,
|
||||
}
|
||||
}
|
||||
|
||||
draw_box(DRAW_FLAGS_CLIP, &gPauseWS_17, gPauseItemsCurrentTab == 0 ? baseX + 9 : baseX, baseY + 7, 0,
|
||||
draw_box(DRAW_FLAGS_NO_CLIP, &gPauseWS_17, gPauseItemsCurrentTab == 0 ? baseX + 9 : baseX, baseY + 7, 0,
|
||||
91, 34, 255, gPauseItemsCurrentTab == 1 ? 128 : 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0);
|
||||
|
||||
@ -308,7 +308,7 @@ void pause_items_draw_contents(MenuPanel* menu, s32 baseX, s32 baseY, s32 width,
|
||||
}
|
||||
draw_msg(msg, msgX, msgY, opacity1, MSG_PAL_WHITE, DRAW_MSG_STYLE_MENU);
|
||||
|
||||
draw_box(DRAW_FLAGS_CLIP, &gPauseWS_17, gPauseItemsCurrentTab == 1 ? baseX + 9 : baseX, baseY + 39, 0,
|
||||
draw_box(DRAW_FLAGS_NO_CLIP, &gPauseWS_17, gPauseItemsCurrentTab == 1 ? baseX + 9 : baseX, baseY + 39, 0,
|
||||
91, 34, 255, gPauseItemsCurrentTab == 0 ? 128 : 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0);
|
||||
|
||||
|
@ -10,7 +10,8 @@ extern s8 pause_image_143FF0_png[];
|
||||
WindowStyleCustom gPauseWS_0 = {
|
||||
.background = {
|
||||
.imgData = NULL,
|
||||
.packedTileFormat = 0x41,
|
||||
.fmt = G_IM_FMT_I,
|
||||
.bitDepth = G_IM_SIZ_8b,
|
||||
.width = 0,
|
||||
.height = 0,
|
||||
.unk_07 = { 0, 0, 0, 0},
|
||||
@ -18,7 +19,8 @@ WindowStyleCustom gPauseWS_0 = {
|
||||
},
|
||||
.corners = {
|
||||
.imgData = NULL,
|
||||
.packedTileFormat = 0,
|
||||
.fmt = G_IM_FMT_RGBA,
|
||||
.bitDepth = G_IM_SIZ_4b,
|
||||
.size1 = { .x = 0, .y = 0},
|
||||
.size2 = { .x = 0, .y = 0},
|
||||
.size3 = { .x = 0, .y = 0},
|
||||
@ -34,7 +36,8 @@ WindowStyleCustom gPauseWS_0 = {
|
||||
WindowStyleCustom gPauseWS_1 = {
|
||||
.background = {
|
||||
.imgData = ui_box_bg_tile_png,
|
||||
.packedTileFormat = 0x40,
|
||||
.fmt = G_IM_FMT_I,
|
||||
.bitDepth = G_IM_SIZ_4b,
|
||||
.width = 16,
|
||||
.height = 16,
|
||||
.unk_07 = { 0, 0, 0, 0},
|
||||
@ -42,7 +45,8 @@ WindowStyleCustom gPauseWS_1 = {
|
||||
},
|
||||
.corners = {
|
||||
.imgData = ui_box_corners4_png,
|
||||
.packedTileFormat = 0x31,
|
||||
.fmt = G_IM_FMT_IA,
|
||||
.bitDepth = G_IM_SIZ_8b,
|
||||
.size1 = { .x = 8, .y = 8},
|
||||
.size2 = { .x = 8, .y = 8},
|
||||
.size3 = { .x = 8, .y = 8},
|
||||
@ -58,7 +62,8 @@ WindowStyleCustom gPauseWS_1 = {
|
||||
WindowStyleCustom gPauseWS_2 = {
|
||||
.background = {
|
||||
.imgData = NULL,
|
||||
.packedTileFormat = 0x40,
|
||||
.fmt = G_IM_FMT_I,
|
||||
.bitDepth = G_IM_SIZ_4b,
|
||||
.width = 16,
|
||||
.height = 16,
|
||||
.unk_07 = { 0, 0, 0, 0 },
|
||||
@ -66,7 +71,8 @@ WindowStyleCustom gPauseWS_2 = {
|
||||
},
|
||||
.corners = {
|
||||
.imgData = NULL,
|
||||
.packedTileFormat = 0x31,
|
||||
.fmt = G_IM_FMT_IA,
|
||||
.bitDepth = G_IM_SIZ_8b,
|
||||
.size1 = { .x = 8, .y = 8 },
|
||||
.size2 = { .x = 8, .y = 8 },
|
||||
.size3 = { .x = 8, .y = 8 },
|
||||
@ -82,7 +88,8 @@ WindowStyleCustom gPauseWS_2 = {
|
||||
WindowStyleCustom gPauseWS_3 = {
|
||||
.background = {
|
||||
.imgData = NULL,
|
||||
.packedTileFormat = 0x00,
|
||||
.fmt = G_IM_FMT_RGBA,
|
||||
.bitDepth = G_IM_SIZ_4b,
|
||||
.width = 0,
|
||||
.height = 0,
|
||||
.unk_07 = { 0, 0, 0, 0 },
|
||||
@ -90,7 +97,8 @@ WindowStyleCustom gPauseWS_3 = {
|
||||
},
|
||||
.corners = {
|
||||
.imgData = pause_image_1439F0_png,
|
||||
.packedTileFormat = 0x31,
|
||||
.fmt = G_IM_FMT_IA,
|
||||
.bitDepth = G_IM_SIZ_8b,
|
||||
.size1 = { .x = 16, .y = 8 },
|
||||
.size2 = { .x = 16, .y = 8 },
|
||||
.size3 = { .x = 16, .y = 8 },
|
||||
@ -106,7 +114,8 @@ WindowStyleCustom gPauseWS_3 = {
|
||||
WindowStyleCustom gPauseWS_4 = {
|
||||
.background = {
|
||||
.imgData = NULL,
|
||||
.packedTileFormat = 0x00,
|
||||
.fmt = G_IM_FMT_RGBA,
|
||||
.bitDepth = G_IM_SIZ_4b,
|
||||
.width = 0,
|
||||
.height = 0,
|
||||
.unk_07 = { 0, 0, 0, 0 },
|
||||
@ -114,7 +123,8 @@ WindowStyleCustom gPauseWS_4 = {
|
||||
},
|
||||
.corners = {
|
||||
.imgData = pause_image_1439F0_png,
|
||||
.packedTileFormat = 0x31,
|
||||
.fmt = G_IM_FMT_IA,
|
||||
.bitDepth = G_IM_SIZ_8b,
|
||||
.size1 = { .x = 16, .y = 8 },
|
||||
.size2 = { .x = 16, .y = 8 },
|
||||
.size3 = { .x = 16, .y = 8 },
|
||||
@ -130,7 +140,8 @@ WindowStyleCustom gPauseWS_4 = {
|
||||
WindowStyleCustom gPauseWS_5 = {
|
||||
.background = {
|
||||
.imgData = NULL,
|
||||
.packedTileFormat = 0x00,
|
||||
.fmt = G_IM_FMT_RGBA,
|
||||
.bitDepth = G_IM_SIZ_4b,
|
||||
.width = 0,
|
||||
.height = 0,
|
||||
.unk_07 = { 0, 0, 0, 0 },
|
||||
@ -138,7 +149,8 @@ WindowStyleCustom gPauseWS_5 = {
|
||||
},
|
||||
.corners = {
|
||||
.imgData = pause_image_1439F0_png,
|
||||
.packedTileFormat = 0x31,
|
||||
.fmt = G_IM_FMT_IA,
|
||||
.bitDepth = G_IM_SIZ_8b,
|
||||
.size1 = { .x = 16, .y = 8 },
|
||||
.size2 = { .x = 16, .y = 8 },
|
||||
.size3 = { .x = 16, .y = 8 },
|
||||
@ -154,7 +166,8 @@ WindowStyleCustom gPauseWS_5 = {
|
||||
WindowStyleCustom gPauseWS_6 = {
|
||||
.background = {
|
||||
.imgData = NULL,
|
||||
.packedTileFormat = 0x00,
|
||||
.fmt = G_IM_FMT_RGBA,
|
||||
.bitDepth = G_IM_SIZ_4b,
|
||||
.width = 0,
|
||||
.height = 0,
|
||||
.unk_07 = { 0, 0, 0, 0 },
|
||||
@ -162,7 +175,8 @@ WindowStyleCustom gPauseWS_6 = {
|
||||
},
|
||||
.corners = {
|
||||
.imgData = pause_image_1439F0_png,
|
||||
.packedTileFormat = 0x31,
|
||||
.fmt = G_IM_FMT_IA,
|
||||
.bitDepth = G_IM_SIZ_8b,
|
||||
.size1 = { .x = 16, .y = 8 },
|
||||
.size2 = { .x = 16, .y = 8 },
|
||||
.size3 = { .x = 16, .y = 8 },
|
||||
@ -178,7 +192,8 @@ WindowStyleCustom gPauseWS_6 = {
|
||||
WindowStyleCustom gPauseWS_7 = {
|
||||
.background = {
|
||||
.imgData = NULL,
|
||||
.packedTileFormat = 0x00,
|
||||
.fmt = G_IM_FMT_RGBA,
|
||||
.bitDepth = G_IM_SIZ_4b,
|
||||
.width = 0,
|
||||
.height = 0,
|
||||
.unk_07 = { 0, 0, 0, 0 },
|
||||
@ -186,7 +201,8 @@ WindowStyleCustom gPauseWS_7 = {
|
||||
},
|
||||
.corners = {
|
||||
.imgData = pause_image_1439F0_png,
|
||||
.packedTileFormat = 0x31,
|
||||
.fmt = G_IM_FMT_IA,
|
||||
.bitDepth = G_IM_SIZ_8b,
|
||||
.size1 = { .x = 16, .y = 8 },
|
||||
.size2 = { .x = 16, .y = 8 },
|
||||
.size3 = { .x = 16, .y = 8 },
|
||||
@ -202,7 +218,8 @@ WindowStyleCustom gPauseWS_7 = {
|
||||
WindowStyleCustom gPauseWS_8 = {
|
||||
.background = {
|
||||
.imgData = NULL,
|
||||
.packedTileFormat = 0x00,
|
||||
.fmt = G_IM_FMT_RGBA,
|
||||
.bitDepth = G_IM_SIZ_4b,
|
||||
.width = 0,
|
||||
.height = 0,
|
||||
.unk_07 = { 0, 0, 0, 0 },
|
||||
@ -210,7 +227,8 @@ WindowStyleCustom gPauseWS_8 = {
|
||||
},
|
||||
.corners = {
|
||||
.imgData = pause_image_1439F0_png,
|
||||
.packedTileFormat = 0x31,
|
||||
.fmt = G_IM_FMT_IA,
|
||||
.bitDepth = G_IM_SIZ_8b,
|
||||
.size1 = { .x = 16, .y = 8 },
|
||||
.size2 = { .x = 16, .y = 8 },
|
||||
.size3 = { .x = 16, .y = 8 },
|
||||
@ -226,7 +244,8 @@ WindowStyleCustom gPauseWS_8 = {
|
||||
WindowStyleCustom gPauseWS_9 = {
|
||||
.background = {
|
||||
.imgData = NULL,
|
||||
.packedTileFormat = 0x00,
|
||||
.fmt = G_IM_FMT_RGBA,
|
||||
.bitDepth = G_IM_SIZ_4b,
|
||||
.width = 0,
|
||||
.height = 0,
|
||||
.unk_07 = { 0, 0, 0, 0 },
|
||||
@ -234,7 +253,8 @@ WindowStyleCustom gPauseWS_9 = {
|
||||
},
|
||||
.corners = {
|
||||
.imgData = NULL,
|
||||
.packedTileFormat = 0x00,
|
||||
.fmt = G_IM_FMT_RGBA,
|
||||
.bitDepth = G_IM_SIZ_4b,
|
||||
.size1 = { .x = 0, .y = 0 },
|
||||
.size2 = { .x = 0, .y = 0 },
|
||||
.size3 = { .x = 0, .y = 0 },
|
||||
@ -250,7 +270,8 @@ WindowStyleCustom gPauseWS_9 = {
|
||||
WindowStyleCustom gPauseWS_10 = {
|
||||
.background = {
|
||||
.imgData = NULL,
|
||||
.packedTileFormat = 0x00,
|
||||
.fmt = G_IM_FMT_RGBA,
|
||||
.bitDepth = G_IM_SIZ_4b,
|
||||
.width = 0,
|
||||
.height = 0,
|
||||
.unk_07 = { 0, 0, 0, 0 },
|
||||
@ -258,7 +279,8 @@ WindowStyleCustom gPauseWS_10 = {
|
||||
},
|
||||
.corners = {
|
||||
.imgData = pause_image_1439F0_png,
|
||||
.packedTileFormat = 0x31,
|
||||
.fmt = G_IM_FMT_IA,
|
||||
.bitDepth = G_IM_SIZ_8b,
|
||||
.size1 = { .x = 16, .y = 8 },
|
||||
.size2 = { .x = 16, .y = 8 },
|
||||
.size3 = { .x = 16, .y = 8 },
|
||||
@ -274,7 +296,8 @@ WindowStyleCustom gPauseWS_10 = {
|
||||
WindowStyleCustom gPauseWS_11 = {
|
||||
.background = {
|
||||
.imgData = NULL,
|
||||
.packedTileFormat = 0x00,
|
||||
.fmt = G_IM_FMT_RGBA,
|
||||
.bitDepth = G_IM_SIZ_4b,
|
||||
.width = 0,
|
||||
.height = 0,
|
||||
.unk_07 = { 0, 0, 0, 0 },
|
||||
@ -282,7 +305,8 @@ WindowStyleCustom gPauseWS_11 = {
|
||||
},
|
||||
.corners = {
|
||||
.imgData = pause_image_1439F0_png,
|
||||
.packedTileFormat = 0x31,
|
||||
.fmt = G_IM_FMT_IA,
|
||||
.bitDepth = G_IM_SIZ_8b,
|
||||
.size1 = { .x = 16, .y = 8 },
|
||||
.size2 = { .x = 16, .y = 8 },
|
||||
.size3 = { .x = 16, .y = 8 },
|
||||
@ -298,7 +322,8 @@ WindowStyleCustom gPauseWS_11 = {
|
||||
WindowStyleCustom gPauseWS_12 = {
|
||||
.background = {
|
||||
.imgData = ui_box_bg_tile_png,
|
||||
.packedTileFormat = 0x40,
|
||||
.fmt = G_IM_FMT_I,
|
||||
.bitDepth = G_IM_SIZ_4b,
|
||||
.width = 16,
|
||||
.height = 16,
|
||||
.unk_07 = { 0, 0, 0, 0 },
|
||||
@ -306,7 +331,8 @@ WindowStyleCustom gPauseWS_12 = {
|
||||
},
|
||||
.corners = {
|
||||
.imgData = ui_box_corners4_png,
|
||||
.packedTileFormat = 0x31,
|
||||
.fmt = G_IM_FMT_IA,
|
||||
.bitDepth = G_IM_SIZ_8b,
|
||||
.size1 = { .x = 8, .y = 8 },
|
||||
.size2 = { .x = 8, .y = 8 },
|
||||
.size3 = { .x = 8, .y = 8 },
|
||||
@ -322,7 +348,8 @@ WindowStyleCustom gPauseWS_12 = {
|
||||
WindowStyleCustom gPauseWS_13 = {
|
||||
.background = {
|
||||
.imgData = NULL,
|
||||
.packedTileFormat = 0x00,
|
||||
.fmt = G_IM_FMT_RGBA,
|
||||
.bitDepth = G_IM_SIZ_4b,
|
||||
.width = 0,
|
||||
.height = 0,
|
||||
.unk_07 = { 0, 0, 0, 0 },
|
||||
@ -330,7 +357,8 @@ WindowStyleCustom gPauseWS_13 = {
|
||||
},
|
||||
.corners = {
|
||||
.imgData = pause_image_143BF0_png,
|
||||
.packedTileFormat = 0x31,
|
||||
.fmt = G_IM_FMT_IA,
|
||||
.bitDepth = G_IM_SIZ_8b,
|
||||
.size1 = { .x = 16, .y = 16 },
|
||||
.size2 = { .x = 16, .y = 16 },
|
||||
.size3 = { .x = 16, .y = 16 },
|
||||
@ -346,7 +374,8 @@ WindowStyleCustom gPauseWS_13 = {
|
||||
WindowStyleCustom gPauseWS_14 = {
|
||||
.background = {
|
||||
.imgData = NULL,
|
||||
.packedTileFormat = 0x00,
|
||||
.fmt = G_IM_FMT_RGBA,
|
||||
.bitDepth = G_IM_SIZ_4b,
|
||||
.width = 0,
|
||||
.height = 0,
|
||||
.unk_07 = { 0, 0, 0, 0 },
|
||||
@ -354,7 +383,8 @@ WindowStyleCustom gPauseWS_14 = {
|
||||
},
|
||||
.corners = {
|
||||
.imgData = pause_image_1439F0_png,
|
||||
.packedTileFormat = 0x31,
|
||||
.fmt = G_IM_FMT_IA,
|
||||
.bitDepth = G_IM_SIZ_8b,
|
||||
.size1 = { .x = 16, .y = 8 },
|
||||
.size2 = { .x = 16, .y = 8 },
|
||||
.size3 = { .x = 16, .y = 8 },
|
||||
@ -370,7 +400,8 @@ WindowStyleCustom gPauseWS_14 = {
|
||||
WindowStyleCustom gPauseWS_15 = {
|
||||
.background = {
|
||||
.imgData = ui_box_bg_tile_png,
|
||||
.packedTileFormat = 0x40,
|
||||
.fmt = G_IM_FMT_I,
|
||||
.bitDepth = G_IM_SIZ_4b,
|
||||
.width = 16,
|
||||
.height = 16,
|
||||
.unk_07 = { 0, 0, 0, 0 },
|
||||
@ -378,7 +409,8 @@ WindowStyleCustom gPauseWS_15 = {
|
||||
},
|
||||
.corners = {
|
||||
.imgData = ui_box_corners4_png,
|
||||
.packedTileFormat = 0x31,
|
||||
.fmt = G_IM_FMT_IA,
|
||||
.bitDepth = G_IM_SIZ_8b,
|
||||
.size1 = { .x = 8, .y = 8 },
|
||||
.size2 = { .x = 8, .y = 8 },
|
||||
.size3 = { .x = 8, .y = 8 },
|
||||
@ -394,7 +426,8 @@ WindowStyleCustom gPauseWS_15 = {
|
||||
WindowStyleCustom gPauseWS_16 = {
|
||||
.background = {
|
||||
.imgData = ui_box_bg_tile_png,
|
||||
.packedTileFormat = 0x40,
|
||||
.fmt = G_IM_FMT_I,
|
||||
.bitDepth = G_IM_SIZ_4b,
|
||||
.width = 16,
|
||||
.height = 16,
|
||||
.unk_07 = { 0, 0, 0, 0 },
|
||||
@ -402,7 +435,8 @@ WindowStyleCustom gPauseWS_16 = {
|
||||
},
|
||||
.corners = {
|
||||
.imgData = ui_box_corners4_png,
|
||||
.packedTileFormat = 0x31,
|
||||
.fmt = G_IM_FMT_IA,
|
||||
.bitDepth = G_IM_SIZ_8b,
|
||||
.size1 = { .x = 8, .y = 8 },
|
||||
.size2 = { .x = 8, .y = 8 },
|
||||
.size3 = { .x = 8, .y = 8 },
|
||||
@ -418,7 +452,8 @@ WindowStyleCustom gPauseWS_16 = {
|
||||
WindowStyleCustom gPauseWS_17 = {
|
||||
.background = {
|
||||
.imgData = NULL,
|
||||
.packedTileFormat = 0x00,
|
||||
.fmt = G_IM_FMT_RGBA,
|
||||
.bitDepth = G_IM_SIZ_4b,
|
||||
.width = 0,
|
||||
.height = 0,
|
||||
.unk_07 = { 0, 0, 0, 0 },
|
||||
@ -426,7 +461,8 @@ WindowStyleCustom gPauseWS_17 = {
|
||||
},
|
||||
.corners = {
|
||||
.imgData = pause_image_143BF0_png,
|
||||
.packedTileFormat = 0x31,
|
||||
.fmt = G_IM_FMT_IA,
|
||||
.bitDepth = G_IM_SIZ_8b,
|
||||
.size1 = { .x = 16, .y = 16 },
|
||||
.size2 = { .x = 16, .y = 16 },
|
||||
.size3 = { .x = 16, .y = 16 },
|
||||
@ -442,7 +478,8 @@ WindowStyleCustom gPauseWS_17 = {
|
||||
WindowStyleCustom gPauseWS_18 = {
|
||||
.background = {
|
||||
.imgData = ui_box_bg_tile_png,
|
||||
.packedTileFormat = 0x40,
|
||||
.fmt = G_IM_FMT_I,
|
||||
.bitDepth = G_IM_SIZ_4b,
|
||||
.width = 16,
|
||||
.height = 16,
|
||||
.unk_07 = { 0, 0, 0, 0 },
|
||||
@ -450,7 +487,8 @@ WindowStyleCustom gPauseWS_18 = {
|
||||
},
|
||||
.corners = {
|
||||
.imgData = ui_box_corners4_png,
|
||||
.packedTileFormat = 0x31,
|
||||
.fmt = G_IM_FMT_IA,
|
||||
.bitDepth = G_IM_SIZ_8b,
|
||||
.size1 = { .x = 8, .y = 8 },
|
||||
.size2 = { .x = 8, .y = 8 },
|
||||
.size3 = { .x = 8, .y = 8 },
|
||||
@ -466,7 +504,8 @@ WindowStyleCustom gPauseWS_18 = {
|
||||
WindowStyleCustom gPauseWS_19 = {
|
||||
.background = {
|
||||
.imgData = ui_box_bg_tile_png,
|
||||
.packedTileFormat = 0x40,
|
||||
.fmt = G_IM_FMT_I,
|
||||
.bitDepth = G_IM_SIZ_4b,
|
||||
.width = 16,
|
||||
.height = 16,
|
||||
.unk_07 = { 0, 0, 0, 0 },
|
||||
@ -474,7 +513,8 @@ WindowStyleCustom gPauseWS_19 = {
|
||||
},
|
||||
.corners = {
|
||||
.imgData = ui_box_corners4_png,
|
||||
.packedTileFormat = 0x31,
|
||||
.fmt = G_IM_FMT_IA,
|
||||
.bitDepth = G_IM_SIZ_8b,
|
||||
.size1 = { .x = 8, .y = 8 },
|
||||
.size2 = { .x = 8, .y = 8 },
|
||||
.size3 = { .x = 8, .y = 8 },
|
||||
@ -490,7 +530,8 @@ WindowStyleCustom gPauseWS_19 = {
|
||||
WindowStyleCustom gPauseWS_20 = {
|
||||
.background = {
|
||||
.imgData = ui_box_bg_tile_png,
|
||||
.packedTileFormat = 0x40,
|
||||
.fmt = G_IM_FMT_I,
|
||||
.bitDepth = G_IM_SIZ_4b,
|
||||
.width = 16,
|
||||
.height = 16,
|
||||
.unk_07 = { 0, 0, 0, 0 },
|
||||
@ -498,7 +539,8 @@ WindowStyleCustom gPauseWS_20 = {
|
||||
},
|
||||
.corners = {
|
||||
.imgData = ui_box_corners4_png,
|
||||
.packedTileFormat = 0x31,
|
||||
.fmt = G_IM_FMT_IA,
|
||||
.bitDepth = G_IM_SIZ_8b,
|
||||
.size1 = { .x = 8, .y = 8 },
|
||||
.size2 = { .x = 8, .y = 8 },
|
||||
.size3 = { .x = 8, .y = 8 },
|
||||
@ -514,7 +556,8 @@ WindowStyleCustom gPauseWS_20 = {
|
||||
WindowStyleCustom gPauseWS_21 = {
|
||||
.background = {
|
||||
.imgData = ui_box_bg_tile_png,
|
||||
.packedTileFormat = 0x40,
|
||||
.fmt = G_IM_FMT_I,
|
||||
.bitDepth = G_IM_SIZ_4b,
|
||||
.width = 16,
|
||||
.height = 16,
|
||||
.unk_07 = { 0, 0, 0, 0 },
|
||||
@ -522,7 +565,8 @@ WindowStyleCustom gPauseWS_21 = {
|
||||
},
|
||||
.corners = {
|
||||
.imgData = pause_image_143FF0_png,
|
||||
.packedTileFormat = 0x31,
|
||||
.fmt = G_IM_FMT_IA,
|
||||
.bitDepth = G_IM_SIZ_8b,
|
||||
.size1 = { .x = 16, .y = 16 },
|
||||
.size2 = { .x = 16, .y = 16 },
|
||||
.size3 = { .x = 16, .y = 16 },
|
||||
@ -538,7 +582,8 @@ WindowStyleCustom gPauseWS_21 = {
|
||||
WindowStyleCustom gPauseWS_22 = {
|
||||
.background = {
|
||||
.imgData = NULL,
|
||||
.packedTileFormat = 0x00,
|
||||
.fmt = G_IM_FMT_RGBA,
|
||||
.bitDepth = G_IM_SIZ_4b,
|
||||
.width = 0,
|
||||
.height = 0,
|
||||
.unk_07 = { 0, 0, 0, 0 },
|
||||
@ -546,7 +591,8 @@ WindowStyleCustom gPauseWS_22 = {
|
||||
},
|
||||
.corners = {
|
||||
.imgData = pause_image_1439F0_png,
|
||||
.packedTileFormat = 0x31,
|
||||
.fmt = G_IM_FMT_IA,
|
||||
.bitDepth = G_IM_SIZ_8b,
|
||||
.size1 = { .x = 16, .y = 8 },
|
||||
.size2 = { .x = 16, .y = 8 },
|
||||
.size3 = { .x = 16, .y = 8 },
|
||||
@ -562,7 +608,8 @@ WindowStyleCustom gPauseWS_22 = {
|
||||
WindowStyleCustom gPauseWS_23 = {
|
||||
.background = {
|
||||
.imgData = ui_box_bg_tile_png,
|
||||
.packedTileFormat = 0x40,
|
||||
.fmt = G_IM_FMT_I,
|
||||
.bitDepth = G_IM_SIZ_4b,
|
||||
.width = 16,
|
||||
.height = 16,
|
||||
.unk_07 = { 0, 0, 0, 0 },
|
||||
@ -570,7 +617,8 @@ WindowStyleCustom gPauseWS_23 = {
|
||||
},
|
||||
.corners = {
|
||||
.imgData = ui_box_corners4_png,
|
||||
.packedTileFormat = 0x31,
|
||||
.fmt = G_IM_FMT_IA,
|
||||
.bitDepth = G_IM_SIZ_8b,
|
||||
.size1 = { .x = 8, .y = 8 },
|
||||
.size2 = { .x = 8, .y = 8 },
|
||||
.size3 = { .x = 8, .y = 8 },
|
||||
@ -586,7 +634,8 @@ WindowStyleCustom gPauseWS_23 = {
|
||||
WindowStyleCustom gPauseWS_24 = {
|
||||
.background = {
|
||||
.imgData = 0x00000000,
|
||||
.packedTileFormat = 0x00,
|
||||
.fmt = G_IM_FMT_RGBA,
|
||||
.bitDepth = G_IM_SIZ_4b,
|
||||
.width = 0,
|
||||
.height = 0,
|
||||
.unk_07 = { 0, 0, 0, 0 },
|
||||
@ -594,7 +643,8 @@ WindowStyleCustom gPauseWS_24 = {
|
||||
},
|
||||
.corners = {
|
||||
.imgData = pause_image_1439F0_png,
|
||||
.packedTileFormat = 0x31,
|
||||
.fmt = G_IM_FMT_IA,
|
||||
.bitDepth = G_IM_SIZ_8b,
|
||||
.size1 = { .x = 16, .y = 8 },
|
||||
.size2 = { .x = 16, .y = 8 },
|
||||
.size3 = { .x = 16, .y = 8 },
|
||||
@ -610,7 +660,8 @@ WindowStyleCustom gPauseWS_24 = {
|
||||
WindowStyleCustom gPauseWS_25 = {
|
||||
.background = {
|
||||
.imgData = ui_box_bg_tile_png,
|
||||
.packedTileFormat = 0x40,
|
||||
.fmt = G_IM_FMT_I,
|
||||
.bitDepth = G_IM_SIZ_4b,
|
||||
.width = 16,
|
||||
.height = 16,
|
||||
.unk_07 = { 0, 0, 0, 0 },
|
||||
@ -618,7 +669,8 @@ WindowStyleCustom gPauseWS_25 = {
|
||||
},
|
||||
.corners = {
|
||||
.imgData = pause_image_143FF0_png,
|
||||
.packedTileFormat = 0x31,
|
||||
.fmt = G_IM_FMT_IA,
|
||||
.bitDepth = G_IM_SIZ_8b,
|
||||
.size1 = { .x = 16, .y = 16 },
|
||||
.size2 = { .x = 16, .y = 16 },
|
||||
.size3 = { .x = 16, .y = 16 },
|
||||
@ -634,7 +686,8 @@ WindowStyleCustom gPauseWS_25 = {
|
||||
WindowStyleCustom gPauseWS_26 = {
|
||||
.background = {
|
||||
.imgData = ui_box_bg_tile_png,
|
||||
.packedTileFormat = 0x40,
|
||||
.fmt = G_IM_FMT_I,
|
||||
.bitDepth = G_IM_SIZ_4b,
|
||||
.width = 16,
|
||||
.height = 16,
|
||||
.unk_07 = { 0, 0, 0, 0 },
|
||||
@ -642,7 +695,8 @@ WindowStyleCustom gPauseWS_26 = {
|
||||
},
|
||||
.corners = {
|
||||
.imgData = ui_box_corners4_png,
|
||||
.packedTileFormat = 0x31,
|
||||
.fmt = G_IM_FMT_IA,
|
||||
.bitDepth = G_IM_SIZ_8b,
|
||||
.size1 = { .x = 8, .y = 8 },
|
||||
.size2 = { .x = 8, .y = 8 },
|
||||
.size3 = { .x = 8, .y = 8 },
|
||||
@ -658,7 +712,8 @@ WindowStyleCustom gPauseWS_26 = {
|
||||
WindowStyleCustom gPauseWS_27 = {
|
||||
.background = {
|
||||
.imgData = ui_box_bg_tile_png,
|
||||
.packedTileFormat = 0x40,
|
||||
.fmt = G_IM_FMT_I,
|
||||
.bitDepth = G_IM_SIZ_4b,
|
||||
.width = 16,
|
||||
.height = 16,
|
||||
.unk_07 = { 0, 0, 0, 0 },
|
||||
@ -666,7 +721,8 @@ WindowStyleCustom gPauseWS_27 = {
|
||||
},
|
||||
.corners = {
|
||||
.imgData = pause_image_143FF0_png,
|
||||
.packedTileFormat = 0x31,
|
||||
.fmt = G_IM_FMT_IA,
|
||||
.bitDepth = G_IM_SIZ_8b,
|
||||
.size1 = { .x = 16, .y = 16 },
|
||||
.size2 = { .x = 16, .y = 16 },
|
||||
.size3 = { .x = 16, .y = 16 },
|
||||
@ -682,7 +738,8 @@ WindowStyleCustom gPauseWS_27 = {
|
||||
WindowStyleCustom gPauseWS_28 = {
|
||||
.background = {
|
||||
.imgData = NULL,
|
||||
.packedTileFormat = 0x00,
|
||||
.fmt = G_IM_FMT_RGBA,
|
||||
.bitDepth = G_IM_SIZ_4b,
|
||||
.width = 0,
|
||||
.height = 0,
|
||||
.unk_07 = { 0, 0, 0, 0 },
|
||||
@ -690,7 +747,8 @@ WindowStyleCustom gPauseWS_28 = {
|
||||
},
|
||||
.corners = {
|
||||
.imgData = pause_image_1439F0_png,
|
||||
.packedTileFormat = 0x31,
|
||||
.fmt = G_IM_FMT_IA,
|
||||
.bitDepth = G_IM_SIZ_8b,
|
||||
.size1 = { .x = 16, .y = 8 },
|
||||
.size2 = { .x = 16, .y = 8 },
|
||||
.size3 = { .x = 16, .y = 8 },
|
||||
|
@ -21,10 +21,22 @@ typedef struct WindowGroup {
|
||||
} WindowGroup; // size = 0x02
|
||||
|
||||
WindowStyle gWindowStyles[64] = {
|
||||
{ 3 }, { 3 }, { 11 }, { 12 }, { 13 }, { 14 }, { 3 }, { 21 }, { 3 }, { 0 }, { 9 }, { 3 }, { 0 }, { 1 }, { 3 }, { 9 },
|
||||
{ 10 }, { 7 }, { 8 }, { 3 }, { 3 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 },
|
||||
{ 0 }, { 0 }, { 0 }, { 0 }, { 3 }, { 11 }, { 12 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 },
|
||||
{ 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 1 }
|
||||
{ WINDOW_STYLE_3 }, { WINDOW_STYLE_3 }, { WINDOW_STYLE_11 }, { WINDOW_STYLE_12 },
|
||||
{ WINDOW_STYLE_13 }, { WINDOW_STYLE_14 }, { WINDOW_STYLE_3 }, { WINDOW_STYLE_21 },
|
||||
{ WINDOW_STYLE_3 }, { WINDOW_STYLE_0 }, { WINDOW_STYLE_9 }, { WINDOW_STYLE_3 },
|
||||
{ WINDOW_STYLE_0 }, { WINDOW_STYLE_1 }, { WINDOW_STYLE_3 }, { WINDOW_STYLE_9 },
|
||||
{ WINDOW_STYLE_10 }, { WINDOW_STYLE_7 }, { WINDOW_STYLE_8 }, { WINDOW_STYLE_3 },
|
||||
{ WINDOW_STYLE_3 }, { WINDOW_STYLE_0 }, { WINDOW_STYLE_0 }, { WINDOW_STYLE_0 },
|
||||
{ WINDOW_STYLE_0 }, { WINDOW_STYLE_0 }, { WINDOW_STYLE_0 }, { WINDOW_STYLE_0 },
|
||||
{ WINDOW_STYLE_0 }, { WINDOW_STYLE_0 }, { WINDOW_STYLE_0 }, { WINDOW_STYLE_0 },
|
||||
{ WINDOW_STYLE_0 }, { WINDOW_STYLE_0 }, { WINDOW_STYLE_0 }, { WINDOW_STYLE_0 },
|
||||
{ WINDOW_STYLE_3 }, { WINDOW_STYLE_11 }, { WINDOW_STYLE_12 }, { WINDOW_STYLE_0 },
|
||||
{ WINDOW_STYLE_0 }, { WINDOW_STYLE_0 }, { WINDOW_STYLE_0 }, { WINDOW_STYLE_0 },
|
||||
{ WINDOW_STYLE_0 }, { WINDOW_STYLE_0 }, { WINDOW_STYLE_0 }, { WINDOW_STYLE_0 },
|
||||
{ WINDOW_STYLE_0 }, { WINDOW_STYLE_0 }, { WINDOW_STYLE_0 }, { WINDOW_STYLE_0 },
|
||||
{ WINDOW_STYLE_0 }, { WINDOW_STYLE_0 }, { WINDOW_STYLE_0 }, { WINDOW_STYLE_0 },
|
||||
{ WINDOW_STYLE_0 }, { WINDOW_STYLE_0 }, { WINDOW_STYLE_0 }, { WINDOW_STYLE_0 },
|
||||
{ WINDOW_STYLE_0 }, { WINDOW_STYLE_0 }, { WINDOW_STYLE_0 }, { WINDOW_STYLE_1 }
|
||||
};
|
||||
|
||||
SimpleWindowUpdateData gSimpleWindowUpdates[] = {
|
||||
@ -320,7 +332,7 @@ void render_windows(s32* windowsArray, s32 parent, s32 flags, s32 baseX, s32 bas
|
||||
|
||||
boxFlags = childFlags;
|
||||
if (childWindow->flags & WINDOW_FLAGS_40) {
|
||||
boxFlags |= DRAW_FLAGS_2;
|
||||
boxFlags |= DRAW_FLAGS_ANIMATED_BACKGROUND;
|
||||
}
|
||||
|
||||
if (draw_box(boxFlags, windowStyle, posX, posY, posZ, width, height, childOpacity, childDarkening,
|
||||
|
@ -58,16 +58,15 @@ WindowStyleCustom D_802417D8_909208 = {
|
||||
},
|
||||
.corners = {
|
||||
.imgData = N(window_ul_img),
|
||||
.packedTileFormat = WINDOW_IMG_IA_8,
|
||||
.fmt = G_IM_FMT_IA,
|
||||
.bitDepth = G_IM_SIZ_8b,
|
||||
.size1 = { 8, 8 },
|
||||
.size2 = { 8, 8 },
|
||||
.size3 = { 8, 8 },
|
||||
.size4 = { 8, 8 },
|
||||
},
|
||||
// gsDPSetCombineLERP(PRIMITIVE, 0, TEXEL1, 0, 0, 0, 0, TEXEL1, 0, 0, 0, COMBINED, 0, 0, 0, COMBINED),
|
||||
.opaqueCombineMode = { .words = { 0xFC317FFF, 0xFFFFF438 }},
|
||||
// gsDPSetCombineLERP(PRIMITIVE, 0, TEXEL1, 0, TEXEL1, 0, PRIMITIVE, 0, 0, 0, 0, COMBINED, 0, 0, 0, COMBINED)
|
||||
.transparentCombineMode = { .words = { 0xFC3127FF, 0xFFFFFE38 }},
|
||||
.opaqueCombineMode = gsDPSetCombineLERP(PRIMITIVE, 0, TEXEL1, 0, 0, 0, 0, TEXEL1, 0, 0, 0, COMBINED, 0, 0, 0, COMBINED),
|
||||
.transparentCombineMode = gsDPSetCombineLERP(PRIMITIVE, 0, TEXEL1, 0, TEXEL1, 0, PRIMITIVE, 0, 0, 0, 0, COMBINED, 0, 0, 0, COMBINED),
|
||||
.color1 = { 224, 224, 224, 255 },
|
||||
.color2 = { 0, 0, 0, 255},
|
||||
};
|
||||
@ -455,7 +454,7 @@ void func_80240DA4_9087D4(void) {
|
||||
f64 lrx = baseX + (fullWidth * 0.5) + (D_802417CC_9091FC * 0.5);
|
||||
f64 lry = baseY + (fullHeight * 0.5) + (D_802417D0_909200 * 0.5);
|
||||
gDPSetScissor(gMasterGfxPos++, G_SC_NON_INTERLACE, ulx, uly, lrx, lry);
|
||||
draw_box(DRAW_FLAGS_CLIP, &D_802417D8_909208, ulx, uly, 0, D_802417CC_9091FC, D_802417D0_909200, 180, 0, 1.0f, 1.0f,
|
||||
draw_box(DRAW_FLAGS_NO_CLIP, &D_802417D8_909208, ulx, uly, 0, D_802417CC_9091FC, D_802417D0_909200, 180, 0, 1.0f, 1.0f,
|
||||
0.0f, 0.0f, 0.0f, NULL, NULL, NULL, 320, 240, NULL);
|
||||
}
|
||||
}
|
||||
|
@ -119,7 +119,7 @@ void N(appendGfx_score_display) (void* renderData) {
|
||||
}
|
||||
|
||||
if (data->scoreWindowPosX < SCREEN_WIDTH + 1) {
|
||||
draw_box(0, 9, data->scoreWindowPosX, 28, 0, 72, 20, 255, 0, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, NULL, NULL, NULL, SCREEN_WIDTH, SCREEN_HEIGHT, NULL);
|
||||
draw_box(0, WINDOW_STYLE_9, data->scoreWindowPosX, 28, 0, 72, 20, 255, 0, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, NULL, NULL, NULL, SCREEN_WIDTH, SCREEN_HEIGHT, NULL);
|
||||
hudElemID = data->hudElemID;
|
||||
hud_element_set_render_pos(hudElemID, data->scoreWindowPosX + 15, 39);
|
||||
hud_element_draw_clipped(hudElemID);
|
||||
|
@ -162,7 +162,7 @@ void N(appendGfx_score_display)(void* renderData) {
|
||||
}
|
||||
}
|
||||
|
||||
draw_box(0, 9, data->windowA_posX, 23, 0, 80, 38, 180, 0, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, NULL, NULL, NULL, SCREEN_WIDTH, SCREEN_HEIGHT, NULL);
|
||||
draw_box(0, WINDOW_STYLE_9, data->windowA_posX, 23, 0, 80, 38, 180, 0, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, NULL, NULL, NULL, SCREEN_WIDTH, SCREEN_HEIGHT, NULL);
|
||||
draw_msg(MSG_MGM_0047, data->windowA_posX + 42, 28, 255, MSG_PAL_WHITE, 0);
|
||||
draw_number(NUM_PANELS - data->found, data->windowA_posX + 65, 43, DRAW_NUMBER_CHARSET_THIN, MSG_PAL_WHITE, 255, DRAW_NUMBER_STYLE_MONOSPACE | DRAW_NUMBER_STYLE_ALIGN_RIGHT);
|
||||
draw_ci_image_with_clipping(&N(panel_peach_img), 32, 32, G_IM_FMT_CI, G_IM_SIZ_4b, &N(panel_peach_pal),
|
||||
@ -172,7 +172,7 @@ void N(appendGfx_score_display)(void* renderData) {
|
||||
deciseconds = ((f32)(timeLeft % 30) * 10.0) / 30;
|
||||
seconds = timeLeft / 30;
|
||||
|
||||
draw_box(0, 0xB, data->windowB_posX, 27, 0, 60, 20, 180, 0, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, NULL, NULL, NULL, SCREEN_WIDTH, SCREEN_HEIGHT, NULL);
|
||||
draw_box(0, WINDOW_STYLE_11, data->windowB_posX, 27, 0, 60, 20, 180, 0, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, NULL, NULL, NULL, SCREEN_WIDTH, SCREEN_HEIGHT, NULL);
|
||||
// draw whole seconds
|
||||
draw_number(seconds, data->windowB_posX + 29, 31, DRAW_NUMBER_CHARSET_THIN, MSG_PAL_WHITE, 255, DRAW_NUMBER_STYLE_MONOSPACE | DRAW_NUMBER_STYLE_ALIGN_RIGHT);
|
||||
// draw tenths of seconds
|
||||
|
@ -927,8 +927,8 @@ ApiStatus MakeShop(Evt* script, s32 isInitialCall) {
|
||||
get_worker(create_worker_frontUI(NULL, draw_shop_items));
|
||||
set_window_properties(WINDOW_ID_10, 100, 66, 120, 28, 0, shop_draw_item_name, NULL, -1);
|
||||
set_window_properties(WINDOW_ID_11, 32, 184, 256, 32, 1, shop_draw_item_desc, NULL, -1);
|
||||
gWindowStyles[10].defaultStyleID = 9;
|
||||
gWindowStyles[11].defaultStyleID = 3;
|
||||
gWindowStyles[10].defaultStyleID = WINDOW_STYLE_9;
|
||||
gWindowStyles[11].defaultStyleID = WINDOW_STYLE_3;
|
||||
shop->currentItemSlot = 0;
|
||||
shop->selectedStoreItemSlot = 0;
|
||||
shop->flags = SHOP_FLAGS_0;
|
||||
|
@ -187,7 +187,7 @@ dlabel D_8010D6A4
|
||||
dlabel D_8010D6A8
|
||||
.space 0x8
|
||||
|
||||
dlabel D_8010D6B0
|
||||
dlabel gBoxQuadBuffer
|
||||
.space 0x1500
|
||||
|
||||
dlabel gPartnerActionStatus
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -391,7 +391,7 @@ segments:
|
||||
- [0x891B0, c, 891b0_len_fb0]
|
||||
- [0x8A160, c, 8a160_len_700]
|
||||
- [0x8A860, c, 8a860_len_3f30]
|
||||
- [0x8E790, c, 8e790_len_2850]
|
||||
- [0x8E790, c, draw_box]
|
||||
- [0x90FE0, .data, npc_collision]
|
||||
- [0x913B0, .data, world/actions]
|
||||
- [0x914E0, .data, world/partners]
|
||||
@ -793,7 +793,7 @@ segments:
|
||||
- [0xA2D40, .data, 8a860_len_3f30]
|
||||
- start: 0xA2D90
|
||||
type: .data
|
||||
name: 8e790_len_2850
|
||||
name: draw_box
|
||||
subsegments:
|
||||
- [0xA2D90]
|
||||
- [0xA2E90, ia8, ui/box/corners9, 16, 64]
|
||||
|
@ -3764,7 +3764,7 @@ D_80109890 = 0x80109890; // type:data rom:0xA2D40
|
||||
D_80109898 = 0x80109898; // type:data rom:0xA2D48
|
||||
D_801098A0 = 0x801098A0; // type:data rom:0xA2D50
|
||||
D_801098BC = 0x801098BC; // type:data rom:0xA2D6C
|
||||
D_801098E0 = 0x801098E0; // type:data rom:0xA2D90
|
||||
gBoxDefaultStyles = 0x801098E0; // type:data rom:0xA2D90
|
||||
ui_box_corners9_png = 0x801099E0; // type:data rom:0xA2E90
|
||||
ui_box_corners8_png = 0x80109DE0; // type:data rom:0xA3290
|
||||
ui_box_corners6_png = 0x8010A6E0; // type:data rom:0xA3B90
|
||||
@ -3776,14 +3776,14 @@ ui_box_bg_tile_png = 0x8010B460; // type:data rom:0xA4910
|
||||
ui_box_corners1_png = 0x8010B4E0; // type:data rom:0xA4990
|
||||
ui_box_corners2_png = 0x8010B8E0; // type:data rom:0xA4D90
|
||||
ui_box_bg_flat_png = 0x8010BAE0; // type:data rom:0xA4F90
|
||||
D_8010BAE8 = 0x8010BAE8; // type:data rom:0xA4F98
|
||||
D_8010BB00 = 0x8010BB00; // type:data rom:0xA4FB0
|
||||
D_8010BB90 = 0x8010BB90; // type:data rom:0xA5040
|
||||
D_8010BBB0 = 0x8010BBB0; // type:data rom:0xA5060
|
||||
gBoxBackground = 0x8010BAE8; // type:data rom:0xA4F98
|
||||
gBoxCorners = 0x8010BB00; // type:data rom:0xA4FB0
|
||||
gBoxCombineModes = 0x8010BB90; // type:data rom:0xA5040
|
||||
gBoxQuadIndex = 0x8010BBB0; // type:data rom:0xA5060
|
||||
D_8010BBB4 = 0x8010BBB4; // type:data rom:0xA5064
|
||||
D_8010BBB8 = 0x8010BBB8; // type:data rom:0xA5068
|
||||
gBoxViewport = 0x8010BBB8; // type:data rom:0xA5068
|
||||
vtx_drawbox1 = 0x8010BBC8; // type:data rom:0xA5078
|
||||
D_8010BC08 = 0x8010BC08; // type:data rom:0xA50B8
|
||||
gBoxMatrix = 0x8010BC08; // type:data rom:0xA50B8
|
||||
D_8010BC50 = 0x8010BC50; // type:data rom:0xA5100
|
||||
D_8010BD30 = 0x8010BD30; // type:data rom:0xA51E0
|
||||
D_8010BD80 = 0x8010BD80; // type:data rom:0xA5230
|
||||
@ -3924,7 +3924,7 @@ gPopupMenu = 0x8010D69C; // type:data rom:0xA6B4C
|
||||
D_8010D6A0 = 0x8010D6A0; // type:data rom:0xA6B50
|
||||
D_8010D6A4 = 0x8010D6A4; // type:data rom:0xA6B54
|
||||
D_8010D6A8 = 0x8010D6A8; // type:data rom:0xA6B58
|
||||
D_8010D6B0 = 0x8010D6B0; // type:data rom:0xA6B60
|
||||
gBoxQuadBuffer = 0x8010D6B0; // type:data rom:0xA6B60
|
||||
update_entity_inverse_rotation_matrix = 0x801104A4; // type:func rom:0xA6BA4
|
||||
get_entity_by_index = 0x801105E8; // type:func rom:0xA6CE8
|
||||
get_shadow_by_index = 0x80110604; // type:func rom:0xA6D04
|
||||
|
Loading…
Reference in New Issue
Block a user