Merge branch 'master' of https://github.com/Reonu/HackerSM64
No files matched your search
@@ -71,6 +71,7 @@ build/*
|
||||
!/assets/**/*custom*.bin
|
||||
!/assets/**/*custom*/**/*.bin
|
||||
!/textures/crash_custom/*.png
|
||||
!/actors/breath_meter/breath_meter_*.png
|
||||
# libultra
|
||||
|
||||
!/lib/*.a
|
||||
|
||||
@@ -66,7 +66,7 @@ KING_BOBOMB_DIRS := king_bobomb water_bubble
|
||||
BOO_DIRS := bookend book chair small_key mad_piano boo haunted_cage
|
||||
MR_I_DIRS := mr_i_eyeball mr_i_iris swoop snufit dorrie scuttlebug
|
||||
HOOT_DIRS := yellow_sphere_small hoot yoshi_egg thwomp bullet_bill heave_ho
|
||||
COINS_DIRS := mist explosion butterfly coin warp_pipe door bowser_key flame blue_fish pebble leaves warp_collision mario_cap power_meter mushroom_1up star sand dirt transparent_star white_particle wooden_signpost tree
|
||||
COINS_DIRS := mist explosion butterfly coin warp_pipe door bowser_key flame blue_fish pebble leaves warp_collision mario_cap breath_meter power_meter mushroom_1up star sand dirt transparent_star white_particle wooden_signpost tree
|
||||
BUBBA_DIRS := bubba wiggler wiggler_body_part lakitu_enemy spiny_egg spiny
|
||||
SKEETER_DIRS := skeeter seaweed water_mine cyan_fish bub water_ring treasure_chest
|
||||
KLEPTO_DIRS := klepto eyerok pokey tornado
|
||||
|
||||
|
After Width: | Height: | Size: 8.6 KiB |
|
After Width: | Height: | Size: 8.7 KiB |
|
After Width: | Height: | Size: 8.8 KiB |
|
After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 8.2 KiB |
|
After Width: | Height: | Size: 9.3 KiB |
|
After Width: | Height: | Size: 8.9 KiB |
|
After Width: | Height: | Size: 8.7 KiB |
|
After Width: | Height: | Size: 8.4 KiB |
|
After Width: | Height: | Size: 8.3 KiB |
@@ -0,0 +1,130 @@
|
||||
#ifdef BREATH_METER
|
||||
// Breath Meter HUD
|
||||
|
||||
// 0x030233E0
|
||||
ALIGNED8 static const Texture texture_breath_meter_left_side[] = {
|
||||
#include "actors/breath_meter/breath_meter_left_side.rgba16.inc.c"
|
||||
};
|
||||
|
||||
// 0x030243E0
|
||||
ALIGNED8 static const Texture texture_breath_meter_right_side[] = {
|
||||
#include "actors/breath_meter/breath_meter_right_side.rgba16.inc.c"
|
||||
};
|
||||
|
||||
// 0x030253E0
|
||||
ALIGNED8 static const Texture texture_breath_meter_full[] = {
|
||||
#include "actors/breath_meter/breath_meter_full.rgba16.inc.c"
|
||||
};
|
||||
|
||||
// 0x03025BE0
|
||||
ALIGNED8 static const Texture texture_breath_meter_seven_segments[] = {
|
||||
#include "actors/breath_meter/breath_meter_seven_segments.rgba16.inc.c"
|
||||
};
|
||||
|
||||
// 0x030263E0
|
||||
ALIGNED8 static const Texture texture_breath_meter_six_segments[] = {
|
||||
#include "actors/breath_meter/breath_meter_six_segments.rgba16.inc.c"
|
||||
};
|
||||
|
||||
// 0x03026BE0
|
||||
ALIGNED8 static const Texture texture_breath_meter_five_segments[] = {
|
||||
#include "actors/breath_meter/breath_meter_five_segments.rgba16.inc.c"
|
||||
};
|
||||
|
||||
// 0x030273E0
|
||||
ALIGNED8 static const Texture texture_breath_meter_four_segments[] = {
|
||||
#include "actors/breath_meter/breath_meter_four_segments.rgba16.inc.c"
|
||||
};
|
||||
|
||||
// 0x03027BE0
|
||||
ALIGNED8 static const Texture texture_breath_meter_three_segments[] = {
|
||||
#include "actors/breath_meter/breath_meter_three_segments.rgba16.inc.c"
|
||||
};
|
||||
|
||||
// 0x030283E0
|
||||
ALIGNED8 static const Texture texture_breath_meter_two_segments[] = {
|
||||
#include "actors/breath_meter/breath_meter_two_segments.rgba16.inc.c"
|
||||
};
|
||||
|
||||
// 0x03028BE0
|
||||
ALIGNED8 static const Texture texture_breath_meter_one_segments[] = {
|
||||
#include "actors/breath_meter/breath_meter_one_segment.rgba16.inc.c"
|
||||
};
|
||||
|
||||
// 0x030293E0
|
||||
const Texture *const breath_meter_segments_lut[] = {
|
||||
texture_breath_meter_one_segments,
|
||||
texture_breath_meter_two_segments,
|
||||
texture_breath_meter_three_segments,
|
||||
texture_breath_meter_four_segments,
|
||||
texture_breath_meter_five_segments,
|
||||
texture_breath_meter_six_segments,
|
||||
texture_breath_meter_seven_segments,
|
||||
texture_breath_meter_full,
|
||||
};
|
||||
|
||||
// 0x03029400
|
||||
static const Vtx vertex_breath_meter_base[] = {
|
||||
{{{ -32, -32, 0}, 0, { 0, 2016}, {0xff, 0xff, 0xff, 0xff}}},
|
||||
{{{ 0, -32, 0}, 0, { 992, 2016}, {0xff, 0xff, 0xff, 0xff}}},
|
||||
{{{ 0, 32, 0}, 0, { 992, 0}, {0xff, 0xff, 0xff, 0xff}}},
|
||||
{{{ -32, 32, 0}, 0, { 0, 0}, {0xff, 0xff, 0xff, 0xff}}},
|
||||
{{{ 0, -32, 0}, 0, { 1, 2016}, {0xff, 0xff, 0xff, 0xff}}},
|
||||
{{{ 32, -32, 0}, 0, { 1024, 2016}, {0xff, 0xff, 0xff, 0xff}}},
|
||||
{{{ 32, 32, 0}, 0, { 1024, 0}, {0xff, 0xff, 0xff, 0xff}}},
|
||||
{{{ 0, 32, 0}, 0, { 1, 0}, {0xff, 0xff, 0xff, 0xff}}},
|
||||
};
|
||||
|
||||
// 0x03029480 - 0x03029530
|
||||
const Gfx dl_breath_meter_base[] = {
|
||||
gsDPPipeSync(),
|
||||
gsSPClearGeometryMode(G_LIGHTING),
|
||||
gsDPSetCombineMode(G_CC_DECALRGBA, G_CC_DECALRGBA),
|
||||
gsDPSetRenderMode(G_RM_TEX_EDGE, G_RM_TEX_EDGE2),
|
||||
gsDPSetTextureFilter(G_TF_POINT),
|
||||
gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON),
|
||||
gsSPVertex(vertex_breath_meter_base, 8, 0),
|
||||
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),
|
||||
gsDPTileSync(),
|
||||
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),
|
||||
gsDPSetTileSize(0, 0, 0, ((32 - 1) << G_TEXTURE_IMAGE_FRAC), ((64 - 1) << G_TEXTURE_IMAGE_FRAC)),
|
||||
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, texture_breath_meter_left_side),
|
||||
gsDPLoadSync(),
|
||||
gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 32 * 64 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)),
|
||||
gsSP2Triangles( 0, 1, 2, 0x0, 0, 2, 3, 0x0),
|
||||
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, texture_breath_meter_right_side),
|
||||
gsDPLoadSync(),
|
||||
gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 32 * 64 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)),
|
||||
gsSP2Triangles( 4, 5, 6, 0x0, 4, 6, 7, 0x0),
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
||||
// 0x03029530
|
||||
static const Vtx vertex_breath_meter_health_segments[] = {
|
||||
{{{ -16, -16, 0}, 0, { 0, 992}, {0xff, 0xff, 0xff, 0xff}}},
|
||||
{{{ 16, -16, 0}, 0, { 992, 992}, {0xff, 0xff, 0xff, 0xff}}},
|
||||
{{{ 16, 16, 0}, 0, { 992, 0}, {0xff, 0xff, 0xff, 0xff}}},
|
||||
{{{ -16, 16, 0}, 0, { 0, 0}, {0xff, 0xff, 0xff, 0xff}}},
|
||||
};
|
||||
|
||||
// 0x03029570 - 0x030295A0
|
||||
const Gfx dl_breath_meter_health_segments_begin[] = {
|
||||
gsDPPipeSync(),
|
||||
gsSPVertex(vertex_breath_meter_health_segments, 4, 0),
|
||||
gsDPTileSync(),
|
||||
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),
|
||||
gsDPSetTileSize(0, 0, 0, ((32 - 1) << G_TEXTURE_IMAGE_FRAC), ((32 - 1) << G_TEXTURE_IMAGE_FRAC)),
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
||||
// 0x030295A0 - 0x030295D8
|
||||
const Gfx dl_breath_meter_health_segments_end[] = {
|
||||
gsDPPipeSync(),
|
||||
gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF),
|
||||
gsSPSetGeometryMode(G_LIGHTING),
|
||||
gsDPSetRenderMode(G_RM_OPA_SURF, G_RM_OPA_SURF2),
|
||||
gsDPSetCombineMode(G_CC_SHADE, G_CC_SHADE),
|
||||
gsDPSetTextureFilter(G_TF_BILERP),
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
#endif
|
||||
@@ -56,6 +56,9 @@ UNUSED static const u64 binid_11 = 11;
|
||||
UNUSED static const u64 binid_12 = 12;
|
||||
|
||||
#include "power_meter/model.inc.c"
|
||||
#ifdef BREATH_METER
|
||||
#include "breath_meter/model.inc.c"
|
||||
#endif
|
||||
UNUSED static const u64 binid_13 = 13;
|
||||
|
||||
UNUSED static const u64 binid_14 = 14;
|
||||
|
||||
@@ -195,6 +195,14 @@ extern const Gfx dl_power_meter_base[];
|
||||
extern const Gfx dl_power_meter_health_segments_begin[];
|
||||
extern const Gfx dl_power_meter_health_segments_end[];
|
||||
|
||||
#ifdef BREATH_METER
|
||||
// breath_meter
|
||||
extern const Texture *const breath_meter_segments_lut[];
|
||||
extern const Gfx dl_breath_meter_base[];
|
||||
extern const Gfx dl_breath_meter_health_segments_begin[];
|
||||
extern const Gfx dl_breath_meter_health_segments_end[];
|
||||
#endif
|
||||
|
||||
// sand
|
||||
extern const Gfx sand_seg3_dl_0302BCD0[];
|
||||
|
||||
|
||||
@@ -66,277 +66,3 @@ static const struct Animation spindrift_seg5_anim_050006AC = {
|
||||
spindrift_seg5_animindex_050005F8,
|
||||
0,
|
||||
};
|
||||
|
||||
// 0x050006D0
|
||||
ALIGNED8 static const Texture spindrift_seg5_texture_050006D0[] = {
|
||||
#include "actors/spindrift/spindrift_face.rgba16.inc.c"
|
||||
};
|
||||
|
||||
// 0x05000ED0
|
||||
ALIGNED8 static const Texture spindrift_seg5_texture_05000ED0[] = {
|
||||
#include "actors/spindrift/spindrift_petal.rgba16.inc.c"
|
||||
};
|
||||
|
||||
// 0x050016D0
|
||||
ALIGNED8 static const Texture spindrift_seg5_texture_050016D0[] = {
|
||||
#include "actors/spindrift/spindrift_leaf.rgba16.inc.c"
|
||||
};
|
||||
|
||||
// 0x05001ED0
|
||||
ALIGNED8 static const Texture spindrift_seg5_texture_05001ED0[] = {
|
||||
#include "actors/spindrift/spindrift_head.rgba16.inc.c"
|
||||
};
|
||||
|
||||
// 0x050026D0
|
||||
static const Vtx spindrift_seg5_vertex_050026D0[] = {
|
||||
{{{ -54, -54, 0}, 0, { 0, 990}, {0xff, 0xff, 0xff, 0xff}}},
|
||||
{{{ 56, 56, 0}, 0, { 990, 0}, {0xff, 0xff, 0xff, 0xff}}},
|
||||
{{{ -54, 56, 0}, 0, { 0, 0}, {0xff, 0xff, 0xff, 0xff}}},
|
||||
{{{ 56, -54, 0}, 0, { 990, 990}, {0xff, 0xff, 0xff, 0xff}}},
|
||||
};
|
||||
|
||||
// 0x05002710 - 0x05002748
|
||||
const Gfx spindrift_seg5_dl_05002710[] = {
|
||||
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, spindrift_seg5_texture_05001ED0),
|
||||
gsDPLoadSync(),
|
||||
gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 32 * 32 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)),
|
||||
gsSPVertex(spindrift_seg5_vertex_050026D0, 4, 0),
|
||||
gsSP2Triangles( 0, 1, 2, 0x0, 0, 3, 1, 0x0),
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
||||
// 0x05002748 - 0x050027B8
|
||||
const Gfx spindrift_seg5_dl_05002748[] = {
|
||||
gsDPPipeSync(),
|
||||
gsDPSetCombineMode(G_CC_DECALRGBA, G_CC_DECALRGBA),
|
||||
gsSPClearGeometryMode(G_LIGHTING),
|
||||
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),
|
||||
gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON),
|
||||
gsDPTileSync(),
|
||||
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),
|
||||
gsDPSetTileSize(0, 0, 0, (32 - 1) << G_TEXTURE_IMAGE_FRAC, (32 - 1) << G_TEXTURE_IMAGE_FRAC),
|
||||
gsSPDisplayList(spindrift_seg5_dl_05002710),
|
||||
gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF),
|
||||
gsDPPipeSync(),
|
||||
gsDPSetCombineMode(G_CC_SHADE, G_CC_SHADE),
|
||||
gsSPSetGeometryMode(G_LIGHTING),
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
||||
// 0x050027B8
|
||||
static const Vtx spindrift_seg5_vertex_050027B8[] = {
|
||||
{{{ 27, -112, -47}, 0, { -36, 520}, {0xff, 0xff, 0xff, 0xff}}},
|
||||
{{{ 27, -112, 48}, 0, { 990, 520}, {0xff, 0xff, 0xff, 0xff}}},
|
||||
{{{ -32, -112, -47}, 0, { -36, 0}, {0xff, 0xff, 0xff, 0xff}}},
|
||||
{{{ -32, -112, 48}, 0, { 990, 0}, {0xff, 0xff, 0xff, 0xff}}},
|
||||
};
|
||||
|
||||
// 0x050027F8 - 0x05002830
|
||||
const Gfx spindrift_seg5_dl_050027F8[] = {
|
||||
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, spindrift_seg5_texture_050006D0),
|
||||
gsDPLoadSync(),
|
||||
gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 32 * 32 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)),
|
||||
gsSPVertex(spindrift_seg5_vertex_050027B8, 4, 0),
|
||||
gsSP2Triangles( 0, 1, 2, 0x0, 2, 1, 3, 0x0),
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
||||
// 0x05002830 - 0x050028A0
|
||||
const Gfx spindrift_seg5_dl_05002830[] = {
|
||||
gsDPPipeSync(),
|
||||
gsDPSetCombineMode(G_CC_DECALRGBA, G_CC_DECALRGBA),
|
||||
gsSPClearGeometryMode(G_LIGHTING),
|
||||
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),
|
||||
gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON),
|
||||
gsDPTileSync(),
|
||||
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),
|
||||
gsDPSetTileSize(0, 0, 0, (32 - 1) << G_TEXTURE_IMAGE_FRAC, (32 - 1) << G_TEXTURE_IMAGE_FRAC),
|
||||
gsSPDisplayList(spindrift_seg5_dl_050027F8),
|
||||
gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF),
|
||||
gsDPPipeSync(),
|
||||
gsDPSetCombineMode(G_CC_SHADE, G_CC_SHADE),
|
||||
gsSPSetGeometryMode(G_LIGHTING),
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
||||
// 0x050028A0
|
||||
static const Vtx spindrift_seg5_vertex_050028A0[] = {
|
||||
{{{ 36, -109, -44}, 0, { -30, 572}, {0xff, 0xff, 0xff, 0xff}}},
|
||||
{{{ 83, -79, 0}, 0, { 480, 1092}, {0xff, 0xff, 0xff, 0xff}}},
|
||||
{{{ 36, -109, 45}, 0, { 990, 572}, {0xff, 0xff, 0xff, 0xff}}},
|
||||
};
|
||||
|
||||
// 0x050028D0 - 0x05002900
|
||||
const Gfx spindrift_seg5_dl_050028D0[] = {
|
||||
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, spindrift_seg5_texture_050006D0),
|
||||
gsDPLoadSync(),
|
||||
gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 32 * 32 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)),
|
||||
gsSPVertex(spindrift_seg5_vertex_050028A0, 3, 0),
|
||||
gsSP1Triangle( 0, 1, 2, 0x0),
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
||||
// 0x05002900 - 0x05002970
|
||||
const Gfx spindrift_seg5_dl_05002900[] = {
|
||||
gsDPPipeSync(),
|
||||
gsDPSetCombineMode(G_CC_DECALRGBA, G_CC_DECALRGBA),
|
||||
gsSPClearGeometryMode(G_LIGHTING),
|
||||
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),
|
||||
gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON),
|
||||
gsDPTileSync(),
|
||||
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),
|
||||
gsDPSetTileSize(0, 0, 0, (32 - 1) << G_TEXTURE_IMAGE_FRAC, (32 - 1) << G_TEXTURE_IMAGE_FRAC),
|
||||
gsSPDisplayList(spindrift_seg5_dl_050028D0),
|
||||
gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF),
|
||||
gsDPPipeSync(),
|
||||
gsDPSetCombineMode(G_CC_SHADE, G_CC_SHADE),
|
||||
gsSPSetGeometryMode(G_LIGHTING),
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
||||
// 0x05002970
|
||||
static const Lights1 spindrift_seg5_lights_05002970 = gdSPDefLights1(
|
||||
0x7f, 0x7f, 0x7f,
|
||||
0xff, 0xff, 0xff, 0x28, 0x28, 0x28
|
||||
);
|
||||
|
||||
// 0x05002988
|
||||
static const Vtx spindrift_seg5_vertex_05002988[] = {
|
||||
{{{ 19, 22, 102}, 0, { 196, 1200}, {0x90, 0x25, 0x2e, 0xff}}},
|
||||
{{{ 13, -6, 4}, 0, { 1032, 456}, {0x92, 0x3e, 0xf5, 0xff}}},
|
||||
{{{ -20, -53, 69}, 0, { 250, -194}, {0x90, 0x25, 0x2e, 0xff}}},
|
||||
{{{ 34, -56, 120}, 0, { -62, 330}, {0xa9, 0x04, 0x5c, 0xff}}},
|
||||
};
|
||||
|
||||
// 0x050029C8 - 0x05002A20
|
||||
const Gfx spindrift_seg5_dl_050029C8[] = {
|
||||
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, spindrift_seg5_texture_050016D0),
|
||||
gsDPLoadSync(),
|
||||
gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 32 * 32 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)),
|
||||
gsSPClearGeometryMode(G_CULL_BACK),
|
||||
gsSPLight(&spindrift_seg5_lights_05002970.l, 1),
|
||||
gsSPLight(&spindrift_seg5_lights_05002970.a, 2),
|
||||
gsSPVertex(spindrift_seg5_vertex_05002988, 4, 0),
|
||||
gsSP2Triangles( 0, 1, 2, 0x0, 0, 2, 3, 0x0),
|
||||
gsSPSetGeometryMode(G_CULL_BACK),
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
||||
// 0x05002A20 - 0x05002A80
|
||||
const Gfx spindrift_seg5_dl_05002A20[] = {
|
||||
gsDPPipeSync(),
|
||||
gsDPSetCombineMode(G_CC_MODULATERGBA, G_CC_MODULATERGBA),
|
||||
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),
|
||||
gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON),
|
||||
gsDPTileSync(),
|
||||
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),
|
||||
gsDPSetTileSize(0, 0, 0, (32 - 1) << G_TEXTURE_IMAGE_FRAC, (32 - 1) << G_TEXTURE_IMAGE_FRAC),
|
||||
gsSPDisplayList(spindrift_seg5_dl_050029C8),
|
||||
gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF),
|
||||
gsDPPipeSync(),
|
||||
gsDPSetCombineMode(G_CC_SHADE, G_CC_SHADE),
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
||||
// 0x05002A80
|
||||
static const Lights1 spindrift_seg5_lights_05002A80 = gdSPDefLights1(
|
||||
0x7f, 0x7f, 0x7f,
|
||||
0xff, 0xff, 0xff, 0x28, 0x28, 0x28
|
||||
);
|
||||
|
||||
// 0x05002A98
|
||||
static const Vtx spindrift_seg5_vertex_05002A98[] = {
|
||||
{{{ 0, -33, -69}, 0, { 514, 1102}, {0xa0, 0x40, 0xcd, 0xff}}},
|
||||
{{{ 13, -2, 0}, 0, { 1070, 398}, {0x9c, 0x4c, 0xf1, 0xff}}},
|
||||
{{{ 53, 33, -86}, 0, { 138, -146}, {0xa0, 0x40, 0xcd, 0xff}}},
|
||||
{{{ 62, -15, -122}, 0, { -146, 482}, {0xac, 0x2e, 0xae, 0xff}}},
|
||||
};
|
||||
|
||||
// 0x05002AD8 - 0x05002B30
|
||||
const Gfx spindrift_seg5_dl_05002AD8[] = {
|
||||
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, spindrift_seg5_texture_050016D0),
|
||||
gsDPLoadSync(),
|
||||
gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 32 * 32 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)),
|
||||
gsSPClearGeometryMode(G_CULL_BACK),
|
||||
gsSPLight(&spindrift_seg5_lights_05002A80.l, 1),
|
||||
gsSPLight(&spindrift_seg5_lights_05002A80.a, 2),
|
||||
gsSPVertex(spindrift_seg5_vertex_05002A98, 4, 0),
|
||||
gsSP2Triangles( 0, 1, 2, 0x0, 3, 0, 2, 0x0),
|
||||
gsSPSetGeometryMode(G_CULL_BACK),
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
||||
// 0x05002B30 - 0x05002B90
|
||||
const Gfx spindrift_seg5_dl_05002B30[] = {
|
||||
gsDPPipeSync(),
|
||||
gsDPSetCombineMode(G_CC_MODULATERGBA, G_CC_MODULATERGBA),
|
||||
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),
|
||||
gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON),
|
||||
gsDPTileSync(),
|
||||
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),
|
||||
gsDPSetTileSize(0, 0, 0, (32 - 1) << G_TEXTURE_IMAGE_FRAC, (32 - 1) << G_TEXTURE_IMAGE_FRAC),
|
||||
gsSPDisplayList(spindrift_seg5_dl_05002AD8),
|
||||
gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF),
|
||||
gsDPPipeSync(),
|
||||
gsDPSetCombineMode(G_CC_SHADE, G_CC_SHADE),
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
||||
// 0x05002B90
|
||||
static const Lights1 spindrift_seg5_lights_05002B90 = gdSPDefLights1(
|
||||
0x7f, 0x7f, 0x7f,
|
||||
0xff, 0xff, 0xff, 0x28, 0x28, 0x28
|
||||
);
|
||||
|
||||
// 0x05002BA8
|
||||
static const Vtx spindrift_seg5_vertex_05002BA8[] = {
|
||||
{{{ 28, -6, 21}, 0, { 474, 1104}, {0x7e, 0xfd, 0x0b, 0xff}}},
|
||||
{{{ 42, -20, -134}, 0, { -192, 0}, {0x7e, 0xfd, 0x0b, 0xff}}},
|
||||
{{{ 42, 98, -96}, 0, { 1152, 0}, {0x7e, 0xfd, 0x0b, 0xff}}},
|
||||
{{{ 28, -21, 0}, 0, { 474, 1104}, {0x7e, 0xf4, 0x00, 0xff}}},
|
||||
{{{ 42, 122, -61}, 0, { -192, 0}, {0x7e, 0xf4, 0x00, 0xff}}},
|
||||
{{{ 42, 122, 63}, 0, { 1152, 0}, {0x7e, 0xf4, 0x00, 0xff}}},
|
||||
{{{ 28, -6, -20}, 0, { 474, 1104}, {0x7e, 0xfd, 0xf5, 0xff}}},
|
||||
{{{ 42, 97, 97}, 0, { -192, 0}, {0x7e, 0xfd, 0xf5, 0xff}}},
|
||||
{{{ 42, -21, 135}, 0, { 1152, 0}, {0x7e, 0xfd, 0xf5, 0xff}}},
|
||||
{{{ 28, 18, -12}, 0, { 474, 1104}, {0x7e, 0x09, 0xf9, 0xff}}},
|
||||
{{{ 42, -61, 122}, 0, { -192, 0}, {0x7e, 0x09, 0xf9, 0xff}}},
|
||||
{{{ 42, -135, 21}, 0, { 1152, 0}, {0x7e, 0x09, 0xf9, 0xff}}},
|
||||
{{{ 28, 18, 13}, 0, { 474, 1104}, {0x7e, 0x0a, 0x07, 0xff}}},
|
||||
{{{ 42, -134, -21}, 0, { -192, 0}, {0x7e, 0x0a, 0x07, 0xff}}},
|
||||
{{{ 42, -61, -122}, 0, { 1152, 0}, {0x7e, 0x0a, 0x07, 0xff}}},
|
||||
};
|
||||
|
||||
// 0x05002C98 - 0x05002D08
|
||||
const Gfx spindrift_seg5_dl_05002C98[] = {
|
||||
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, spindrift_seg5_texture_05000ED0),
|
||||
gsDPLoadSync(),
|
||||
gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 32 * 32 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)),
|
||||
gsSPClearGeometryMode(G_CULL_BACK),
|
||||
gsSPLight(&spindrift_seg5_lights_05002B90.l, 1),
|
||||
gsSPLight(&spindrift_seg5_lights_05002B90.a, 2),
|
||||
gsSPVertex(spindrift_seg5_vertex_05002BA8, 15, 0),
|
||||
gsSP2Triangles( 0, 1, 2, 0x0, 3, 4, 5, 0x0),
|
||||
gsSP2Triangles( 6, 7, 8, 0x0, 9, 10, 11, 0x0),
|
||||
gsSP1Triangle(12, 13, 14, 0x0),
|
||||
gsSPSetGeometryMode(G_CULL_BACK),
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
||||
// 0x05002D08 - 0x05002D68
|
||||
const Gfx spindrift_seg5_dl_05002D08[] = {
|
||||
gsDPPipeSync(),
|
||||
gsDPSetCombineMode(G_CC_MODULATERGBA, G_CC_MODULATERGBA),
|
||||
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),
|
||||
gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON),
|
||||
gsDPTileSync(),
|
||||
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),
|
||||
gsDPSetTileSize(0, 0, 0, (32 - 1) << G_TEXTURE_IMAGE_FRAC, (32 - 1) << G_TEXTURE_IMAGE_FRAC),
|
||||
gsSPDisplayList(spindrift_seg5_dl_05002C98),
|
||||
gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF),
|
||||
gsDPPipeSync(),
|
||||
gsDPSetCombineMode(G_CC_SHADE, G_CC_SHADE),
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
||||
// unlike the other anim lists, this one is way after the actual anim entry. why?
|
||||
@@ -1,17 +1,277 @@
|
||||
// Spindrift
|
||||
|
||||
// Unreferenced light group
|
||||
UNUSED static const Lights1 spindrift_lights_unused1 = gdSPDefLights1(
|
||||
0x3f, 0x08, 0x1b,
|
||||
0xff, 0x22, 0x6d, 0x28, 0x28, 0x28
|
||||
// 0x050006D0
|
||||
ALIGNED8 static const Texture spindrift_seg5_texture_050006D0[] = {
|
||||
#include "actors/spindrift/spindrift_face.rgba16.inc.c"
|
||||
};
|
||||
|
||||
// 0x05000ED0
|
||||
ALIGNED8 static const Texture spindrift_seg5_texture_05000ED0[] = {
|
||||
#include "actors/spindrift/spindrift_petal.rgba16.inc.c"
|
||||
};
|
||||
|
||||
// 0x050016D0
|
||||
ALIGNED8 static const Texture spindrift_seg5_texture_050016D0[] = {
|
||||
#include "actors/spindrift/spindrift_leaf.rgba16.inc.c"
|
||||
};
|
||||
|
||||
// 0x05001ED0
|
||||
ALIGNED8 static const Texture spindrift_seg5_texture_05001ED0[] = {
|
||||
#include "actors/spindrift/spindrift_head.rgba16.inc.c"
|
||||
};
|
||||
|
||||
// 0x050026D0
|
||||
static const Vtx spindrift_seg5_vertex_050026D0[] = {
|
||||
{{{ -54, -54, 0}, 0, { 0, 990}, {0xff, 0xff, 0xff, 0xff}}},
|
||||
{{{ 56, 56, 0}, 0, { 990, 0}, {0xff, 0xff, 0xff, 0xff}}},
|
||||
{{{ -54, 56, 0}, 0, { 0, 0}, {0xff, 0xff, 0xff, 0xff}}},
|
||||
{{{ 56, -54, 0}, 0, { 990, 990}, {0xff, 0xff, 0xff, 0xff}}},
|
||||
};
|
||||
|
||||
// 0x05002710 - 0x05002748
|
||||
const Gfx spindrift_seg5_dl_05002710[] = {
|
||||
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, spindrift_seg5_texture_05001ED0),
|
||||
gsDPLoadSync(),
|
||||
gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 32 * 32 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)),
|
||||
gsSPVertex(spindrift_seg5_vertex_050026D0, 4, 0),
|
||||
gsSP2Triangles( 0, 1, 2, 0x0, 0, 3, 1, 0x0),
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
||||
// 0x05002748 - 0x050027B8
|
||||
const Gfx spindrift_seg5_dl_05002748[] = {
|
||||
gsDPPipeSync(),
|
||||
gsDPSetCombineMode(G_CC_DECALRGBA, G_CC_DECALRGBA),
|
||||
gsSPClearGeometryMode(G_LIGHTING),
|
||||
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),
|
||||
gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON),
|
||||
gsDPTileSync(),
|
||||
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),
|
||||
gsDPSetTileSize(0, 0, 0, (32 - 1) << G_TEXTURE_IMAGE_FRAC, (32 - 1) << G_TEXTURE_IMAGE_FRAC),
|
||||
gsSPDisplayList(spindrift_seg5_dl_05002710),
|
||||
gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF),
|
||||
gsDPPipeSync(),
|
||||
gsDPSetCombineMode(G_CC_SHADE, G_CC_SHADE),
|
||||
gsSPSetGeometryMode(G_LIGHTING),
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
||||
// 0x050027B8
|
||||
static const Vtx spindrift_seg5_vertex_050027B8[] = {
|
||||
{{{ 27, -112, -47}, 0, { -36, 520}, {0xff, 0xff, 0xff, 0xff}}},
|
||||
{{{ 27, -112, 48}, 0, { 990, 520}, {0xff, 0xff, 0xff, 0xff}}},
|
||||
{{{ -32, -112, -47}, 0, { -36, 0}, {0xff, 0xff, 0xff, 0xff}}},
|
||||
{{{ -32, -112, 48}, 0, { 990, 0}, {0xff, 0xff, 0xff, 0xff}}},
|
||||
};
|
||||
|
||||
// 0x050027F8 - 0x05002830
|
||||
const Gfx spindrift_seg5_dl_050027F8[] = {
|
||||
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, spindrift_seg5_texture_050006D0),
|
||||
gsDPLoadSync(),
|
||||
gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 32 * 32 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)),
|
||||
gsSPVertex(spindrift_seg5_vertex_050027B8, 4, 0),
|
||||
gsSP2Triangles( 0, 1, 2, 0x0, 2, 1, 3, 0x0),
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
||||
// 0x05002830 - 0x050028A0
|
||||
const Gfx spindrift_seg5_dl_05002830[] = {
|
||||
gsDPPipeSync(),
|
||||
gsDPSetCombineMode(G_CC_DECALRGBA, G_CC_DECALRGBA),
|
||||
gsSPClearGeometryMode(G_LIGHTING),
|
||||
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),
|
||||
gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON),
|
||||
gsDPTileSync(),
|
||||
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),
|
||||
gsDPSetTileSize(0, 0, 0, (32 - 1) << G_TEXTURE_IMAGE_FRAC, (32 - 1) << G_TEXTURE_IMAGE_FRAC),
|
||||
gsSPDisplayList(spindrift_seg5_dl_050027F8),
|
||||
gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF),
|
||||
gsDPPipeSync(),
|
||||
gsDPSetCombineMode(G_CC_SHADE, G_CC_SHADE),
|
||||
gsSPSetGeometryMode(G_LIGHTING),
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
||||
// 0x050028A0
|
||||
static const Vtx spindrift_seg5_vertex_050028A0[] = {
|
||||
{{{ 36, -109, -44}, 0, { -30, 572}, {0xff, 0xff, 0xff, 0xff}}},
|
||||
{{{ 83, -79, 0}, 0, { 480, 1092}, {0xff, 0xff, 0xff, 0xff}}},
|
||||
{{{ 36, -109, 45}, 0, { 990, 572}, {0xff, 0xff, 0xff, 0xff}}},
|
||||
};
|
||||
|
||||
// 0x050028D0 - 0x05002900
|
||||
const Gfx spindrift_seg5_dl_050028D0[] = {
|
||||
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, spindrift_seg5_texture_050006D0),
|
||||
gsDPLoadSync(),
|
||||
gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 32 * 32 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)),
|
||||
gsSPVertex(spindrift_seg5_vertex_050028A0, 3, 0),
|
||||
gsSP1Triangle( 0, 1, 2, 0x0),
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
||||
// 0x05002900 - 0x05002970
|
||||
const Gfx spindrift_seg5_dl_05002900[] = {
|
||||
gsDPPipeSync(),
|
||||
gsDPSetCombineMode(G_CC_DECALRGBA, G_CC_DECALRGBA),
|
||||
gsSPClearGeometryMode(G_LIGHTING),
|
||||
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),
|
||||
gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON),
|
||||
gsDPTileSync(),
|
||||
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),
|
||||
gsDPSetTileSize(0, 0, 0, (32 - 1) << G_TEXTURE_IMAGE_FRAC, (32 - 1) << G_TEXTURE_IMAGE_FRAC),
|
||||
gsSPDisplayList(spindrift_seg5_dl_050028D0),
|
||||
gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF),
|
||||
gsDPPipeSync(),
|
||||
gsDPSetCombineMode(G_CC_SHADE, G_CC_SHADE),
|
||||
gsSPSetGeometryMode(G_LIGHTING),
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
||||
// 0x05002970
|
||||
static const Lights1 spindrift_seg5_lights_05002970 = gdSPDefLights1(
|
||||
0x7f, 0x7f, 0x7f,
|
||||
0xff, 0xff, 0xff, 0x28, 0x28, 0x28
|
||||
);
|
||||
|
||||
// Unreferenced light group
|
||||
UNUSED static const Lights1 spindrift_lights_unused2 = gdSPDefLights1(
|
||||
0x3f, 0x3f, 0x3f,
|
||||
0xfd, 0xff, 0xff, 0x28, 0x28, 0x28
|
||||
// 0x05002988
|
||||
static const Vtx spindrift_seg5_vertex_05002988[] = {
|
||||
{{{ 19, 22, 102}, 0, { 196, 1200}, {0x90, 0x25, 0x2e, 0xff}}},
|
||||
{{{ 13, -6, 4}, 0, { 1032, 456}, {0x92, 0x3e, 0xf5, 0xff}}},
|
||||
{{{ -20, -53, 69}, 0, { 250, -194}, {0x90, 0x25, 0x2e, 0xff}}},
|
||||
{{{ 34, -56, 120}, 0, { -62, 330}, {0xa9, 0x04, 0x5c, 0xff}}},
|
||||
};
|
||||
|
||||
// 0x050029C8 - 0x05002A20
|
||||
const Gfx spindrift_seg5_dl_050029C8[] = {
|
||||
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, spindrift_seg5_texture_050016D0),
|
||||
gsDPLoadSync(),
|
||||
gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 32 * 32 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)),
|
||||
gsSPClearGeometryMode(G_CULL_BACK),
|
||||
gsSPLight(&spindrift_seg5_lights_05002970.l, 1),
|
||||
gsSPLight(&spindrift_seg5_lights_05002970.a, 2),
|
||||
gsSPVertex(spindrift_seg5_vertex_05002988, 4, 0),
|
||||
gsSP2Triangles( 0, 1, 2, 0x0, 0, 2, 3, 0x0),
|
||||
gsSPSetGeometryMode(G_CULL_BACK),
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
||||
// 0x05002A20 - 0x05002A80
|
||||
const Gfx spindrift_seg5_dl_05002A20[] = {
|
||||
gsDPPipeSync(),
|
||||
gsDPSetCombineMode(G_CC_MODULATERGBA, G_CC_MODULATERGBA),
|
||||
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),
|
||||
gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON),
|
||||
gsDPTileSync(),
|
||||
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),
|
||||
gsDPSetTileSize(0, 0, 0, (32 - 1) << G_TEXTURE_IMAGE_FRAC, (32 - 1) << G_TEXTURE_IMAGE_FRAC),
|
||||
gsSPDisplayList(spindrift_seg5_dl_050029C8),
|
||||
gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF),
|
||||
gsDPPipeSync(),
|
||||
gsDPSetCombineMode(G_CC_SHADE, G_CC_SHADE),
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
||||
// 0x05002A80
|
||||
static const Lights1 spindrift_seg5_lights_05002A80 = gdSPDefLights1(
|
||||
0x7f, 0x7f, 0x7f,
|
||||
0xff, 0xff, 0xff, 0x28, 0x28, 0x28
|
||||
);
|
||||
|
||||
// 0x05002A98
|
||||
static const Vtx spindrift_seg5_vertex_05002A98[] = {
|
||||
{{{ 0, -33, -69}, 0, { 514, 1102}, {0xa0, 0x40, 0xcd, 0xff}}},
|
||||
{{{ 13, -2, 0}, 0, { 1070, 398}, {0x9c, 0x4c, 0xf1, 0xff}}},
|
||||
{{{ 53, 33, -86}, 0, { 138, -146}, {0xa0, 0x40, 0xcd, 0xff}}},
|
||||
{{{ 62, -15, -122}, 0, { -146, 482}, {0xac, 0x2e, 0xae, 0xff}}},
|
||||
};
|
||||
|
||||
// 0x05002AD8 - 0x05002B30
|
||||
const Gfx spindrift_seg5_dl_05002AD8[] = {
|
||||
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, spindrift_seg5_texture_050016D0),
|
||||
gsDPLoadSync(),
|
||||
gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 32 * 32 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)),
|
||||
gsSPClearGeometryMode(G_CULL_BACK),
|
||||
gsSPLight(&spindrift_seg5_lights_05002A80.l, 1),
|
||||
gsSPLight(&spindrift_seg5_lights_05002A80.a, 2),
|
||||
gsSPVertex(spindrift_seg5_vertex_05002A98, 4, 0),
|
||||
gsSP2Triangles( 0, 1, 2, 0x0, 3, 0, 2, 0x0),
|
||||
gsSPSetGeometryMode(G_CULL_BACK),
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
||||
// 0x05002B30 - 0x05002B90
|
||||
const Gfx spindrift_seg5_dl_05002B30[] = {
|
||||
gsDPPipeSync(),
|
||||
gsDPSetCombineMode(G_CC_MODULATERGBA, G_CC_MODULATERGBA),
|
||||
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),
|
||||
gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON),
|
||||
gsDPTileSync(),
|
||||
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),
|
||||
gsDPSetTileSize(0, 0, 0, (32 - 1) << G_TEXTURE_IMAGE_FRAC, (32 - 1) << G_TEXTURE_IMAGE_FRAC),
|
||||
gsSPDisplayList(spindrift_seg5_dl_05002AD8),
|
||||
gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF),
|
||||
gsDPPipeSync(),
|
||||
gsDPSetCombineMode(G_CC_SHADE, G_CC_SHADE),
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
||||
// 0x05002B90
|
||||
static const Lights1 spindrift_seg5_lights_05002B90 = gdSPDefLights1(
|
||||
0x7f, 0x7f, 0x7f,
|
||||
0xff, 0xff, 0xff, 0x28, 0x28, 0x28
|
||||
);
|
||||
|
||||
// 0x05002BA8
|
||||
static const Vtx spindrift_seg5_vertex_05002BA8[] = {
|
||||
{{{ 28, -6, 21}, 0, { 474, 1104}, {0x7e, 0xfd, 0x0b, 0xff}}},
|
||||
{{{ 42, -20, -134}, 0, { -192, 0}, {0x7e, 0xfd, 0x0b, 0xff}}},
|
||||
{{{ 42, 98, -96}, 0, { 1152, 0}, {0x7e, 0xfd, 0x0b, 0xff}}},
|
||||
{{{ 28, -21, 0}, 0, { 474, 1104}, {0x7e, 0xf4, 0x00, 0xff}}},
|
||||
{{{ 42, 122, -61}, 0, { -192, 0}, {0x7e, 0xf4, 0x00, 0xff}}},
|
||||
{{{ 42, 122, 63}, 0, { 1152, 0}, {0x7e, 0xf4, 0x00, 0xff}}},
|
||||
{{{ 28, -6, -20}, 0, { 474, 1104}, {0x7e, 0xfd, 0xf5, 0xff}}},
|
||||
{{{ 42, 97, 97}, 0, { -192, 0}, {0x7e, 0xfd, 0xf5, 0xff}}},
|
||||
{{{ 42, -21, 135}, 0, { 1152, 0}, {0x7e, 0xfd, 0xf5, 0xff}}},
|
||||
{{{ 28, 18, -12}, 0, { 474, 1104}, {0x7e, 0x09, 0xf9, 0xff}}},
|
||||
{{{ 42, -61, 122}, 0, { -192, 0}, {0x7e, 0x09, 0xf9, 0xff}}},
|
||||
{{{ 42, -135, 21}, 0, { 1152, 0}, {0x7e, 0x09, 0xf9, 0xff}}},
|
||||
{{{ 28, 18, 13}, 0, { 474, 1104}, {0x7e, 0x0a, 0x07, 0xff}}},
|
||||
{{{ 42, -134, -21}, 0, { -192, 0}, {0x7e, 0x0a, 0x07, 0xff}}},
|
||||
{{{ 42, -61, -122}, 0, { 1152, 0}, {0x7e, 0x0a, 0x07, 0xff}}},
|
||||
};
|
||||
|
||||
// 0x05002C98 - 0x05002D08
|
||||
const Gfx spindrift_seg5_dl_05002C98[] = {
|
||||
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, spindrift_seg5_texture_05000ED0),
|
||||
gsDPLoadSync(),
|
||||
gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 32 * 32 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)),
|
||||
gsSPClearGeometryMode(G_CULL_BACK),
|
||||
gsSPLight(&spindrift_seg5_lights_05002B90.l, 1),
|
||||
gsSPLight(&spindrift_seg5_lights_05002B90.a, 2),
|
||||
gsSPVertex(spindrift_seg5_vertex_05002BA8, 15, 0),
|
||||
gsSP2Triangles( 0, 1, 2, 0x0, 3, 4, 5, 0x0),
|
||||
gsSP2Triangles( 6, 7, 8, 0x0, 9, 10, 11, 0x0),
|
||||
gsSP1Triangle(12, 13, 14, 0x0),
|
||||
gsSPSetGeometryMode(G_CULL_BACK),
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
||||
// 0x05002D08 - 0x05002D68
|
||||
const Gfx spindrift_seg5_dl_05002D08[] = {
|
||||
gsDPPipeSync(),
|
||||
gsDPSetCombineMode(G_CC_MODULATERGBA, G_CC_MODULATERGBA),
|
||||
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),
|
||||
gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON),
|
||||
gsDPTileSync(),
|
||||
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),
|
||||
gsDPSetTileSize(0, 0, 0, (32 - 1) << G_TEXTURE_IMAGE_FRAC, (32 - 1) << G_TEXTURE_IMAGE_FRAC),
|
||||
gsSPDisplayList(spindrift_seg5_dl_05002C98),
|
||||
gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF),
|
||||
gsDPPipeSync(),
|
||||
gsDPSetCombineMode(G_CC_SHADE, G_CC_SHADE),
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
||||
// 0x05000030
|
||||
static const Lights1 spindrift_seg5_lights_05000030 = gdSPDefLights1(
|
||||
0x12, 0x2c, 0x00,
|
||||
@@ -24,12 +284,6 @@ static const Lights1 spindrift_seg5_lights_05000048 = gdSPDefLights1(
|
||||
0xdd, 0xff, 0x01, 0x28, 0x28, 0x28
|
||||
);
|
||||
|
||||
// Unreferenced light group
|
||||
UNUSED static const Lights1 spindrift_lights_unused3 = gdSPDefLights1(
|
||||
0x00, 0x15, 0x00,
|
||||
0x00, 0x56, 0x00, 0x28, 0x28, 0x28
|
||||
);
|
||||
|
||||
// 0x05000078
|
||||
static const Lights1 spindrift_seg5_lights_05000078 = gdSPDefLights1(
|
||||
0x3f, 0x38, 0x00,
|
||||
@@ -42,12 +296,6 @@ static const Lights1 spindrift_seg5_lights_05000090 = gdSPDefLights1(
|
||||
0x00, 0x3f, 0x00, 0x28, 0x28, 0x28
|
||||
);
|
||||
|
||||
// Unreferenced light group
|
||||
UNUSED static const Lights1 spindrift_lights_unused4 = gdSPDefLights1(
|
||||
0x3f, 0x00, 0x00,
|
||||
0xff, 0x00, 0x00, 0x28, 0x28, 0x28
|
||||
);
|
||||
|
||||
// 0x050000C0
|
||||
static const Vtx spindrift_seg5_vertex_050000C0[] = {
|
||||
{{{ 34, 40, 30}, 0, { 0, 0}, {0x7b, 0x17, 0x11, 0x00}}},
|
||||
|
||||
@@ -28,6 +28,8 @@
|
||||
// -- GAME SETTINGS --
|
||||
// Disable lives and hide the lives counter
|
||||
#define DISABLE_LIVES
|
||||
// Air/Breath meter is separate from health meter when underwater
|
||||
//#define BREATH_METER
|
||||
// Number of coins to spawn the "100 coin" star. If you remove the define altogether, then there won't be a 100 coin star at all.
|
||||
#define X_COIN_STAR 100
|
||||
// Stars don't kick you out of the level
|
||||
@@ -190,6 +192,8 @@
|
||||
// Include Puppyprint, a display library for text and large images. Also includes a custom, enhanced performance profiler.
|
||||
//#define PUPPYPRINT
|
||||
#define PUPPYPRINT_DEBUG 0
|
||||
// Use cycles instead of microseconds
|
||||
//#define PUPPYPRINT_DEBUG_CYCLES
|
||||
// Visual debug enables some collision visuals. Tapping Right on the dpad will cycle between visual hitboxes, visual surfaces, both, and neither.
|
||||
// If puppyprint is enabled, then this can be cycled only while the screen is active.
|
||||
//#define VISUAL_DEBUG
|
||||
|
||||
@@ -377,6 +377,10 @@ struct MarioState
|
||||
/*0xBC*/ f32 peakHeight;
|
||||
/*0xC0*/ f32 quicksandDepth;
|
||||
/*0xC4*/ f32 windGravity;
|
||||
#ifdef BREATH_METER
|
||||
s16 breath;
|
||||
u8 breathCounter;
|
||||
#endif
|
||||
};
|
||||
|
||||
#endif // TYPES_H
|
||||
@@ -1493,7 +1493,11 @@ void audio_reset_session(void) {
|
||||
}
|
||||
#endif
|
||||
#if PUPPYPRINT_DEBUG
|
||||
#ifdef PUPPYPRINT_DEBUG_CYCLES
|
||||
append_puppyprint_log("Audio Initialised in %dc.", (s32)(osGetTime() - first));
|
||||
#else
|
||||
append_puppyprint_log("Audio Initialised in %dus.", (s32)OS_CYCLES_TO_USEC(osGetTime() - first));
|
||||
#endif
|
||||
#endif
|
||||
sAudioFirstBoot = 1;
|
||||
}
|
||||
|
||||
@@ -554,7 +554,6 @@ void vec3f_get_dist_and_angle(Vec3f from, Vec3f to, f32 *dist, s16 *pitch, s16 *
|
||||
register f32 x = to[0] - from[0];
|
||||
register f32 y = to[1] - from[1];
|
||||
register f32 z = to[2] - from[2];
|
||||
|
||||
*dist = sqrtf(sqr(x) + sqr(y) + sqr(z));
|
||||
*pitch = atan2s(sqrtf(sqr(x) + sqr(z)), y);
|
||||
*yaw = atan2s(z, x);
|
||||
@@ -570,6 +569,21 @@ void vec3f_set_dist_and_angle(Vec3f from, Vec3f to, f32 dist, s32 pitch, s32 yaw
|
||||
to[2] = from[2] + dist * coss(pitch) * coss(yaw);
|
||||
}
|
||||
|
||||
s32 approach_s16(s32 current, s32 target, s32 inc, s32 dec) {
|
||||
s16 dist = (target - current);
|
||||
if (dist >= 0) { // target >= current
|
||||
current = ((dist > inc) ? (current + inc) : target);
|
||||
} else { // target < current
|
||||
current = ((dist < -dec) ? (current - dec) : target);
|
||||
}
|
||||
return current;
|
||||
}
|
||||
|
||||
Bool32 approach_s16_bool(s16 *current, s32 target, s32 inc, s32 dec) {
|
||||
*current = approach_s16(*current, target, inc, dec);
|
||||
return !(*current == target);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the value 'current' after it tries to approach target, going up at
|
||||
* most 'inc' and going down at most 'dec'.
|
||||
@@ -584,6 +598,11 @@ s32 approach_s32(s32 current, s32 target, s32 inc, s32 dec) {
|
||||
return current;
|
||||
}
|
||||
|
||||
Bool32 approach_s32_bool(s32 *current, s32 target, s32 inc, s32 dec) {
|
||||
*current = approach_s32(*current, target, inc, dec);
|
||||
return !(*current == target);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the value 'current' after it tries to approach target, going up at
|
||||
* most 'inc' and going down at most 'dec'.
|
||||
@@ -598,6 +617,28 @@ f32 approach_f32(f32 current, f32 target, f32 inc, f32 dec) {
|
||||
return current;
|
||||
}
|
||||
|
||||
Bool32 approach_f32_bool(f32 *current, f32 target, f32 inc, f32 dec) {
|
||||
*current = approach_f32(*current, target, inc, dec);
|
||||
return !(*current == target);
|
||||
}
|
||||
|
||||
s32 approach_f32_signed(f32 *current, f32 target, f32 inc) {
|
||||
s32 reachedTarget = FALSE;
|
||||
*current += inc;
|
||||
if (inc >= 0.0f) {
|
||||
if (*current > target) {
|
||||
*current = target;
|
||||
reachedTarget = TRUE;
|
||||
}
|
||||
} else {
|
||||
if (*current < target) {
|
||||
*current = target;
|
||||
reachedTarget = TRUE;
|
||||
}
|
||||
}
|
||||
return reachedTarget;
|
||||
}
|
||||
|
||||
/**
|
||||
* Similar to approach_s32, but converts to s16 and allows for overflow between 32767 and -32768
|
||||
*/
|
||||
|
||||
@@ -374,8 +374,19 @@ void mtxf_rotate_xy(Mtx *mtx, s32 angle);
|
||||
void get_pos_from_transform_mtx(Vec3f dest, Mat4 objMtx, Mat4 camMtx);
|
||||
void vec3f_get_dist_and_angle(Vec3f from, Vec3f to, f32 *dist, s16 *pitch, s16 *yaw);
|
||||
void vec3f_set_dist_and_angle(Vec3f from, Vec3f to, f32 dist, s32 pitch, s32 yaw);
|
||||
s32 approach_s16(s32 current, s32 target, s32 inc, s32 dec);
|
||||
s32 approach_s32(s32 current, s32 target, s32 inc, s32 dec);
|
||||
f32 approach_f32(f32 current, f32 target, f32 inc, f32 dec);
|
||||
Bool32 approach_s16_bool(s16 *current, s32 target, s32 inc, s32 dec);
|
||||
Bool32 approach_s32_bool(s32 *current, s32 target, s32 inc, s32 dec);
|
||||
Bool32 approach_f32_bool(f32 *current, f32 target, f32 inc, f32 dec);
|
||||
#define approach_s16_symmetric(current, target, inc) approach_s16((current), (target), (inc), (inc))
|
||||
#define approach_s32_symmetric(current, target, inc) approach_s32((current), (target), (inc), (inc))
|
||||
#define approach_f32_symmetric(current, target, inc) approach_f32((current), (target), (inc), (inc))
|
||||
#define approach_s16_symmetric_bool(current, target, inc) approach_s16_bool((current), (target), (inc), (inc))
|
||||
#define approach_s32_symmetric_bool(current, target, inc) approach_s32_bool((current), (target), (inc), (inc))
|
||||
#define approach_f32_symmetric_bool(current, target, inc) approach_f32_bool((current), (target), (inc), (inc))
|
||||
s32 approach_f32_signed(f32 *current, f32 target, f32 inc);
|
||||
s32 approach_angle(s32 current, s32 target, s32 inc);
|
||||
s16 atan2s(f32 y, f32 x);
|
||||
f32 atan2f(f32 a, f32 b);
|
||||
|
||||
@@ -30,7 +30,10 @@ void bhv_recovery_heart_loop(void) {
|
||||
}
|
||||
|
||||
if ((o->oSpinningHeartTotalSpin += o->oAngleVelYaw) >= 0x10000) {
|
||||
gMarioStates[0].healCounter += 4;
|
||||
gMarioState->healCounter += 4;
|
||||
#ifdef BREATH_METER
|
||||
gMarioState->breathCounter += 4;
|
||||
#endif
|
||||
o->oSpinningHeartTotalSpin -= 0x10000;
|
||||
}
|
||||
|
||||
|
||||
@@ -3793,42 +3793,21 @@ s32 collide_with_walls(Vec3f pos, f32 offsetY, f32 radius) {
|
||||
* Compare a vector to a position, return TRUE if they match.
|
||||
*/
|
||||
s32 vec3f_compare(Vec3f pos, f32 posX, f32 posY, f32 posZ) {
|
||||
s32 equal = FALSE;
|
||||
|
||||
if (pos[0] == posX && pos[1] == posY && pos[2] == posZ) {
|
||||
equal = TRUE;
|
||||
}
|
||||
return equal;
|
||||
return (pos[0] == posX && pos[1] == posY && pos[2] == posZ);
|
||||
}
|
||||
|
||||
s32 clamp_pitch(Vec3f from, Vec3f to, s16 maxPitch, s16 minPitch) {
|
||||
s32 outOfRange = 0;
|
||||
s16 pitch;
|
||||
s16 yaw;
|
||||
void clamp_pitch(Vec3f from, Vec3f to, s16 maxPitch, s16 minPitch) {
|
||||
s16 pitch, yaw;
|
||||
f32 dist;
|
||||
|
||||
vec3f_get_dist_and_angle(from, to, &dist, &pitch, &yaw);
|
||||
if (pitch > maxPitch) {
|
||||
pitch = maxPitch;
|
||||
outOfRange++;
|
||||
}
|
||||
if (pitch < minPitch) {
|
||||
pitch = minPitch;
|
||||
outOfRange++;
|
||||
}
|
||||
pitch = CLAMP(pitch, minPitch, maxPitch);
|
||||
vec3f_set_dist_and_angle(from, to, dist, pitch, yaw);
|
||||
return outOfRange;
|
||||
}
|
||||
|
||||
s32 is_within_100_units_of_mario(f32 posX, f32 posY, f32 posZ) {
|
||||
s32 isCloseToMario = 0;
|
||||
Vec3f pos;
|
||||
|
||||
vec3f_set(pos, posX, posY, posZ);
|
||||
if (calc_abs_dist(sMarioCamState->pos, pos) < 100.f) {
|
||||
isCloseToMario = 1;
|
||||
}
|
||||
return isCloseToMario;
|
||||
return (calc_abs_dist(sMarioCamState->pos, pos) < 100.f);
|
||||
}
|
||||
|
||||
s32 set_or_approach_f32_asymptotic(f32 *dst, f32 goal, f32 scale) {
|
||||
@@ -3837,11 +3816,7 @@ s32 set_or_approach_f32_asymptotic(f32 *dst, f32 goal, f32 scale) {
|
||||
} else {
|
||||
*dst = goal;
|
||||
}
|
||||
if (*dst == goal) {
|
||||
return FALSE;
|
||||
} else {
|
||||
return TRUE;
|
||||
}
|
||||
return (*dst != goal);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -3854,11 +3829,7 @@ s32 approach_f32_asymptotic_bool(f32 *current, f32 target, f32 multiplier) {
|
||||
multiplier = 1.f;
|
||||
}
|
||||
*current = *current + (target - *current) * multiplier;
|
||||
if (*current == target) {
|
||||
return FALSE;
|
||||
} else {
|
||||
return TRUE;
|
||||
}
|
||||
return (*current != target);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -3885,11 +3856,7 @@ s32 approach_s16_asymptotic_bool(s16 *current, s16 target, s16 divisor) {
|
||||
temp += target;
|
||||
*current = temp;
|
||||
}
|
||||
if (*current == target) {
|
||||
return FALSE;
|
||||
} else {
|
||||
return TRUE;
|
||||
}
|
||||
return (*current != target);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -696,7 +696,7 @@ void shake_camera_handheld(Vec3f pos, Vec3f focus);
|
||||
s32 find_c_buttons_pressed(u16 currentState, u16 buttonsPressed, u16 buttonsDown);
|
||||
s32 update_camera_hud_status(struct Camera *c);
|
||||
s32 collide_with_walls(Vec3f pos, f32 offsetY, f32 radius);
|
||||
s32 clamp_pitch(Vec3f from, Vec3f to, s16 maxPitch, s16 minPitch);
|
||||
void clamp_pitch(Vec3f from, Vec3f to, s16 maxPitch, s16 minPitch);
|
||||
s32 is_within_100_units_of_mario(f32 posX, f32 posY, f32 posZ);
|
||||
s32 set_or_approach_f32_asymptotic(f32 *dst, f32 goal, f32 scale);
|
||||
s32 approach_f32_asymptotic_bool(f32 *current, f32 target, f32 multiplier);
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
#include "save_file.h"
|
||||
#include "print.h"
|
||||
#include "engine/surface_load.h"
|
||||
#include "engine/math_util.h"
|
||||
#include "puppycam2.h"
|
||||
#include "puppyprint.h"
|
||||
|
||||
@@ -25,6 +26,23 @@
|
||||
* cannon reticle, and the unused keys.
|
||||
**/
|
||||
|
||||
#define HUD_POWER_METER_X 140
|
||||
#define HUD_POWER_METER_EMPHASIZED_Y 166
|
||||
#define HUD_POWER_METER_Y 200
|
||||
#define HUD_POWER_METER_HIDDEN_Y 300
|
||||
|
||||
#ifdef BREATH_METER
|
||||
// #ifdef DISABLE_LIVES
|
||||
// #define HUD_BREATH_METER_X 64
|
||||
// #define HUD_BREATH_METER_Y 200
|
||||
// #define HUD_BREATH_METER_HIDDEN_Y 300
|
||||
// #else
|
||||
#define HUD_BREATH_METER_X 40
|
||||
#define HUD_BREATH_METER_Y 32
|
||||
#define HUD_BREATH_METER_HIDDEN_Y -20
|
||||
// #endif
|
||||
#endif
|
||||
|
||||
// ------------- FPS COUNTER ---------------
|
||||
// To use it, call print_fps(x,y); every frame.
|
||||
#define FRAMETIME_COUNT 30
|
||||
@@ -35,22 +53,19 @@ u8 curFrameTimeIndex = 0;
|
||||
#include "PR/os_convert.h"
|
||||
|
||||
// Call once per frame
|
||||
f32 calculate_and_update_fps()
|
||||
{
|
||||
f32 calculate_and_update_fps() {
|
||||
OSTime newTime = osGetTime();
|
||||
OSTime oldTime = frameTimes[curFrameTimeIndex];
|
||||
frameTimes[curFrameTimeIndex] = newTime;
|
||||
|
||||
curFrameTimeIndex++;
|
||||
if (curFrameTimeIndex >= FRAMETIME_COUNT)
|
||||
if (curFrameTimeIndex >= FRAMETIME_COUNT) {
|
||||
curFrameTimeIndex = 0;
|
||||
|
||||
|
||||
}
|
||||
return ((f32)FRAMETIME_COUNT * 1000000.0f) / (s32)OS_CYCLES_TO_USEC(newTime - oldTime);
|
||||
}
|
||||
|
||||
void print_fps(s32 x, s32 y)
|
||||
{
|
||||
void print_fps(s32 x, s32 y) {
|
||||
f32 fps = calculate_and_update_fps();
|
||||
char text[14];
|
||||
|
||||
@@ -69,7 +84,6 @@ struct PowerMeterHUD {
|
||||
s8 animation;
|
||||
s16 x;
|
||||
s16 y;
|
||||
f32 unused;
|
||||
};
|
||||
|
||||
struct CameraHUD {
|
||||
@@ -82,9 +96,8 @@ static s16 sPowerMeterStoredHealth;
|
||||
|
||||
static struct PowerMeterHUD sPowerMeterHUD = {
|
||||
POWER_METER_HIDDEN,
|
||||
140,
|
||||
166,
|
||||
1.0,
|
||||
HUD_POWER_METER_X,
|
||||
HUD_POWER_METER_HIDDEN_Y,
|
||||
};
|
||||
|
||||
// Power Meter timer that keeps counting when it's visible.
|
||||
@@ -92,12 +105,22 @@ static struct PowerMeterHUD sPowerMeterHUD = {
|
||||
// when the power meter is hidden.
|
||||
s32 sPowerMeterVisibleTimer = 0;
|
||||
|
||||
#ifdef BREATH_METER
|
||||
static s16 sBreathMeterStoredValue;
|
||||
static struct PowerMeterHUD sBreathMeterHUD = {
|
||||
BREATH_METER_HIDDEN,
|
||||
HUD_BREATH_METER_X,
|
||||
HUD_BREATH_METER_HIDDEN_Y,
|
||||
};
|
||||
s32 sBreathMeterVisibleTimer = 0;
|
||||
#endif
|
||||
|
||||
static struct CameraHUD sCameraHUD = { CAM_STATUS_NONE };
|
||||
|
||||
/**
|
||||
* Renders a rgba16 16x16 glyph texture from a table list.
|
||||
*/
|
||||
void render_hud_tex_lut(s32 x, s32 y, u8 *texture) {
|
||||
void render_hud_tex_lut(s32 x, s32 y, Texture *texture) {
|
||||
gDPPipeSync(gDisplayListHead++);
|
||||
gDPSetTextureImage(gDisplayListHead++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, texture);
|
||||
gSPDisplayList(gDisplayListHead++, &dl_hud_img_load_tex_block);
|
||||
@@ -108,17 +131,17 @@ void render_hud_tex_lut(s32 x, s32 y, u8 *texture) {
|
||||
/**
|
||||
* Renders a rgba16 8x8 glyph texture from a table list.
|
||||
*/
|
||||
void render_hud_small_tex_lut(s32 x, s32 y, u8 *texture) {
|
||||
gDPSetTile(gDisplayListHead++, 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);
|
||||
gDPTileSync(gDisplayListHead++);
|
||||
gDPSetTile(gDisplayListHead++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 2, 0, G_TX_RENDERTILE, 0,
|
||||
G_TX_CLAMP, 3, G_TX_NOLOD, G_TX_CLAMP, 3, G_TX_NOLOD);
|
||||
gDPSetTileSize(gDisplayListHead++, G_TX_RENDERTILE, 0, 0, (8 - 1) << G_TEXTURE_IMAGE_FRAC, (8 - 1) << G_TEXTURE_IMAGE_FRAC);
|
||||
gDPPipeSync(gDisplayListHead++);
|
||||
gDPSetTextureImage(gDisplayListHead++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, texture);
|
||||
gDPLoadSync(gDisplayListHead++);
|
||||
gDPLoadBlock(gDisplayListHead++, G_TX_LOADTILE, 0, 0, 8 * 8 - 1, CALC_DXT(8, G_IM_SIZ_16b_BYTES));
|
||||
void render_hud_small_tex_lut(s32 x, s32 y, Texture *texture) {
|
||||
gDPSetTile( gDisplayListHead++, 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);
|
||||
gDPTileSync( gDisplayListHead++);
|
||||
gDPSetTile( gDisplayListHead++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 2, 0, G_TX_RENDERTILE, 0,
|
||||
G_TX_CLAMP, 3, G_TX_NOLOD, G_TX_CLAMP, 3, G_TX_NOLOD);
|
||||
gDPSetTileSize( gDisplayListHead++, G_TX_RENDERTILE, 0, 0, (8 - 1) << G_TEXTURE_IMAGE_FRAC, (8 - 1) << G_TEXTURE_IMAGE_FRAC);
|
||||
gDPPipeSync( gDisplayListHead++);
|
||||
gDPSetTextureImage( gDisplayListHead++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, texture);
|
||||
gDPLoadSync( gDisplayListHead++);
|
||||
gDPLoadBlock( gDisplayListHead++, G_TX_LOADTILE, 0, 0, 8 * 8 - 1, CALC_DXT(8, G_IM_SIZ_16b_BYTES));
|
||||
gSPTextureRectangle(gDisplayListHead++, x << 2, y << 2, (x + 7) << 2, (y + 7) << 2, G_TX_RENDERTILE,
|
||||
0, 0, 4 << 10, 1 << 10);
|
||||
}
|
||||
@@ -127,17 +150,14 @@ void render_hud_small_tex_lut(s32 x, s32 y, u8 *texture) {
|
||||
* Renders power meter health segment texture using a table list.
|
||||
*/
|
||||
void render_power_meter_health_segment(s16 numHealthWedges) {
|
||||
u8 *(*healthLUT)[];
|
||||
|
||||
Texture *(*healthLUT)[];
|
||||
healthLUT = segmented_to_virtual(&power_meter_health_segments_lut);
|
||||
|
||||
gDPPipeSync(gDisplayListHead++);
|
||||
gDPSetTextureImage(gDisplayListHead++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 1,
|
||||
(*healthLUT)[numHealthWedges - 1]);
|
||||
gDPLoadSync(gDisplayListHead++);
|
||||
gDPLoadBlock(gDisplayListHead++, G_TX_LOADTILE, 0, 0, 32 * 32 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES));
|
||||
gSP1Triangle(gDisplayListHead++, 0, 1, 2, 0);
|
||||
gSP1Triangle(gDisplayListHead++, 0, 2, 3, 0);
|
||||
gDPPipeSync( gDisplayListHead++);
|
||||
gDPSetTextureImage(gDisplayListHead++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, (*healthLUT)[numHealthWedges - 1]);
|
||||
gDPLoadSync( gDisplayListHead++);
|
||||
gDPLoadBlock( gDisplayListHead++, G_TX_LOADTILE, 0, 0, 32 * 32 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES));
|
||||
gSP1Triangle( gDisplayListHead++, 0, 1, 2, 0);
|
||||
gSP1Triangle( gDisplayListHead++, 0, 2, 3, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -145,14 +165,8 @@ void render_power_meter_health_segment(s16 numHealthWedges) {
|
||||
* That includes the "POWER" base and the colored health segment textures.
|
||||
*/
|
||||
void render_dl_power_meter(s16 numHealthWedges) {
|
||||
Mtx *mtx;
|
||||
|
||||
mtx = alloc_display_list(sizeof(Mtx));
|
||||
|
||||
if (mtx == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
Mtx *mtx = alloc_display_list(sizeof(Mtx));
|
||||
if (mtx == NULL) return;
|
||||
guTranslate(mtx, (f32) sPowerMeterHUD.x, (f32) sPowerMeterHUD.y, 0);
|
||||
|
||||
gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(mtx++),
|
||||
@@ -173,8 +187,7 @@ void render_dl_power_meter(s16 numHealthWedges) {
|
||||
* Checks its timer to later change into deemphasizing mode.
|
||||
*/
|
||||
void animate_power_meter_emphasized(void) {
|
||||
s16 hudDisplayFlags;
|
||||
hudDisplayFlags = gHudDisplay.flags;
|
||||
s16 hudDisplayFlags = gHudDisplay.flags;
|
||||
|
||||
if (!(hudDisplayFlags & HUD_DISPLAY_FLAG_EMPHASIZE_POWER)) {
|
||||
if (sPowerMeterVisibleTimer == 45.0) {
|
||||
@@ -191,23 +204,12 @@ void animate_power_meter_emphasized(void) {
|
||||
*/
|
||||
static void animate_power_meter_deemphasizing(void) {
|
||||
s16 speed = 5;
|
||||
|
||||
if (sPowerMeterHUD.y >= 181) {
|
||||
speed = 3;
|
||||
}
|
||||
|
||||
if (sPowerMeterHUD.y >= 191) {
|
||||
speed = 2;
|
||||
}
|
||||
|
||||
if (sPowerMeterHUD.y >= 196) {
|
||||
speed = 1;
|
||||
}
|
||||
|
||||
if (sPowerMeterHUD.y > (HUD_POWER_METER_Y - 20)) speed = 3;
|
||||
if (sPowerMeterHUD.y > (HUD_POWER_METER_Y - 10)) speed = 2;
|
||||
if (sPowerMeterHUD.y > (HUD_POWER_METER_Y - 5)) speed = 1;
|
||||
sPowerMeterHUD.y += speed;
|
||||
|
||||
if (sPowerMeterHUD.y >= 201) {
|
||||
sPowerMeterHUD.y = 200;
|
||||
if (sPowerMeterHUD.y > HUD_POWER_METER_Y) {
|
||||
sPowerMeterHUD.y = HUD_POWER_METER_Y;
|
||||
sPowerMeterHUD.animation = POWER_METER_VISIBLE;
|
||||
}
|
||||
}
|
||||
@@ -218,7 +220,7 @@ static void animate_power_meter_deemphasizing(void) {
|
||||
*/
|
||||
static void animate_power_meter_hiding(void) {
|
||||
sPowerMeterHUD.y += 20;
|
||||
if (sPowerMeterHUD.y >= 301) {
|
||||
if (sPowerMeterHUD.y > HUD_POWER_METER_HIDDEN_Y) {
|
||||
sPowerMeterHUD.animation = POWER_METER_HIDDEN;
|
||||
sPowerMeterVisibleTimer = 0;
|
||||
}
|
||||
@@ -231,31 +233,29 @@ void handle_power_meter_actions(s16 numHealthWedges) {
|
||||
// Show power meter if health is not full, less than 8
|
||||
if (numHealthWedges < 8 && sPowerMeterStoredHealth == 8 && sPowerMeterHUD.animation == POWER_METER_HIDDEN) {
|
||||
sPowerMeterHUD.animation = POWER_METER_EMPHASIZED;
|
||||
sPowerMeterHUD.y = 166;
|
||||
sPowerMeterHUD.y = HUD_POWER_METER_EMPHASIZED_Y;
|
||||
}
|
||||
|
||||
// Show power meter if health is full, has 8
|
||||
if (numHealthWedges == 8 && sPowerMeterStoredHealth == 7) {
|
||||
sPowerMeterVisibleTimer = 0;
|
||||
}
|
||||
|
||||
// After health is full, hide power meter
|
||||
if (numHealthWedges == 8 && sPowerMeterVisibleTimer > 45.0) {
|
||||
sPowerMeterHUD.animation = POWER_METER_HIDING;
|
||||
}
|
||||
|
||||
// Update to match health value
|
||||
sPowerMeterStoredHealth = numHealthWedges;
|
||||
|
||||
#ifndef BREATH_METER
|
||||
// If Mario is swimming, keep power meter visible
|
||||
if (gPlayerCameraState->action & ACT_FLAG_SWIMMING) {
|
||||
if (sPowerMeterHUD.animation == POWER_METER_HIDDEN
|
||||
|| sPowerMeterHUD.animation == POWER_METER_EMPHASIZED) {
|
||||
sPowerMeterHUD.animation = POWER_METER_DEEMPHASIZING;
|
||||
sPowerMeterHUD.y = 166;
|
||||
sPowerMeterHUD.y = HUD_POWER_METER_EMPHASIZED_Y;
|
||||
}
|
||||
sPowerMeterVisibleTimer = 0;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -265,40 +265,114 @@ void handle_power_meter_actions(s16 numHealthWedges) {
|
||||
*/
|
||||
void render_hud_power_meter(void) {
|
||||
s16 shownHealthWedges = gHudDisplay.wedges;
|
||||
|
||||
if (sPowerMeterHUD.animation != POWER_METER_HIDING) {
|
||||
handle_power_meter_actions(shownHealthWedges);
|
||||
}
|
||||
|
||||
if (sPowerMeterHUD.animation == POWER_METER_HIDDEN) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (sPowerMeterHUD.animation != POWER_METER_HIDING) handle_power_meter_actions(shownHealthWedges);
|
||||
if (sPowerMeterHUD.animation == POWER_METER_HIDDEN) return;
|
||||
switch (sPowerMeterHUD.animation) {
|
||||
case POWER_METER_EMPHASIZED:
|
||||
animate_power_meter_emphasized();
|
||||
break;
|
||||
case POWER_METER_DEEMPHASIZING:
|
||||
animate_power_meter_deemphasizing();
|
||||
break;
|
||||
case POWER_METER_HIDING:
|
||||
animate_power_meter_hiding();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
case POWER_METER_EMPHASIZED: animate_power_meter_emphasized(); break;
|
||||
case POWER_METER_DEEMPHASIZING: animate_power_meter_deemphasizing(); break;
|
||||
case POWER_METER_HIDING: animate_power_meter_hiding(); break;
|
||||
default: break;
|
||||
}
|
||||
|
||||
render_dl_power_meter(shownHealthWedges);
|
||||
|
||||
sPowerMeterVisibleTimer += 1;
|
||||
sPowerMeterVisibleTimer++;
|
||||
}
|
||||
|
||||
#ifdef VERSION_JP
|
||||
#define HUD_TOP_Y 210
|
||||
#else
|
||||
#define HUD_TOP_Y 209
|
||||
#ifdef BREATH_METER
|
||||
/**
|
||||
* Renders breath meter health segment texture using a table list.
|
||||
*/
|
||||
void render_breath_meter_segment(s16 numBreathWedges) {
|
||||
Texture *(*breathLUT)[];
|
||||
breathLUT = segmented_to_virtual(&breath_meter_segments_lut);
|
||||
gDPPipeSync( gDisplayListHead++);
|
||||
gDPSetTextureImage(gDisplayListHead++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, (*breathLUT)[numBreathWedges - 1]);
|
||||
gDPLoadSync( gDisplayListHead++);
|
||||
gDPLoadBlock( gDisplayListHead++, G_TX_LOADTILE, 0, 0, ((32 * 32) - 1), CALC_DXT(32, G_IM_SIZ_16b_BYTES));
|
||||
gSP1Triangle( gDisplayListHead++, 0, 1, 2, 0);
|
||||
gSP1Triangle( gDisplayListHead++, 0, 2, 3, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* Renders breath meter display lists.
|
||||
* That includes the base and the colored segment textures.
|
||||
*/
|
||||
void render_dl_breath_meter(s16 numBreathWedges) {
|
||||
Mtx *mtx = alloc_display_list(sizeof(Mtx));
|
||||
if (mtx == NULL) return;
|
||||
guTranslate(mtx, ((f32) sBreathMeterHUD.x), ((f32) sBreathMeterHUD.y), 0);
|
||||
gSPMatrix( gDisplayListHead++, VIRTUAL_TO_PHYSICAL(mtx++),
|
||||
(G_MTX_MODELVIEW | G_MTX_MUL | G_MTX_PUSH));
|
||||
gSPDisplayList( gDisplayListHead++, &dl_breath_meter_base);
|
||||
if (numBreathWedges != 0) {
|
||||
gSPDisplayList(gDisplayListHead++, &dl_breath_meter_health_segments_begin);
|
||||
render_breath_meter_segment(numBreathWedges);
|
||||
gSPDisplayList(gDisplayListHead++, &dl_breath_meter_health_segments_end);
|
||||
}
|
||||
gSPPopMatrix(gDisplayListHead++, G_MTX_MODELVIEW);
|
||||
}
|
||||
|
||||
/**
|
||||
* Breath meter animation called after emphasized mode.
|
||||
* Moves breath meter y pos speed until it's visible.
|
||||
*/
|
||||
static void animate_breath_meter_sliding_in(void) {
|
||||
approach_s16_symmetric_bool(&sBreathMeterHUD.y, HUD_BREATH_METER_Y, 5);
|
||||
if (sBreathMeterHUD.y == HUD_BREATH_METER_Y) {
|
||||
sBreathMeterHUD.animation = BREATH_METER_VISIBLE;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Breath meter animation called when there's 8 health segments.
|
||||
* Moves breath meter y pos quickly until it's hidden.
|
||||
*/
|
||||
static void animate_breath_meter_sliding_out(void) {
|
||||
approach_s16_symmetric_bool(&sBreathMeterHUD.y, HUD_BREATH_METER_HIDDEN_Y, 20);
|
||||
if (sBreathMeterHUD.y == HUD_BREATH_METER_HIDDEN_Y) {
|
||||
sBreathMeterHUD.animation = BREATH_METER_HIDDEN;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Handles breath meter actions depending of the health segments values.
|
||||
*/
|
||||
void handle_breath_meter_actions(s16 numBreathWedges) {
|
||||
// Show breath meter if health is not full, less than 8
|
||||
if ((numBreathWedges < 8) && (sBreathMeterStoredValue == 8) && sBreathMeterHUD.animation == BREATH_METER_HIDDEN) {
|
||||
sBreathMeterHUD.animation = BREATH_METER_SHOWING;
|
||||
// sBreathMeterHUD.y = HUD_BREATH_METER_Y;
|
||||
}
|
||||
// Show breath meter if breath is full, has 8
|
||||
if ((numBreathWedges == 8) && (sBreathMeterStoredValue == 7)) sBreathMeterVisibleTimer = 0;
|
||||
// After breath is full, hide breath meter
|
||||
if ((numBreathWedges == 8) && (sBreathMeterVisibleTimer > 45)) sBreathMeterHUD.animation = BREATH_METER_HIDING;
|
||||
// Update to match breath value
|
||||
sBreathMeterStoredValue = numBreathWedges;
|
||||
// If Mario is swimming, keep breath meter visible
|
||||
if (gPlayerCameraState->action & ACT_FLAG_SWIMMING) {
|
||||
if (sBreathMeterHUD.animation == BREATH_METER_HIDDEN) {
|
||||
sBreathMeterHUD.animation = BREATH_METER_SHOWING;
|
||||
}
|
||||
sBreathMeterVisibleTimer = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void render_hud_breath_meter(void) {
|
||||
s16 shownBreathAmount = gHudDisplay.breath;
|
||||
if (sBreathMeterHUD.animation != BREATH_METER_HIDING) handle_breath_meter_actions(shownBreathAmount);
|
||||
if (sBreathMeterHUD.animation == BREATH_METER_HIDDEN) return;
|
||||
switch (sBreathMeterHUD.animation) {
|
||||
case BREATH_METER_SHOWING: animate_breath_meter_sliding_in(); break;
|
||||
case BREATH_METER_HIDING: animate_breath_meter_sliding_out(); break;
|
||||
default: break;
|
||||
}
|
||||
render_dl_breath_meter(shownBreathAmount);
|
||||
sBreathMeterVisibleTimer++;
|
||||
}
|
||||
#endif
|
||||
|
||||
#define HUD_TOP_Y 209
|
||||
|
||||
/**
|
||||
* Renders the amount of lives Mario has.
|
||||
*/
|
||||
@@ -329,31 +403,17 @@ void render_hud_coins(void) {
|
||||
print_text_fmt_int(198, HUD_TOP_Y, "%d", gHudDisplay.coins);
|
||||
}
|
||||
|
||||
#ifdef VERSION_JP
|
||||
#define HUD_STARS_X 73
|
||||
#else
|
||||
#define HUD_STARS_X 78
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Renders the amount of stars collected.
|
||||
* Disables "X" glyph when Mario has 100 stars or more.
|
||||
*/
|
||||
void render_hud_stars(void) {
|
||||
s8 showX = 0;
|
||||
|
||||
if (gHudFlash == 1 && gGlobalTimer & 0x08) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (gHudDisplay.stars < 100) {
|
||||
showX = 1;
|
||||
}
|
||||
|
||||
if ((gHudFlash == 1) && (gGlobalTimer & 0x08)) return;
|
||||
s8 showX = (gHudDisplay.stars < 100);
|
||||
print_text(GFX_DIMENSIONS_RECT_FROM_RIGHT_EDGE(HUD_STARS_X), HUD_TOP_Y, "-"); // 'Star' glyph
|
||||
if (showX == 1) {
|
||||
print_text(GFX_DIMENSIONS_RECT_FROM_RIGHT_EDGE(HUD_STARS_X) + 16, HUD_TOP_Y, "*"); // 'X' glyph
|
||||
}
|
||||
if (showX) print_text(GFX_DIMENSIONS_RECT_FROM_RIGHT_EDGE(HUD_STARS_X) + 16, HUD_TOP_Y, "*"); // 'X' glyph
|
||||
print_text_fmt_int((showX * 14) + GFX_DIMENSIONS_RECT_FROM_RIGHT_EDGE(HUD_STARS_X - 16),
|
||||
HUD_TOP_Y, "%d", gHudDisplay.stars);
|
||||
}
|
||||
@@ -364,7 +424,6 @@ void render_hud_stars(void) {
|
||||
*/
|
||||
void render_hud_keys(void) {
|
||||
s16 i;
|
||||
|
||||
for (i = 0; i < gHudDisplay.keys; i++) {
|
||||
print_text((i * 16) + 220, 142, "/"); // unused glyph - beta key
|
||||
}
|
||||
@@ -374,31 +433,20 @@ void render_hud_keys(void) {
|
||||
* Renders the timer when Mario start sliding in PSS.
|
||||
*/
|
||||
void render_hud_timer(void) {
|
||||
u8 *(*hudLUT)[58];
|
||||
u16 timerValFrames;
|
||||
u16 timerMins;
|
||||
u16 timerSecs;
|
||||
u16 timerFracSecs;
|
||||
|
||||
Texture *(*hudLUT)[58];
|
||||
hudLUT = segmented_to_virtual(&main_hud_lut);
|
||||
timerValFrames = gHudDisplay.timer;
|
||||
u16 timerValFrames = gHudDisplay.timer;
|
||||
#ifdef VERSION_EU
|
||||
switch (eu_get_language()) {
|
||||
case LANGUAGE_ENGLISH:
|
||||
print_text(GFX_DIMENSIONS_RECT_FROM_RIGHT_EDGE(150), 185, "TIME");
|
||||
break;
|
||||
case LANGUAGE_FRENCH:
|
||||
print_text(GFX_DIMENSIONS_RECT_FROM_RIGHT_EDGE(155), 185, "TEMPS");
|
||||
break;
|
||||
case LANGUAGE_GERMAN:
|
||||
print_text(GFX_DIMENSIONS_RECT_FROM_RIGHT_EDGE(150), 185, "ZEIT");
|
||||
break;
|
||||
case LANGUAGE_ENGLISH: print_text(GFX_DIMENSIONS_RECT_FROM_RIGHT_EDGE(150), 185, "TIME"); break;
|
||||
case LANGUAGE_FRENCH: print_text(GFX_DIMENSIONS_RECT_FROM_RIGHT_EDGE(155), 185, "TEMPS"); break;
|
||||
case LANGUAGE_GERMAN: print_text(GFX_DIMENSIONS_RECT_FROM_RIGHT_EDGE(150), 185, "ZEIT"); break;
|
||||
}
|
||||
#endif
|
||||
timerMins = timerValFrames / (30 * 60);
|
||||
timerSecs = (timerValFrames - (timerMins * 1800)) / 30;
|
||||
u16 timerMins = timerValFrames / (30 * 60);
|
||||
u16 timerSecs = (timerValFrames - (timerMins * 1800)) / 30;
|
||||
|
||||
timerFracSecs = ((timerValFrames - (timerMins * 1800) - (timerSecs * 30)) & 0xFFFF) / 3;
|
||||
u16 timerFracSecs = ((timerValFrames - (timerMins * 1800) - (timerSecs * 30)) & 0xFFFF) / 3;
|
||||
#ifndef VERSION_EU
|
||||
print_text(GFX_DIMENSIONS_RECT_FROM_RIGHT_EDGE(150), 185, "TIME");
|
||||
#endif
|
||||
@@ -424,13 +472,10 @@ void set_hud_camera_status(s16 status) {
|
||||
* the camera status called, a defined glyph is rendered.
|
||||
*/
|
||||
void render_hud_camera_status(void) {
|
||||
u8 *(*cameraLUT)[6];
|
||||
s32 x;
|
||||
s32 y;
|
||||
|
||||
Texture *(*cameraLUT)[6];
|
||||
cameraLUT = segmented_to_virtual(&main_hud_camera_lut);
|
||||
x = GFX_DIMENSIONS_RECT_FROM_RIGHT_EDGE(54);
|
||||
y = 205;
|
||||
s32 x = GFX_DIMENSIONS_RECT_FROM_RIGHT_EDGE(54);
|
||||
s32 y = 205;
|
||||
|
||||
if (sCameraHUD.status == CAM_STATUS_NONE) {
|
||||
return;
|
||||
@@ -456,7 +501,7 @@ void render_hud_camera_status(void) {
|
||||
render_hud_small_tex_lut(x + 4, y + 16, (*cameraLUT)[GLYPH_CAM_ARROW_DOWN]);
|
||||
break;
|
||||
case CAM_STATUS_C_UP:
|
||||
render_hud_small_tex_lut(x + 4, y - 8, (*cameraLUT)[GLYPH_CAM_ARROW_UP]);
|
||||
render_hud_small_tex_lut(x + 4, y - 8, (*cameraLUT)[GLYPH_CAM_ARROW_UP]);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -479,14 +524,16 @@ void render_hud(void) {
|
||||
sPowerMeterHUD.animation = POWER_METER_HIDDEN;
|
||||
sPowerMeterStoredHealth = 8;
|
||||
sPowerMeterVisibleTimer = 0;
|
||||
#ifdef BREATH_METER
|
||||
sBreathMeterHUD.animation = BREATH_METER_HIDDEN;
|
||||
sBreathMeterStoredValue = 8;
|
||||
sBreathMeterVisibleTimer = 0;
|
||||
#endif
|
||||
} else {
|
||||
#ifdef VERSION_EU
|
||||
// basically create_dl_ortho_matrix but guOrtho screen width is different
|
||||
|
||||
mtx = alloc_display_list(sizeof(*mtx));
|
||||
if (mtx == NULL) {
|
||||
return;
|
||||
}
|
||||
if (mtx == NULL) return;
|
||||
create_dl_identity_matrix();
|
||||
guOrtho(mtx, -16.0f, SCREEN_WIDTH + 16, 0, SCREEN_HEIGHT, -10.0f, 10.0f, 1.0f);
|
||||
gSPPerspNormalize(gDisplayListHead++, 0xFFFF);
|
||||
@@ -495,7 +542,6 @@ void render_hud(void) {
|
||||
#else
|
||||
create_dl_ortho_matrix();
|
||||
#endif
|
||||
|
||||
if (gCurrentArea != NULL && gCurrentArea->camera->mode == CAMERA_MODE_INSIDE_CANNON) {
|
||||
render_hud_cannon_reticle();
|
||||
}
|
||||
@@ -504,38 +550,27 @@ void render_hud(void) {
|
||||
render_hud_mario_lives();
|
||||
}
|
||||
#endif
|
||||
if (hudDisplayFlags & HUD_DISPLAY_FLAG_COIN_COUNT) {
|
||||
render_hud_coins();
|
||||
}
|
||||
|
||||
if (hudDisplayFlags & HUD_DISPLAY_FLAG_STAR_COUNT) {
|
||||
render_hud_stars();
|
||||
}
|
||||
|
||||
if (hudDisplayFlags & HUD_DISPLAY_FLAG_KEYS) {
|
||||
render_hud_keys();
|
||||
}
|
||||
if (hudDisplayFlags & HUD_DISPLAY_FLAG_COIN_COUNT ) render_hud_coins();
|
||||
if (hudDisplayFlags & HUD_DISPLAY_FLAG_STAR_COUNT ) render_hud_stars();
|
||||
if (hudDisplayFlags & HUD_DISPLAY_FLAG_KEYS ) render_hud_keys();
|
||||
#ifdef BREATH_METER
|
||||
if (hudDisplayFlags & HUD_DISPLAY_FLAG_BREATH_METER) render_hud_breath_meter();
|
||||
#endif
|
||||
|
||||
if (hudDisplayFlags & HUD_DISPLAY_FLAG_CAMERA_AND_POWER) {
|
||||
render_hud_power_meter();
|
||||
#ifdef PUPPYCAM
|
||||
if (!gPuppyCam.enabled)
|
||||
#endif
|
||||
#ifdef PUPPYCAM
|
||||
if (!gPuppyCam.enabled) {
|
||||
#endif
|
||||
render_hud_camera_status();
|
||||
#ifdef PUPPYCAM
|
||||
}
|
||||
#endif
|
||||
}
|
||||
if (hudDisplayFlags & HUD_DISPLAY_FLAG_TIMER) render_hud_timer();
|
||||
|
||||
if (hudDisplayFlags & HUD_DISPLAY_FLAG_TIMER) {
|
||||
render_hud_timer();
|
||||
}
|
||||
|
||||
if (gSurfacePoolError & NOT_ENOUGH_ROOM_FOR_SURFACES)
|
||||
{
|
||||
print_text(10, 40, "SURFACE POOL FULL");
|
||||
}
|
||||
if (gSurfacePoolError & NOT_ENOUGH_ROOM_FOR_NODES)
|
||||
{
|
||||
print_text(10, 60, "SURFACE NODE POOL FULL");
|
||||
}
|
||||
if (gSurfacePoolError & NOT_ENOUGH_ROOM_FOR_SURFACES) print_text(10, 40, "SURFACE POOL FULL");
|
||||
if (gSurfacePoolError & NOT_ENOUGH_ROOM_FOR_NODES ) print_text(10, 60, "SURFACE NODE POOL FULL");
|
||||
#ifdef CUSTOM_DEBUG
|
||||
if (gCustomDebugMode) {
|
||||
render_debug_mode();
|
||||
|
||||
@@ -12,6 +12,15 @@ enum PowerMeterAnimation {
|
||||
POWER_METER_VISIBLE
|
||||
};
|
||||
|
||||
#ifdef BREATH_METER
|
||||
enum AirMeterAnimation {
|
||||
BREATH_METER_HIDDEN,
|
||||
BREATH_METER_SHOWING,
|
||||
BREATH_METER_HIDING,
|
||||
BREATH_METER_VISIBLE
|
||||
};
|
||||
#endif
|
||||
|
||||
enum CameraHUDLut {
|
||||
GLYPH_CAM_CAMERA,
|
||||
GLYPH_CAM_MARIO_HEAD,
|
||||
|
||||
@@ -736,13 +736,15 @@ void reset_mario_pitch(struct MarioState *m) {
|
||||
}
|
||||
}
|
||||
|
||||
u32 interact_coin(struct MarioState *m, UNUSED u32 interactType, struct Object *o) {
|
||||
m->numCoins += o->oDamageOrCoinValue;
|
||||
m->healCounter += 4 * o->oDamageOrCoinValue;
|
||||
|
||||
o->oInteractStatus = INT_STATUS_INTERACTED;
|
||||
u32 interact_coin(struct MarioState *m, UNUSED u32 interactType, struct Object *obj) {
|
||||
m->numCoins += obj->oDamageOrCoinValue;
|
||||
m->healCounter += 4 * obj->oDamageOrCoinValue;
|
||||
#ifdef BREATH_METER
|
||||
m->breathCounter += (4 * obj->oDamageOrCoinValue);
|
||||
#endif
|
||||
obj->oInteractStatus = INT_STATUS_INTERACTED;
|
||||
#ifdef X_COIN_STAR
|
||||
if (COURSE_IS_MAIN_COURSE(gCurrCourseNum) && m->numCoins - o->oDamageOrCoinValue < X_COIN_STAR
|
||||
if (COURSE_IS_MAIN_COURSE(gCurrCourseNum) && m->numCoins - obj->oDamageOrCoinValue < X_COIN_STAR
|
||||
&& m->numCoins >= X_COIN_STAR) {
|
||||
bhv_spawn_star_no_level_exit(6);
|
||||
}
|
||||
@@ -752,13 +754,16 @@ u32 interact_coin(struct MarioState *m, UNUSED u32 interactType, struct Object *
|
||||
queue_rumble_data(5, 80);
|
||||
}
|
||||
#endif
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
u32 interact_water_ring(struct MarioState *m, UNUSED u32 interactType, struct Object *o) {
|
||||
m->healCounter += 4 * o->oDamageOrCoinValue;
|
||||
o->oInteractStatus = INT_STATUS_INTERACTED;
|
||||
u32 interact_water_ring(struct MarioState *m, UNUSED u32 interactType, struct Object *obj) {
|
||||
#ifdef BREATH_METER
|
||||
m->breathCounter += (4 * obj->oDamageOrCoinValue);
|
||||
#else
|
||||
m->healCounter += (4 * obj->oDamageOrCoinValue);
|
||||
#endif
|
||||
obj->oInteractStatus = INT_STATUS_INTERACTED;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -781,6 +786,9 @@ u32 interact_star_or_key(struct MarioState *m, UNUSED u32 interactType, struct O
|
||||
if (!noExit) {
|
||||
m->hurtCounter = 0;
|
||||
m->healCounter = 0;
|
||||
#ifdef BREATH_METER
|
||||
m->breathCounter = 0;
|
||||
#endif
|
||||
if (m->capTimer > 1) {
|
||||
m->capTimer = 1;
|
||||
}
|
||||
|
||||
@@ -904,8 +904,10 @@ void initiate_delayed_warp(void) {
|
||||
|
||||
void update_hud_values(void) {
|
||||
if (gCurrCreditsEntry == NULL) {
|
||||
s16 numHealthWedges = gMarioState->health > 0 ? gMarioState->health >> 8 : 0;
|
||||
|
||||
s16 numHealthWedges = ((gMarioState->health > 0) ? (gMarioState->health >> 8) : 0);
|
||||
#ifdef BREATH_METER
|
||||
s16 numBreathWedges = ((gMarioState->breath > 0) ? (gMarioState->breath >> 8) : 0);
|
||||
#endif
|
||||
if (gCurrCourseNum >= COURSE_MIN) {
|
||||
gHudDisplay.flags |= HUD_DISPLAY_FLAG_COIN_COUNT;
|
||||
} else {
|
||||
@@ -946,12 +948,19 @@ void update_hud_values(void) {
|
||||
play_sound(SOUND_MENU_POWER_METER, gGlobalSoundSource);
|
||||
}
|
||||
gHudDisplay.wedges = numHealthWedges;
|
||||
|
||||
if (gMarioState->hurtCounter > 0) {
|
||||
gHudDisplay.flags |= HUD_DISPLAY_FLAG_EMPHASIZE_POWER;
|
||||
} else {
|
||||
gHudDisplay.flags &= ~HUD_DISPLAY_FLAG_EMPHASIZE_POWER;
|
||||
}
|
||||
#ifdef BREATH_METER
|
||||
gHudDisplay.breath = numBreathWedges;
|
||||
if (gMarioState->breath > 0) {
|
||||
gHudDisplay.flags |= HUD_DISPLAY_FLAG_BREATH_METER;
|
||||
} else {
|
||||
gHudDisplay.flags &= ~HUD_DISPLAY_FLAG_BREATH_METER;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1252,7 +1261,11 @@ s32 init_level(void) {
|
||||
#endif
|
||||
|
||||
#if PUPPYPRINT_DEBUG
|
||||
#ifdef PUPPYPRINT_DEBUG_CYCLES
|
||||
append_puppyprint_log("Level loaded in %dc", (s32)(osGetTime() - first));
|
||||
#else
|
||||
append_puppyprint_log("Level loaded in %dus", (s32)(OS_CYCLES_TO_USEC(osGetTime() - first)));
|
||||
#endif
|
||||
#endif
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -107,6 +107,9 @@ struct HudDisplay {
|
||||
/*0x08*/ s16 keys;
|
||||
/*0x0A*/ s16 flags;
|
||||
/*0x0C*/ u16 timer;
|
||||
#ifdef BREATH_METER
|
||||
u16 breath;
|
||||
#endif
|
||||
};
|
||||
|
||||
extern struct HudDisplay gHudDisplay;
|
||||
@@ -120,6 +123,9 @@ enum HUDDisplayFlag {
|
||||
HUD_DISPLAY_FLAG_KEYS = (1 << 4), // 0x0010
|
||||
HUD_DISPLAY_FLAG_UNKNOWN_0020 = (1 << 5), // 0x0020
|
||||
HUD_DISPLAY_FLAG_TIMER = (1 << 6), // 0x0040
|
||||
#ifdef BREATH_METER
|
||||
HUD_DISPLAY_FLAG_BREATH_METER = (1 << 14), // 0x4000
|
||||
#endif
|
||||
HUD_DISPLAY_FLAG_EMPHASIZE_POWER = (1 << 15), // 0x8000
|
||||
|
||||
HUD_DISPLAY_NONE = (0 << 0), // 0x0000
|
||||
|
||||
@@ -1483,7 +1483,10 @@ void update_mario_health(struct MarioState *m) {
|
||||
} else {
|
||||
if ((m->action & ACT_FLAG_SWIMMING) && !(m->action & ACT_FLAG_INTANGIBLE)) {
|
||||
terrainIsSnow = (m->area->terrainType & TERRAIN_MASK) == TERRAIN_SNOW;
|
||||
|
||||
#ifdef BREATH_METER
|
||||
// when in snow terrains lose 3 health.
|
||||
if ((m->pos[1] < (m->waterLevel - 140)) && terrainIsSnow) m->health -= 3;
|
||||
#else
|
||||
// When Mario is near the water surface, recover health (unless in snow),
|
||||
// when in snow terrains lose 3 health.
|
||||
// If using the debug level select, do not lose any HP to water.
|
||||
@@ -1492,6 +1495,7 @@ void update_mario_health(struct MarioState *m) {
|
||||
} else if (!gDebugLevelSelect) {
|
||||
m->health -= (terrainIsSnow ? 3 : 1);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1511,7 +1515,7 @@ void update_mario_health(struct MarioState *m) {
|
||||
if (m->health < 0x100) {
|
||||
m->health = 0xFF;
|
||||
}
|
||||
|
||||
#ifndef BREATH_METER
|
||||
// Play a noise to alert the player when Mario is close to drowning.
|
||||
if (((m->action & ACT_GROUP_MASK) == ACT_GROUP_SUBMERGED) && (m->health < 0x300)) {
|
||||
play_sound(SOUND_MOVING_ALMOST_DROWNING, gGlobalSoundSource);
|
||||
@@ -1526,9 +1530,43 @@ void update_mario_health(struct MarioState *m) {
|
||||
gRumblePakTimer = 0;
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef BREATH_METER
|
||||
void update_mario_breath(struct MarioState *m) {
|
||||
if (m->breath >= 0x100 && m->health >= 0x100) {
|
||||
if (m->pos[1] < (m->waterLevel - 140) && !(m->flags & MARIO_METAL_CAP) && !(m->action & ACT_FLAG_INTANGIBLE)) {
|
||||
m->breath--;
|
||||
if (m->breath < 0x300) {
|
||||
// Play a noise to alert the player when Mario is close to drowning.
|
||||
play_sound(SOUND_MOVING_ALMOST_DROWNING, gGlobalSoundSource);
|
||||
#if ENABLE_RUMBLE
|
||||
if (gRumblePakTimer == 0) {
|
||||
gRumblePakTimer = 36;
|
||||
if (is_rumble_finished_and_queue_empty()) queue_rumble_data(3, 30);
|
||||
}
|
||||
} else {
|
||||
gRumblePakTimer = 0;
|
||||
#endif
|
||||
}
|
||||
} else if (!(m->input & INPUT_IN_POISON_GAS)) {
|
||||
m->breath += 0x1A;
|
||||
}
|
||||
if (m->breathCounter > 0) {
|
||||
m->breath += 0x40;
|
||||
m->breathCounter--;
|
||||
}
|
||||
if (m->breath > 0x880) m->breath = 0x880;
|
||||
if (m->breath < 0x100) {
|
||||
m->breath = 0xFF;
|
||||
m->health = 0xFF;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Updates some basic info for camera usage.
|
||||
*/
|
||||
@@ -1772,6 +1810,9 @@ s32 execute_mario_action(UNUSED struct Object *o) {
|
||||
squish_mario_model(gMarioState);
|
||||
set_submerged_cam_preset_and_spawn_bubbles(gMarioState);
|
||||
update_mario_health(gMarioState);
|
||||
#ifdef BREATH_METER
|
||||
update_mario_breath(gMarioState);
|
||||
#endif
|
||||
update_mario_info_for_cam(gMarioState);
|
||||
mario_update_hitbox_and_cap_model(gMarioState);
|
||||
|
||||
@@ -1900,7 +1941,10 @@ void init_mario_from_save_file(void) {
|
||||
|
||||
gMarioState->numLives = 4;
|
||||
gMarioState->health = 0x880;
|
||||
|
||||
#ifdef BREATH_METER
|
||||
gMarioState->breath = 0x880;
|
||||
gHudDisplay.breath = 8;
|
||||
#endif
|
||||
gMarioState->prevNumStarsForDialog = gMarioState->numStars;
|
||||
gMarioState->animYTrans = 0xBD;
|
||||
|
||||
|
||||
@@ -742,6 +742,9 @@ s32 act_eaten_by_bubba(struct MarioState *m) {
|
||||
play_sound_if_no_flag(m, SOUND_MARIO_DYING, MARIO_ACTION_SOUND_PLAYED);
|
||||
set_mario_animation(m, MARIO_ANIM_A_POSE);
|
||||
m->marioObj->header.gfx.node.flags &= ~GRAPH_RENDER_ACTIVE;
|
||||
#ifdef BREATH_METER
|
||||
m->breath = 0xFF;
|
||||
#endif
|
||||
m->health = 0xFF;
|
||||
if (m->actionTimer++ == 60) {
|
||||
level_trigger_warp(m, WARP_OP_DEATH);
|
||||
@@ -1038,6 +1041,9 @@ s32 act_spawn_spin_landing(struct MarioState *m) {
|
||||
* particle flag that generates sparkles.
|
||||
*/
|
||||
s32 act_exit_airborne(struct MarioState *m) {
|
||||
#ifdef BREATH_METER
|
||||
m->breath = 0x880;
|
||||
#endif
|
||||
if (15 < m->actionTimer++
|
||||
&& launch_mario_until_land(m, ACT_EXIT_LAND_SAVE_DIALOG, MARIO_ANIM_GENERAL_FALL, -32.0f)) {
|
||||
// heal Mario
|
||||
@@ -1050,6 +1056,9 @@ s32 act_exit_airborne(struct MarioState *m) {
|
||||
}
|
||||
|
||||
s32 act_falling_exit_airborne(struct MarioState *m) {
|
||||
#ifdef BREATH_METER
|
||||
m->breath = 0x880;
|
||||
#endif
|
||||
if (launch_mario_until_land(m, ACT_EXIT_LAND_SAVE_DIALOG, MARIO_ANIM_GENERAL_FALL, 0.0f)) {
|
||||
// heal Mario
|
||||
m->healCounter = 31;
|
||||
@@ -1144,8 +1153,10 @@ s32 act_exit_land_save_dialog(struct MarioState *m) {
|
||||
}
|
||||
|
||||
s32 act_death_exit(struct MarioState *m) {
|
||||
if (15 < m->actionTimer++
|
||||
&& launch_mario_until_land(m, ACT_DEATH_EXIT_LAND, MARIO_ANIM_GENERAL_FALL, -32.0f)) {
|
||||
#ifdef BREATH_METER
|
||||
m->breath = 0x880;
|
||||
#endif
|
||||
if (15 < m->actionTimer++ && launch_mario_until_land(m, ACT_DEATH_EXIT_LAND, MARIO_ANIM_GENERAL_FALL, -32.0f)) {
|
||||
#ifdef VERSION_JP
|
||||
play_sound(SOUND_MARIO_OOOF, m->marioObj->header.gfx.cameraToObject);
|
||||
#else
|
||||
@@ -1164,6 +1175,9 @@ s32 act_death_exit(struct MarioState *m) {
|
||||
}
|
||||
|
||||
s32 act_unused_death_exit(struct MarioState *m) {
|
||||
#ifdef BREATH_METER
|
||||
m->breath = 0x880;
|
||||
#endif
|
||||
if (launch_mario_until_land(m, ACT_FREEFALL_LAND_STOP, MARIO_ANIM_GENERAL_FALL, 0.0f)) {
|
||||
#ifdef VERSION_JP
|
||||
play_sound(SOUND_MARIO_OOOF, m->marioObj->header.gfx.cameraToObject);
|
||||
@@ -1180,6 +1194,9 @@ s32 act_unused_death_exit(struct MarioState *m) {
|
||||
}
|
||||
|
||||
s32 act_falling_death_exit(struct MarioState *m) {
|
||||
#ifdef BREATH_METER
|
||||
m->breath = 0x880;
|
||||
#endif
|
||||
if (launch_mario_until_land(m, ACT_DEATH_EXIT_LAND, MARIO_ANIM_GENERAL_FALL, 0.0f)) {
|
||||
#ifdef VERSION_JP
|
||||
play_sound(SOUND_MARIO_OOOF, m->marioObj->header.gfx.cameraToObject);
|
||||
@@ -1200,6 +1217,9 @@ s32 act_falling_death_exit(struct MarioState *m) {
|
||||
|
||||
// waits 11 frames before actually executing, also has reduced fvel
|
||||
s32 act_special_exit_airborne(struct MarioState *m) {
|
||||
#ifdef BREATH_METER
|
||||
m->breath = 0x880;
|
||||
#endif
|
||||
struct Object *marioObj = m->marioObj;
|
||||
|
||||
play_sound_if_no_flag(m, SOUND_MARIO_YAHOO, MARIO_MARIO_SOUND_PLAYED);
|
||||
@@ -1225,6 +1245,9 @@ s32 act_special_exit_airborne(struct MarioState *m) {
|
||||
}
|
||||
|
||||
s32 act_special_death_exit(struct MarioState *m) {
|
||||
#ifdef BREATH_METER
|
||||
m->breath = 0x880;
|
||||
#endif
|
||||
struct Object *marioObj = m->marioObj;
|
||||
|
||||
if (m->actionTimer++ < 11) {
|
||||
|
||||
@@ -452,7 +452,7 @@ static s32 obj_smooth_turn(s16 *angleVel, s32 *angle, s16 targetAngle, f32 targe
|
||||
currentSpeed = absi(*angleVel);
|
||||
clamp_s16(¤tSpeed, minSpeed, maxSpeed);
|
||||
|
||||
*angle = approach_s16_symmetric(*angle, targetAngle, currentSpeed);
|
||||
*angle = approach_angle(*angle, targetAngle, currentSpeed);
|
||||
return (s16)(*angle) == targetAngle;
|
||||
}
|
||||
|
||||
|
||||
@@ -282,88 +282,15 @@ void cur_obj_forward_vel_approach_upward(f32 target, f32 increment) {
|
||||
}
|
||||
}
|
||||
|
||||
s32 approach_f32_signed(f32 *value, f32 target, f32 increment) {
|
||||
s32 reachedTarget = FALSE;
|
||||
|
||||
*value += increment;
|
||||
|
||||
if (increment >= 0.0f) {
|
||||
if (*value > target) {
|
||||
*value = target;
|
||||
reachedTarget = TRUE;
|
||||
}
|
||||
} else {
|
||||
if (*value < target) {
|
||||
*value = target;
|
||||
reachedTarget = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
return reachedTarget;
|
||||
}
|
||||
|
||||
f32 approach_f32_symmetric(f32 value, f32 target, f32 increment) {
|
||||
f32 dist;
|
||||
|
||||
if ((dist = target - value) >= 0.0f) {
|
||||
if (dist > increment) {
|
||||
value += increment;
|
||||
} else {
|
||||
value = target;
|
||||
}
|
||||
} else {
|
||||
if (dist < -increment) {
|
||||
value -= increment;
|
||||
} else {
|
||||
value = target;
|
||||
}
|
||||
}
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
s16 approach_s16_symmetric(s16 value, s16 target, s16 increment) {
|
||||
s16 dist = target - value;
|
||||
|
||||
if (dist >= 0) {
|
||||
if (dist > increment) {
|
||||
value += increment;
|
||||
} else {
|
||||
value = target;
|
||||
}
|
||||
} else {
|
||||
if (dist < -increment) {
|
||||
value -= increment;
|
||||
} else {
|
||||
value = target;
|
||||
}
|
||||
}
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
s32 cur_obj_rotate_yaw_toward(s16 target, s16 increment) {
|
||||
s16 startYaw;
|
||||
|
||||
startYaw = (s16) o->oMoveAngleYaw;
|
||||
s16 startYaw = (s16) o->oMoveAngleYaw;
|
||||
o->oMoveAngleYaw = approach_s16_symmetric(o->oMoveAngleYaw, target, increment);
|
||||
|
||||
if ((o->oAngleVelYaw = (s16)((s16) o->oMoveAngleYaw - startYaw)) == 0) {
|
||||
return TRUE;
|
||||
} else {
|
||||
return FALSE;
|
||||
}
|
||||
return ((o->oAngleVelYaw = (s16)((s16) o->oMoveAngleYaw - startYaw)) == 0);
|
||||
}
|
||||
|
||||
s16 obj_angle_to_object(struct Object *obj1, struct Object *obj2) {
|
||||
f32 z1, x1, z2, x2;
|
||||
s16 angle;
|
||||
|
||||
z1 = obj1->oPosZ; z2 = obj2->oPosZ; // ordering of instructions..
|
||||
x1 = obj1->oPosX; x2 = obj2->oPosX;
|
||||
|
||||
angle = atan2s(z2 - z1, x2 - x1);
|
||||
return angle;
|
||||
return atan2s((obj2->oPosZ - obj1->oPosZ), (obj2->oPosX - obj1->oPosX));
|
||||
}
|
||||
|
||||
s16 obj_turn_toward_object(struct Object *obj, struct Object *target, s16 angleIndex, s16 turnAmount) {
|
||||
@@ -376,12 +303,12 @@ s16 obj_turn_toward_object(struct Object *obj, struct Object *target, s16 angleI
|
||||
case O_FACE_ANGLE_PITCH_INDEX:
|
||||
a = target->oPosX - obj->oPosX;
|
||||
c = target->oPosZ - obj->oPosZ;
|
||||
a = sqrtf(a * a + c * c);
|
||||
a = sqrtf(sqr(a) + sqr(c));
|
||||
|
||||
b = -obj->oPosY;
|
||||
d = -target->oPosY;
|
||||
|
||||
targetAngle = atan2s(a, d - b);
|
||||
targetAngle = atan2s(a, (d - b));
|
||||
break;
|
||||
|
||||
case O_MOVE_ANGLE_YAW_INDEX:
|
||||
@@ -391,7 +318,7 @@ s16 obj_turn_toward_object(struct Object *obj, struct Object *target, s16 angleI
|
||||
b = obj->oPosX;
|
||||
d = target->oPosX;
|
||||
|
||||
targetAngle = atan2s(c - a, d - b);
|
||||
targetAngle = atan2s((c - a), (d - b));
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -401,25 +328,16 @@ s16 obj_turn_toward_object(struct Object *obj, struct Object *target, s16 angleI
|
||||
}
|
||||
|
||||
void obj_set_parent_relative_pos(struct Object *obj, s16 relX, s16 relY, s16 relZ) {
|
||||
obj->oParentRelativePosX = relX;
|
||||
obj->oParentRelativePosY = relY;
|
||||
obj->oParentRelativePosZ = relZ;
|
||||
vec3_set(&obj->oParentRelativePosVec, relX, relY, relZ);
|
||||
}
|
||||
|
||||
void obj_set_pos(struct Object *obj, s16 x, s16 y, s16 z) {
|
||||
obj->oPosX = x;
|
||||
obj->oPosY = y;
|
||||
obj->oPosZ = z;
|
||||
vec3_set(&obj->oPosVec, x, y, z);
|
||||
}
|
||||
|
||||
void obj_set_angle(struct Object *obj, s16 pitch, s16 yaw, s16 roll) {
|
||||
obj->oFaceAnglePitch = pitch;
|
||||
obj->oFaceAngleYaw = yaw;
|
||||
obj->oFaceAngleRoll = roll;
|
||||
|
||||
obj->oMoveAnglePitch = pitch;
|
||||
obj->oMoveAngleYaw = yaw;
|
||||
obj->oMoveAngleRoll = roll;
|
||||
vec3_set(&obj->oFaceAngleVec, pitch, yaw, roll);
|
||||
vec3_set(&obj->oMoveAngleVec, pitch, yaw, roll);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -453,7 +371,7 @@ struct Object *spawn_object_rel_with_rot(struct Object *parent, u32 model, const
|
||||
|
||||
struct Object *spawn_obj_with_transform_flags(struct Object *parent, s32 model, const BehaviorScript *behavior) {
|
||||
struct Object *newObj = spawn_object(parent, model, behavior);
|
||||
newObj->oFlags |= OBJ_FLAG_UPDATE_TRANSFORM_FOR_THROW_MATRIX | OBJ_FLAG_SET_THROW_MATRIX_FROM_TRANSFORM;
|
||||
newObj->oFlags |= (OBJ_FLAG_UPDATE_TRANSFORM_FOR_THROW_MATRIX | OBJ_FLAG_SET_THROW_MATRIX_FROM_TRANSFORM);
|
||||
return newObj;
|
||||
}
|
||||
|
||||
@@ -508,8 +426,7 @@ struct Object *spawn_object_at_origin(struct Object *parent, UNUSED s32 unusedAr
|
||||
obj->header.gfx.areaIndex = parent->header.gfx.areaIndex;
|
||||
obj->header.gfx.activeAreaIndex = parent->header.gfx.areaIndex;
|
||||
|
||||
geo_obj_init((struct GraphNodeObject *) &obj->header.gfx, gLoadedGraphNodes[model], gVec3fZero,
|
||||
gVec3sZero);
|
||||
geo_obj_init((struct GraphNodeObject *) &obj->header.gfx, gLoadedGraphNodes[model], gVec3fZero, gVec3sZero);
|
||||
|
||||
return obj;
|
||||
}
|
||||
@@ -575,9 +492,7 @@ struct Object *spawn_object_relative_with_scale(s16 behaviorParam, s16 relativeP
|
||||
}
|
||||
|
||||
void cur_obj_move_using_vel(void) {
|
||||
o->oPosX += o->oVelX;
|
||||
o->oPosY += o->oVelY;
|
||||
o->oPosZ += o->oVelZ;
|
||||
vec3f_add(&o->oPosVec, &o->oVelVec);
|
||||
}
|
||||
|
||||
void obj_copy_graph_y_offset(struct Object *dst, struct Object *src) {
|
||||
@@ -590,25 +505,16 @@ void obj_copy_pos_and_angle(struct Object *dst, struct Object *src) {
|
||||
}
|
||||
|
||||
void obj_copy_pos(struct Object *dst, struct Object *src) {
|
||||
dst->oPosX = src->oPosX;
|
||||
dst->oPosY = src->oPosY;
|
||||
dst->oPosZ = src->oPosZ;
|
||||
vec3f_copy(&dst->oPosVec, &src->oPosVec);
|
||||
}
|
||||
|
||||
void obj_copy_angle(struct Object *dst, struct Object *src) {
|
||||
dst->oMoveAnglePitch = src->oMoveAnglePitch;
|
||||
dst->oMoveAngleYaw = src->oMoveAngleYaw;
|
||||
dst->oMoveAngleRoll = src->oMoveAngleRoll;
|
||||
|
||||
dst->oFaceAnglePitch = src->oFaceAnglePitch;
|
||||
dst->oFaceAngleYaw = src->oFaceAngleYaw;
|
||||
dst->oFaceAngleRoll = src->oFaceAngleRoll;
|
||||
vec3_copy(&dst->oMoveAngleVec, &src->oMoveAngleVec);
|
||||
vec3_copy(&dst->oFaceAngleVec, &src->oFaceAngleVec);
|
||||
}
|
||||
|
||||
void obj_set_gfx_pos_from_pos(struct Object *obj) {
|
||||
obj->header.gfx.pos[0] = obj->oPosX;
|
||||
obj->header.gfx.pos[1] = obj->oPosY;
|
||||
obj->header.gfx.pos[2] = obj->oPosZ;
|
||||
vec3f_copy(obj->header.gfx.pos, &obj->oPosVec);
|
||||
}
|
||||
|
||||
void obj_init_animation(struct Object *obj, s32 animIndex) {
|
||||
|
||||
@@ -69,9 +69,6 @@ void obj_set_held_state(struct Object *obj, const BehaviorScript *heldBehavior);
|
||||
f32 lateral_dist_between_objects(struct Object *obj1, struct Object *obj2);
|
||||
f32 dist_between_objects(struct Object *obj1, struct Object *obj2);
|
||||
void cur_obj_forward_vel_approach_upward(f32 target, f32 increment);
|
||||
s32 approach_f32_signed(f32 *value, f32 target, f32 increment);
|
||||
f32 approach_f32_symmetric(f32 value, f32 target, f32 increment);
|
||||
s16 approach_s16_symmetric(s16 value, s16 target, s16 increment);
|
||||
s32 cur_obj_rotate_yaw_toward(s16 target, s16 increment);
|
||||
s16 obj_angle_to_object(struct Object *obj1, struct Object *obj2);
|
||||
s16 obj_turn_toward_object(struct Object *obj, struct Object *target, s16 angleIndex, s16 turnAmount);
|
||||
|
||||
@@ -139,8 +139,7 @@ void puppyprint_calculate_ram_usage(void)
|
||||
audioPool[6] + audioPool[7] + audioPool[8] + audioPool[9] + audioPool[10] + audioPool[11];
|
||||
}
|
||||
|
||||
void puppyprint_profiler_finished(void)
|
||||
{
|
||||
void puppyprint_profiler_finished(void) {
|
||||
s32 i = 0;
|
||||
benchMark[NUM_BENCH_ITERATIONS] = 0;
|
||||
benchMark[NUM_BENCH_ITERATIONS+1] = 0;
|
||||
@@ -158,37 +157,37 @@ void puppyprint_profiler_finished(void)
|
||||
|
||||
//RGB colour lookup table for colouring all the funny ram prints.
|
||||
u8 colourChart[33][3] = {
|
||||
{255, 0, 0},
|
||||
{0, 0, 255},
|
||||
{0, 255, 0},
|
||||
{255, 255, 0},
|
||||
{255, 0, 255},
|
||||
{255, 127, 0},
|
||||
{0, 255, 255},
|
||||
{51, 255, 51},
|
||||
{255, 153, 153},
|
||||
{204, 0, 102},
|
||||
{0, 153, 153},
|
||||
{153, 255, 153},
|
||||
{0, 0, 128},
|
||||
{128, 0, 128},
|
||||
{218, 165, 32},
|
||||
{107, 142, 35},
|
||||
{188, 143, 143},
|
||||
{210, 105, 30},
|
||||
{154, 205, 50},
|
||||
{165, 42, 42},
|
||||
{255, 105, 180},
|
||||
{139, 69, 19},
|
||||
{250, 240, 230},
|
||||
{95, 158, 160},
|
||||
{60, 179, 113},
|
||||
{255, 69, 0},
|
||||
{128, 0, 0},
|
||||
{216, 191, 216},
|
||||
{244, 164, 96},
|
||||
{176, 196, 222},
|
||||
{255, 255, 255}};
|
||||
{ 255, 0, 0 },
|
||||
{ 0, 0, 255 },
|
||||
{ 0, 255, 0 },
|
||||
{ 255, 255, 0 },
|
||||
{ 255, 0, 255 },
|
||||
{ 255, 127, 0 },
|
||||
{ 0, 255, 255 },
|
||||
{ 51, 255, 51 },
|
||||
{ 255, 153, 153 },
|
||||
{ 204, 0, 102 },
|
||||
{ 0, 153, 153 },
|
||||
{ 153, 255, 153 },
|
||||
{ 0, 0, 128 },
|
||||
{ 128, 0, 128 },
|
||||
{ 218, 165, 32 },
|
||||
{ 107, 142, 35 },
|
||||
{ 188, 143, 143 },
|
||||
{ 210, 105, 30 },
|
||||
{ 154, 205, 50 },
|
||||
{ 165, 42, 42 },
|
||||
{ 255, 105, 180 },
|
||||
{ 139, 69, 19 },
|
||||
{ 250, 240, 230 },
|
||||
{ 95, 158, 160 },
|
||||
{ 60, 179, 113 },
|
||||
{ 255, 69, 0 },
|
||||
{ 128, 0, 0 },
|
||||
{ 216, 191, 216 },
|
||||
{ 244, 164, 96 },
|
||||
{ 176, 196, 222 },
|
||||
{ 255, 255, 255 }};
|
||||
|
||||
//Change this to alter the width of the bar at the bottom.
|
||||
#define BAR_LENGTH 200
|
||||
@@ -366,8 +365,13 @@ void puppyprint_render_profiler(void)
|
||||
s32 perfPercentage[5];
|
||||
s32 graphPos;
|
||||
s32 prevGraph;
|
||||
#ifdef PUPPYPRINT_DEBUG_CYCLES
|
||||
OSTime cpuCount = (cpuTime+audioTime[NUM_PERF_ITERATIONS]+dmaAudioTime[NUM_PERF_ITERATIONS]+faultTime[NUM_PERF_ITERATIONS]
|
||||
+taskTime[NUM_PERF_ITERATIONS]-profilerTime[NUM_PERF_ITERATIONS]-profilerTime2[NUM_PERF_ITERATIONS]);
|
||||
#else
|
||||
OSTime cpuCount = OS_CYCLES_TO_USEC(cpuTime+audioTime[NUM_PERF_ITERATIONS]+dmaAudioTime[NUM_PERF_ITERATIONS]+faultTime[NUM_PERF_ITERATIONS]
|
||||
+taskTime[NUM_PERF_ITERATIONS]-profilerTime[NUM_PERF_ITERATIONS]-profilerTime2[NUM_PERF_ITERATIONS]);
|
||||
#endif
|
||||
OSTime first = osGetTime();
|
||||
char textBytes[80];
|
||||
|
||||
@@ -383,7 +387,11 @@ void puppyprint_render_profiler(void)
|
||||
if (!ramViewer && !benchViewer && !logViewer)
|
||||
{
|
||||
print_fps(16,40);
|
||||
#ifdef PUPPYPRINT_DEBUG_CYCLES
|
||||
sprintf(textBytes, "CPU: %dc (%d_)#RSP: %dc (%d_)#RDP: %dc (%d_)", (s32)cpuCount, (s32)(cpuCount/333), (s32)(rspTime), (s32)(rspTime)/333, (s32)(rdpTime), (s32)(rdpTime)/333);
|
||||
#else
|
||||
sprintf(textBytes, "CPU: %dus (%d_)#RSP: %dus (%d_)#RDP: %dus (%d_)", (s32)cpuCount, (s32)(cpuCount/333), (s32)OS_CYCLES_TO_USEC(rspTime), (s32)OS_CYCLES_TO_USEC(rspTime)/333, (s32)OS_CYCLES_TO_USEC(rdpTime), (s32)OS_CYCLES_TO_USEC(rdpTime)/333);
|
||||
#endif
|
||||
print_small_text(16, 52, textBytes, PRINT_TEXT_ALIGN_LEFT, PRINT_ALL);
|
||||
|
||||
sprintf(textBytes, "OBJ: %d/%d", gObjectCounter, OBJECT_POOL_CAPACITY);
|
||||
@@ -406,8 +414,13 @@ void puppyprint_render_profiler(void)
|
||||
{
|
||||
benchmarkTimer--;
|
||||
prepare_blank_box();
|
||||
#ifdef PUPPYPRINT_DEBUG_CYCLES
|
||||
//sprintf(textBytes, "Benchmark: %dus#High: %dc", (s32)(benchMark[NUM_BENCH_ITERATIONS]), (s32)(benchMark[NUM_BENCH_ITERATIONS+1]));
|
||||
sprintf(textBytes, "Done in %0.000f seconds#Benchmark: %dc#High: %dc", (f32)(benchmarkProgramTimer)*0.000001f, (s32)(benchMark[NUM_BENCH_ITERATIONS]), (s32)(benchMark[NUM_BENCH_ITERATIONS+1]));
|
||||
#else
|
||||
//sprintf(textBytes, "Benchmark: %dus#High: %dus", (s32)OS_CYCLES_TO_USEC(benchMark[NUM_BENCH_ITERATIONS]), (s32)OS_CYCLES_TO_USEC(benchMark[NUM_BENCH_ITERATIONS+1]));
|
||||
sprintf(textBytes, "Done in %0.000f seconds#Benchmark: %dus#High: %dus", (f32)(benchmarkProgramTimer)*0.000001f, (s32)OS_CYCLES_TO_USEC(benchMark[NUM_BENCH_ITERATIONS]), (s32)OS_CYCLES_TO_USEC(benchMark[NUM_BENCH_ITERATIONS+1]));
|
||||
#endif
|
||||
render_blank_box(160-(get_text_width(textBytes)/2)-4, 158, 160+(get_text_width(textBytes)/2)+4, 196, 0, 0, 0, 255);
|
||||
print_set_envcolour(255, 255, 255, 255);
|
||||
print_small_text(160, 160, textBytes, PRINT_TEXT_ALIGN_CENTRE, PRINT_ALL);
|
||||
@@ -422,6 +435,18 @@ void puppyprint_render_profiler(void)
|
||||
perfPercentage[4] = MAX((dmaTime[NUM_PERF_ITERATIONS]/ADDTIMES), 1);
|
||||
#undef ADDTIMES
|
||||
|
||||
#ifdef PUPPYPRINT_DEBUG_CYCLES
|
||||
sprintf(textBytes, "Collision: <COL_99505099>%dc", (s32)(collisionTime[NUM_PERF_ITERATIONS]));
|
||||
print_small_text(304, 40, textBytes, PRINT_TEXT_ALIGN_RIGHT, PRINT_ALL);
|
||||
sprintf(textBytes, "Graph: <COL_50509999>%dc", (s32)(graphTime[NUM_PERF_ITERATIONS]));
|
||||
print_small_text(304, 52, textBytes, PRINT_TEXT_ALIGN_RIGHT, PRINT_ALL);
|
||||
sprintf(textBytes, "Behaviour: <COL_50995099>%dc", (s32)(behaviourTime[NUM_PERF_ITERATIONS]));
|
||||
print_small_text(304, 64, textBytes, PRINT_TEXT_ALIGN_RIGHT, PRINT_ALL);
|
||||
sprintf(textBytes, "Audio: <COL_99995099>%dc", (s32)(audioTime[NUM_PERF_ITERATIONS]));
|
||||
print_small_text(304, 76, textBytes, PRINT_TEXT_ALIGN_RIGHT, PRINT_ALL);
|
||||
sprintf(textBytes, "DMA: <COL_99509999>%dc", (s32)(dmaTime[NUM_PERF_ITERATIONS]));
|
||||
print_small_text(304, 88, textBytes, PRINT_TEXT_ALIGN_RIGHT, PRINT_ALL);
|
||||
#else
|
||||
sprintf(textBytes, "Collision: <COL_99505099>%dus", (s32)OS_CYCLES_TO_USEC(collisionTime[NUM_PERF_ITERATIONS]));
|
||||
print_small_text(304, 40, textBytes, PRINT_TEXT_ALIGN_RIGHT, PRINT_ALL);
|
||||
sprintf(textBytes, "Graph: <COL_50509999>%dus", (s32)OS_CYCLES_TO_USEC(graphTime[NUM_PERF_ITERATIONS]));
|
||||
@@ -432,6 +457,7 @@ void puppyprint_render_profiler(void)
|
||||
print_small_text(304, 76, textBytes, PRINT_TEXT_ALIGN_RIGHT, PRINT_ALL);
|
||||
sprintf(textBytes, "DMA: <COL_99509999>%dus", (s32)OS_CYCLES_TO_USEC(dmaTime[NUM_PERF_ITERATIONS]));
|
||||
print_small_text(304, 88, textBytes, PRINT_TEXT_ALIGN_RIGHT, PRINT_ALL);
|
||||
#endif
|
||||
|
||||
//Render CPU breakdown bar.
|
||||
prepare_blank_box();
|
||||
|
||||