Fix/supress almost every single compiler warning for US
This commit is contained in:
1 parent
11364cbb7f
commit
af9f9d6b8b
50 files changed
+113
-89
No files matched your search
@@ -126,12 +126,12 @@ void seq_channel_layer_process_script(struct SequenceChannelLayer *layer) {
|
||||
u8 sameSound;
|
||||
u8 cmd; // a0 sp3E, EU s2
|
||||
u8 cmdSemitone; // sp3D, t0
|
||||
u16 sp3A; // t2, a0, a1
|
||||
u16 sp3A = 0; // t2, a0, a1
|
||||
f32 tuning; // f0
|
||||
s32 vel; // sp30, t3
|
||||
s32 vel = 0; // sp30, t3
|
||||
s32 usedSemitone; // a1
|
||||
f32 freqScale; // sp28, f0
|
||||
f32 sp24;
|
||||
f32 freqScale = 0.0f; // sp28, f0
|
||||
f32 sp24 = 0.0f;
|
||||
f32 temp_f12;
|
||||
f32 temp_f2;
|
||||
|
||||
|
||||
+4
-2
@@ -190,6 +190,7 @@ s8 get_vibrato_pitch_change(struct VibratoState *vib) {
|
||||
switch (index & 0x30) {
|
||||
case 0x10:
|
||||
index = 31 - index;
|
||||
// fall through
|
||||
|
||||
case 0x00:
|
||||
return vib->curve[index];
|
||||
@@ -385,8 +386,8 @@ s32 adsr_update(struct AdsrState *adsr) {
|
||||
adsr->state = ADSR_STATE_HANG;
|
||||
break;
|
||||
}
|
||||
// fallthrough
|
||||
}
|
||||
// fall through
|
||||
|
||||
case ADSR_STATE_START_LOOP:
|
||||
adsr->envIndex = 0;
|
||||
@@ -394,11 +395,12 @@ s32 adsr_update(struct AdsrState *adsr) {
|
||||
adsr->currentHiRes = adsr->current << 0x10;
|
||||
#endif
|
||||
adsr->state = ADSR_STATE_LOOP;
|
||||
// fallthrough
|
||||
|
||||
#ifdef VERSION_SH
|
||||
restart:
|
||||
#endif
|
||||
// fall through
|
||||
|
||||
case ADSR_STATE_LOOP:
|
||||
adsr->delay = BSWAP16(adsr->envelope[adsr->envIndex].delay);
|
||||
switch (adsr->delay) {
|
||||
|
||||
+2
-2
@@ -409,9 +409,9 @@ void *alloc_bank_or_seq(struct SoundMultiPool *arg0, s32 arg1, s32 size, s32 arg
|
||||
#endif
|
||||
u32 nullID = -1;
|
||||
UNUSED s32 i;
|
||||
u8 *table;
|
||||
u8 *table = NULL;
|
||||
#ifndef VERSION_SH
|
||||
u8 isSound;
|
||||
u8 isSound = FALSE;
|
||||
#endif
|
||||
#if defined(VERSION_JP) || defined(VERSION_US)
|
||||
u16 firstVal;
|
||||
|
||||
+4
-4
@@ -764,8 +764,8 @@ u8 get_missing_bank(u32 seqId, s32 *nonNullCount, s32 *nullCount) {
|
||||
}
|
||||
|
||||
struct AudioBank *load_banks_immediate(s32 seqId, u8 *outDefaultBank) {
|
||||
void *ret;
|
||||
u32 bankId;
|
||||
void *ret = NULL;
|
||||
u32 bankId = 0;
|
||||
u16 offset;
|
||||
u8 i;
|
||||
|
||||
@@ -945,10 +945,10 @@ void audio_init() {
|
||||
// It seems boot.s doesn't clear the .bss area for audio, so do it here.
|
||||
i = 0;
|
||||
lim3 = ((uintptr_t) &gAudioGlobalsEndMarker - (uintptr_t) &gAudioGlobalsStartMarker) / 8;
|
||||
ptr64 = &gAudioGlobalsStartMarker - 1;
|
||||
ptr64 = &gAudioGlobalsStartMarker;
|
||||
for (k = lim3; k >= 0; k--) {
|
||||
i++;
|
||||
ptr64[i] = 0;
|
||||
i++;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1493,7 +1493,7 @@ void sequence_channel_process_script(struct SequenceChannel *seqChannel) {
|
||||
u8 loBits;
|
||||
u16 sp5A;
|
||||
s32 sp38;
|
||||
s8 value;
|
||||
s8 value = 0;
|
||||
s32 i;
|
||||
u8 *seqData;
|
||||
|
||||
@@ -2235,7 +2235,7 @@ void sequence_player_process_sequence(struct SequencePlayer *seqPlayer) {
|
||||
#endif
|
||||
u8 loBits;
|
||||
u8 temp;
|
||||
s32 value;
|
||||
s32 value = 0;
|
||||
s32 i;
|
||||
u16 u16v;
|
||||
u8 *seqData;
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
aSetBuffer(pkt, 0, 0, c + DMEM_ADDR_WET_RIGHT_CH, d); \
|
||||
aSaveBuffer(pkt, VIRTUAL_TO_PHYSICAL2(gSynthesisReverb.ringBuffer.right + (off)));
|
||||
|
||||
#define ALIGN(val, amnt) (((val) + (1 << amnt) - 1) & ~((1 << amnt) - 1))
|
||||
#define AUDIO_ALIGN(val, amnt) (((val) + (1 << amnt) - 1) & ~((1 << amnt) - 1))
|
||||
|
||||
struct VolumeChange {
|
||||
u16 sourceLeft;
|
||||
@@ -379,7 +379,7 @@ u64 *synthesis_resample_and_mix_reverb(u64 *cmd, s32 bufLen, s16 reverbIndex, s1
|
||||
aMix(cmd++, 0, 0x8000 + gSynthesisReverbs[reverbIndex].reverbGain, DMEM_ADDR_WET_LEFT_CH, DMEM_ADDR_WET_LEFT_CH);
|
||||
} else {
|
||||
startPad = (item->startPos % 8u) * 2;
|
||||
paddedLengthA = ALIGN(startPad + item->lengthA, 4);
|
||||
paddedLengthA = AUDIO_ALIGN(startPad + item->lengthA, 4);
|
||||
|
||||
cmd = synthesis_load_reverb_ring_buffer(cmd, DMEM_ADDR_RESAMPLED, (item->startPos - startPad / 2), DEFAULT_LEN_1CH, reverbIndex);
|
||||
if (item->lengthB != 0) {
|
||||
@@ -539,7 +539,7 @@ u64 *synthesis_do_one_audio_update(s16 *aiBuf, s32 bufLen, u64 *cmd, s32 updateI
|
||||
// Same as above but upsample the previously downsampled samples used for reverb first
|
||||
temp = 0; //! jesus christ
|
||||
t4 = (v1->startPos & 7) * 2;
|
||||
ra = ALIGN(v1->lengthA + t4, 4);
|
||||
ra = AUDIO_ALIGN(v1->lengthA + t4, 4);
|
||||
aSetLoadBufferPair(cmd++, 0, v1->startPos - t4 / 2);
|
||||
if (v1->lengthB != 0) {
|
||||
// Ring buffer wrapped
|
||||
@@ -606,11 +606,11 @@ u64 *synthesis_process_notes(s16 *aiBuf, s32 bufLen, u64 *cmd) {
|
||||
UNUSED u8 pad7[0x0c]; // sp100
|
||||
UNUSED s32 tempBufLen;
|
||||
#ifdef VERSION_EU
|
||||
s32 sp130; //sp128, sp104
|
||||
s32 sp130 = 0; //sp128, sp104
|
||||
UNUSED u32 pad9;
|
||||
#else
|
||||
UNUSED u32 pad9;
|
||||
s32 sp130; //sp128, sp104
|
||||
s32 sp130 = 0; //sp128, sp104
|
||||
#endif
|
||||
s32 nAdpcmSamplesProcessed; // signed required for US
|
||||
s32 t0;
|
||||
@@ -891,7 +891,7 @@ u64 *synthesis_process_notes(s16 *aiBuf, s32 bufLen, u64 *cmd) {
|
||||
VIRTUAL_TO_PHYSICAL2(synthesisState->synthesisBuffers->adpcmdecState));
|
||||
sp130 = s2 * 2;
|
||||
} else {
|
||||
s5Aligned = ALIGN(s5, 5);
|
||||
s5Aligned = AUDIO_ALIGN(s5, 5);
|
||||
aSetBuffer(cmd++, 0, DMEM_ADDR_COMPRESSED_ADPCM_DATA + a3,
|
||||
DMEM_ADDR_UNCOMPRESSED_NOTE + s5Aligned, s0 * 2);
|
||||
aADPCMdec(cmd++, flags,
|
||||
@@ -905,9 +905,9 @@ u64 *synthesis_process_notes(s16 *aiBuf, s32 bufLen, u64 *cmd) {
|
||||
aADPCMdec(cmd++, flags, VIRTUAL_TO_PHYSICAL2(note->synthesisBuffers->adpcmdecState));
|
||||
sp130 = s2 * 2;
|
||||
} else {
|
||||
aSetBuffer(cmd++, 0, DMEM_ADDR_COMPRESSED_ADPCM_DATA + a3, DMEM_ADDR_UNCOMPRESSED_NOTE + ALIGN(s5, 5), s0 * 2);
|
||||
aSetBuffer(cmd++, 0, DMEM_ADDR_COMPRESSED_ADPCM_DATA + a3, DMEM_ADDR_UNCOMPRESSED_NOTE + AUDIO_ALIGN(s5, 5), s0 * 2);
|
||||
aADPCMdec(cmd++, flags, VIRTUAL_TO_PHYSICAL2(note->synthesisBuffers->adpcmdecState));
|
||||
aDMEMMove(cmd++, DMEM_ADDR_UNCOMPRESSED_NOTE + ALIGN(s5, 5) + (s2 * 2), DMEM_ADDR_UNCOMPRESSED_NOTE + s5, (nSamplesInThisIteration) * 2);
|
||||
aDMEMMove(cmd++, DMEM_ADDR_UNCOMPRESSED_NOTE + AUDIO_ALIGN(s5, 5) + (s2 * 2), DMEM_ADDR_UNCOMPRESSED_NOTE + s5, (nSamplesInThisIteration) * 2);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -595,7 +595,7 @@ u32 get_area_terrain_size(s16 *data) {
|
||||
*/
|
||||
void load_area_terrain(s16 index, s16 *data, s8 *surfaceRooms, s16 *macroObjects) {
|
||||
s16 terrainLoadType;
|
||||
s16 *vertexData;
|
||||
s16 *vertexData = NULL;
|
||||
UNUSED s32 unused;
|
||||
|
||||
// Initialize the data for this.
|
||||
|
||||
@@ -864,7 +864,7 @@ void bhv_boo_in_castle_loop(void) {
|
||||
}
|
||||
|
||||
void bhv_boo_staircase(void) {
|
||||
f32 targetY;
|
||||
f32 targetY = 0.0f;
|
||||
|
||||
switch (o->oBehParams2ndByte) {
|
||||
case 1:
|
||||
|
||||
@@ -258,7 +258,7 @@ void bhv_free_bowling_ball_init(void) {
|
||||
}
|
||||
|
||||
void bhv_free_bowling_ball_roll_loop(void) {
|
||||
s16 collisionFlags = object_step();
|
||||
/*s16 collisionFlags = */object_step();
|
||||
bowling_ball_set_hitbox();
|
||||
|
||||
if (o->oForwardVel > 10.0f) {
|
||||
@@ -266,8 +266,9 @@ void bhv_free_bowling_ball_roll_loop(void) {
|
||||
cur_obj_play_sound_1(SOUND_ENV_UNKNOWN2);
|
||||
}
|
||||
|
||||
if ((collisionFlags & OBJ_COL_FLAG_GROUNDED) && !(collisionFlags & OBJ_COL_FLAGS_LANDED))
|
||||
cur_obj_play_sound_2(SOUND_GENERAL_QUIET_POUND1_LOWPRIO);
|
||||
/* Always false, commented out to suppress compiler warnings */
|
||||
// if ((collisionFlags & OBJ_COL_FLAG_GROUNDED) && !(collisionFlags & OBJ_COL_FLAGS_LANDED))
|
||||
// cur_obj_play_sound_2(SOUND_GENERAL_QUIET_POUND1_LOWPRIO);
|
||||
|
||||
if (!is_point_within_radius_of_mario(o->oPosX, o->oPosY, o->oPosZ, 6000)) {
|
||||
o->header.gfx.node.flags |= GRAPH_RENDER_INVISIBLE;
|
||||
|
||||
@@ -1564,8 +1564,11 @@ void bowser_free_update(void) {
|
||||
struct Object *platform;
|
||||
UNUSED f32 floorHeight;
|
||||
#ifdef PLATFORM_DISPLACEMENT_2
|
||||
s16 tmpOFaceAngleYaw = (s16) o->oFaceAngleYaw;
|
||||
if ((platform = o->platform) != NULL) {
|
||||
apply_platform_displacement(&sBowserDisplacementInfo, &o->oPosX, &o->oFaceAngleYaw, platform);
|
||||
// NOTE: This function was at one point using '&o->oFaceAngleYaw', which is a s32 address. Should tmpOFaceAngleYaw be using the first 16 bits instead, or was that a bug?
|
||||
apply_platform_displacement(&sBowserDisplacementInfo, &o->oPosX, &tmpOFaceAngleYaw, platform);
|
||||
o->oFaceAngleYaw = tmpOFaceAngleYaw;
|
||||
}
|
||||
#else
|
||||
if ((platform = o->platform) != NULL) {
|
||||
|
||||
@@ -33,6 +33,9 @@ static void fish_spawner_act_spawn(void) {
|
||||
case FISH_SPAWNER_BP_FEW_CYAN:
|
||||
model = MODEL_CYAN_FISH; schoolQuantity = 5; minDistToMario = 1500.0f; fishAnimation = cyan_fish_seg6_anims_0600E264;
|
||||
break;
|
||||
|
||||
default:
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ void bhv_jrb_sliding_box_loop(void) {
|
||||
struct Surface *sp38;
|
||||
UNUSED Vec3f sp2C;
|
||||
Vec3f sp20;
|
||||
s16 sp1E;
|
||||
s16 sp1E = 0;
|
||||
if (o->oJrbSlidingBoxUnkF4 == NULL) {
|
||||
sp3C = cur_obj_nearest_object_with_behavior(bhvInSunkenShip3);
|
||||
if (sp3C != NULL) // NULL check only for assignment, not for dereference?
|
||||
|
||||
@@ -163,6 +163,7 @@ void bhv_unagi_loop(void) {
|
||||
break;
|
||||
case 2:
|
||||
unagi_act_2();
|
||||
// fall through
|
||||
case 3:
|
||||
unagi_act_3();
|
||||
break;
|
||||
|
||||
+3
-2
@@ -1625,7 +1625,8 @@ s32 update_boss_fight_camera(struct Camera *c, Vec3f focus, Vec3f pos) {
|
||||
switch (gCurrLevelArea) {
|
||||
case AREA_BOB:
|
||||
pos[1] += 125.f;
|
||||
//! fall through, makes the BoB boss fight camera move up twice as high as it should
|
||||
// fall through
|
||||
//! makes the BoB boss fight camera move up twice as high as it should
|
||||
case AREA_WF:
|
||||
pos[1] += 125.f;
|
||||
}
|
||||
@@ -5127,7 +5128,7 @@ s32 determine_dance_cutscene(UNUSED struct Camera *c) {
|
||||
* @return `pullResult` or `pushResult` depending on Mario's door action
|
||||
*/
|
||||
u8 open_door_cutscene(u8 pullResult, u8 pushResult) {
|
||||
s16 result;
|
||||
s16 result = 0;
|
||||
|
||||
if (sMarioCamState->action == ACT_PULLING_DOOR) {
|
||||
result = pullResult;
|
||||
|
||||
@@ -455,6 +455,8 @@ void envfx_set_bubble_texture(s32 mode, s16 index) {
|
||||
imageArr = segmented_to_virtual(&bubble_ptr_0B006848);
|
||||
frame = 0;
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
|
||||
gDPSetTextureImage(sGfxCursor++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, *(imageArr + frame));
|
||||
|
||||
@@ -72,7 +72,7 @@ struct DmaHandlerList gDemoInputsBuf;
|
||||
|
||||
// fillers
|
||||
UNUSED static u8 sfillerGameInit[0x90];
|
||||
static s32 sUnusedGameInitValue = 0;
|
||||
UNUSED static s32 sUnusedGameInitValue = 0;
|
||||
|
||||
// General timer that runs as the game starts
|
||||
u32 gGlobalTimer = 0;
|
||||
|
||||
@@ -1020,7 +1020,7 @@ s8 gDialogCourseActNum = 1;
|
||||
void render_dialog_entries(void) {
|
||||
void **dialogTable;
|
||||
struct DialogEntry *dialog;
|
||||
s8 lowerBound;
|
||||
s8 lowerBound = 0;
|
||||
dialogTable = segmented_to_virtual(seg2_dialog_table);
|
||||
dialog = segmented_to_virtual(dialogTable[gDialogID]);
|
||||
|
||||
|
||||
@@ -492,7 +492,7 @@ void warp_level(void) {
|
||||
}
|
||||
|
||||
void warp_credits(void) {
|
||||
s32 marioAction;
|
||||
s32 marioAction = 0;
|
||||
|
||||
switch (sWarpDest.nodeId) {
|
||||
case WARP_NODE_CREDITS_START:
|
||||
@@ -1144,7 +1144,7 @@ UNUSED static s32 play_mode_unused(void) {
|
||||
}
|
||||
|
||||
s32 update_level(void) {
|
||||
s32 changeLevel;
|
||||
s32 changeLevel = FALSE;
|
||||
|
||||
switch (sCurrPlayMode) {
|
||||
case PLAY_MODE_NORMAL:
|
||||
|
||||
@@ -61,9 +61,11 @@ s32 lava_boost_on_wall(struct MarioState *m) {
|
||||
}
|
||||
|
||||
s32 check_fall_damage(struct MarioState *m, u32 hardFallAction) {
|
||||
#ifndef NO_FALL_DAMAGE
|
||||
f32 fallHeight;
|
||||
f32 damageHeight;
|
||||
#ifdef NO_FALL_DAMAGE
|
||||
return FALSE;
|
||||
#endif
|
||||
|
||||
fallHeight = m->peakHeight - m->pos[1];
|
||||
|
||||
@@ -104,7 +106,7 @@ s32 check_fall_damage(struct MarioState *m, u32 hardFallAction) {
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -526,7 +528,7 @@ s32 act_backflip(struct MarioState *m) {
|
||||
}
|
||||
|
||||
s32 act_freefall(struct MarioState *m) {
|
||||
s32 animation;
|
||||
s32 animation = 0;
|
||||
|
||||
if (m->input & INPUT_B_PRESSED) {
|
||||
return set_mario_action(m, ACT_DIVE, 0);
|
||||
@@ -1034,7 +1036,7 @@ s32 act_burning_fall(struct MarioState *m) {
|
||||
}
|
||||
|
||||
s32 act_crazy_box_bounce(struct MarioState *m) {
|
||||
f32 minSpeed;
|
||||
f32 minSpeed = 0.0f;
|
||||
|
||||
if (m->actionTimer == 0) {
|
||||
switch (m->actionArg) {
|
||||
@@ -2069,7 +2071,7 @@ s32 check_common_airborne_cancels(struct MarioState *m) {
|
||||
}
|
||||
|
||||
s32 mario_execute_airborne_action(struct MarioState *m) {
|
||||
u32 cancel;
|
||||
u32 cancel = FALSE;
|
||||
|
||||
if (check_common_airborne_cancels(m)) {
|
||||
return TRUE;
|
||||
|
||||
@@ -860,7 +860,7 @@ s32 check_common_automatic_cancels(struct MarioState *m) {
|
||||
}
|
||||
|
||||
s32 mario_execute_automatic_action(struct MarioState *m) {
|
||||
s32 cancel;
|
||||
s32 cancel = FALSE;
|
||||
|
||||
if (check_common_automatic_cancels(m)) {
|
||||
return TRUE;
|
||||
|
||||
@@ -1292,6 +1292,7 @@ s32 act_crawling(struct MarioState *m) {
|
||||
mario_set_forward_vel(m, 10.0f);
|
||||
}
|
||||
//! Possibly unintended missing break
|
||||
// fall through
|
||||
|
||||
case GROUND_STEP_NONE:
|
||||
align_with_floor(m);
|
||||
|
||||
@@ -37,7 +37,7 @@ s32 mario_update_punch_sequence(struct MarioState *m) {
|
||||
switch (m->actionArg) {
|
||||
case 0:
|
||||
play_sound(SOUND_MARIO_PUNCH_YAH, m->marioObj->header.gfx.cameraToObject);
|
||||
// Fall-through:
|
||||
// fall through
|
||||
case 1:
|
||||
set_mario_animation(m, MARIO_ANIM_FIRST_PUNCH);
|
||||
if (is_anim_past_end(m)) {
|
||||
@@ -77,7 +77,7 @@ s32 mario_update_punch_sequence(struct MarioState *m) {
|
||||
|
||||
case 3:
|
||||
play_sound(SOUND_MARIO_PUNCH_WAH, m->marioObj->header.gfx.cameraToObject);
|
||||
// Fall-through:
|
||||
// fall through
|
||||
case 4:
|
||||
set_mario_animation(m, MARIO_ANIM_SECOND_PUNCH);
|
||||
if (is_anim_past_end(m)) {
|
||||
@@ -456,7 +456,7 @@ s32 check_common_object_cancels(struct MarioState *m) {
|
||||
}
|
||||
|
||||
s32 mario_execute_object_action(struct MarioState *m) {
|
||||
s32 cancel;
|
||||
s32 cancel = FALSE;
|
||||
|
||||
if (check_common_object_cancels(m)) {
|
||||
return TRUE;
|
||||
|
||||
@@ -180,7 +180,7 @@ void play_anim_sound(struct MarioState *m, u32 actionState, s32 animFrame, u32 s
|
||||
|
||||
s32 act_start_sleeping(struct MarioState *m) {
|
||||
#ifndef VERSION_JP
|
||||
s32 animFrame;
|
||||
s32 animFrame = 0;
|
||||
#endif
|
||||
|
||||
if (check_common_idle_cancels(m)) {
|
||||
|
||||
@@ -969,6 +969,8 @@ Gfx *geo_movtex_update_horizontal(s32 callContext, struct GraphNode *node, UNUSE
|
||||
case MOVTEX_TREADMILL_SMALL:
|
||||
movtexVerts = segmented_to_virtual(ttc_movtex_tris_small_surface_treadmill);
|
||||
break;
|
||||
default:
|
||||
return NULL;
|
||||
}
|
||||
update_moving_texture_offset(movtexVerts, MOVTEX_ATTR_COLORED_S);
|
||||
}
|
||||
|
||||
@@ -394,7 +394,8 @@ 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) {
|
||||
f32 a, b, c, d;
|
||||
UNUSED s32 unused;
|
||||
s16 targetAngle, startAngle;
|
||||
s16 targetAngle = 0;
|
||||
s16 startAngle;
|
||||
|
||||
switch (angleIndex) {
|
||||
case O_MOVE_ANGLE_PITCH_INDEX:
|
||||
@@ -1825,7 +1826,7 @@ void cur_obj_move_standard(s16 steepSlopeAngleDegrees) {
|
||||
}
|
||||
}
|
||||
|
||||
static s32 cur_obj_within_12k_bounds(void) {
|
||||
UNUSED static s32 cur_obj_within_12k_bounds(void) {
|
||||
if (o->oPosX < -12000.0f || 12000.0f < o->oPosX) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -1019,7 +1019,7 @@ Gfx *display_painting_rippling(struct Painting *painting) {
|
||||
s16 *neighborTris = segmented_to_virtual(seg2_painting_mesh_neighbor_tris);
|
||||
s16 numVtx = mesh[0];
|
||||
s16 numTris = mesh[numVtx * 3 + 1];
|
||||
Gfx *dlist;
|
||||
Gfx *dlist = NULL;
|
||||
|
||||
// Generate the mesh and its lighting data
|
||||
painting_generate_mesh(painting, mesh, numVtx);
|
||||
|
||||
@@ -30,7 +30,7 @@ s32 set_and_reset_transition_fade_timer(s8 fadeTimer, u8 transTime) {
|
||||
}
|
||||
|
||||
u8 set_transition_color_fade_alpha(s8 fadeType, s8 fadeTimer, u8 transTime) {
|
||||
u8 time;
|
||||
u8 time = 0;
|
||||
|
||||
switch (fadeType) {
|
||||
case 0:
|
||||
|
||||
+7
-5
@@ -310,7 +310,8 @@ void make_shadow_vertex_at_xyz(Vtx *vertices, s8 index, f32 relX, f32 relY, f32
|
||||
s16 vtxX = round_float(relX);
|
||||
s16 vtxY = round_float(relY);
|
||||
s16 vtxZ = round_float(relZ);
|
||||
s16 textureX, textureY;
|
||||
s16 textureX = 0;
|
||||
s16 textureY = 0;
|
||||
|
||||
switch (shadowVertexType) {
|
||||
case SHADOW_WITH_9_VERTS:
|
||||
@@ -545,9 +546,6 @@ s8 correct_shadow_solidity_for_animations(s32 isLuigi, u8 initialSolidity, struc
|
||||
s16 animFrame;
|
||||
|
||||
switch (isLuigi) {
|
||||
case 0:
|
||||
player = gMarioObject;
|
||||
break;
|
||||
case 1:
|
||||
/**
|
||||
* This is evidence of a removed second player, likely Luigi.
|
||||
@@ -559,6 +557,10 @@ s8 correct_shadow_solidity_for_animations(s32 isLuigi, u8 initialSolidity, struc
|
||||
*/
|
||||
player = gLuigiObject;
|
||||
break;
|
||||
case 0:
|
||||
default:
|
||||
player = gMarioObject;
|
||||
break;
|
||||
}
|
||||
|
||||
animFrame = player->header.gfx.animInfo.animFrame;
|
||||
@@ -612,7 +614,7 @@ Gfx *create_shadow_player(f32 xPos, f32 yPos, f32 zPos, s16 shadowScale, u8 soli
|
||||
Vtx *verts;
|
||||
Gfx *displayList;
|
||||
struct Shadow shadow;
|
||||
s8 ret;
|
||||
s8 ret = 0;
|
||||
s32 i;
|
||||
|
||||
// Update global variables about whether Mario is on a flying carpet.
|
||||
|
||||
@@ -12,6 +12,8 @@
|
||||
|
||||
#define ABS(val) (((val) < 0 ? (-(val)) : (val)))
|
||||
#define SQ(val) ((val) * (val))
|
||||
#ifndef ALIGN
|
||||
#define ALIGN(VAL_, ALIGNMENT_) (((VAL_) + ((ALIGNMENT_) - 1)) & ~((ALIGNMENT_) - 1))
|
||||
#endif
|
||||
|
||||
#endif // GD_MACROS_H
|
||||
@@ -668,7 +668,7 @@ void func_80190574(s32 a0, struct ObjJoint *a1, struct ObjJoint *a2, f32 x, f32
|
||||
UNUSED u32 pad268;
|
||||
UNUSED u32 sp264 = 0;
|
||||
UNUSED u32 sp258[3]; // unused vec?
|
||||
struct GdVec3f sp24C;
|
||||
struct GdVec3f sp24C = {0, 0, 0};
|
||||
struct GdVec3f sp240;
|
||||
UNUSED u32 pad238[2];
|
||||
s32 sp234; // i?
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
*/
|
||||
|
||||
// bss
|
||||
static char sDefSettingsMenuStr[0x100];
|
||||
UNUSED static char sDefSettingsMenuStr[0x100];
|
||||
static struct GdVec3f sStaticVec;
|
||||
UNUSED static struct GdVec3f unusedVec;
|
||||
static struct ObjGadget *sCurGadgetPtr;
|
||||
|
||||
@@ -153,7 +153,7 @@ static s32 sLightId;
|
||||
static Hilite sHilites[600];
|
||||
static struct GdVec3f D_801BD758;
|
||||
static struct GdVec3f D_801BD768; // had to migrate earlier
|
||||
static u32 D_801BD774;
|
||||
UNUSED static u32 D_801BD774;
|
||||
static struct GdObj *sMenuGadgets[9]; // @ 801BD778; d_obj ptr storage? menu?
|
||||
static struct ObjView *sDebugViews[2]; // Seems to be a list of ObjViews for displaying debug info
|
||||
static struct GdDisplayList *sStaticDl; // @ 801BD7A8
|
||||
@@ -171,7 +171,7 @@ static LookAt D_801BE7D0[3];
|
||||
static OSMesgQueue D_801BE830; // controller msg queue
|
||||
static OSMesg D_801BE848[10];
|
||||
UNUSED static u32 unref_801be870[16];
|
||||
static OSMesgQueue D_801BE8B0;
|
||||
UNUSED static OSMesgQueue D_801BE8B0;
|
||||
static OSMesgQueue sGdDMAQueue; // @ 801BE8C8
|
||||
UNUSED static u32 unref_801be8e0[25];
|
||||
static OSMesg sGdMesgBuf[1]; // @ 801BE944
|
||||
@@ -205,7 +205,7 @@ static s32 D_801A86BC = 1;
|
||||
static s32 D_801A86C0 = 0; // gd_dl id for something?
|
||||
UNUSED static u32 unref_801a86C4 = 10;
|
||||
static s32 sMtxParamType = G_MTX_PROJECTION;
|
||||
static struct GdVec3f D_801A86CC = { 1.0f, 1.0f, 1.0f };
|
||||
UNUSED static struct GdVec3f D_801A86CC = { 1.0f, 1.0f, 1.0f };
|
||||
static struct ObjView *sActiveView = NULL; // @ 801A86D8 current view? used when drawing dl
|
||||
static struct ObjView *sScreenView = NULL; // @ 801A86DC
|
||||
static struct ObjView *D_801A86E0 = NULL;
|
||||
|
||||
@@ -229,7 +229,7 @@ s32 intro_play_its_a_me_mario(void) {
|
||||
* Returns a level ID after their criteria is met.
|
||||
*/
|
||||
s32 lvl_intro_update(s16 arg, UNUSED s32 unusedArg) {
|
||||
s32 retVar;
|
||||
s32 retVar = 0;
|
||||
|
||||
switch (arg) {
|
||||
case LVL_INTRO_PLAY_ITS_A_ME_MARIO:
|
||||
|
||||
Reference in new issue
Block a user