model.inc.c (5893B)
1 // Power Meter HUD 2 3 UNUSED static const u64 power_meter_unused_1 = 0; 4 5 #if defined(VERSION_CN) 6 ALIGNED8 static const Texture texture_power_meter_left_side[] = { 7 #include "actors/power_meter/power_meter_left_side_cn.rgba16.inc.c" 8 }; 9 10 ALIGNED8 static const Texture texture_power_meter_right_side[] = { 11 #include "actors/power_meter/power_meter_right_side_cn.rgba16.inc.c" 12 }; 13 #else 14 // 0x030233E0 15 ALIGNED8 static const Texture texture_power_meter_left_side[] = { 16 #include "actors/power_meter/power_meter_left_side.rgba16.inc.c" 17 }; 18 19 // 0x030243E0 20 ALIGNED8 static const Texture texture_power_meter_right_side[] = { 21 #include "actors/power_meter/power_meter_right_side.rgba16.inc.c" 22 }; 23 #endif 24 25 // 0x030253E0 26 ALIGNED8 static const Texture texture_power_meter_full[] = { 27 #include "actors/power_meter/power_meter_full.rgba16.inc.c" 28 }; 29 30 // 0x03025BE0 31 ALIGNED8 static const Texture texture_power_meter_seven_segments[] = { 32 #include "actors/power_meter/power_meter_seven_segments.rgba16.inc.c" 33 }; 34 35 // 0x030263E0 36 ALIGNED8 static const Texture texture_power_meter_six_segments[] = { 37 #include "actors/power_meter/power_meter_six_segments.rgba16.inc.c" 38 }; 39 40 // 0x03026BE0 41 ALIGNED8 static const Texture texture_power_meter_five_segments[] = { 42 #include "actors/power_meter/power_meter_five_segments.rgba16.inc.c" 43 }; 44 45 // 0x030273E0 46 ALIGNED8 static const Texture texture_power_meter_four_segments[] = { 47 #include "actors/power_meter/power_meter_four_segments.rgba16.inc.c" 48 }; 49 50 // 0x03027BE0 51 ALIGNED8 static const Texture texture_power_meter_three_segments[] = { 52 #include "actors/power_meter/power_meter_three_segments.rgba16.inc.c" 53 }; 54 55 // 0x030283E0 56 ALIGNED8 static const Texture texture_power_meter_two_segments[] = { 57 #include "actors/power_meter/power_meter_two_segments.rgba16.inc.c" 58 }; 59 60 // 0x03028BE0 61 ALIGNED8 static const Texture texture_power_meter_one_segments[] = { 62 #include "actors/power_meter/power_meter_one_segment.rgba16.inc.c" 63 }; 64 65 // 0x030293E0 66 const Texture *const power_meter_health_segments_lut[] = { 67 texture_power_meter_one_segments, 68 texture_power_meter_two_segments, 69 texture_power_meter_three_segments, 70 texture_power_meter_four_segments, 71 texture_power_meter_five_segments, 72 texture_power_meter_six_segments, 73 texture_power_meter_seven_segments, 74 texture_power_meter_full, 75 }; 76 77 // 0x03029400 78 static const Vtx vertex_power_meter_base[] = { 79 {{{ -32, -32, 0}, 0, { 0, 2016}, {0xff, 0xff, 0xff, 0xff}}}, 80 {{{ 0, -32, 0}, 0, { 992, 2016}, {0xff, 0xff, 0xff, 0xff}}}, 81 {{{ 0, 32, 0}, 0, { 992, 0}, {0xff, 0xff, 0xff, 0xff}}}, 82 {{{ -32, 32, 0}, 0, { 0, 0}, {0xff, 0xff, 0xff, 0xff}}}, 83 {{{ 0, -32, 0}, 0, { 1, 2016}, {0xff, 0xff, 0xff, 0xff}}}, 84 {{{ 32, -32, 0}, 0, { 1024, 2016}, {0xff, 0xff, 0xff, 0xff}}}, 85 {{{ 32, 32, 0}, 0, { 1024, 0}, {0xff, 0xff, 0xff, 0xff}}}, 86 {{{ 0, 32, 0}, 0, { 1, 0}, {0xff, 0xff, 0xff, 0xff}}}, 87 }; 88 89 // 0x03029480 - 0x03029530 90 const Gfx dl_power_meter_base[] = { 91 gsDPPipeSync(), 92 gsSPClearGeometryMode(G_LIGHTING), 93 gsDPSetCombineMode(G_CC_DECALRGBA, G_CC_DECALRGBA), 94 gsDPSetRenderMode(G_RM_TEX_EDGE, G_RM_TEX_EDGE2), 95 gsDPSetTextureFilter(G_TF_POINT), 96 gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON), 97 gsSPVertex(vertex_power_meter_base, 8, 0), 98 gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 0, 0, G_TX_LOADTILE, 0, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOLOD, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOLOD), 99 gsDPTileSync(), 100 gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 8, 0, G_TX_RENDERTILE, 0, G_TX_CLAMP, 6, G_TX_NOLOD, G_TX_CLAMP, 5, G_TX_NOLOD), 101 gsDPSetTileSize(0, 0, 0, (32 - 1) << G_TEXTURE_IMAGE_FRAC, (64 - 1) << G_TEXTURE_IMAGE_FRAC), 102 gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, texture_power_meter_left_side), 103 gsDPLoadSync(), 104 gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 32 * 64 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)), 105 gsSP2Triangles( 0, 1, 2, 0x0, 0, 2, 3, 0x0), 106 gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, texture_power_meter_right_side), 107 gsDPLoadSync(), 108 gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 32 * 64 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)), 109 gsSP2Triangles( 4, 5, 6, 0x0, 4, 6, 7, 0x0), 110 gsSPEndDisplayList(), 111 }; 112 113 // 0x03029530 114 static const Vtx vertex_power_meter_health_segments[] = { 115 #if defined(VERSION_CN) 116 {{{ -16, -20, 0}, 0, { 0, 992}, {0xff, 0xff, 0xff, 0xff}}}, 117 {{{ 15, -20, 0}, 0, { 992, 992}, {0xff, 0xff, 0xff, 0xff}}}, 118 {{{ 15, 12, 0}, 0, { 992, 0}, {0xff, 0xff, 0xff, 0xff}}}, 119 {{{ -16, 12, 0}, 0, { 0, 0}, {0xff, 0xff, 0xff, 0xff}}}, 120 #else 121 {{{ -16, -16, 0}, 0, { 0, 992}, {0xff, 0xff, 0xff, 0xff}}}, 122 {{{ 15, -16, 0}, 0, { 992, 992}, {0xff, 0xff, 0xff, 0xff}}}, 123 {{{ 15, 16, 0}, 0, { 992, 0}, {0xff, 0xff, 0xff, 0xff}}}, 124 {{{ -16, 16, 0}, 0, { 0, 0}, {0xff, 0xff, 0xff, 0xff}}}, 125 #endif 126 }; 127 128 // 0x03029570 - 0x030295A0 129 const Gfx dl_power_meter_health_segments_begin[] = { 130 gsDPPipeSync(), 131 gsSPVertex(vertex_power_meter_health_segments, 4, 0), 132 gsDPTileSync(), 133 gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 8, 0, G_TX_RENDERTILE, 0, G_TX_CLAMP, 5, G_TX_NOLOD, G_TX_CLAMP, 5, G_TX_NOLOD), 134 gsDPSetTileSize(0, 0, 0, (32 - 1) << G_TEXTURE_IMAGE_FRAC, (32 - 1) << G_TEXTURE_IMAGE_FRAC), 135 gsSPEndDisplayList(), 136 }; 137 138 // 0x030295A0 - 0x030295D8 139 const Gfx dl_power_meter_health_segments_end[] = { 140 gsDPPipeSync(), 141 gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF), 142 gsSPSetGeometryMode(G_LIGHTING), 143 gsDPSetRenderMode(G_RM_OPA_SURF, G_RM_OPA_SURF2), 144 gsDPSetCombineMode(G_CC_SHADE, G_CC_SHADE), 145 gsDPSetTextureFilter(G_TF_BILERP), 146 gsSPEndDisplayList(), 147 };