From 39586c6cde9c06ed99c6df05efaeb326055581ed Mon Sep 17 00:00:00 2001 From: Arceveti <73617174+Arceveti@users.noreply.github.com> Date: Tue, 21 Sep 2021 13:38:29 -0700 Subject: [PATCH 01/26] Name object fields --- data/behavior_data.c | 51 +- include/object_fields.h | 1698 +++++++++-------- .../behaviors/animated_floor_switch.inc.c | 36 +- src/game/behaviors/bouncing_fireball.inc.c | 4 +- src/game/behaviors/bub.inc.c | 28 +- src/game/behaviors/bubba.inc.c | 88 +- src/game/behaviors/camera_lakitu.inc.c | 4 +- src/game/behaviors/cannon.inc.c | 26 +- src/game/behaviors/cap.inc.c | 18 +- src/game/behaviors/celebration_star.inc.c | 6 +- src/game/behaviors/chain_chomp.inc.c | 10 +- .../behaviors/checkerboard_platform.inc.c | 16 +- src/game/behaviors/chuckya.inc.c | 40 +- src/game/behaviors/clam.inc.c | 6 +- src/game/behaviors/coin.inc.c | 18 +- src/game/behaviors/collide_particles.inc.c | 18 +- .../behaviors/controllable_platform.inc.c | 18 +- src/game/behaviors/cruiser.inc.c | 12 +- src/game/behaviors/door.inc.c | 28 +- src/game/behaviors/elevator.inc.c | 44 +- src/game/behaviors/end_birds_1.inc.c | 12 +- src/game/behaviors/end_birds_2.inc.c | 2 +- src/game/behaviors/exclamation_box.inc.c | 16 +- src/game/behaviors/eyerok.inc.c | 104 +- src/game/behaviors/flame_mario.inc.c | 2 +- src/game/behaviors/flamethrower.inc.c | 6 +- src/game/behaviors/floating_platform.inc.c | 32 +- .../behaviors/flying_bookend_switch.inc.c | 42 +- src/game/behaviors/grand_star.inc.c | 2 +- src/game/behaviors/grill_door.inc.c | 8 +- src/game/behaviors/haunted_chair.inc.c | 44 +- src/game/behaviors/heave_ho.inc.c | 22 +- src/game/behaviors/intro_lakitu.inc.c | 28 +- src/game/behaviors/intro_scene.inc.c | 2 +- src/game/behaviors/jrb_ship.inc.c | 22 +- src/game/behaviors/jumping_box.inc.c | 6 +- src/game/behaviors/kickable_board.inc.c | 14 +- src/game/behaviors/king_bobomb.inc.c | 44 +- src/game/behaviors/klepto.inc.c | 50 +- src/game/behaviors/koopa_shell.inc.c | 6 +- .../lll_octagonal_rotating_mesh.inc.c | 6 +- .../behaviors/lll_rotating_hex_flame.inc.c | 12 +- .../behaviors/lll_sinking_rock_block.inc.c | 4 +- src/game/behaviors/mr_i.inc.c | 88 +- src/game/behaviors/mushroom_1up.inc.c | 8 +- src/game/behaviors/rolling_log.inc.c | 20 +- src/game/behaviors/scuttlebug.inc.c | 34 +- src/game/behaviors/skeeter.inc.c | 16 +- src/game/behaviors/snowman.inc.c | 30 +- src/game/behaviors/sound_spawner.inc.c | 2 +- src/game/behaviors/spawn_star.inc.c | 6 +- src/game/behaviors/spindel.inc.c | 24 +- src/game/behaviors/sushi.inc.c | 10 +- .../behaviors/switch_hidden_objects.inc.c | 16 +- src/game/behaviors/tower_platform.inc.c | 32 +- src/game/behaviors/tox_box.inc.c | 4 +- src/game/behaviors/treasure_chest.inc.c | 34 +- src/game/behaviors/tree_particles.inc.c | 10 +- src/game/behaviors/tumbling_bridge.inc.c | 4 +- src/game/behaviors/tuxie.inc.c | 34 +- src/game/behaviors/unagi.inc.c | 58 +- src/game/behaviors/water_bomb_cannon.inc.c | 30 +- src/game/behaviors/water_objs.inc.c | 38 +- src/game/behaviors/wdw_water_level.inc.c | 4 +- src/game/behaviors/white_puff_explode.inc.c | 18 +- src/game/mario.c | 2 +- src/game/object_helpers.c | 18 +- src/game/spawn_sound.c | 2 +- 68 files changed, 1649 insertions(+), 1548 deletions(-) diff --git a/data/behavior_data.c b/data/behavior_data.c index d2b4dc779..7e8ad4378 100644 --- a/data/behavior_data.c +++ b/data/behavior_data.c @@ -508,8 +508,8 @@ const BehaviorScript bhvBetaChestLid[] = { const BehaviorScript bhvBubbleParticleSpawner[] = { BEGIN(OBJ_LIST_DEFAULT), DISABLE_RENDERING(), - SET_RANDOM_INT(oWaterObjUnkF4, /*Minimum*/ 2, /*Range*/ 9), - DELAY_VAR(oWaterObjUnkF4), + SET_RANDOM_INT(oWaterObjScaleXAngle, /*Minimum*/ 2, /*Range*/ 9), + DELAY_VAR(oWaterObjScaleXAngle), SPAWN_CHILD(/*Model*/ MODEL_BUBBLE, /*Behavior*/ bhvSmallWaterWave), PARENT_BIT_CLEAR(oActiveParticleFlags, ACTIVE_PARTICLE_BUBBLE), DEACTIVATE(), @@ -520,12 +520,12 @@ const BehaviorScript bhvBubbleMaybe[] = { OR_INT(oFlags, OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE), BILLBOARD(), CALL_NATIVE(bhv_bubble_wave_init), - SET_RANDOM_FLOAT(oWaterObjUnkF4, /*Minimum*/ -75, /*Range*/ 150), - SET_RANDOM_FLOAT(oWaterObjUnkF8, /*Minimum*/ -75, /*Range*/ 150), - SET_RANDOM_FLOAT(oWaterObjUnkFC, /*Minimum*/ -75, /*Range*/ 150), - SUM_FLOAT(/*Dest*/ oPosX, /*Value 1*/ oPosX, /*Value 2*/ oWaterObjUnkF4), - SUM_FLOAT(/*Dest*/ oPosZ, /*Value 1*/ oPosZ, /*Value 2*/ oWaterObjUnkF8), - SUM_FLOAT(/*Dest*/ oPosY, /*Value 1*/ oPosY, /*Value 2*/ oWaterObjUnkFC), + SET_RANDOM_FLOAT(oWaterObjScaleXAngle, /*Minimum*/ -75, /*Range*/ 150), + SET_RANDOM_FLOAT(oWaterObjScaleYAngle, /*Minimum*/ -75, /*Range*/ 150), + SET_RANDOM_FLOAT(oWaterObjScaleXAngleVel, /*Minimum*/ -75, /*Range*/ 150), + SUM_FLOAT(/*Dest*/ oPosX, /*Value 1*/ oPosX, /*Value 2*/ oWaterObjScaleXAngle), + SUM_FLOAT(/*Dest*/ oPosZ, /*Value 1*/ oPosZ, /*Value 2*/ oWaterObjScaleYAngle), + SUM_FLOAT(/*Dest*/ oPosY, /*Value 1*/ oPosY, /*Value 2*/ oWaterObjScaleXAngleVel), SET_INT(oAnimState, -1), BEGIN_REPEAT(60), ADD_INT(oAnimState, 1), @@ -539,12 +539,12 @@ const BehaviorScript bhvSmallWaterWave[] = { OR_INT(oFlags, OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE), BILLBOARD(), CALL_NATIVE(bhv_bubble_wave_init), - SET_RANDOM_FLOAT(oWaterObjUnkF4, /*Minimum*/ -50, /*Range*/ 100), - SET_RANDOM_FLOAT(oWaterObjUnkF8, /*Minimum*/ -50, /*Range*/ 100), - SUM_FLOAT(/*Dest*/ oPosX, /*Value 1*/ oPosX, /*Value 2*/ oWaterObjUnkF4), - SUM_FLOAT(/*Dest*/ oPosZ, /*Value 1*/ oPosZ, /*Value 2*/ oWaterObjUnkF8), - SET_RANDOM_FLOAT(oWaterObjUnkFC, /*Minimum*/ 0, /*Range*/ 50), - SUM_FLOAT(/*Dest*/ oPosY, /*Value 1*/ oPosY, /*Value 2*/ oWaterObjUnkFC), + SET_RANDOM_FLOAT(oWaterObjScaleXAngle, /*Minimum*/ -50, /*Range*/ 100), + SET_RANDOM_FLOAT(oWaterObjScaleYAngle, /*Minimum*/ -50, /*Range*/ 100), + SUM_FLOAT(/*Dest*/ oPosX, /*Value 1*/ oPosX, /*Value 2*/ oWaterObjScaleXAngle), + SUM_FLOAT(/*Dest*/ oPosZ, /*Value 1*/ oPosZ, /*Value 2*/ oWaterObjScaleYAngle), + SET_RANDOM_FLOAT(oWaterObjScaleXAngleVel, /*Minimum*/ 0, /*Range*/ 50), + SUM_FLOAT(/*Dest*/ oPosY, /*Value 1*/ oPosY, /*Value 2*/ oWaterObjScaleXAngleVel), SET_INT(oAnimState, -1), CALL(bhvSmallWaterWave398), BEGIN_REPEAT(60), @@ -557,10 +557,10 @@ const BehaviorScript bhvSmallWaterWave[] = { const BehaviorScript bhvSmallWaterWave398[] = { ADD_INT(oAnimState, 1), ADD_FLOAT(oPosY, 7), - SET_RANDOM_FLOAT(oWaterObjUnkF4, /*Minimum*/ -2, /*Range*/ 5), - SET_RANDOM_FLOAT(oWaterObjUnkF8, /*Minimum*/ -2, /*Range*/ 5), - SUM_FLOAT(/*Dest*/ oPosX, /*Value 1*/ oPosX, /*Value 2*/ oWaterObjUnkF4), - SUM_FLOAT(/*Dest*/ oPosZ, /*Value 1*/ oPosZ, /*Value 2*/ oWaterObjUnkF8), + SET_RANDOM_FLOAT(oWaterObjScaleXAngle, /*Minimum*/ -2, /*Range*/ 5), + SET_RANDOM_FLOAT(oWaterObjScaleYAngle, /*Minimum*/ -2, /*Range*/ 5), + SUM_FLOAT(/*Dest*/ oPosX, /*Value 1*/ oPosX, /*Value 2*/ oWaterObjScaleXAngle), + SUM_FLOAT(/*Dest*/ oPosZ, /*Value 1*/ oPosZ, /*Value 2*/ oWaterObjScaleYAngle), RETURN(), }; @@ -782,7 +782,7 @@ const BehaviorScript bhvWfRotatingWoodenPlatform[] = { const BehaviorScript bhvKoopaShellUnderwater[] = { BEGIN(OBJ_LIST_GENACTOR), - OR_INT(oFlags, (OBJ_FLAG_HOLDABLE | OBJ_FLAG_COMPUTE_DIST_TO_MARIO | OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE)), + OR_LONG(oFlags, (OBJ_FLAG_HOLDABLE | OBJ_FLAG_COMPUTE_DIST_TO_MARIO | OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE | OBJ_FLAG_SILHOUETTE)), BEGIN_LOOP(), CALL_NATIVE(bhv_koopa_shell_underwater_loop), END_LOOP(), @@ -871,7 +871,7 @@ const BehaviorScript bhvMrIBlueCoin[] = { OR_INT(oFlags, OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE), BILLBOARD(), SET_INT(oIntangibleTimer, 0), - SET_FLOAT(oMrIUnk110, 20), + SET_FLOAT(oMrIBlinking, 20), SET_INT(oAnimState, -1), SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 30, /*Gravity*/ -400, /*Bounciness*/ -70, /*Drag strength*/ 1000, /*Friction*/ 1000, /*Buoyancy*/ 200, /*Unused*/ 0, 0), CALL_NATIVE(bhv_coin_init), @@ -2371,7 +2371,7 @@ const BehaviorScript bhvLllTiltingInvertedPyramid[] = { const BehaviorScript bhvKoopaShell[] = { BEGIN(OBJ_LIST_LEVEL), - OR_INT(oFlags, OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE), + OR_LONG(oFlags, (OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE | OBJ_FLAG_SILHOUETTE)), //! Silhouette doesn't show up in-game SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 30, /*Gravity*/ -400, /*Bounciness*/ -50, /*Drag strength*/ 1000, /*Friction*/ 1000, /*Buoyancy*/ 200, /*Unused*/ 0, 0), BEGIN_LOOP(), CALL_NATIVE(bhv_koopa_shell_loop), @@ -2547,7 +2547,7 @@ const BehaviorScript bhvWdwExpressElevatorPlatform[] = { const BehaviorScript bhvChirpChirp[] = { BEGIN(OBJ_LIST_DEFAULT), - SET_INT(oBirdChirpChirpUnkF4, 1), + SET_INT(oCheepCheepSpawnerSpawnAmount, 1), GOTO(bhvChirpChirpUnused), }; @@ -4787,7 +4787,7 @@ const BehaviorScript bhvWdwSquareFloatingPlatform[] = { BEGIN(OBJ_LIST_SURFACE), OR_LONG(oFlags, (OBJ_FLAG_SET_FACE_YAW_TO_MOVE_YAW | OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE | OBJ_FLAG_UCODE_LARGE)), LOAD_COLLISION_DATA(wdw_seg7_collision_square_floating_platform), - SET_FLOAT(oFloatingPlatformUnkFC, 64), + SET_FLOAT(oFloatingPlatformHeightOffset, 64), SET_HOME(), BEGIN_LOOP(), CALL_NATIVE(bhv_floating_platform_loop), @@ -4799,7 +4799,7 @@ const BehaviorScript bhvWdwRectangularFloatingPlatform[] = { BEGIN(OBJ_LIST_SURFACE), OR_LONG(oFlags, (OBJ_FLAG_SET_FACE_YAW_TO_MOVE_YAW | OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE | OBJ_FLAG_UCODE_LARGE)), LOAD_COLLISION_DATA(wdw_seg7_collision_rect_floating_platform), - SET_FLOAT(oFloatingPlatformUnkFC, 64), + SET_FLOAT(oFloatingPlatformHeightOffset, 64), SET_HOME(), BEGIN_LOOP(), CALL_NATIVE(bhv_floating_platform_loop), @@ -4811,7 +4811,7 @@ const BehaviorScript bhvJrbFloatingPlatform[] = { BEGIN(OBJ_LIST_SURFACE), OR_LONG(oFlags, (OBJ_FLAG_SET_FACE_YAW_TO_MOVE_YAW | OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE | OBJ_FLAG_UCODE_LARGE)), LOAD_COLLISION_DATA(jrb_seg7_collision_floating_platform), - SET_FLOAT(oFloatingPlatformUnkFC, 64), + SET_FLOAT(oFloatingPlatformHeightOffset, 64), SET_HOME(), BEGIN_LOOP(), CALL_NATIVE(bhv_floating_platform_loop), @@ -4823,7 +4823,6 @@ const BehaviorScript bhvArrowLift[] = { BEGIN(OBJ_LIST_SURFACE), OR_INT(oFlags, OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE), LOAD_COLLISION_DATA(wdw_seg7_collision_arrow_lift), - SET_INT_RAND_RSHIFT(oArrowLiftUnk100, /*Minimum*/ 1, /*Right shift*/ 32), SET_HOME(), BEGIN_LOOP(), CALL_NATIVE(bhv_arrow_lift_loop), diff --git a/include/object_fields.h b/include/object_fields.h index 747561953..02bb58725 100644 --- a/include/object_fields.h +++ b/include/object_fields.h @@ -50,1115 +50,1220 @@ // 0x088 (0x00), the first field, is object-specific and defined below the common fields. /* Common fields */ -#define /*0x08C*/ oFlags OBJECT_FIELD_U32(0x01) -#define /*0x090*/ oDialogResponse OBJECT_FIELD_S16(0x02, 0) -#define /*0x092*/ oDialogState OBJECT_FIELD_S16(0x02, 1) -#define /*0x094*/ oUnk94 OBJECT_FIELD_U32(0x03) +#define /*0x08C*/ oFlags OBJECT_FIELD_U32(0x01) +#define /*0x090*/ oDialogResponse OBJECT_FIELD_S16(0x02, 0) +#define /*0x092*/ oDialogState OBJECT_FIELD_S16(0x02, 1) +#define /*0x094*/ oUnk94 OBJECT_FIELD_U32(0x03) // 0x98 unused/removed. -#define /*0x09C*/ oIntangibleTimer OBJECT_FIELD_S32(0x05) -#define /*0x0A0*/ O_POS_INDEX 0x06 -#define /*0x0A0*/ oPosX OBJECT_FIELD_F32(O_POS_INDEX + 0) -#define /*0x0A4*/ oPosY OBJECT_FIELD_F32(O_POS_INDEX + 1) -#define /*0x0A8*/ oPosZ OBJECT_FIELD_F32(O_POS_INDEX + 2) -#define /*0x0AC*/ oVelX OBJECT_FIELD_F32(0x09) -#define /*0x0B0*/ oVelY OBJECT_FIELD_F32(0x0A) -#define /*0x0B4*/ oVelZ OBJECT_FIELD_F32(0x0B) -#define /*0x0B8*/ oForwardVel OBJECT_FIELD_F32(0x0C) -#define /*0x0B8*/ oForwardVelS32 OBJECT_FIELD_S32(0x0C) -#define /*0x0BC*/ oLeftVel OBJECT_FIELD_F32(0x0D) -#define /*0x0C0*/ oUpVel OBJECT_FIELD_F32(0x0E) -#define /*0x0C4*/ O_MOVE_ANGLE_INDEX 0x0F -#define /*0x0C4*/ O_MOVE_ANGLE_PITCH_INDEX (O_MOVE_ANGLE_INDEX + 0) -#define /*0x0C4*/ O_MOVE_ANGLE_YAW_INDEX (O_MOVE_ANGLE_INDEX + 1) -#define /*0x0C4*/ O_MOVE_ANGLE_ROLL_INDEX (O_MOVE_ANGLE_INDEX + 2) -#define /*0x0C4*/ oMoveAnglePitch OBJECT_FIELD_S32(O_MOVE_ANGLE_PITCH_INDEX) -#define /*0x0C8*/ oMoveAngleYaw OBJECT_FIELD_S32(O_MOVE_ANGLE_YAW_INDEX) -#define /*0x0CC*/ oMoveAngleRoll OBJECT_FIELD_S32(O_MOVE_ANGLE_ROLL_INDEX) -#define /*0x0D0*/ O_FACE_ANGLE_INDEX 0x12 -#define /*0x0D0*/ O_FACE_ANGLE_PITCH_INDEX (O_FACE_ANGLE_INDEX + 0) -#define /*0x0D0*/ O_FACE_ANGLE_YAW_INDEX (O_FACE_ANGLE_INDEX + 1) -#define /*0x0D0*/ O_FACE_ANGLE_ROLL_INDEX (O_FACE_ANGLE_INDEX + 2) -#define /*0x0D0*/ oFaceAnglePitch OBJECT_FIELD_S32(O_FACE_ANGLE_PITCH_INDEX) -#define /*0x0D4*/ oFaceAngleYaw OBJECT_FIELD_S32(O_FACE_ANGLE_YAW_INDEX) -#define /*0x0D8*/ oFaceAngleRoll OBJECT_FIELD_S32(O_FACE_ANGLE_ROLL_INDEX) -#define /*0x0DC*/ oGraphYOffset OBJECT_FIELD_F32(0x15) -#define /*0x0E0*/ oActiveParticleFlags OBJECT_FIELD_U32(0x16) -#define /*0x0E4*/ oGravity OBJECT_FIELD_F32(0x17) -#define /*0x0E8*/ oFloorHeight OBJECT_FIELD_F32(0x18) -#define /*0x0EC*/ oMoveFlags OBJECT_FIELD_U32(0x19) -#define /*0x0F0*/ oAnimState OBJECT_FIELD_S32(0x1A) +#define /*0x09C*/ oIntangibleTimer OBJECT_FIELD_S32(0x05) +/* Position vector */ +#define /*0x0A0*/ O_POS_INDEX 0x06 +#define /*0x0A0*/ O_POS_X_INDEX (O_POS_INDEX + 0) // 0x06 +#define /*0x0A4*/ O_POS_Y_INDEX (O_POS_INDEX + 1) // 0x07 +#define /*0x0A8*/ O_POS_Z_INDEX (O_POS_INDEX + 2) // 0x08 +#define /*0x0A0*/ oPosVec OBJECT_FIELD_F32(O_POS_INDEX) +#define /*0x0A0*/ oPosX OBJECT_FIELD_F32(O_POS_X_INDEX) +#define /*0x0A4*/ oPosY OBJECT_FIELD_F32(O_POS_Y_INDEX) +#define /*0x0A8*/ oPosZ OBJECT_FIELD_F32(O_POS_Z_INDEX) +/* Velocity vector */ +#define /*0x0AC*/ O_VEL_INDEX 0x09 +#define /*0x0AC*/ O_VEL_X_INDEX (O_VEL_INDEX + 0) // 0x09 +#define /*0x0B0*/ O_VEL_Y_INDEX (O_VEL_INDEX + 1) // 0x0A +#define /*0x0B4*/ O_VEL_Z_INDEX (O_VEL_INDEX + 2) // 0x0B +#define /*0x0AC*/ oVelVec OBJECT_FIELD_F32(O_VEL_INDEX) +#define /*0x0AC*/ oVelX OBJECT_FIELD_F32(O_VEL_X_INDEX) +#define /*0x0B0*/ oVelY OBJECT_FIELD_F32(O_VEL_Y_INDEX) +#define /*0x0B4*/ oVelZ OBJECT_FIELD_F32(O_VEL_Z_INDEX) +/* Local Position vector */ +#define /*0x0B8*/ O_LOCAL_VEL_INDEX 0x0C +#define /*0x0B8*/ O_LOCAL_VEL_X_INDEX (O_LOCAL_VEL_INDEX + 0) // 0x0C +#define /*0x0BC*/ O_LOCAL_VEL_Y_INDEX (O_LOCAL_VEL_INDEX + 1) // 0x0D +#define /*0x0C0*/ O_LOCAL_VEL_Z_INDEX (O_LOCAL_VEL_INDEX + 2) // 0x0E +#define /*0x0B8*/ oLocalVelVec OBJECT_FIELD_F32(O_LOCAL_VEL_INDEX) +#define /*0x0B8*/ oLeftVel OBJECT_FIELD_F32(O_LOCAL_VEL_X_INDEX) +#define /*0x0BC*/ oUpVel OBJECT_FIELD_F32(O_LOCAL_VEL_Y_INDEX) +#define /*0x0C0*/ oForwardVel OBJECT_FIELD_F32(O_LOCAL_VEL_Z_INDEX) // moved +/* Move Angle vector */ +#define /*0x0C4*/ O_MOVE_ANGLE_INDEX 0x0F +#define /*0x0C4*/ O_MOVE_ANGLE_PITCH_INDEX (O_MOVE_ANGLE_INDEX + 0) // 0x0F +#define /*0x0C8*/ O_MOVE_ANGLE_YAW_INDEX (O_MOVE_ANGLE_INDEX + 1) // 0x10 +#define /*0x0CC*/ O_MOVE_ANGLE_ROLL_INDEX (O_MOVE_ANGLE_INDEX + 2) // 0x11 +#define /*0x0C4*/ oMoveAngleVec OBJECT_FIELD_S32(O_MOVE_ANGLE_INDEX) +#define /*0x0C4*/ oMoveAnglePitch OBJECT_FIELD_S32(O_MOVE_ANGLE_PITCH_INDEX) +#define /*0x0C8*/ oMoveAngleYaw OBJECT_FIELD_S32(O_MOVE_ANGLE_YAW_INDEX) +#define /*0x0CC*/ oMoveAngleRoll OBJECT_FIELD_S32(O_MOVE_ANGLE_ROLL_INDEX) +/* Face Angle vector */ +#define /*0x0D0*/ O_FACE_ANGLE_INDEX 0x12 +#define /*0x0D0*/ O_FACE_ANGLE_PITCH_INDEX (O_FACE_ANGLE_INDEX + 0) // 0x12 +#define /*0x0D4*/ O_FACE_ANGLE_YAW_INDEX (O_FACE_ANGLE_INDEX + 1) // 0x13 +#define /*0x0D8*/ O_FACE_ANGLE_ROLL_INDEX (O_FACE_ANGLE_INDEX + 2) // 0x14 +#define /*0x0D0*/ oFaceAngleVec OBJECT_FIELD_S32(O_FACE_ANGLE_INDEX) +#define /*0x0D0*/ oFaceAnglePitch OBJECT_FIELD_S32(O_FACE_ANGLE_PITCH_INDEX) +#define /*0x0D4*/ oFaceAngleYaw OBJECT_FIELD_S32(O_FACE_ANGLE_YAW_INDEX) +#define /*0x0D8*/ oFaceAngleRoll OBJECT_FIELD_S32(O_FACE_ANGLE_ROLL_INDEX) +/* Common fields */ +#define /*0x0DC*/ oGraphYOffset OBJECT_FIELD_F32(0x15) +#define /*0x0E0*/ oActiveParticleFlags OBJECT_FIELD_U32(0x16) +#define /*0x0E4*/ oGravity OBJECT_FIELD_F32(0x17) +#define /*0x0E8*/ oFloorHeight OBJECT_FIELD_F32(0x18) +#define /*0x0EC*/ oMoveFlags OBJECT_FIELD_U32(0x19) +#define /*0x0F0*/ oAnimState OBJECT_FIELD_S32(0x1A) // 0x0F4-0x110 (0x1B-0x22) are object specific and defined below the common fields. -#define /*0x114*/ oAngleVelPitch OBJECT_FIELD_S32(0x23) -#define /*0x118*/ oAngleVelYaw OBJECT_FIELD_S32(0x24) -#define /*0x11C*/ oAngleVelRoll OBJECT_FIELD_S32(0x25) -#define /*0x120*/ oAnimations OBJECT_FIELD_ANIMS(0x26) -#define /*0x124*/ oHeldState OBJECT_FIELD_U32(0x27) -#define /*0x128*/ oWallHitboxRadius OBJECT_FIELD_F32(0x28) -#define /*0x12C*/ oDragStrength OBJECT_FIELD_F32(0x29) -#define /*0x130*/ oInteractType OBJECT_FIELD_U32(0x2A) -#define /*0x134*/ oInteractStatus OBJECT_FIELD_S32(0x2B) -#define /*0x138*/ O_PARENT_RELATIVE_POS_INDEX 0x2C -#define /*0x138*/ oParentRelativePosX OBJECT_FIELD_F32(O_PARENT_RELATIVE_POS_INDEX + 0) -#define /*0x13C*/ oParentRelativePosY OBJECT_FIELD_F32(O_PARENT_RELATIVE_POS_INDEX + 1) -#define /*0x140*/ oParentRelativePosZ OBJECT_FIELD_F32(O_PARENT_RELATIVE_POS_INDEX + 2) -#define /*0x144*/ oBehParams2ndByte OBJECT_FIELD_S32(0x2F) +/* Angle Velocity vector */ +#define /*0x114*/ O_ANGLE_VEL_INDEX 0x23 +#define /*0x114*/ O_ANGLE_VEL_PITCH_INDEX (O_ANGLE_VEL_INDEX + 0) // 0x23 +#define /*0x118*/ O_ANGLE_VEL_YAW_INDEX (O_ANGLE_VEL_INDEX + 1) // 0x24 +#define /*0x11C*/ O_ANGLE_VEL_ROLL_INDEX (O_ANGLE_VEL_INDEX + 2) // 0x25 +#define /*0x114*/ oAngleVelVec OBJECT_FIELD_S32(O_ANGLE_VEL_INDEX) +#define /*0x114*/ oAngleVelPitch OBJECT_FIELD_S32(O_ANGLE_VEL_PITCH_INDEX) +#define /*0x118*/ oAngleVelYaw OBJECT_FIELD_S32(O_ANGLE_VEL_YAW_INDEX) +#define /*0x11C*/ oAngleVelRoll OBJECT_FIELD_S32(O_ANGLE_VEL_ROLL_INDEX) +/* Common fields */ +#define /*0x120*/ oAnimations OBJECT_FIELD_ANIMS(0x26) +#define /*0x124*/ oHeldState OBJECT_FIELD_U32(0x27) +#define /*0x128*/ oWallHitboxRadius OBJECT_FIELD_F32(0x28) +#define /*0x12C*/ oDragStrength OBJECT_FIELD_F32(0x29) +#define /*0x130*/ oInteractType OBJECT_FIELD_U32(0x2A) +#define /*0x134*/ oInteractStatus OBJECT_FIELD_S32(0x2B) +/* Parent Relative Position vector */ +#define /*0x138*/ O_PARENT_RELATIVE_POS_INDEX 0x2C +#define /*0x138*/ O_PARENT_RELATIVE_POS_X_INDEX (O_PARENT_RELATIVE_POS_INDEX + 0) // 0x2C +#define /*0x13C*/ O_PARENT_RELATIVE_POS_Y_INDEX (O_PARENT_RELATIVE_POS_INDEX + 1) // 0x2D +#define /*0x140*/ O_PARENT_RELATIVE_POS_Z_INDEX (O_PARENT_RELATIVE_POS_INDEX + 2) // 0x2E +#define /*0x138*/ oParentRelativePosVec OBJECT_FIELD_F32(O_PARENT_RELATIVE_POS_INDEX) +#define /*0x138*/ oParentRelativePosX OBJECT_FIELD_F32(O_PARENT_RELATIVE_POS_X_INDEX) +#define /*0x13C*/ oParentRelativePosY OBJECT_FIELD_F32(O_PARENT_RELATIVE_POS_Y_INDEX) +#define /*0x140*/ oParentRelativePosZ OBJECT_FIELD_F32(O_PARENT_RELATIVE_POS_Z_INDEX) +/* Common fields */ +#define /*0x144*/ oBehParams2ndByte OBJECT_FIELD_S32(0x2F) // 0x148 unused, possibly a third param byte. -#define /*0x14C*/ oAction OBJECT_FIELD_S32(0x31) -#define /*0x150*/ oSubAction OBJECT_FIELD_S32(0x32) -#define /*0x154*/ oTimer OBJECT_FIELD_S32(0x33) -#define /*0x158*/ oBounciness OBJECT_FIELD_F32(0x34) -#define /*0x15C*/ oDistanceToMario OBJECT_FIELD_F32(0x35) -#define /*0x160*/ oAngleToMario OBJECT_FIELD_S32(0x36) -#define /*0x164*/ oHomeX OBJECT_FIELD_F32(0x37) -#define /*0x168*/ oHomeY OBJECT_FIELD_F32(0x38) -#define /*0x16C*/ oHomeZ OBJECT_FIELD_F32(0x39) -#define /*0x170*/ oFriction OBJECT_FIELD_F32(0x3A) -#define /*0x174*/ oBuoyancy OBJECT_FIELD_F32(0x3B) -#define /*0x178*/ oSoundStateID OBJECT_FIELD_S32(0x3C) -#define /*0x17C*/ oOpacity OBJECT_FIELD_S32(0x3D) -#define /*0x180*/ oDamageOrCoinValue OBJECT_FIELD_S32(0x3E) -#define /*0x184*/ oHealth OBJECT_FIELD_S32(0x3F) -#define /*0x188*/ oBehParams OBJECT_FIELD_S32(0x40) -#define /*0x18C*/ oPrevAction OBJECT_FIELD_S32(0x41) -#define /*0x190*/ oInteractionSubtype OBJECT_FIELD_U32(0x42) -#define /*0x194*/ oCollisionDistance OBJECT_FIELD_F32(0x43) -#define /*0x198*/ oNumLootCoins OBJECT_FIELD_S32(0x44) -#define /*0x19C*/ oDrawingDistance OBJECT_FIELD_F32(0x45) -#define /*0x1A0*/ oRoom OBJECT_FIELD_S32(0x46) +#define /*0x14C*/ oAction OBJECT_FIELD_S32(0x31) +#define /*0x150*/ oSubAction OBJECT_FIELD_S32(0x32) +#define /*0x154*/ oTimer OBJECT_FIELD_S32(0x33) +#define /*0x158*/ oBounciness OBJECT_FIELD_F32(0x34) +#define /*0x15C*/ oDistanceToMario OBJECT_FIELD_F32(0x35) +#define /*0x160*/ oAngleToMario OBJECT_FIELD_S32(0x36) +/* Home Position vector */ +#define /*0x164*/ O_HOME_INDEX 0x37 +#define /*0x164*/ O_HOME_X_INDEX (O_HOME_INDEX + 0) // 0x37 +#define /*0x168*/ O_HOME_Y_INDEX (O_HOME_INDEX + 1) // 0x38 +#define /*0x16C*/ O_HOME_Z_INDEX (O_HOME_INDEX + 2) // 0x39 +#define /*0x164*/ oHomeVec OBJECT_FIELD_F32(O_HOME_INDEX) +#define /*0x164*/ oHomeX OBJECT_FIELD_F32(O_HOME_X_INDEX) +#define /*0x168*/ oHomeY OBJECT_FIELD_F32(O_HOME_Y_INDEX) +#define /*0x16C*/ oHomeZ OBJECT_FIELD_F32(O_HOME_Z_INDEX) +/* Common fields */ +#define /*0x170*/ oFriction OBJECT_FIELD_F32(0x3A) +#define /*0x174*/ oBuoyancy OBJECT_FIELD_F32(0x3B) +#define /*0x178*/ oSoundStateID OBJECT_FIELD_S32(0x3C) +#define /*0x17C*/ oOpacity OBJECT_FIELD_S32(0x3D) +#define /*0x180*/ oDamageOrCoinValue OBJECT_FIELD_S32(0x3E) +#define /*0x184*/ oHealth OBJECT_FIELD_S32(0x3F) +#define /*0x188*/ oBehParams OBJECT_FIELD_S32(0x40) +#define /*0x18C*/ oPrevAction OBJECT_FIELD_S32(0x41) +#define /*0x190*/ oInteractionSubtype OBJECT_FIELD_U32(0x42) +#define /*0x194*/ oCollisionDistance OBJECT_FIELD_F32(0x43) +#define /*0x198*/ oNumLootCoins OBJECT_FIELD_S32(0x44) +#define /*0x19C*/ oDrawingDistance OBJECT_FIELD_F32(0x45) +#define /*0x1A0*/ oRoom OBJECT_FIELD_S32(0x46) // 0x1A4 is unused, possibly related to 0x1A8 in removed macro purposes. -#define /*0x1A8*/ oUnk1A8 OBJECT_FIELD_U32(0x48) +#define /*0x1A8*/ oUnk1A8 OBJECT_FIELD_U32(0x48) // 0x1AC-0x1B2 (0x48-0x4A) are object specific and defined below the common fields. -#define /*0x1B4*/ oWallAngle OBJECT_FIELD_S32(0x4B) -#define /*0x1B8*/ oFloorType OBJECT_FIELD_S16(0x4C, 0) -#define /*0x1BA*/ oFloorRoom OBJECT_FIELD_S16(0x4C, 1) -#define /*0x1BC*/ oAngleToHome OBJECT_FIELD_S32(0x4D) -#define /*0x1C0*/ oFloor OBJECT_FIELD_SURFACE(0x4E) -#define /*0x1C4*/ oDeathSound OBJECT_FIELD_S32(0x4F) +#define /*0x1B4*/ oWallAngle OBJECT_FIELD_S32(0x4B) +#define /*0x1B8*/ oFloorType OBJECT_FIELD_S16(0x4C, 0) +#define /*0x1BA*/ oFloorRoom OBJECT_FIELD_S16(0x4C, 1) +#define /*0x1BC*/ oAngleToHome OBJECT_FIELD_S32(0x4D) +#define /*0x1C0*/ oFloor OBJECT_FIELD_SURFACE(0x4E) +#define /*0x1C4*/ oDeathSound OBJECT_FIELD_S32(0x4F) #ifdef PUPPYLIGHTS -#define /*0x1C4*/ oLightID OBJECT_FIELD_S32(0x50) +#define /*0x1C4*/ oLightID OBJECT_FIELD_S32(0x50) #endif /* Pathed (see obj_follow_path) */ -#define /*0x0FC*/ oPathedStartWaypoint OBJECT_FIELD_WAYPOINT(0x1D) -#define /*0x100*/ oPathedPrevWaypoint OBJECT_FIELD_WAYPOINT(0x1E) -#define /*0x104*/ oPathedPrevWaypointFlags OBJECT_FIELD_S32(0x1F) -#define /*0x108*/ oPathedTargetPitch OBJECT_FIELD_S32(0x20) -#define /*0x10C*/ oPathedTargetYaw OBJECT_FIELD_S32(0x21) +#define /*0x0FC*/ oPathedStartWaypoint OBJECT_FIELD_WAYPOINT(0x1D) +#define /*0x100*/ oPathedPrevWaypoint OBJECT_FIELD_WAYPOINT(0x1E) +#define /*0x104*/ oPathedPrevWaypointFlags OBJECT_FIELD_S32(0x1F) +#define /*0x108*/ oPathedTargetPitch OBJECT_FIELD_S32(0x20) +#define /*0x10C*/ oPathedTargetYaw OBJECT_FIELD_S32(0x21) /* Special Object Macro */ -#define /*0x108*/ oMacroUnk108 OBJECT_FIELD_F32(0x20) -#define /*0x10C*/ oMacroUnk10C OBJECT_FIELD_F32(0x21) -#define /*0x110*/ oMacroUnk110 OBJECT_FIELD_F32(0x22) +#define /*0x108*/ oMacroUnk108 OBJECT_FIELD_F32(0x20) +#define /*0x10C*/ oMacroUnk10C OBJECT_FIELD_F32(0x21) +#define /*0x110*/ oMacroUnk110 OBJECT_FIELD_F32(0x22) /* Mario */ -#define /*0x0F4*/ oMarioParticleFlags OBJECT_FIELD_S32(0x1B) -#define /*0x108*/ oMarioPoleUnk108 OBJECT_FIELD_S32(0x20) -#define /*0x108*/ oMarioReadingSignDYaw OBJECT_FIELD_S32(0x20) -#define /*0x10C*/ oMarioPoleYawVel OBJECT_FIELD_S32(0x21) -#define /*0x10C*/ oMarioCannonObjectYaw OBJECT_FIELD_S32(0x21) -#define /*0x10C*/ oMarioTornadoYawVel OBJECT_FIELD_S32(0x21) -#define /*0x10C*/ oMarioReadingSignDPosX OBJECT_FIELD_F32(0x21) -#define /*0x110*/ oMarioPolePos OBJECT_FIELD_F32(0x22) -#define /*0x110*/ oMarioCannonInputYaw OBJECT_FIELD_S32(0x22) -#define /*0x110*/ oMarioTornadoPosY OBJECT_FIELD_F32(0x22) -#define /*0x110*/ oMarioReadingSignDPosZ OBJECT_FIELD_F32(0x22) -#define /*0x110*/ oMarioWhirlpoolPosY OBJECT_FIELD_F32(0x22) -#define /*0x110*/ oMarioBurnTimer OBJECT_FIELD_S32(0x22) -#define /*0x110*/ oMarioLongJumpIsSlow OBJECT_FIELD_S32(0x22) -#define /*0x110*/ oMarioSteepJumpYaw OBJECT_FIELD_S32(0x22) -#define /*0x110*/ oMarioWalkingPitch OBJECT_FIELD_S32(0x22) +#define /*0x0F4*/ oMarioParticleFlags OBJECT_FIELD_S32(0x1B) +#define /*0x108*/ oMarioPoleUnk108 OBJECT_FIELD_S32(0x20) +#define /*0x108*/ oMarioReadingSignDYaw OBJECT_FIELD_S32(0x20) +#define /*0x10C*/ oMarioPoleYawVel OBJECT_FIELD_S32(0x21) +#define /*0x10C*/ oMarioCannonObjectYaw OBJECT_FIELD_S32(0x21) +#define /*0x10C*/ oMarioTornadoYawVel OBJECT_FIELD_S32(0x21) +#define /*0x10C*/ oMarioReadingSignDPosX OBJECT_FIELD_F32(0x21) +#define /*0x110*/ oMarioPolePos OBJECT_FIELD_F32(0x22) +#define /*0x110*/ oMarioCannonInputYaw OBJECT_FIELD_S32(0x22) +#define /*0x110*/ oMarioTornadoPosY OBJECT_FIELD_F32(0x22) +#define /*0x110*/ oMarioReadingSignDPosZ OBJECT_FIELD_F32(0x22) +#define /*0x110*/ oMarioWhirlpoolPosY OBJECT_FIELD_F32(0x22) +#define /*0x110*/ oMarioBurnTimer OBJECT_FIELD_S32(0x22) +#define /*0x110*/ oMarioLongJumpIsSlow OBJECT_FIELD_S32(0x22) +#define /*0x110*/ oMarioSteepJumpYaw OBJECT_FIELD_S32(0x22) +#define /*0x110*/ oMarioWalkingPitch OBJECT_FIELD_S32(0x22) /* 1-Up Hidden */ -#define /*0x0F4*/ o1UpHiddenUnkF4 OBJECT_FIELD_S32(0x1B) +#define /*0x0F4*/ o1UpHiddenTimesTriggered OBJECT_FIELD_S32(0x1B) /* Activated Back and Forth Platform */ -#define /*0x0F4*/ oActivatedBackAndForthPlatformMaxOffset OBJECT_FIELD_F32(0x1B) -#define /*0x0F8*/ oActivatedBackAndForthPlatformOffset OBJECT_FIELD_F32(0x1C) -#define /*0x0FC*/ oActivatedBackAndForthPlatformVel OBJECT_FIELD_F32(0x1D) -#define /*0x100*/ oActivatedBackAndForthPlatformCountdown OBJECT_FIELD_S32(0x1E) -#define /*0x104*/ oActivatedBackAndForthPlatformStartYaw OBJECT_FIELD_S32(0x1F) -#define /*0x108*/ oActivatedBackAndForthPlatformVertical OBJECT_FIELD_S32(0x20) -#define /*0x10C*/ oActivatedBackAndForthPlatformFlipRotation OBJECT_FIELD_S32(0x21) +#define /*0x0F4*/ oActivatedBackAndForthPlatformMaxOffset OBJECT_FIELD_F32(0x1B) +#define /*0x0F8*/ oActivatedBackAndForthPlatformOffset OBJECT_FIELD_F32(0x1C) +#define /*0x0FC*/ oActivatedBackAndForthPlatformVel OBJECT_FIELD_F32(0x1D) +#define /*0x100*/ oActivatedBackAndForthPlatformCountdown OBJECT_FIELD_S32(0x1E) +#define /*0x104*/ oActivatedBackAndForthPlatformStartYaw OBJECT_FIELD_S32(0x1F) +#define /*0x108*/ oActivatedBackAndForthPlatformVertical OBJECT_FIELD_S32(0x20) +#define /*0x10C*/ oActivatedBackAndForthPlatformFlipRotation OBJECT_FIELD_S32(0x21) /* Amp */ -#define /*0x0F4*/ oAmpRadiusOfRotation OBJECT_FIELD_F32(0x1B) -#define /*0x0F8*/ oAmpYPhase OBJECT_FIELD_S32(0x1C) +#define /*0x0F4*/ oAmpRadiusOfRotation OBJECT_FIELD_F32(0x1B) +#define /*0x0F8*/ oAmpYPhase OBJECT_FIELD_S32(0x1C) /* Homing Amp */ -#define /*0x0F4*/ oHomingAmpLockedOn OBJECT_FIELD_S32(0x1B) -#define /*0x0FC*/ oHomingAmpAvgY OBJECT_FIELD_F32(0x1D) +#define /*0x0F4*/ oHomingAmpLockedOn OBJECT_FIELD_S32(0x1B) +#define /*0x0FC*/ oHomingAmpAvgY OBJECT_FIELD_F32(0x1D) /* Arrow Lift */ -#define /*0x0F4*/ oArrowLiftDisplacement OBJECT_FIELD_F32(0x1B) -#define /*0x100*/ oArrowLiftUnk100 OBJECT_FIELD_S32(0x1E) +#define /*0x0F4*/ oArrowLiftDisplacement OBJECT_FIELD_F32(0x1B) /* Back-and-Forth Platform */ -#define /*0x0F4*/ oBackAndForthPlatformDirection OBJECT_FIELD_F32(0x1B) -#define /*0x0F8*/ oBackAndForthPlatformPathLength OBJECT_FIELD_F32(0x1C) -#define /*0x0FC*/ oBackAndForthPlatformDistance OBJECT_FIELD_F32(0x1D) -#define /*0x100*/ oBackAndForthPlatformVel OBJECT_FIELD_F32(0x1E) +#define /*0x0F4*/ oBackAndForthPlatformDirection OBJECT_FIELD_F32(0x1B) +#define /*0x0F8*/ oBackAndForthPlatformPathLength OBJECT_FIELD_F32(0x1C) +#define /*0x0FC*/ oBackAndForthPlatformDistance OBJECT_FIELD_F32(0x1D) +#define /*0x100*/ oBackAndForthPlatformVel OBJECT_FIELD_F32(0x1E) /* Bird */ -#define /*0x0F4*/ oBirdSpeed OBJECT_FIELD_F32(0x1B) -#define /*0x0F8*/ oBirdTargetPitch OBJECT_FIELD_S32(0x1C) -#define /*0x0FC*/ oBirdTargetYaw OBJECT_FIELD_S32(0x1D) +#define /*0x0F4*/ oBirdSpeed OBJECT_FIELD_F32(0x1B) +#define /*0x0F8*/ O_BIRD_TARGET_ANGLE_INDEX 0x1C +#define /*0x0F8*/ O_BIRD_TARGET_PITCH_INDEX (O_BIRD_TARGET_ANGLE_INDEX + 0) // 0x1C +#define /*0x0FC*/ O_BIRD_TARGET_YAW_INDEX (O_BIRD_TARGET_ANGLE_INDEX + 1) // 0x1D +#define /*0x100*/ O_BIRD_TARGET_ROLL_INDEX (O_BIRD_TARGET_ANGLE_INDEX + 2) // 0x1E +#define /*0x0F8*/ oBirdTargetAngleVec OBJECT_FIELD_S32(O_BIRD_TARGET_ANGLE_INDEX) +#define /*0x0F8*/ oBirdTargetPitch OBJECT_FIELD_S32(O_BIRD_TARGET_PITCH_INDEX) +#define /*0x0FC*/ oBirdTargetYaw OBJECT_FIELD_S32(O_BIRD_TARGET_YAW_INDEX) +#define /*0x100*/ oBirdTargetRoll OBJECT_FIELD_S32(O_BIRD_TARGET_ROLL_INDEX) // unused /* Bird Chirp Chirp */ -#define /*0x0F4*/ oBirdChirpChirpUnkF4 OBJECT_FIELD_S32(0x1B) +#define /*0x0F4*/ oCheepCheepSpawnerSpawnAmount OBJECT_FIELD_S32(0x1B) /* End Birds */ -#define /*0x104*/ oEndBirdUnk104 OBJECT_FIELD_F32(0x1F) +#define /*0x104*/ oEndBirdCutsceneVars9PointX OBJECT_FIELD_F32(0x1F) /* Hidden Blue Coin */ -#define /*0x0F8*/ oHiddenBlueCoinSwitch OBJECT_FIELD_OBJ(0x1C) +#define /*0x0F8*/ oHiddenBlueCoinSwitch OBJECT_FIELD_OBJ(0x1C) /* Bob-omb */ -#define /*0x0F4*/ oBobombBlinkTimer OBJECT_FIELD_S32(0x1B) -#define /*0x0F8*/ oBobombFuseLit OBJECT_FIELD_S32(0x1C) -#define /*0x0FC*/ oBobombFuseTimer OBJECT_FIELD_S32(0x1D) +#define /*0x0F4*/ oBobombBlinkTimer OBJECT_FIELD_S32(0x1B) +#define /*0x0F8*/ oBobombFuseLit OBJECT_FIELD_S32(0x1C) +#define /*0x0FC*/ oBobombFuseTimer OBJECT_FIELD_S32(0x1D) /* Bob-omb Buddy */ -#define /*0x0F4*/ oBobombBuddyBlinkTimer OBJECT_FIELD_S32(0x1B) -#define /*0x0F8*/ oBobombBuddyHasTalkedToMario OBJECT_FIELD_S32(0x1C) -#define /*0x0FC*/ oBobombBuddyRole OBJECT_FIELD_S32(0x1D) -#define /*0x100*/ oBobombBuddyCannonStatus OBJECT_FIELD_S32(0x1E) -#define /*0x108*/ oBobombBuddyPosXCopy OBJECT_FIELD_F32(0x20) -#define /*0x10C*/ oBobombBuddyPosYCopy OBJECT_FIELD_F32(0x21) -#define /*0x110*/ oBobombBuddyPosZCopy OBJECT_FIELD_F32(0x22) +#define /*0x0F4*/ oBobombBuddyBlinkTimer OBJECT_FIELD_S32(0x1B) +#define /*0x0F8*/ oBobombBuddyHasTalkedToMario OBJECT_FIELD_S32(0x1C) +#define /*0x0FC*/ oBobombBuddyRole OBJECT_FIELD_S32(0x1D) +#define /*0x100*/ oBobombBuddyCannonStatus OBJECT_FIELD_S32(0x1E) +#define /*0x108*/ O_BOBOMB_BUDDY_POS_COPY_INDEX 0x20 +#define /*0x108*/ O_BOBOMB_BUDDY_POS_X_COPY_INDEX (O_BOBOMB_BUDDY_POS_COPY_INDEX + 0) // 0x20 +#define /*0x10C*/ O_BOBOMB_BUDDY_POS_Y_COPY_INDEX (O_BOBOMB_BUDDY_POS_COPY_INDEX + 1) // 0x21 +#define /*0x110*/ O_BOBOMB_BUDDY_POS_Z_COPY_INDEX (O_BOBOMB_BUDDY_POS_COPY_INDEX + 2) // 0x22 +#define /*0x108*/ oBobombBuddyPosCopyVec OBJECT_FIELD_F32(O_BOBOMB_BUDDY_POS_COPY_INDEX) +#define /*0x108*/ oBobombBuddyPosXCopy OBJECT_FIELD_F32(O_BOBOMB_BUDDY_POS_X_COPY_INDEX) +#define /*0x10C*/ oBobombBuddyPosYCopy OBJECT_FIELD_F32(O_BOBOMB_BUDDY_POS_Y_COPY_INDEX) +#define /*0x110*/ oBobombBuddyPosZCopy OBJECT_FIELD_F32(O_BOBOMB_BUDDY_POS_Z_COPY_INDEX) /* Bob-omb Explosion Bubble */ -#define /*0x0FC*/ oBobombExpBubGfxScaleFacX OBJECT_FIELD_S32(0x1D) -#define /*0x100*/ oBobombExpBubGfxScaleFacY OBJECT_FIELD_S32(0x1E) -#define /*0x104*/ oBobombExpBubGfxExpRateX OBJECT_FIELD_S32(0x1F) -#define /*0x108*/ oBobombExpBubGfxExpRateY OBJECT_FIELD_S32(0x20) +#define /*0x0FC*/ oBobombExpBubGfxScaleFacX OBJECT_FIELD_S32(0x1D) +#define /*0x100*/ oBobombExpBubGfxScaleFacY OBJECT_FIELD_S32(0x1E) +#define /*0x104*/ oBobombExpBubGfxExpRateX OBJECT_FIELD_S32(0x1F) +#define /*0x108*/ oBobombExpBubGfxExpRateY OBJECT_FIELD_S32(0x20) /* Bomp (Small) */ -#define /*0x100*/ oSmallBompInitX OBJECT_FIELD_F32(0x1E) +#define /*0x100*/ oSmallBompInitX OBJECT_FIELD_F32(0x1E) /* Boo */ -#define /*0x088*/ oBooDeathStatus OBJECT_FIELD_S32(0x00) -#define /*0x0F4*/ oBooTargetOpacity OBJECT_FIELD_S32(0x1B) -#define /*0x0F8*/ oBooBaseScale OBJECT_FIELD_F32(0x1C) -#define /*0x0FC*/ oBooOscillationTimer OBJECT_FIELD_S32(0x1D) -#define /*0x100*/ oBooMoveYawDuringHit OBJECT_FIELD_S32(0x1E) -#define /*0x104*/ oBooMoveYawBeforeHit OBJECT_FIELD_F32(0x1F) -#define /*0x108*/ oBooParentBigBoo OBJECT_FIELD_OBJ(0x20) -#define /*0x10C*/ oBooNegatedAggressiveness OBJECT_FIELD_F32(0x21) -#define /*0x110*/ oBooInitialMoveYaw OBJECT_FIELD_S32(0x22) -#define /*0x1B0*/ oBooTurningSpeed OBJECT_FIELD_S16(0x4A, 0) +#define /*0x088*/ oBooDeathStatus OBJECT_FIELD_S32(0x00) +#define /*0x0F4*/ oBooTargetOpacity OBJECT_FIELD_S32(0x1B) +#define /*0x0F8*/ oBooBaseScale OBJECT_FIELD_F32(0x1C) +#define /*0x0FC*/ oBooOscillationTimer OBJECT_FIELD_S32(0x1D) +#define /*0x100*/ oBooMoveYawDuringHit OBJECT_FIELD_S32(0x1E) +#define /*0x104*/ oBooMoveYawBeforeHit OBJECT_FIELD_F32(0x1F) +#define /*0x108*/ oBooParentBigBoo OBJECT_FIELD_OBJ(0x20) +#define /*0x10C*/ oBooNegatedAggressiveness OBJECT_FIELD_F32(0x21) +#define /*0x110*/ oBooInitialMoveYaw OBJECT_FIELD_S32(0x22) +#define /*0x1B0*/ oBooTurningSpeed OBJECT_FIELD_S16(0x4A, 0) /* Big Boo */ -#define /*0x1AC*/ oBigBooNumMinionBoosKilled OBJECT_FIELD_S32(0x49) +#define /*0x1AC*/ oBigBooNumMinionBoosKilled OBJECT_FIELD_S32(0x49) /* Bookend */ -#define /*0x0F4*/ oBookendUnkF4 OBJECT_FIELD_S32(0x1B) -#define /*0x0F8*/ oBookendUnkF8 OBJECT_FIELD_S32(0x1C) +#define /*0x0F4*/ oBookendTargetPitch OBJECT_FIELD_S32(0x1B) +#define /*0x0F8*/ oBookendTargetRoll OBJECT_FIELD_S32(0x1C) /* Book Switch */ -#define /*0x0F4*/ oBookSwitchUnkF4 OBJECT_FIELD_F32(0x1B) +#define /*0x0F4*/ oBookSwitchDistFromHome OBJECT_FIELD_F32(0x1B) /* Book Switch Manager */ -#define /*0x0F4*/ oBookSwitchManagerUnkF4 OBJECT_FIELD_S32(0x1B) -#define /*0x0F8*/ oBookSwitchManagerUnkF8 OBJECT_FIELD_S32(0x1C) +#define /*0x0F4*/ oBookSwitchManagerNumCorrectChoices OBJECT_FIELD_S32(0x1B) +#define /*0x0F8*/ oBookSwitchManagerIsActive OBJECT_FIELD_S32(0x1C) /* Haunted Bookshelf */ -#define /*0x088*/ oHauntedBookshelfShouldOpen OBJECT_FIELD_S32(0x00) +#define /*0x088*/ oHauntedBookshelfShouldOpen OBJECT_FIELD_S32(0x00) /* Bouncing FireBall */ -#define /*0x0F4*/ oBouncingFireBallUnkF4 OBJECT_FIELD_S32(0x1B) +#define /*0x0F4*/ oBouncingFireBallSpawnerRandomCooldown OBJECT_FIELD_S32(0x1B) /* Bowling Ball */ -#define /*0x0F4*/ oBowlingBallTargetYaw OBJECT_FIELD_S32(0x1B) +#define /*0x0F4*/ oBowlingBallTargetYaw OBJECT_FIELD_S32(0x1B) // 0x1D-0x21 reserved for pathing /* Bowling Ball Spawner (Generic) */ -#define /*0x0F4*/ oBBallSpawnerMaxSpawnDist OBJECT_FIELD_F32(0x1B) -#define /*0x0F8*/ oBBallSpawnerSpawnOdds OBJECT_FIELD_F32(0x1C) -#define /*0x0FC*/ oBBallSpawnerPeriodMinus1 OBJECT_FIELD_S32(0x1D) +#define /*0x0F4*/ oBBallSpawnerMaxSpawnDist OBJECT_FIELD_F32(0x1B) +#define /*0x0F8*/ oBBallSpawnerSpawnOdds OBJECT_FIELD_F32(0x1C) +#define /*0x0FC*/ oBBallSpawnerPeriodMinus1 OBJECT_FIELD_S32(0x1D) /* Bowser */ -#define /*0x088*/ oBowserCamAct OBJECT_FIELD_S32(0x00) -#define /*0x0F4*/ oBowserStatus OBJECT_FIELD_S32(0x1B) -#define /*0x0F8*/ oBowserTimer OBJECT_FIELD_S32(0x1C) -#define /*0x0FC*/ oBowserDistToCentre OBJECT_FIELD_F32(0x1D) -#define /*0x106*/ oBowserBitsJustJump OBJECT_FIELD_S16(0x1F, 1) -#define /*0x108*/ oBowserRandSplitFloor OBJECT_FIELD_S16(0x20, 0) -#define /*0x10A*/ oBowserHeldAnglePitch OBJECT_FIELD_S16(0x20, 1) -#define /*0x10D*/ oBowserHeldAngleVelYaw OBJECT_FIELD_S16(0x21, 0) -#define /*0x10E*/ oBowserGrabbedStatus OBJECT_FIELD_S16(0x21, 1) -#define /*0x110*/ oBowserIsReacting OBJECT_FIELD_S16(0x22, 0) -#define /*0x112*/ oBowserAngleToCentre OBJECT_FIELD_S16(0x22, 1) -#define /*0x1AC*/ oBowserTargetOpacity OBJECT_FIELD_S16(0x49, 0) -#define /*0x1AE*/ oBowserEyesTimer OBJECT_FIELD_S16(0x49, 1) -#define /*0x1B0*/ oBowserEyesShut OBJECT_FIELD_S16(0x4A, 0) -#define /*0x1B2*/ oBowserRainbowLight OBJECT_FIELD_S16(0x4A, 1) +#define /*0x088*/ oBowserCamAct OBJECT_FIELD_S32(0x00) +#define /*0x0F4*/ oBowserStatus OBJECT_FIELD_S32(0x1B) +#define /*0x0F8*/ oBowserTimer OBJECT_FIELD_S32(0x1C) +#define /*0x0FC*/ oBowserDistToCentre OBJECT_FIELD_F32(0x1D) +#define /*0x106*/ oBowserBitsJustJump OBJECT_FIELD_S16(0x1F, 1) +#define /*0x108*/ oBowserRandSplitFloor OBJECT_FIELD_S16(0x20, 0) +#define /*0x10A*/ oBowserHeldAnglePitch OBJECT_FIELD_S16(0x20, 1) +#define /*0x10D*/ oBowserHeldAngleVelYaw OBJECT_FIELD_S16(0x21, 0) +#define /*0x10E*/ oBowserGrabbedStatus OBJECT_FIELD_S16(0x21, 1) +#define /*0x110*/ oBowserIsReacting OBJECT_FIELD_S16(0x22, 0) +#define /*0x112*/ oBowserAngleToCentre OBJECT_FIELD_S16(0x22, 1) +#define /*0x1AC*/ oBowserTargetOpacity OBJECT_FIELD_S16(0x49, 0) +#define /*0x1AE*/ oBowserEyesTimer OBJECT_FIELD_S16(0x49, 1) +#define /*0x1B0*/ oBowserEyesShut OBJECT_FIELD_S16(0x4A, 0) +#define /*0x1B2*/ oBowserRainbowLight OBJECT_FIELD_S16(0x4A, 1) /* Bowser Shockwave */ -#define /*0x0F4*/ oBowserShockWaveScale OBJECT_FIELD_F32(0x1B) - -/* Black Smoke Bowser */ -#define /*0x0F4*/ oBlackSmokeBowserUnkF4 OBJECT_FIELD_F32(0x1B) +#define /*0x0F4*/ oBowserShockWaveScale OBJECT_FIELD_F32(0x1B) /* Bowser Key Cutscene */ -#define /*0x0F4*/ oBowserKeyScale OBJECT_FIELD_F32(0x1B) +#define /*0x0F4*/ oBowserKeyScale OBJECT_FIELD_F32(0x1B) /* Bowser Puzzle */ -#define /*0x0F4*/ oBowserPuzzleCompletionFlags OBJECT_FIELD_S32(0x1B) +#define /*0x0F4*/ oBowserPuzzleCompletionFlags OBJECT_FIELD_S32(0x1B) /* Bowser Puzzle Piece */ -#define /*0x0FC*/ oBowserPuzzlePieceOffsetX OBJECT_FIELD_F32(0x1D) -#define /*0x100*/ oBowserPuzzlePieceOffsetY OBJECT_FIELD_F32(0x1E) -#define /*0x104*/ oBowserPuzzlePieceOffsetZ OBJECT_FIELD_F32(0x1F) -#define /*0x108*/ oBowserPuzzlePieceContinuePerformingAction OBJECT_FIELD_S32(0x20) -#define /*0x10C*/ oBowserPuzzlePieceActionList OBJECT_FIELD_VPTR(0x21) -#define /*0x110*/ oBowserPuzzlePieceNextAction OBJECT_FIELD_VPTR(0x22) +#define /*0x0FC*/ O_BOWSER_PUZZLE_PIECE_OFFSET_INDEX 0x1D +#define /*0x0FC*/ O_BOWSER_PUZZLE_PIECE_OFFSET_X_INDEX (O_BOWSER_PUZZLE_PIECE_OFFSET_INDEX + 0) // 0x1D +#define /*0x100*/ O_BOWSER_PUZZLE_PIECE_OFFSET_Y_INDEX (O_BOWSER_PUZZLE_PIECE_OFFSET_INDEX + 1) // 0x1E +#define /*0x104*/ O_BOWSER_PUZZLE_PIECE_OFFSET_Z_INDEX (O_BOWSER_PUZZLE_PIECE_OFFSET_INDEX + 2) // 0x1F +#define /*0x0FC*/ oBowserPuzzlePieceOffsetVec OBJECT_FIELD_F32(O_BOWSER_PUZZLE_PIECE_OFFSET_INDEX) +#define /*0x0FC*/ oBowserPuzzlePieceOffsetX OBJECT_FIELD_F32(O_BOWSER_PUZZLE_PIECE_OFFSET_X_INDEX) +#define /*0x100*/ oBowserPuzzlePieceOffsetY OBJECT_FIELD_F32(O_BOWSER_PUZZLE_PIECE_OFFSET_Y_INDEX) +#define /*0x104*/ oBowserPuzzlePieceOffsetZ OBJECT_FIELD_F32(O_BOWSER_PUZZLE_PIECE_OFFSET_Z_INDEX) +#define /*0x108*/ oBowserPuzzlePieceContinuePerformingAction OBJECT_FIELD_S32(0x20) +#define /*0x10C*/ oBowserPuzzlePieceActionList OBJECT_FIELD_VPTR(0x21) +#define /*0x110*/ oBowserPuzzlePieceNextAction OBJECT_FIELD_VPTR(0x22) /* Bubba */ -#define /*0x0F4*/ oBubbaUnkF4 OBJECT_FIELD_F32(0x1B) -#define /*0x0F8*/ oBubbaUnkF8 OBJECT_FIELD_S32(0x1C) -#define /*0x0FC*/ oBubbaUnkFC OBJECT_FIELD_S32(0x1D) -#define /*0x100*/ oBubbaUnk100 OBJECT_FIELD_S32(0x1E) -#define /*0x104*/ oBubbaUnk104 OBJECT_FIELD_S32(0x1F) -#define /*0x108*/ oBubbaUnk108 OBJECT_FIELD_F32(0x20) -#define /*0x10C*/ oBubbaUnk10C OBJECT_FIELD_F32(0x21) -#define /*0x1AC*/ oBubbaUnk1AC OBJECT_FIELD_S16(0x49, 0) -#define /*0x1AE*/ oBubbaUnk1AE OBJECT_FIELD_S16(0x49, + 1) -#define /*0x1B0*/ oBubbaUnk1B0 OBJECT_FIELD_S16(0x4A, 0) -#define /*0x1B2*/ oBubbaUnk1B2 OBJECT_FIELD_S16(0x4A, + 1) +#define /*0x0F4*/ oBubbaMovePitch OBJECT_FIELD_F32(0x1B) +#define /*0x0F8*/ oBubbaRandomTimer OBJECT_FIELD_S32(0x1C) +#define /*0x0FC*/ oBubbaHitWall OBJECT_FIELD_S32(0x1D) +#define /*0x100*/ oBubbaLungeTimer OBJECT_FIELD_S32(0x1E) +#define /*0x104*/ oBubbaNextTargetPitchTowardMario OBJECT_FIELD_S32(0x1F) +#define /*0x108*/ oBubbaAirVelY OBJECT_FIELD_F32(0x20) +#define /*0x10C*/ oBubbaJumpHeight OBJECT_FIELD_F32(0x21) +#define /*0x1AC*/ oBubbaTargetPitch OBJECT_FIELD_S16(0x49, 0) +#define /*0x1AE*/ oBubbaTargetYaw OBJECT_FIELD_S16(0x49, + 1) +#define /*0x1B0*/ oBubbaPitchVel OBJECT_FIELD_S16(0x4A, 0) +#define /*0x1B2*/ oBubbaYawVel OBJECT_FIELD_S16(0x4A, + 1) /* Bullet Bill */ -#define /*0x0F8*/ oBulletBillInitialMoveYaw OBJECT_FIELD_S32(0x1C) +#define /*0x0F8*/ oBulletBillInitialMoveYaw OBJECT_FIELD_S32(0x1C) /* Bully (all variants) */ -#define /*0x0F4*/ oBullySubtype OBJECT_FIELD_S32(0x1B) -#define /*0x0F8*/ oBullyPrevX OBJECT_FIELD_F32(0x1C) -#define /*0x0FC*/ oBullyPrevY OBJECT_FIELD_F32(0x1D) -#define /*0x100*/ oBullyPrevZ OBJECT_FIELD_F32(0x1E) -#define /*0x104*/ oBullyKBTimerAndMinionKOCounter OBJECT_FIELD_S32(0x1F) -#define /*0x108*/ oBullyMarioCollisionAngle OBJECT_FIELD_S32(0x20) +#define /*0x0F4*/ oBullySubtype OBJECT_FIELD_S32(0x1B) +#define /*0x0F8*/ O_BULLY_PREV_INDEX 0x1C +#define /*0x0F8*/ O_BULLY_PREV_X_INDEX (O_BULLY_PREV_INDEX + 0) // 0x1C +#define /*0x0FC*/ O_BULLY_PREV_Y_INDEX (O_BULLY_PREV_INDEX + 1) // 0x1D +#define /*0x100*/ O_BULLY_PREV_Z_INDEX (O_BULLY_PREV_INDEX + 2) // 0x1E +#define /*0x0F8*/ oBullyPrevVec OBJECT_FIELD_F32(O_BULLY_PREV_INDEX) +#define /*0x0F8*/ oBullyPrevX OBJECT_FIELD_F32(O_BULLY_PREV_X_INDEX) +#define /*0x0FC*/ oBullyPrevY OBJECT_FIELD_F32(O_BULLY_PREV_Y_INDEX) +#define /*0x100*/ oBullyPrevZ OBJECT_FIELD_F32(O_BULLY_PREV_Z_INDEX) +#define /*0x104*/ oBullyKBTimerAndMinionKOCounter OBJECT_FIELD_S32(0x1F) +#define /*0x108*/ oBullyMarioCollisionAngle OBJECT_FIELD_S32(0x20) /* Butterfly */ -#define /*0x0F4*/ oButterflyYPhase OBJECT_FIELD_S32(0x1B) +#define /*0x0F4*/ oButterflyYPhase OBJECT_FIELD_S32(0x1B) /* Triplet Butterfly */ -#define /*0x0F4*/ oTripletButterflyScale OBJECT_FIELD_F32(0x1B) -#define /*0x0F8*/ oTripletButterflySpeed OBJECT_FIELD_F32(0x1C) -#define /*0x0FC*/ oTripletButterflyBaseYaw OBJECT_FIELD_F32(0x1D) -#define /*0x100*/ oTripletButterflyTargetPitch OBJECT_FIELD_S32(0x1E) -#define /*0x104*/ oTripletButterflyTargetYaw OBJECT_FIELD_S32(0x1F) -#define /*0x108*/ oTripletButterflyType OBJECT_FIELD_S32(0x20) -#define /*0x10C*/ oTripletButterflyModel OBJECT_FIELD_S32(0x21) -#define /*0x110*/ oTripletButterflySelectedButterfly OBJECT_FIELD_S32(0x22) -#define /*0x1AC*/ oTripletButterflyScalePhase OBJECT_FIELD_S32(0x49) +#define /*0x0F4*/ oTripletButterflyScale OBJECT_FIELD_F32(0x1B) +#define /*0x0F8*/ oTripletButterflySpeed OBJECT_FIELD_F32(0x1C) +#define /*0x0FC*/ oTripletButterflyBaseYaw OBJECT_FIELD_F32(0x1D) +#define /*0x100*/ oTripletButterflyTargetPitch OBJECT_FIELD_S32(0x1E) +#define /*0x104*/ oTripletButterflyTargetYaw OBJECT_FIELD_S32(0x1F) +#define /*0x108*/ oTripletButterflyType OBJECT_FIELD_S32(0x20) +#define /*0x10C*/ oTripletButterflyModel OBJECT_FIELD_S32(0x21) +#define /*0x110*/ oTripletButterflySelectedButterfly OBJECT_FIELD_S32(0x22) +#define /*0x1AC*/ oTripletButterflyScalePhase OBJECT_FIELD_S32(0x49) /* Cannon */ -#define /*0x0F4*/ oCannonUnkF4 OBJECT_FIELD_S32(0x1B) -#define /*0x0F8*/ oCannonUnkF8 OBJECT_FIELD_S32(0x1C) -#define /*0x10C*/ oCannonUnk10C OBJECT_FIELD_S32(0x21) +#define /*0x0F4*/ oCannonAngle OBJECT_FIELD_S32(0x1B) +#define /*0x0F8*/ oCannonTimeSinceActivated OBJECT_FIELD_S32(0x1C) +#define /*0x10C*/ oCannonIsActive OBJECT_FIELD_S32(0x21) /* Cap */ -#define /*0x0F4*/ oCapUnkF4 OBJECT_FIELD_S32(0x1B) -#define /*0x0F8*/ oCapUnkF8 OBJECT_FIELD_S32(0x1C) +#define /*0x0F4*/ oCapDoScaleVertically OBJECT_FIELD_S32(0x1B) +#define /*0x0F8*/ oCapScaleAngle OBJECT_FIELD_S32(0x1C) /* Chain Chomp */ -#define /*0x0F4*/ oChainChompSegments OBJECT_FIELD_CHAIN_SEGMENT(0x1B) -#define /*0x0F8*/ oChainChompMaxDistFromPivotPerChainPart OBJECT_FIELD_F32(0x1C) -#define /*0x0FC*/ oChainChompMaxDistBetweenChainParts OBJECT_FIELD_F32(0x1D) -#define /*0x100*/ oChainChompDistToPivot OBJECT_FIELD_F32(0x1E) -#define /*0x104*/ oChainChompUnk104 OBJECT_FIELD_F32(0x1F) -#define /*0x108*/ oChainChompRestrictedByChain OBJECT_FIELD_S32(0x20) -#define /*0x10C*/ oChainChompTargetPitch OBJECT_FIELD_S32(0x21) -#define /*0x110*/ oChainChompNumLunges OBJECT_FIELD_S32(0x22) -#define /*0x1AC*/ oChainChompReleaseStatus OBJECT_FIELD_S32(0x49) -#define /*0x1B0*/ oChainChompHitGate OBJECT_FIELD_S32(0x4A) +#define /*0x0F4*/ oChainChompSegments OBJECT_FIELD_CHAIN_SEGMENT(0x1B) +#define /*0x0F8*/ oChainChompMaxDistFromPivotPerChainPart OBJECT_FIELD_F32(0x1C) +#define /*0x0FC*/ oChainChompMaxDistBetweenChainParts OBJECT_FIELD_F32(0x1D) +#define /*0x100*/ oChainChompDistToPivot OBJECT_FIELD_F32(0x1E) +#define /*0x104*/ oChainChompSignedMaxDistBetweenChainParts OBJECT_FIELD_F32(0x1F) +#define /*0x108*/ oChainChompRestrictedByChain OBJECT_FIELD_S32(0x20) +#define /*0x10C*/ oChainChompTargetPitch OBJECT_FIELD_S32(0x21) +#define /*0x110*/ oChainChompNumLunges OBJECT_FIELD_S32(0x22) +#define /*0x1AC*/ oChainChompReleaseStatus OBJECT_FIELD_S32(0x49) +#define /*0x1B0*/ oChainChompHitGate OBJECT_FIELD_S32(0x4A) /* Checkerboard Platform */ -#define /*0x0F8*/ oCheckerBoardPlatformUnkF8 OBJECT_FIELD_S32(0x1C) // oAction like -#define /*0x0FC*/ oCheckerBoardPlatformUnkFC OBJECT_FIELD_S32(0x1D) -#define /*0x1AC*/ oCheckerBoardPlatformUnk1AC OBJECT_FIELD_F32(0x49) +#define /*0x0F8*/ oCheckerBoardPlatformRotateAction OBJECT_FIELD_S32(0x1C) // oAction like +#define /*0x0FC*/ oCheckerBoardPlatformHeight OBJECT_FIELD_S32(0x1D) +#define /*0x1AC*/ oCheckerBoardPlatformRadius OBJECT_FIELD_F32(0x49) /* Cheep Cheep */ -#define /*0x0F4*/ oCheepCheepUnkF4 OBJECT_FIELD_F32(0x1B) -#define /*0x0F8*/ oCheepCheepUnkF8 OBJECT_FIELD_F32(0x1C) -#define /*0x0FC*/ oCheepCheepUnkFC OBJECT_FIELD_F32(0x1D) -#define /*0x104*/ oCheepCheepUnk104 OBJECT_FIELD_F32(0x1F) -#define /*0x108*/ oCheepCheepUnk108 OBJECT_FIELD_F32(0x20) +#define /*0x0F4*/ oCheepCheepWaterLevel OBJECT_FIELD_F32(0x1B) +#define /*0x0F8*/ oCheepCheepTargetY OBJECT_FIELD_F32(0x1C) +#define /*0x0FC*/ oCheepCheepTargetYOffset OBJECT_FIELD_F32(0x1D) +#define /*0x104*/ oCheepCheepMaxYOffset OBJECT_FIELD_F32(0x1F) +#define /*0x108*/ oCheepCheepRandomSwimAway OBJECT_FIELD_F32(0x20) /* Chuckya */ -#define /*0x088*/ oChuckyaUnk88 OBJECT_FIELD_S32(0x00) -#define /*0x0F8*/ oChuckyaUnkF8 OBJECT_FIELD_S32(0x1C) -#define /*0x0FC*/ oChuckyaUnkFC OBJECT_FIELD_S32(0x1D) -#define /*0x100*/ oChuckyaUnk100 OBJECT_FIELD_S32(0x1E) +#define /*0x088*/ oCommonAnchorAction OBJECT_FIELD_S32(0x00) +#define /*0x0F8*/ oChuckyaUnused OBJECT_FIELD_S32(0x1C) +#define /*0x0FC*/ oChuckyaSubActionTimer OBJECT_FIELD_S32(0x1D) +#define /*0x100*/ oChuckyaNumPlayerEscapeActions OBJECT_FIELD_S32(0x1E) /* Clam */ -#define /*0x0F4*/ oClamUnkF4 OBJECT_FIELD_S32(0x1B) +#define /*0x0F4*/ oClamShakeTimer OBJECT_FIELD_S32(0x1B) /* Cloud */ -#define /*0x0F4*/ oCloudCenterX OBJECT_FIELD_F32(0x1B) -#define /*0x0F8*/ oCloudCenterY OBJECT_FIELD_F32(0x1C) -#define /*0x0FC*/ oCloudBlowing OBJECT_FIELD_S32(0x1D) -#define /*0x100*/ oCloudGrowSpeed OBJECT_FIELD_F32(0x1E) -#define /*0x1AC*/ oCloudFwooshMovementRadius OBJECT_FIELD_S16(0x49, 0) +#define /*0x0F4*/ oCloudCenterX OBJECT_FIELD_F32(0x1B) +#define /*0x0F8*/ oCloudCenterY OBJECT_FIELD_F32(0x1C) +#define /*0x0FC*/ oCloudBlowing OBJECT_FIELD_S32(0x1D) +#define /*0x100*/ oCloudGrowSpeed OBJECT_FIELD_F32(0x1E) +#define /*0x1AC*/ oCloudFwooshMovementRadius OBJECT_FIELD_S16(0x49, 0) /* Coin */ -#define /*0x0F4*/ oCoinUnkF4 OBJECT_FIELD_S32(0x1B) -#define /*0x0F8*/ oCoinUnkF8 OBJECT_FIELD_S32(0x1C) -#define /*0x110*/ oCoinUnk110 OBJECT_FIELD_F32(0x22) +#define /*0x0F4*/ oCoinRespawnBits OBJECT_FIELD_S32(0x1B) +#define /*0x0F8*/ oCoinSnapToGround OBJECT_FIELD_S32(0x1C) +#define /*0x110*/ oCoinBaseYVel OBJECT_FIELD_F32(0x22) #ifndef VERSION_JP -#define /*0x1B0*/ oCoinUnk1B0 OBJECT_FIELD_S32(0x4A) +#define /*0x1B0*/ oCoinBounceTimer OBJECT_FIELD_S32(0x4A) #endif /* Collision Particle */ -#define /*0x0F4*/ oCollisionParticleUnkF4 OBJECT_FIELD_F32(0x1B) +#define /*0x0F4*/ oCollisionParticleScale OBJECT_FIELD_F32(0x1B) /* Controllable Platform */ -#define /*0x0F8*/ oControllablePlatformUnkF8 OBJECT_FIELD_S32(0x1C) -#define /*0x0FC*/ oControllablePlatformUnkFC OBJECT_FIELD_F32(0x1D) -#define /*0x100*/ oControllablePlatformUnk100 OBJECT_FIELD_S32(0x1E) +#define /*0x0F8*/ oControllablePlatformWallHitDirection OBJECT_FIELD_S32(0x1C) +#define /*0x0FC*/ oControllablePlatformInitPosY OBJECT_FIELD_F32(0x1D) +#define /*0x100*/ oControllablePlatformIsFarFromMario OBJECT_FIELD_S32(0x1E) /* Breakable Box Small (Small Cork Box) */ -#define /*0x0F4*/ oBreakableBoxSmallReleased OBJECT_FIELD_S32(0x1B) -#define /*0x0FC*/ oBreakableBoxSmallFramesSinceReleased OBJECT_FIELD_S32(0x1D) +#define /*0x0F4*/ oBreakableBoxSmallReleased OBJECT_FIELD_S32(0x1B) +#define /*0x0FC*/ oBreakableBoxSmallFramesSinceReleased OBJECT_FIELD_S32(0x1D) /* Jumping Box (Crazy Box) */ -#define /*0x0F4*/ oJumpingBoxUnkF4 OBJECT_FIELD_S32(0x1B) -#define /*0x0F8*/ oJumpingBoxUnkF8 OBJECT_FIELD_S32(0x1C) +#define /*0x0F4*/ oJumpingBoxUnusedTimerMin OBJECT_FIELD_S32(0x1B) +#define /*0x0F8*/ oJumpingBoxRandomTimer OBJECT_FIELD_S32(0x1C) /* RR Cruiser Wing */ -#define /*0x0F4*/ oRRCruiserWingUnkF4 OBJECT_FIELD_S32(0x1B) -#define /*0x0F8*/ oRRCruiserWingUnkF8 OBJECT_FIELD_S32(0x1C) +#define /*0x0F4*/ oRRCruiserWingInitYaw OBJECT_FIELD_S32(0x1B) +#define /*0x0F8*/ oRRCruiserWingInitPitch OBJECT_FIELD_S32(0x1C) /* Donut Platform Spawner */ -#define /*0x0F4*/ oDonutPlatformSpawnerSpawnedPlatforms OBJECT_FIELD_S32(0x1B) +#define /*0x0F4*/ oDonutPlatformSpawnerSpawnedPlatforms OBJECT_FIELD_S32(0x1B) /* Door */ -#define /*0x088*/ oDoorUnk88 OBJECT_FIELD_S32(0x00) -#define /*0x0F8*/ oDoorUnkF8 OBJECT_FIELD_S32(0x1C) -#define /*0x0FC*/ oDoorUnkFC OBJECT_FIELD_S32(0x1D) -#define /*0x100*/ oDoorUnk100 OBJECT_FIELD_S32(0x1E) +#define /*0x088*/ oDoorIsRendering OBJECT_FIELD_S32(0x00) +#define /*0x0F8*/ oDoorSelfRoom OBJECT_FIELD_S32(0x1C) +#define /*0x0FC*/ oDoorForwardRoom OBJECT_FIELD_S32(0x1D) +#define /*0x100*/ oDoorBackwardRoom OBJECT_FIELD_S32(0x1E) /* Dorrie */ -#define /*0x0F4*/ oDorrieDistToHome OBJECT_FIELD_F32(0x1B) -#define /*0x0F8*/ oDorrieOffsetY OBJECT_FIELD_F32(0x1C) -#define /*0x0FC*/ oDorrieVelY OBJECT_FIELD_F32(0x1D) -#define /*0x100*/ oDorrieForwardDistToMario OBJECT_FIELD_F32(0x1E) -#define /*0x104*/ oDorrieYawVel OBJECT_FIELD_S32(0x1F) -#define /*0x10C*/ oDorrieLiftingMario OBJECT_FIELD_S32(0x21) -#define /*0x1AC*/ oDorrieGroundPounded OBJECT_FIELD_S16(0x49, 0) -#define /*0x1AE*/ oDorrieAngleToHome OBJECT_FIELD_S16(0x49, + 1) -#define /*0x1B0*/ oDorrieNeckAngle OBJECT_FIELD_S16(0x4A, 0) -#define /*0x1B2*/ oDorrieHeadRaiseSpeed OBJECT_FIELD_S16(0x4A, + 1) +#define /*0x0F4*/ oDorrieDistToHome OBJECT_FIELD_F32(0x1B) +#define /*0x0F8*/ oDorrieOffsetY OBJECT_FIELD_F32(0x1C) +#define /*0x0FC*/ oDorrieVelY OBJECT_FIELD_F32(0x1D) +#define /*0x100*/ oDorrieForwardDistToMario OBJECT_FIELD_F32(0x1E) +#define /*0x104*/ oDorrieYawVel OBJECT_FIELD_S32(0x1F) +#define /*0x10C*/ oDorrieLiftingMario OBJECT_FIELD_S32(0x21) +#define /*0x1AC*/ oDorrieGroundPounded OBJECT_FIELD_S16(0x49, 0) +#define /*0x1AE*/ oDorrieAngleToHome OBJECT_FIELD_S16(0x49, + 1) +#define /*0x1B0*/ oDorrieNeckAngle OBJECT_FIELD_S16(0x4A, 0) +#define /*0x1B2*/ oDorrieHeadRaiseSpeed OBJECT_FIELD_S16(0x4A, + 1) /* Elevator */ -#define /*0x0F4*/ oElevatorUnkF4 OBJECT_FIELD_F32(0x1B) -#define /*0x0F8*/ oElevatorUnkF8 OBJECT_FIELD_F32(0x1C) -#define /*0x0FC*/ oElevatorUnkFC OBJECT_FIELD_F32(0x1D) -#define /*0x100*/ oElevatorUnk100 OBJECT_FIELD_S32(0x1E) +#define /*0x0F4*/ oElevatorMinY OBJECT_FIELD_F32(0x1B) +#define /*0x0F8*/ oElevatorMaxY OBJECT_FIELD_F32(0x1C) +#define /*0x0FC*/ oElevatorMidY OBJECT_FIELD_F32(0x1D) +#define /*0x100*/ oElevatorType OBJECT_FIELD_S32(0x1E) /* Exclamation Box */ -#define /*0x0F4*/ oExclamationBoxUnkF4 OBJECT_FIELD_F32(0x1B) // scale? -#define /*0x0F8*/ oExclamationBoxUnkF8 OBJECT_FIELD_F32(0x1C) // scale? -#define /*0x0FC*/ oExclamationBoxUnkFC OBJECT_FIELD_S32(0x1D) // angle? +#define /*0x0F4*/ oExclamationBoxHorizontalScale OBJECT_FIELD_F32(0x1B) +#define /*0x0F8*/ oExclamationBoxVerticalScale OBJECT_FIELD_F32(0x1C) +#define /*0x0FC*/ oExclamationBoxScaleAngle OBJECT_FIELD_S32(0x1D) /* Eyerok Boss */ -#define /*0x0F8*/ oEyerokBossNumHands OBJECT_FIELD_S32(0x1C) -#define /*0x0FC*/ oEyerokBossUnkFC OBJECT_FIELD_S32(0x1D) -#define /*0x100*/ oEyerokBossActiveHand OBJECT_FIELD_S32(0x1E) -#define /*0x104*/ oEyerokBossUnk104 OBJECT_FIELD_S32(0x1F) -#define /*0x108*/ oEyerokBossUnk108 OBJECT_FIELD_F32(0x20) -#define /*0x10C*/ oEyerokBossUnk10C OBJECT_FIELD_F32(0x21) -#define /*0x110*/ oEyerokBossUnk110 OBJECT_FIELD_F32(0x22) -#define /*0x1AC*/ oEyerokBossUnk1AC OBJECT_FIELD_S32(0x49) +#define /*0x0F8*/ oEyerokBossNumHands OBJECT_FIELD_S32(0x1C) +#define /*0x0FC*/ oEyerokBossAttackPhase OBJECT_FIELD_S32(0x1D) +#define /*0x100*/ oEyerokBossActiveHand OBJECT_FIELD_S32(0x1E) +#define /*0x104*/ oEyerokBossAttackCountdown OBJECT_FIELD_S32(0x1F) +#define /*0x108*/ oEyerokBossFightSideZ OBJECT_FIELD_F32(0x20) +#define /*0x10C*/ oEyerokBossClampedMarioPosZ OBJECT_FIELD_F32(0x21) +#define /*0x110*/ oEyerokBossOffsetFromHome OBJECT_FIELD_F32(0x22) +#define /*0x1AC*/ oEyerokBossActiveHandId OBJECT_FIELD_S32(0x49) /* Eyerok Hand */ -#define /*0x0F4*/ oEyerokHandWakeUpTimer OBJECT_FIELD_S32(0x1B) -#define /*0x0F8*/ oEyerokReceivedAttack OBJECT_FIELD_S32(0x1C) -#define /*0x0FC*/ oEyerokHandUnkFC OBJECT_FIELD_S32(0x1D) -#define /*0x100*/ oEyerokHandUnk100 OBJECT_FIELD_S32(0x1E) +#define /*0x0F4*/ oEyerokHandWakeUpTimer OBJECT_FIELD_S32(0x1B) +#define /*0x0F8*/ oEyerokReceivedAttack OBJECT_FIELD_S32(0x1C) +#define /*0x0FC*/ oEyerokHandAnimStateIndex OBJECT_FIELD_S32(0x1D) +#define /*0x100*/ oEyerokHandEyeShownTimer OBJECT_FIELD_S32(0x1E) /* Falling Pillar */ -#define /*0x0F4*/ oFallingPillarPitchAcceleration OBJECT_FIELD_F32(0x1B) +#define /*0x0F4*/ oFallingPillarPitchAcceleration OBJECT_FIELD_F32(0x1B) /* Fire Spitter */ -#define /*0x0F4*/ oFireSpitterScaleVel OBJECT_FIELD_F32(0x1B) +#define /*0x0F4*/ oFireSpitterScaleVel OBJECT_FIELD_F32(0x1B) /* Blue Fish */ -#define /*0x0F4*/ oBlueFishRandomVel OBJECT_FIELD_F32(0x1B) -#define /*0x0F8*/ oBlueFishRandomTime OBJECT_FIELD_S32(0x1C) -#define /*0x100*/ oBlueFishRandomAngle OBJECT_FIELD_F32(0x1E) +#define /*0x0F4*/ oBlueFishRandomVel OBJECT_FIELD_F32(0x1B) +#define /*0x0F8*/ oBlueFishRandomTime OBJECT_FIELD_S32(0x1C) +#define /*0x100*/ oBlueFishRandomAngle OBJECT_FIELD_F32(0x1E) /* Fish Group */ -#define /*0x0F4*/ oFishWaterLevel OBJECT_FIELD_F32(0x1B) -#define /*0x0F8*/ oFishGoalY OBJECT_FIELD_F32(0x1C) -#define /*0x0FC*/ oFishHeightOffset OBJECT_FIELD_F32(0x1D) -#define /*0x100*/ oFishYawVel OBJECT_FIELD_S32(0x1E) -#define /*0x104*/ oFishRoamDistance OBJECT_FIELD_F32(0x1F) -#define /*0x108*/ oFishGoalVel OBJECT_FIELD_F32(0x20) -#define /*0x10C*/ oFishDepthDistance OBJECT_FIELD_F32(0x21) -#define /*0x110*/ oFishActiveDistance OBJECT_FIELD_F32(0x22) +#define /*0x0F4*/ oFishWaterLevel OBJECT_FIELD_F32(0x1B) +#define /*0x0F8*/ oFishGoalY OBJECT_FIELD_F32(0x1C) +#define /*0x0FC*/ oFishHeightOffset OBJECT_FIELD_F32(0x1D) +#define /*0x100*/ oFishYawVel OBJECT_FIELD_S32(0x1E) +#define /*0x104*/ oFishRoamDistance OBJECT_FIELD_F32(0x1F) +#define /*0x108*/ oFishGoalVel OBJECT_FIELD_F32(0x20) +#define /*0x10C*/ oFishDepthDistance OBJECT_FIELD_F32(0x21) +#define /*0x110*/ oFishActiveDistance OBJECT_FIELD_F32(0x22) /* Flame */ -#define /*0x0F4*/ oFlameScale OBJECT_FIELD_F32(0x1B) -#define /*0x0F8*/ oFlameSpeedTimerOffset OBJECT_FIELD_S32(0x1C) -#define /*0x0FC*/ oFlameUnusedRand OBJECT_FIELD_F32(0x1D) -#define /*0x100*/ oFlameBowser OBJECT_FIELD_OBJ(0x1E) +#define /*0x0F4*/ oFlameScale OBJECT_FIELD_F32(0x1B) +#define /*0x0F8*/ oFlameSpeedTimerOffset OBJECT_FIELD_S32(0x1C) +#define /*0x0FC*/ oFlameUnusedRand OBJECT_FIELD_F32(0x1D) +#define /*0x100*/ oFlameBowser OBJECT_FIELD_OBJ(0x1E) /* Blue Flame */ -#define /*0x0F8*/ oBlueFlameNextScale OBJECT_FIELD_F32(0x1C) +#define /*0x0F8*/ oBlueFlameNextScale OBJECT_FIELD_F32(0x1C) /* Small Piranha Flame */ -#define /*0x0F4*/ oSmallPiranhaFlameStartSpeed OBJECT_FIELD_F32(0x1B) -#define /*0x0F8*/ oSmallPiranhaFlameEndSpeed OBJECT_FIELD_F32(0x1C) -#define /*0x0FC*/ oSmallPiranhaFlameModel OBJECT_FIELD_S32(0x1D) -#define /*0x100*/ oSmallPiranhaFlameNextFlameTimer OBJECT_FIELD_S32(0x1E) -#define /*0x104*/ oSmallPiranhaFlameSpeed OBJECT_FIELD_F32(0x1F) +#define /*0x0F4*/ oSmallPiranhaFlameStartSpeed OBJECT_FIELD_F32(0x1B) +#define /*0x0F8*/ oSmallPiranhaFlameEndSpeed OBJECT_FIELD_F32(0x1C) +#define /*0x0FC*/ oSmallPiranhaFlameModel OBJECT_FIELD_S32(0x1D) +#define /*0x100*/ oSmallPiranhaFlameNextFlameTimer OBJECT_FIELD_S32(0x1E) +#define /*0x104*/ oSmallPiranhaFlameSpeed OBJECT_FIELD_F32(0x1F) /* Moving Flame */ -#define /*0x0F4*/ oMovingFlameTimer OBJECT_FIELD_S32(0x1B) - -/* Flamethrower Flame */ -#define /*0x110*/ oFlameThowerFlameUnk110 OBJECT_FIELD_S32(0x22) +#define /*0x0F4*/ oMovingFlameTimer OBJECT_FIELD_S32(0x1B) /* Flamethrower */ -#define /*0x110*/ oFlameThowerUnk110 OBJECT_FIELD_S32(0x22) +#define /*0x110*/ oFlameThowerTimeRemaining OBJECT_FIELD_S32(0x22) /* Floating Platform */ -#define /*0x0F4*/ oFloatingPlatformUnkF4 OBJECT_FIELD_S32(0x1B) -#define /*0x0F8*/ oFloatingPlatformUnkF8 OBJECT_FIELD_F32(0x1C) -#define /*0x0FC*/ oFloatingPlatformUnkFC OBJECT_FIELD_F32(0x1D) -#define /*0x100*/ oFloatingPlatformUnk100 OBJECT_FIELD_S32(0x1E) +#define /*0x0F4*/ oFloatingPlatformIsOnFloor OBJECT_FIELD_S32(0x1B) +#define /*0x0F8*/ oFloatingPlatformMarioWeightWobbleOffset OBJECT_FIELD_F32(0x1C) +#define /*0x0FC*/ oFloatingPlatformHeightOffset OBJECT_FIELD_F32(0x1D) +#define /*0x100*/ oFloatingPlatformWaterSurfaceWobbleOffset OBJECT_FIELD_S32(0x1E) /* Floor Switch Press Animation */ -#define /*0x0F4*/ oFloorSwitchPressAnimationUnkF4 OBJECT_FIELD_S32(0x1B) -#define /*0x0F8*/ oFloorSwitchPressAnimationUnkF8 OBJECT_FIELD_S32(0x1C) -#define /*0x0FC*/ oFloorSwitchPressAnimationUnkFC OBJECT_FIELD_S32(0x1D) -#define /*0x100*/ oFloorSwitchPressAnimationUnk100 OBJECT_FIELD_S32(0x1E) +#define /*0x0F4*/ oFloorSwitchPressAnimationTickTimer OBJECT_FIELD_S32(0x1B) +#define /*0x0F8*/ oFloorSwitchPressAnimationDoubleFrame OBJECT_FIELD_S32(0x1C) +#define /*0x0FC*/ oFloorSwitchPressAnimationDoResetTime OBJECT_FIELD_S32(0x1D) +#define /*0x100*/ oFloorSwitchPressAnimationSwitchNotTicking OBJECT_FIELD_S32(0x1E) /* Fly Guy */ -#define /*0x0F4*/ oFlyGuyIdleTimer OBJECT_FIELD_S32(0x1B) -#define /*0x0F8*/ oFlyGuyOscTimer OBJECT_FIELD_S32(0x1C) -#define /*0x0FC*/ oFlyGuyUnusedJitter OBJECT_FIELD_S32(0x1D) -#define /*0x100*/ oFlyGuyLungeYDecel OBJECT_FIELD_F32(0x1E) -#define /*0x104*/ oFlyGuyLungeTargetPitch OBJECT_FIELD_S32(0x1F) -#define /*0x108*/ oFlyGuyTargetRoll OBJECT_FIELD_S32(0x20) -#define /*0x10C*/ oFlyGuyScaleVel OBJECT_FIELD_F32(0x21) +#define /*0x0F4*/ oFlyGuyIdleTimer OBJECT_FIELD_S32(0x1B) +#define /*0x0F8*/ oFlyGuyOscTimer OBJECT_FIELD_S32(0x1C) +#define /*0x0FC*/ oFlyGuyUnusedJitter OBJECT_FIELD_S32(0x1D) +#define /*0x100*/ oFlyGuyLungeYDecel OBJECT_FIELD_F32(0x1E) +#define /*0x104*/ oFlyGuyLungeTargetPitch OBJECT_FIELD_S32(0x1F) +#define /*0x108*/ oFlyGuyTargetRoll OBJECT_FIELD_S32(0x20) +#define /*0x10C*/ oFlyGuyScaleVel OBJECT_FIELD_F32(0x21) /* Grand Star */ -#define /*0x108*/ oGrandStarUnk108 OBJECT_FIELD_S32(0x20) +#define /*0x108*/ oGrandStarArcTime OBJECT_FIELD_S32(0x20) /* Horizontal Grindel */ -#define /*0x0F4*/ oHorizontalGrindelTargetYaw OBJECT_FIELD_S32(0x1B) -#define /*0x0F8*/ oHorizontalGrindelDistToHome OBJECT_FIELD_F32(0x1C) -#define /*0x0FC*/ oHorizontalGrindelOnGround OBJECT_FIELD_S32(0x1D) +#define /*0x0F4*/ oHorizontalGrindelTargetYaw OBJECT_FIELD_S32(0x1B) +#define /*0x0F8*/ oHorizontalGrindelDistToHome OBJECT_FIELD_F32(0x1C) +#define /*0x0FC*/ oHorizontalGrindelOnGround OBJECT_FIELD_S32(0x1D) /* Goomba */ -#define /*0x0F4*/ oGoombaSize OBJECT_FIELD_S32(0x1B) -#define /*0x0F8*/ oGoombaScale OBJECT_FIELD_F32(0x1C) -#define /*0x0FC*/ oGoombaWalkTimer OBJECT_FIELD_S32(0x1D) -#define /*0x100*/ oGoombaTargetYaw OBJECT_FIELD_S32(0x1E) -#define /*0x104*/ oGoombaBlinkTimer OBJECT_FIELD_S32(0x1F) -#define /*0x108*/ oGoombaTurningAwayFromWall OBJECT_FIELD_S32(0x20) -#define /*0x10C*/ oGoombaRelativeSpeed OBJECT_FIELD_F32(0x21) +#define /*0x0F4*/ oGoombaSize OBJECT_FIELD_S32(0x1B) +#define /*0x0F8*/ oGoombaScale OBJECT_FIELD_F32(0x1C) +#define /*0x0FC*/ oGoombaWalkTimer OBJECT_FIELD_S32(0x1D) +#define /*0x100*/ oGoombaTargetYaw OBJECT_FIELD_S32(0x1E) +#define /*0x104*/ oGoombaBlinkTimer OBJECT_FIELD_S32(0x1F) +#define /*0x108*/ oGoombaTurningAwayFromWall OBJECT_FIELD_S32(0x20) +#define /*0x10C*/ oGoombaRelativeSpeed OBJECT_FIELD_F32(0x21) /* Haunted Chair */ -#define /*0x0F4*/ oHauntedChairUnkF4 OBJECT_FIELD_S32(0x1B) -#define /*0x0F8*/ oHauntedChairUnkF8 OBJECT_FIELD_F32(0x1C) -#define /*0x0FC*/ oHauntedChairUnkFC OBJECT_FIELD_F32(0x1D) -#define /*0x100*/ oHauntedChairUnk100 OBJECT_FIELD_S32P(0x1E) -#define /*0x104*/ oHauntedChairUnk104 OBJECT_FIELD_S32(0x1F) +#define /*0x0F4*/ oHauntedChairSpinTimer OBJECT_FIELD_S32(0x1B) +#define /*0x0F8*/ oHauntedChairPitchVel OBJECT_FIELD_F32(0x1C) +#define /*0x0FC*/ oHauntedChairRollVel OBJECT_FIELD_F32(0x1D) +#define /*0x100*/ oHauntedChairFallFromPianoAngle OBJECT_FIELD_S32P(0x1E) +#define /*0x104*/ oHauntedChairFallTargetAngle OBJECT_FIELD_S32(0x1F) /* Heave-Ho */ -#define /*0x088*/ oHeaveHoUnk88 OBJECT_FIELD_S32(0x00) -#define /*0x0F4*/ oHeaveHoUnkF4 OBJECT_FIELD_F32(0x1B) +#define /*0x088*/ oHeaveHoThrowState OBJECT_FIELD_S32(0x00) +#define /*0x0F4*/ oHeaveHoTimedSpeed OBJECT_FIELD_F32(0x1B) /* Hidden Object */ -#define /*0x0F4*/ oHiddenObjectUnkF4 OBJECT_FIELD_OBJ(0x1B) +#define /*0x0F4*/ oHiddenObjectSwitchObj OBJECT_FIELD_OBJ(0x1B) /* Hoot */ -#define /*0x0F4*/ oHootAvailability OBJECT_FIELD_S32(0x1B) -#define /*0x110*/ oHootMarioReleaseTime OBJECT_FIELD_S32(0x22) +#define /*0x0F4*/ oHootAvailability OBJECT_FIELD_S32(0x1B) +#define /*0x110*/ oHootMarioReleaseTime OBJECT_FIELD_S32(0x22) /* Horizontal Movement */ -#define /*0x0F4*/ oLllOctMeshWaveTimer OBJECT_FIELD_S32(0x1B) -#define /*0x0F8*/ oLllOctMeshActionOffset OBJECT_FIELD_S32(0x1C) -#define /*0x100*/ oLllOctMeshWaveOffset1 OBJECT_FIELD_F32(0x1E) -#define /*0x104*/ oLllOctMeshStandTimer OBJECT_FIELD_S32(0x1F) -#define /*0x108*/ oLllOctMeshWaveOffset2 OBJECT_FIELD_F32(0x20) +#define /*0x0F4*/ oLllOctMeshWaveTimer OBJECT_FIELD_S32(0x1B) +#define /*0x0F8*/ oLllOctMeshActionOffset OBJECT_FIELD_S32(0x1C) +#define /*0x100*/ oLllOctMeshWaveYOffset OBJECT_FIELD_F32(0x1E) +#define /*0x104*/ oLllOctMeshStandTimer OBJECT_FIELD_S32(0x1F) +#define /*0x108*/ oLllOctMeshYOffsetFromHome OBJECT_FIELD_F32(0x20) /* Kickable Board */ -#define /*0x0F4*/ oKickableBoardF4 OBJECT_FIELD_S32(0x1B) -#define /*0x0F8*/ oKickableBoardF8 OBJECT_FIELD_S32(0x1C) +#define /*0x0F4*/ oKickableBoardRockingAngleAmount OBJECT_FIELD_S32(0x1B) +#define /*0x0F8*/ oKickableBoardRockingTimer OBJECT_FIELD_S32(0x1C) /* King Bob-omb */ -#define /*0x088*/ oKingBobombUnk88 OBJECT_FIELD_S32(0x00) -#define /*0x0F8*/ oKingBobombUnkF8 OBJECT_FIELD_S32(0x1C) -#define /*0x0FC*/ oKingBobombUnkFC OBJECT_FIELD_S32(0x1D) -#define /*0x100*/ oKingBobombUnk100 OBJECT_FIELD_S32(0x1E) -#define /*0x104*/ oKingBobombUnk104 OBJECT_FIELD_S32(0x1F) -#define /*0x108*/ oKingBobombUnk108 OBJECT_FIELD_S32(0x20) +#define /*0x088*/ oKingBobombHoldingMarioState OBJECT_FIELD_S32(0x00) +#define /*0x0F8*/ oKingBobombIsJumping OBJECT_FIELD_S32(0x1C) +#define /*0x0FC*/ oKingBobombPlayerGrabEscapeActions OBJECT_FIELD_S32(0x1D) +#define /*0x100*/ oKingBobombShouldStomp OBJECT_FIELD_S32(0x1E) +#define /*0x104*/ oKingBobombStationaryTimer OBJECT_FIELD_S32(0x1F) +#define /*0x108*/ oKingBobombPlayerGrabEscapeCooldown OBJECT_FIELD_S32(0x20) +#define /*0x10C*/ oKingBobombBlinkTimer OBJECT_FIELD_S32(0x21) /* Klepto */ -#define /*0x0F4*/ oKleptoDistanceToTarget OBJECT_FIELD_F32(0x1B) -#define /*0x0F8*/ oKleptoUnkF8 OBJECT_FIELD_F32(0x1C) -#define /*0x0FC*/ oKleptoUnkFC OBJECT_FIELD_F32(0x1D) -#define /*0x100*/ oKleptoSpeed OBJECT_FIELD_F32(0x1E) -#define /*0x104*/ oKleptoStartPosX OBJECT_FIELD_F32(0x1F) -#define /*0x108*/ oKleptoStartPosY OBJECT_FIELD_F32(0x20) -#define /*0x10C*/ oKleptoStartPosZ OBJECT_FIELD_F32(0x21) -#define /*0x110*/ oKleptoTimeUntilTargetChange OBJECT_FIELD_S32(0x22) -#define /*0x1AC*/ oKleptoTargetNumber OBJECT_FIELD_S16(0x49, 0) -#define /*0x1AE*/ oKleptoUnk1AE OBJECT_FIELD_S16(0x49, + 1) -#define /*0x1B0*/ oKleptoUnk1B0 OBJECT_FIELD_S16(0x4A, 0) -#define /*0x1B2*/ oKleptoYawToTarget OBJECT_FIELD_S16(0x4A, + 1) +#define /*0x0F4*/ oKleptoDistanceToTarget OBJECT_FIELD_F32(0x1B) +#define /*0x0F8*/ oKleptoHomeYOffset OBJECT_FIELD_F32(0x1C) +#define /*0x0FC*/ oKleptoHalfLateralDistToHome OBJECT_FIELD_F32(0x1D) +#define /*0x100*/ oKleptoSpeed OBJECT_FIELD_F32(0x1E) +#define /*0x104*/ O_KLEPTO_START_POS_INDEX 0x1F +#define /*0x104*/ O_KLEPTO_START_POS_X_INDEX (O_KLEPTO_START_POS_INDEX + 0) // 0x1F +#define /*0x108*/ O_KLEPTO_START_POS_Y_INDEX (O_KLEPTO_START_POS_INDEX + 1) // 0x20 +#define /*0x10C*/ O_KLEPTO_START_POS_Z_INDEX (O_KLEPTO_START_POS_INDEX + 2) // 0x21 +#define /*0x104*/ oKleptoStartPosVec OBJECT_FIELD_F32(O_KLEPTO_START_POS_INDEX) +#define /*0x104*/ oKleptoStartPosX OBJECT_FIELD_F32(O_KLEPTO_START_POS_X_INDEX) +#define /*0x108*/ oKleptoStartPosY OBJECT_FIELD_F32(O_KLEPTO_START_POS_Y_INDEX) +#define /*0x10C*/ oKleptoStartPosZ OBJECT_FIELD_F32(O_KLEPTO_START_POS_Z_INDEX) +#define /*0x110*/ oKleptoTimeUntilTargetChange OBJECT_FIELD_S32(0x22) +#define /*0x1AC*/ oKleptoTargetNumber OBJECT_FIELD_S16(0x49, 0) +#define /*0x1AE*/ oKleptoDiveTimer OBJECT_FIELD_S16(0x49, + 1) +#define /*0x1B0*/ oKleptoPitchToTarget OBJECT_FIELD_S16(0x4A, 0) +#define /*0x1B2*/ oKleptoYawToTarget OBJECT_FIELD_S16(0x4A, + 1) /* Koopa */ -#define /*0x0F4*/ oKoopaAgility OBJECT_FIELD_F32(0x1B) -#define /*0x0F8*/ oKoopaMovementType OBJECT_FIELD_S32(0x1C) -#define /*0x0FC*/ oKoopaTargetYaw OBJECT_FIELD_S32(0x1D) -#define /*0x100*/ oKoopaUnshelledTimeUntilTurn OBJECT_FIELD_S32(0x1E) -#define /*0x104*/ oKoopaTurningAwayFromWall OBJECT_FIELD_S32(0x1F) -#define /*0x108*/ oKoopaDistanceToMario OBJECT_FIELD_F32(0x20) -#define /*0x10C*/ oKoopaAngleToMario OBJECT_FIELD_S32(0x21) -#define /*0x110*/ oKoopaBlinkTimer OBJECT_FIELD_S32(0x22) -#define /*0x1AC*/ oKoopaCountdown OBJECT_FIELD_S16(0x49, 0) -#define /*0x1AE*/ oKoopaTheQuickRaceIndex OBJECT_FIELD_S16(0x49, 1) -#define /*0x1B0*/ oKoopaTheQuickInitTextboxCooldown OBJECT_FIELD_S16(0x4A, 0) +#define /*0x0F4*/ oKoopaAgility OBJECT_FIELD_F32(0x1B) +#define /*0x0F8*/ oKoopaMovementType OBJECT_FIELD_S32(0x1C) +#define /*0x0FC*/ oKoopaTargetYaw OBJECT_FIELD_S32(0x1D) +#define /*0x100*/ oKoopaUnshelledTimeUntilTurn OBJECT_FIELD_S32(0x1E) +#define /*0x104*/ oKoopaTurningAwayFromWall OBJECT_FIELD_S32(0x1F) +#define /*0x108*/ oKoopaDistanceToMario OBJECT_FIELD_F32(0x20) +#define /*0x10C*/ oKoopaAngleToMario OBJECT_FIELD_S32(0x21) +#define /*0x110*/ oKoopaBlinkTimer OBJECT_FIELD_S32(0x22) +#define /*0x1AC*/ oKoopaCountdown OBJECT_FIELD_S16(0x49, 0) +#define /*0x1AE*/ oKoopaTheQuickRaceIndex OBJECT_FIELD_S16(0x49, 1) +#define /*0x1B0*/ oKoopaTheQuickInitTextboxCooldown OBJECT_FIELD_S16(0x4A, 0) // 0x1D-0x21 for koopa the quick reserved for pathing /* Koopa Race Endpoint */ -#define /*0x0F4*/ oKoopaRaceEndpointRaceBegun OBJECT_FIELD_S32(0x1B) -#define /*0x0F8*/ oKoopaRaceEndpointKoopaFinished OBJECT_FIELD_S32(0x1C) -#define /*0x0FC*/ oKoopaRaceEndpointRaceStatus OBJECT_FIELD_S32(0x1D) -#define /*0x100*/ oKoopaRaceEndpointDialog OBJECT_FIELD_S32(0x1E) -#define /*0x104*/ oKoopaRaceEndpointRaceEnded OBJECT_FIELD_S32(0x1F) +#define /*0x0F4*/ oKoopaRaceEndpointRaceBegun OBJECT_FIELD_S32(0x1B) +#define /*0x0F8*/ oKoopaRaceEndpointKoopaFinished OBJECT_FIELD_S32(0x1C) +#define /*0x0FC*/ oKoopaRaceEndpointRaceStatus OBJECT_FIELD_S32(0x1D) +#define /*0x100*/ oKoopaRaceEndpointDialog OBJECT_FIELD_S32(0x1E) +#define /*0x104*/ oKoopaRaceEndpointRaceEnded OBJECT_FIELD_S32(0x1F) /* Koopa Shell Flame */ -#define /*0x0F4*/ oKoopaShellFlameUnkF4 OBJECT_FIELD_F32(0x1B) -#define /*0x0F8*/ oKoopaShellFlameUnkF8 OBJECT_FIELD_F32(0x1C) +#define /*0x0F4*/ oKoopaShellFlameUnused OBJECT_FIELD_F32(0x1B) +#define /*0x0F8*/ oKoopaShellFlameScale OBJECT_FIELD_F32(0x1C) /* Camera Lakitu */ -#define /*0x0F4*/ oCameraLakituBlinkTimer OBJECT_FIELD_S32(0x1B) -#define /*0x0F8*/ oCameraLakituSpeed OBJECT_FIELD_F32(0x1C) -#define /*0x0FC*/ oCameraLakituCircleRadius OBJECT_FIELD_F32(0x1D) -#define /*0x100*/ oCameraLakituFinishedDialog OBJECT_FIELD_S32(0x1E) +#define /*0x0F4*/ oCameraLakituBlinkTimer OBJECT_FIELD_S32(0x1B) +#define /*0x0F8*/ oCameraLakituSpeed OBJECT_FIELD_F32(0x1C) +#define /*0x0FC*/ oCameraLakituCircleRadius OBJECT_FIELD_F32(0x1D) +#define /*0x100*/ oCameraLakituFinishedDialog OBJECT_FIELD_S32(0x1E) #ifndef VERSION_JP -#define /*0x104*/ oCameraLakituUnk104 OBJECT_FIELD_S32(0x1F) +#define /*0x104*/ oCameraLakituIntroMusicPlayed OBJECT_FIELD_S32(0x1F) #endif -#define /*0x1AC*/ oCameraLakituPitchVel OBJECT_FIELD_S16(0x49, 0) -#define /*0x1AE*/ oCameraLakituYawVel OBJECT_FIELD_S16(0x49, + 1) +#define /*0x1AC*/ oCameraLakituPitchVel OBJECT_FIELD_S16(0x49, 0) +#define /*0x1AE*/ oCameraLakituYawVel OBJECT_FIELD_S16(0x49, + 1) /* Evil Lakitu */ -#define /*0x0F4*/ oEnemyLakituNumSpinies OBJECT_FIELD_S32(0x1B) -#define /*0x0F8*/ oEnemyLakituBlinkTimer OBJECT_FIELD_S32(0x1C) -#define /*0x0FC*/ oEnemyLakituSpinyCooldown OBJECT_FIELD_S32(0x1D) -#define /*0x100*/ oEnemyLakituFaceForwardCountdown OBJECT_FIELD_S32(0x1E) +#define /*0x0F4*/ oEnemyLakituNumSpinies OBJECT_FIELD_S32(0x1B) +#define /*0x0F8*/ oEnemyLakituBlinkTimer OBJECT_FIELD_S32(0x1C) +#define /*0x0FC*/ oEnemyLakituSpinyCooldown OBJECT_FIELD_S32(0x1D) +#define /*0x100*/ oEnemyLakituFaceForwardCountdown OBJECT_FIELD_S32(0x1E) /* Intro Cutscene Lakitu */ -#define /*0x0F8*/ oIntroLakituSplineSegmentProgress OBJECT_FIELD_F32(0x1C) -#define /*0x0FC*/ oIntroLakituSplineSegment OBJECT_FIELD_F32(0x1D) -#define /*0x100*/ oIntroLakituUnk100 OBJECT_FIELD_F32(0x1E) -#define /*0x104*/ oIntroLakituUnk104 OBJECT_FIELD_F32(0x1F) -#define /*0x108*/ oIntroLakituUnk108 OBJECT_FIELD_F32(0x20) -#define /*0x10C*/ oIntroLakituUnk10C OBJECT_FIELD_F32(0x21) -#define /*0x110*/ oIntroLakituUnk110 OBJECT_FIELD_F32(0x22) -#define /*0x1AC*/ oIntroLakituCloud OBJECT_FIELD_OBJ(0x49) +#define /*0x0F8*/ oIntroLakituSplineSegmentProgress OBJECT_FIELD_F32(0x1C) +#define /*0x0FC*/ oIntroLakituSplineSegment OBJECT_FIELD_F32(0x1D) +#define /*0x100*/ oIntroLakituDistToBirdsX OBJECT_FIELD_F32(0x1E) +#define /*0x104*/ oIntroLakituDistToBirdsZ OBJECT_FIELD_F32(0x1F) +#define /*0x108*/ O_INTRO_LAKITU_END_BIRDS_DEST_INDEX 0x20 +#define /*0x108*/ O_INTRO_LAKITU_END_BIRDS_DEST_Z_INDEX (O_INTRO_LAKITU_END_BIRDS_DEST_INDEX + 0) // 0x20 +#define /*0x10C*/ O_INTRO_LAKITU_END_BIRDS_DEST_Y_INDEX (O_INTRO_LAKITU_END_BIRDS_DEST_INDEX + 1) // 0x21 +#define /*0x110*/ O_INTRO_LAKITU_END_BIRDS_DEST_X_INDEX (O_INTRO_LAKITU_END_BIRDS_DEST_INDEX + 2) // 0x22 +#define /*0x108*/ oIntroLakituEndBirds1DestVec OBJECT_FIELD_F32(O_INTRO_LAKITU_END_BIRDS_DEST_INDEX) +#define /*0x108*/ oIntroLakituEndBirds1DestZ OBJECT_FIELD_F32(O_INTRO_LAKITU_END_BIRDS_DEST_Z_INDEX) +#define /*0x10C*/ oIntroLakituEndBirds1DestY OBJECT_FIELD_F32(O_INTRO_LAKITU_END_BIRDS_DEST_Y_INDEX) +#define /*0x110*/ oIntroLakituEndBirds1DestX OBJECT_FIELD_F32(O_INTRO_LAKITU_END_BIRDS_DEST_X_INDEX) +#define /*0x1AC*/ oIntroLakituCloud OBJECT_FIELD_OBJ(0x49) /* Main Menu Button */ -#define /*0x0F4*/ oMenuButtonState OBJECT_FIELD_S32(0x1B) -#define /*0x0F8*/ oMenuButtonTimer OBJECT_FIELD_S32(0x1C) -#define /*0x0FC*/ oMenuButtonOrigPosX OBJECT_FIELD_F32(0x1D) -#define /*0x100*/ oMenuButtonOrigPosY OBJECT_FIELD_F32(0x1E) -#define /*0x104*/ oMenuButtonOrigPosZ OBJECT_FIELD_F32(0x1F) -#define /*0x108*/ oMenuButtonScale OBJECT_FIELD_F32(0x20) -#define /*0x10C*/ oMenuButtonActionPhase OBJECT_FIELD_S32(0x21) +#define /*0x0F4*/ oMenuButtonState OBJECT_FIELD_S32(0x1B) +#define /*0x0F8*/ oMenuButtonTimer OBJECT_FIELD_S32(0x1C) +#define /*0x0FC*/ O_MENU_BUTTON_ORIG_POS_INDEX 0x1D +#define /*0x0FC*/ O_MENU_BUTTON_ORIG_POS_X_INDEX (O_MENU_BUTTON_ORIG_POS_INDEX + 0) // 0x1D +#define /*0x100*/ O_MENU_BUTTON_ORIG_POS_Y_INDEX (O_MENU_BUTTON_ORIG_POS_INDEX + 1) // 0x1E +#define /*0x104*/ O_MENU_BUTTON_ORIG_POS_Z_INDEX (O_MENU_BUTTON_ORIG_POS_INDEX + 2) // 0x1F +#define /*0x0FC*/ oMenuButtonOrigPosVec OBJECT_FIELD_F32(O_MENU_BUTTON_ORIG_POS_INDEX) +#define /*0x0FC*/ oMenuButtonOrigPosX OBJECT_FIELD_F32(O_MENU_BUTTON_ORIG_POS_X_INDEX) +#define /*0x100*/ oMenuButtonOrigPosY OBJECT_FIELD_F32(O_MENU_BUTTON_ORIG_POS_Y_INDEX) +#define /*0x104*/ oMenuButtonOrigPosZ OBJECT_FIELD_F32(O_MENU_BUTTON_ORIG_POS_Z_INDEX) +#define /*0x108*/ oMenuButtonScale OBJECT_FIELD_F32(0x20) +#define /*0x10C*/ oMenuButtonActionPhase OBJECT_FIELD_S32(0x21) /* Manta Ray */ -#define /*0x0F4*/ oMantaTargetPitch OBJECT_FIELD_S32(0x1B) -#define /*0x0F8*/ oMantaTargetYaw OBJECT_FIELD_S32(0x1C) +#define /*0x0F4*/ O_MANTA_TARGET_ANGLE_INDEX 0x1B +#define /*0x0F4*/ O_MANTA_TARGET_PITCH_INDEX (O_MANTA_TARGET_ANGLE_INDEX + 0) // 0x1B +#define /*0x0F8*/ O_MANTA_TARGET_YAW_INDEX (O_MANTA_TARGET_ANGLE_INDEX + 1) // 0x1C +#define /*0x0FC*/ O_MANTA_TARGET_ROLL_INDEX (O_MANTA_TARGET_ANGLE_INDEX + 2) // 0x1D +#define /*0x0F4*/ oMantaTargetAngleVec OBJECT_FIELD_S32(O_MANTA_TARGET_ANGLE_INDEX) +#define /*0x0F4*/ oMantaTargetPitch OBJECT_FIELD_S32(O_MANTA_TARGET_PITCH_INDEX) +#define /*0x0F8*/ oMantaTargetYaw OBJECT_FIELD_S32(O_MANTA_TARGET_YAW_INDEX) +#define /*0x0FC*/ oMantaTargetRoll OBJECT_FIELD_S32(O_MANTA_TARGET_ROLL_INDEX) // unused /* Merry-Go-Round */ -#define /*0x088*/ oMerryGoRoundStopped OBJECT_FIELD_S32(0x00) -#define /*0x0F8*/ oMerryGoRoundMusicShouldPlay OBJECT_FIELD_S32(0x1C) -#define /*0x0FC*/ oMerryGoRoundMarioIsOutside OBJECT_FIELD_S32(0x1D) +#define /*0x088*/ oMerryGoRoundStopped OBJECT_FIELD_S32(0x00) +#define /*0x0F8*/ oMerryGoRoundMusicShouldPlay OBJECT_FIELD_S32(0x1C) +#define /*0x0FC*/ oMerryGoRoundMarioIsOutside OBJECT_FIELD_S32(0x1D) /* Merry-Go-Round Boo Manager */ -#define /*0x088*/ oMerryGoRoundBooManagerNumBoosKilled OBJECT_FIELD_S32(0x00) -#define /*0x0FC*/ oMerryGoRoundBooManagerNumBoosSpawned OBJECT_FIELD_S32(0x1D) +#define /*0x088*/ oMerryGoRoundBooManagerNumBoosKilled OBJECT_FIELD_S32(0x00) +#define /*0x0FC*/ oMerryGoRoundBooManagerNumBoosSpawned OBJECT_FIELD_S32(0x1D) /* Mips */ -#define /*0x0F4*/ oMipsStarStatus OBJECT_FIELD_S32(0x1B) -#define /*0x0F8*/ oMipsStartWaypointIndex OBJECT_FIELD_S32(0x1C) +#define /*0x0F4*/ oMipsStarStatus OBJECT_FIELD_S32(0x1B) +#define /*0x0F8*/ oMipsStartWaypointIndex OBJECT_FIELD_S32(0x1C) // 0x1D-0x21 reserved for pathing -#define /*0x1AC*/ oMipsForwardVelocity OBJECT_FIELD_F32(0x49) +#define /*0x1AC*/ oMipsForwardVelocity OBJECT_FIELD_F32(0x49) /* Moneybag */ -#define /*0x0F4*/ oMoneybagJumpState OBJECT_FIELD_S32(0x1B) +#define /*0x0F4*/ oMoneybagJumpState OBJECT_FIELD_S32(0x1B) /* Monty Mole */ -#define /*0x0F4*/ oMontyMoleCurrentHole OBJECT_FIELD_OBJ(0x1B) -#define /*0x0F8*/ oMontyMoleHeightRelativeToFloor OBJECT_FIELD_F32(0x1C) +#define /*0x0F4*/ oMontyMoleCurrentHole OBJECT_FIELD_OBJ(0x1B) +#define /*0x0F8*/ oMontyMoleHeightRelativeToFloor OBJECT_FIELD_F32(0x1C) /* Monty Mole Hole */ -#define /*0x0F4*/ oMontyMoleHoleCooldown OBJECT_FIELD_S32(0x1B) +#define /*0x0F4*/ oMontyMoleHoleCooldown OBJECT_FIELD_S32(0x1B) /* Mr. Blizzard */ -#define /*0x0F4*/ oMrBlizzardScale OBJECT_FIELD_F32(0x1B) -#define /*0x0F8*/ oMrBlizzardHeldObj OBJECT_FIELD_OBJ(0x1C) -#define /*0x0FC*/ oMrBlizzardGraphYVel OBJECT_FIELD_F32(0x1D) -#define /*0x100*/ oMrBlizzardTimer OBJECT_FIELD_S32(0x1E) -#define /*0x104*/ oMrBlizzardDizziness OBJECT_FIELD_F32(0x1F) -#define /*0x108*/ oMrBlizzardChangeInDizziness OBJECT_FIELD_F32(0x20) -#define /*0x10C*/ oMrBlizzardGraphYOffset OBJECT_FIELD_F32(0x21) -#define /*0x110*/ oMrBlizzardDistFromHome OBJECT_FIELD_S32(0x22) -#define /*0x1AC*/ oMrBlizzardTargetMoveYaw OBJECT_FIELD_S32(0x49) +#define /*0x0F4*/ oMrBlizzardScale OBJECT_FIELD_F32(0x1B) +#define /*0x0F8*/ oMrBlizzardHeldObj OBJECT_FIELD_OBJ(0x1C) +#define /*0x0FC*/ oMrBlizzardGraphYVel OBJECT_FIELD_F32(0x1D) +#define /*0x100*/ oMrBlizzardTimer OBJECT_FIELD_S32(0x1E) +#define /*0x104*/ oMrBlizzardDizziness OBJECT_FIELD_F32(0x1F) +#define /*0x108*/ oMrBlizzardChangeInDizziness OBJECT_FIELD_F32(0x20) +#define /*0x10C*/ oMrBlizzardGraphYOffset OBJECT_FIELD_F32(0x21) +#define /*0x110*/ oMrBlizzardDistFromHome OBJECT_FIELD_S32(0x22) +#define /*0x1AC*/ oMrBlizzardTargetMoveYaw OBJECT_FIELD_S32(0x49) /* Mr. I */ -#define /*0x0F4*/ oMrIUnkF4 OBJECT_FIELD_S32(0x1B) -#define /*0x0FC*/ oMrIUnkFC OBJECT_FIELD_S32(0x1D) -#define /*0x100*/ oMrIUnk100 OBJECT_FIELD_S32(0x1E) -#define /*0x104*/ oMrIUnk104 OBJECT_FIELD_S32(0x1F) -#define /*0x108*/ oMrIUnk108 OBJECT_FIELD_S32(0x20) -#define /*0x10C*/ oMrISize OBJECT_FIELD_F32(0x21) -#define /*0x110*/ oMrIUnk110 OBJECT_FIELD_S32(0x22) +#define /*0x0F4*/ oMrISpinAngle OBJECT_FIELD_S32(0x1B) +#define /*0x0FC*/ oMrISpinAmount OBJECT_FIELD_S32(0x1D) +#define /*0x100*/ oMrISpinDirection OBJECT_FIELD_S32(0x1E) +#define /*0x104*/ oMrIParticleTimer OBJECT_FIELD_S32(0x1F) +#define /*0x108*/ oMrIParticleTimerTarget OBJECT_FIELD_S32(0x20) +#define /*0x10C*/ oMrISize OBJECT_FIELD_F32(0x21) +#define /*0x110*/ oMrIBlinking OBJECT_FIELD_S32(0x22) /* Object Respawner */ -#define /*0x0F4*/ oRespawnerModelToRespawn OBJECT_FIELD_S32(0x1B) -#define /*0x0F8*/ oRespawnerMinSpawnDist OBJECT_FIELD_F32(0x1C) -#define /*0x0FC*/ oRespawnerBehaviorToRespawn OBJECT_FIELD_CVPTR(0x1D) +#define /*0x0F4*/ oRespawnerModelToRespawn OBJECT_FIELD_S32(0x1B) +#define /*0x0F8*/ oRespawnerMinSpawnDist OBJECT_FIELD_F32(0x1C) +#define /*0x0FC*/ oRespawnerBehaviorToRespawn OBJECT_FIELD_CVPTR(0x1D) /* Openable Grill */ -#define /*0x088*/ oOpenableGrillUnk88 OBJECT_FIELD_S32(0x00) -#define /*0x0F4*/ oOpenableGrillUnkF4 OBJECT_FIELD_OBJ(0x1B) +#define /*0x088*/ oOpenableGrillIsOpen OBJECT_FIELD_S32(0x00) +#define /*0x0F4*/ oOpenableGrillFloorSwitchObj OBJECT_FIELD_OBJ(0x1B) /* Intro Cutscene Peach */ -#define /*0x108*/ oIntroPeachYawFromFocus OBJECT_FIELD_F32(0x20) -#define /*0x10C*/ oIntroPeachPitchFromFocus OBJECT_FIELD_F32(0x21) -#define /*0x110*/ oIntroPeachDistToCamera OBJECT_FIELD_F32(0x22) +#define /*0x108*/ oIntroPeachYawFromFocus OBJECT_FIELD_F32(0x20) +#define /*0x10C*/ oIntroPeachPitchFromFocus OBJECT_FIELD_F32(0x21) +#define /*0x110*/ oIntroPeachDistToCamera OBJECT_FIELD_F32(0x22) /* Racing Penguin */ -#define /*0x0F4*/ oRacingPenguinInitTextCooldown OBJECT_FIELD_S32(0x1B) +#define /*0x0F4*/ oRacingPenguinInitTextCooldown OBJECT_FIELD_S32(0x1B) // 0x1D-0x21 reserved for pathing -#define /*0x110*/ oRacingPenguinWeightedNewTargetSpeed OBJECT_FIELD_F32(0x22) -#define /*0x1AC*/ oRacingPenguinFinalTextbox OBJECT_FIELD_S16(0x49, 0) -#define /*0x1AE*/ oRacingPenguinMarioWon OBJECT_FIELD_S16(0x49, + 1) -#define /*0x1B0*/ oRacingPenguinReachedBottom OBJECT_FIELD_S16(0x4A, 0) -#define /*0x1B2*/ oRacingPenguinMarioCheated OBJECT_FIELD_S16(0x4A, + 1) +#define /*0x110*/ oRacingPenguinWeightedNewTargetSpeed OBJECT_FIELD_F32(0x22) +#define /*0x1AC*/ oRacingPenguinFinalTextbox OBJECT_FIELD_S16(0x49, 0) +#define /*0x1AE*/ oRacingPenguinMarioWon OBJECT_FIELD_S16(0x49, + 1) +#define /*0x1B0*/ oRacingPenguinReachedBottom OBJECT_FIELD_S16(0x4A, 0) +#define /*0x1B2*/ oRacingPenguinMarioCheated OBJECT_FIELD_S16(0x4A, + 1) /* Small Penguin */ -#define /*0x088*/ oSmallPenguinUnk88 OBJECT_FIELD_S32(0x00) -#define /*0x100*/ oSmallPenguinUnk100 OBJECT_FIELD_S32(0x1E) // angle? -#define /*0x104*/ oSmallPenguinUnk104 OBJECT_FIELD_F32(0x1F) -#define /*0x108*/ oSmallPenguinUnk108 OBJECT_FIELD_F32(0x20) -#define /*0x110*/ oSmallPenguinUnk110 OBJECT_FIELD_S32(0x22) +#define /*0x088*/ oSmallPenguinReturnedToMother OBJECT_FIELD_S32(0x00) +#define /*0x100*/ oSmallPenguinStoredAction OBJECT_FIELD_S32(0x1E) +#define /*0x104*/ oSmallPenguinNextForwardVel OBJECT_FIELD_F32(0x1F) +#define /*0x108*/ oSmallPenguinRandomDistanceCheck OBJECT_FIELD_F32(0x20) +#define /*0x110*/ oSmallPenguinYawIncrement OBJECT_FIELD_S32(0x22) /* SL Walking Penguin */ -#define /*0x100*/ oSLWalkingPenguinWindCollisionXPos OBJECT_FIELD_F32(0x1E) -#define /*0x104*/ oSLWalkingPenguinWindCollisionZPos OBJECT_FIELD_F32(0x1F) -#define /*0x10C*/ oSLWalkingPenguinCurStep OBJECT_FIELD_S32(0x21) -#define /*0x110*/ oSLWalkingPenguinCurStepTimer OBJECT_FIELD_S32(0x22) +#define /*0x100*/ oSLWalkingPenguinWindCollisionXPos OBJECT_FIELD_F32(0x1E) +#define /*0x104*/ oSLWalkingPenguinWindCollisionZPos OBJECT_FIELD_F32(0x1F) +#define /*0x10C*/ oSLWalkingPenguinCurStep OBJECT_FIELD_S32(0x21) +#define /*0x110*/ oSLWalkingPenguinCurStepTimer OBJECT_FIELD_S32(0x22) /* Piranha Plant */ -#define /*0x0F4*/ oPiranhaPlantSleepMusicState OBJECT_FIELD_S32(0x1B) -#define /*0x0F8*/ oPiranhaPlantScale OBJECT_FIELD_F32(0x1C) +#define /*0x0F4*/ oPiranhaPlantSleepMusicState OBJECT_FIELD_S32(0x1B) +#define /*0x0F8*/ oPiranhaPlantScale OBJECT_FIELD_F32(0x1C) /* Fire Piranha Plant */ -#define /*0x0F4*/ oFirePiranhaPlantNeutralScale OBJECT_FIELD_F32(0x1B) -#define /*0x0F8*/ oFirePiranhaPlantScale OBJECT_FIELD_F32(0x1C) //Shared with above obj? Coincidence? -#define /*0x0FC*/ oFirePiranhaPlantActive OBJECT_FIELD_S32(0x1D) -#define /*0x100*/ oFirePiranhaPlantDeathSpinTimer OBJECT_FIELD_S32(0x1E) -#define /*0x104*/ oFirePiranhaPlantDeathSpinVel OBJECT_FIELD_F32(0x1F) - -/* Pitoune */ -#define /*0x0F4*/ oPitouneUnkF4 OBJECT_FIELD_F32(0x1B) -#define /*0x0F8*/ oPitouneUnkF8 OBJECT_FIELD_F32(0x1C) -#define /*0x0FC*/ oPitouneUnkFC OBJECT_FIELD_F32(0x1D) - -/* Falling Rising Bitfs Platform */ -#define /*0x0F4*/ oBitfsPlatformTimer OBJECT_FIELD_S32(0x1B) - -/* Falling Bowser Bits Platform */ -#define /*0x0F8*/ oBitsPlatformBowser OBJECT_FIELD_OBJ(0x1C) -#define /*0x0FC*/ oBitsPlatformTimer OBJECT_FIELD_S32(0x1D) - -/* WF Platform */ -#define /*0x10C*/ oPlatformUnk10C OBJECT_FIELD_F32(0x21) -#define /*0x110*/ oPlatformUnk110 OBJECT_FIELD_F32(0x22) - -/* Platform on Tracks */ -#define /*0x088*/ oPlatformOnTrackBaseBallIndex OBJECT_FIELD_S32(0x00) -#define /*0x0F4*/ oPlatformOnTrackDistMovedSinceLastBall OBJECT_FIELD_F32(0x1B) -#define /*0x0F8*/ oPlatformOnTrackSkiLiftRollVel OBJECT_FIELD_F32(0x1C) -#define /*0x0FC*/ oPlatformOnTrackStartWaypoint OBJECT_FIELD_WAYPOINT(0x1D) -#define /*0x100*/ oPlatformOnTrackPrevWaypoint OBJECT_FIELD_WAYPOINT(0x1E) -#define /*0x104*/ oPlatformOnTrackPrevWaypointFlags OBJECT_FIELD_S32(0x1F) -#define /*0x108*/ oPlatformOnTrackPitch OBJECT_FIELD_S32(0x20) -#define /*0x10C*/ oPlatformOnTrackYaw OBJECT_FIELD_S32(0x21) -#define /*0x110*/ oPlatformOnTrackOffsetY OBJECT_FIELD_F32(0x22) -#define /*0x1AC*/ oPlatformOnTrackIsNotSkiLift OBJECT_FIELD_S16(0x49, 0) -#define /*0x1AE*/ oPlatformOnTrackIsNotHMC OBJECT_FIELD_S16(0x49, + 1) -#define /*0x1B0*/ oPlatformOnTrackType OBJECT_FIELD_S16(0x4A, 0) -#define /*0x1B2*/ oPlatformOnTrackWasStoodOn OBJECT_FIELD_S16(0x4A, + 1) - -/* Platform Spawner */ -#define /*0x0F4*/ oPlatformSpawnerUnkF4 OBJECT_FIELD_S32(0x1B) -#define /*0x0F8*/ oPlatformSpawnerUnkF8 OBJECT_FIELD_S32(0x1C) -#define /*0x0FC*/ oPlatformSpawnerUnkFC OBJECT_FIELD_S32(0x1D) -#define /*0x100*/ oPlatformSpawnerUnk100 OBJECT_FIELD_F32(0x1E) -#define /*0x104*/ oPlatformSpawnerUnk104 OBJECT_FIELD_F32(0x1F) -#define /*0x108*/ oPlatformSpawnerUnk108 OBJECT_FIELD_F32(0x20) - -/* Pokey */ -#define /*0x0F4*/ oPokeyAliveBodyPartFlags OBJECT_FIELD_U32(0x1B) -#define /*0x0F8*/ oPokeyNumAliveBodyParts OBJECT_FIELD_S32(0x1C) -#define /*0x0FC*/ oPokeyBottomBodyPartSize OBJECT_FIELD_F32(0x1D) -#define /*0x100*/ oPokeyHeadWasKilled OBJECT_FIELD_S32(0x1E) -#define /*0x104*/ oPokeyTargetYaw OBJECT_FIELD_S32(0x1F) -#define /*0x108*/ oPokeyChangeTargetTimer OBJECT_FIELD_S32(0x20) -#define /*0x10C*/ oPokeyTurningAwayFromWall OBJECT_FIELD_S32(0x21) - -/* Pokey Body Part */ -#define /*0x0F8*/ oPokeyBodyPartDeathDelayAfterHeadKilled OBJECT_FIELD_S32(0x1C) -#define /*0x110*/ oPokeyBodyPartBlinkTimer OBJECT_FIELD_S32(0x22) - -/* DDD Pole */ -#define /*0x0F4*/ oDDDPoleVel OBJECT_FIELD_F32(0x1B) -#define /*0x0F8*/ oDDDPoleMaxOffset OBJECT_FIELD_F32(0x1C) -#define /*0x0FC*/ oDDDPoleOffset OBJECT_FIELD_F32(0x1D) - -/* Pyramid Top */ -#define /*0x0F4*/ oPyramidTopPillarsTouched OBJECT_FIELD_S32(0x1B) - -/* Pyramid Top Explosion */ -#define /*0x0F4*/ oPyramidTopFragmentsScale OBJECT_FIELD_F32(0x1B) +#define /*0x0F4*/ oFirePiranhaPlantNeutralScale OBJECT_FIELD_F32(0x1B) +#define /*0x0F8*/ oFirePiranhaPlantScale OBJECT_FIELD_F32(0x1C) // Shared with above obj? Coincidence? +#define /*0x0FC*/ oFirePiranhaPlantActive OBJECT_FIELD_S32(0x1D) +#define /*0x100*/ oFirePiranhaPlantDeathSpinTimer OBJECT_FIELD_S32(0x1E) +#define /*0x104*/ oFirePiranhaPlantDeathSpinVel OBJECT_FIELD_F32(0x1F) /* Rolling Log */ -#define /*0x0F4*/ oRollingLogUnkF4 OBJECT_FIELD_F32(0x1B) +#define /*0x0F4*/ oRollingLogMaxDist OBJECT_FIELD_F32(0x1B) +#define /*0x0F8*/ oRollingLogX OBJECT_FIELD_F32(0x1C) +#define /*0x0FC*/ oRollingLogZ OBJECT_FIELD_F32(0x1D) + +/* Falling Rising Bitfs Platform */ +#define /*0x0F4*/ oBitfsPlatformTimer OBJECT_FIELD_S32(0x1B) + +/* Falling Bowser Bits Platform */ +#define /*0x0F8*/ oBitsPlatformBowser OBJECT_FIELD_OBJ(0x1C) +#define /*0x0FC*/ oBitsPlatformTimer OBJECT_FIELD_S32(0x1D) + +/* WF Platform */ +#define /*0x10C*/ oPlatformWFTowerForwardVel OBJECT_FIELD_F32(0x21) +#define /*0x110*/ oPlatformWFTowerMoveDistance OBJECT_FIELD_F32(0x22) + +/* Platform on Tracks */ +#define /*0x088*/ oPlatformOnTrackBaseBallIndex OBJECT_FIELD_S32(0x00) +#define /*0x0F4*/ oPlatformOnTrackDistMovedSinceLastBall OBJECT_FIELD_F32(0x1B) +#define /*0x0F8*/ oPlatformOnTrackSkiLiftRollVel OBJECT_FIELD_F32(0x1C) +#define /*0x0FC*/ oPlatformOnTrackStartWaypoint OBJECT_FIELD_WAYPOINT(0x1D) +#define /*0x100*/ oPlatformOnTrackPrevWaypoint OBJECT_FIELD_WAYPOINT(0x1E) +#define /*0x104*/ oPlatformOnTrackPrevWaypointFlags OBJECT_FIELD_S32(0x1F) +#define /*0x108*/ oPlatformOnTrackPitch OBJECT_FIELD_S32(0x20) +#define /*0x10C*/ oPlatformOnTrackYaw OBJECT_FIELD_S32(0x21) +#define /*0x110*/ oPlatformOnTrackOffsetY OBJECT_FIELD_F32(0x22) +#define /*0x1AC*/ oPlatformOnTrackIsNotSkiLift OBJECT_FIELD_S16(0x49, 0) +#define /*0x1AE*/ oPlatformOnTrackIsNotHMC OBJECT_FIELD_S16(0x49, + 1) +#define /*0x1B0*/ oPlatformOnTrackType OBJECT_FIELD_S16(0x4A, 0) +#define /*0x1B2*/ oPlatformOnTrackWasStoodOn OBJECT_FIELD_S16(0x4A, + 1) + +/* Platform Spawner */ +#define /*0x0F4*/ oPlatformSpawnerWFTowerPlatformNum OBJECT_FIELD_S32(0x1B) +#define /*0x0F8*/ oPlatformSpawnerWFTowerYawOffset OBJECT_FIELD_S32(0x1C) +#define /*0x0FC*/ oPlatformSpawnerWFTowerDYaw OBJECT_FIELD_S32(0x1D) +#define /*0x100*/ oPlatformSpawnerWFTowerRadius OBJECT_FIELD_F32(0x1E) +#define /*0x104*/ oPlatformSpawnerWFTowerMoveDistance OBJECT_FIELD_F32(0x1F) +#define /*0x108*/ oPlatformSpawnerWFTowerForwardVel OBJECT_FIELD_F32(0x20) + +/* Pokey */ +#define /*0x0F4*/ oPokeyAliveBodyPartFlags OBJECT_FIELD_U32(0x1B) +#define /*0x0F8*/ oPokeyNumAliveBodyParts OBJECT_FIELD_S32(0x1C) +#define /*0x0FC*/ oPokeyBottomBodyPartSize OBJECT_FIELD_F32(0x1D) +#define /*0x100*/ oPokeyHeadWasKilled OBJECT_FIELD_S32(0x1E) +#define /*0x104*/ oPokeyTargetYaw OBJECT_FIELD_S32(0x1F) +#define /*0x108*/ oPokeyChangeTargetTimer OBJECT_FIELD_S32(0x20) +#define /*0x10C*/ oPokeyTurningAwayFromWall OBJECT_FIELD_S32(0x21) + +/* Pokey Body Part */ +#define /*0x0F8*/ oPokeyBodyPartDeathDelayAfterHeadKilled OBJECT_FIELD_S32(0x1C) +#define /*0x110*/ oPokeyBodyPartBlinkTimer OBJECT_FIELD_S32(0x22) + +/* DDD Pole */ +#define /*0x0F4*/ oDDDPoleVel OBJECT_FIELD_F32(0x1B) +#define /*0x0F8*/ oDDDPoleMaxOffset OBJECT_FIELD_F32(0x1C) +#define /*0x0FC*/ oDDDPoleOffset OBJECT_FIELD_F32(0x1D) + +/* Pyramid Top */ +#define /*0x0F4*/ oPyramidTopPillarsTouched OBJECT_FIELD_S32(0x1B) + +/* Pyramid Top Explosion */ +#define /*0x0F4*/ oPyramidTopFragmentsScale OBJECT_FIELD_F32(0x1B) + +/* Volcano Trap */ +#define /*0x0F4*/ oVolcanoTrapPitchVel OBJECT_FIELD_F32(0x1B) /* Lll Rotating Hex Flame */ -#define /*0x0F4*/ oLllRotatingHexFlameUnkF4 OBJECT_FIELD_F32(0x1B) -#define /*0x0F8*/ oLllRotatingHexFlameUnkF8 OBJECT_FIELD_F32(0x1C) -#define /*0x0FC*/ oLllRotatingHexFlameUnkFC OBJECT_FIELD_F32(0x1D) +#define /*0x0F4*/ O_LLL_ROTATING_HEX_FLAME_RELATIVE_POS_INDEX 0x1B +#define /*0x0F4*/ O_LLL_ROTATING_HEX_FLAME_RELATIVE_POS_X_INDEX (O_LLL_ROTATING_HEX_FLAME_RELATIVE_POS_INDEX + 0) // 0x1B +#define /*0x0F8*/ O_LLL_ROTATING_HEX_FLAME_RELATIVE_POS_Y_INDEX (O_LLL_ROTATING_HEX_FLAME_RELATIVE_POS_INDEX + 1) // 0x1C +#define /*0x0FC*/ O_LLL_ROTATING_HEX_FLAME_RELATIVE_POS_Z_INDEX (O_LLL_ROTATING_HEX_FLAME_RELATIVE_POS_INDEX + 2) // 0x1D +#define /*0x0F4*/ oLllRotatingHexFlameRelativePosVec OBJECT_FIELD_F32(O_LLL_ROTATING_HEX_FLAME_RELATIVE_POS_INDEX) +#define /*0x0F4*/ oLllRotatingHexFlameRelativePosX OBJECT_FIELD_F32(O_LLL_ROTATING_HEX_FLAME_RELATIVE_POS_X_INDEX) +#define /*0x0F8*/ oLllRotatingHexFlameRelativePosY OBJECT_FIELD_F32(O_LLL_ROTATING_HEX_FLAME_RELATIVE_POS_Y_INDEX) +#define /*0x0FC*/ oLllRotatingHexFlameRelativePosZ OBJECT_FIELD_F32(O_LLL_ROTATING_HEX_FLAME_RELATIVE_POS_Z_INDEX) /* Scuttlebug */ -#define /*0x0F4*/ oScuttlebugUnkF4 OBJECT_FIELD_S32(0x1B) -#define /*0x0F8*/ oScuttlebugUnkF8 OBJECT_FIELD_S32(0x1C) -#define /*0x0FC*/ oScuttlebugUnkFC OBJECT_FIELD_S32(0x1D) +#define /*0x0F4*/ oScuttlebugHasNoLootCoins OBJECT_FIELD_S32(0x1B) +#define /*0x0F8*/ oScuttlebugIsAtttacking OBJECT_FIELD_S32(0x1C) +#define /*0x0FC*/ oScuttlebugTimer OBJECT_FIELD_S32(0x1D) /* Scuttlebug Spawner */ -#define /*0x088*/ oScuttlebugSpawnerUnk88 OBJECT_FIELD_S32(0x00) -#define /*0x0F4*/ oScuttlebugSpawnerUnkF4 OBJECT_FIELD_S32(0x1B) +#define /*0x088*/ oScuttlebugSpawnerIsDeactivated OBJECT_FIELD_S32(0x00) +#define /*0x0F4*/ oScuttlebugSpawnerSpawnWithNoLootCoins OBJECT_FIELD_S32(0x1B) /* Seesaw Platform */ -#define /*0x0F4*/ oSeesawPlatformPitchVel OBJECT_FIELD_F32(0x1B) +#define /*0x0F4*/ oSeesawPlatformPitchVel OBJECT_FIELD_F32(0x1B) /* Ship Part 3 */ -#define /*0x0F4*/ oShipPart3UnkF4 OBJECT_FIELD_S32(0x1B) // angle? -#define /*0x0F8*/ oShipPart3UnkF8 OBJECT_FIELD_S32(0x1C) // angle? +#define /*0x0F4*/ oShipPart3LoopPitch OBJECT_FIELD_S32(0x1B) +#define /*0x0F8*/ oShipPart3LoopRoll OBJECT_FIELD_S32(0x1C) /* Sink When Stepped On */ -#define /*0x104*/ oSinkWhenSteppedOnUnk104 OBJECT_FIELD_S32(0x1F) -#define /*0x108*/ oSinkWhenSteppedOnUnk108 OBJECT_FIELD_F32(0x20) +#define /*0x104*/ oSinkWhenSteppedOnTimer OBJECT_FIELD_S32(0x1F) +#define /*0x108*/ oSinkWhenSteppedOnYOffsetFromHome OBJECT_FIELD_F32(0x20) /* Skeeter */ -#define /*0x0F4*/ oSkeeterTargetAngle OBJECT_FIELD_S32(0x1B) -#define /*0x0F8*/ oSkeeterUnkF8 OBJECT_FIELD_S32(0x1C) -#define /*0x0FC*/ oSkeeterUnkFC OBJECT_FIELD_F32(0x1D) -#define /*0x100*/ oSkeeterWaitTime OBJECT_FIELD_S32(0x1E) -#define /*0x1AC*/ oSkeeterUnk1AC OBJECT_FIELD_S16(0x49, 0) +#define /*0x0F4*/ oSkeeterTargetAngle OBJECT_FIELD_S32(0x1B) +#define /*0x0F8*/ oSkeeterTurningAwayFromWall OBJECT_FIELD_S32(0x1C) +#define /*0x0FC*/ oSkeeterTargetForwardVel OBJECT_FIELD_F32(0x1D) +#define /*0x100*/ oSkeeterWaitTime OBJECT_FIELD_S32(0x1E) +#define /*0x1AC*/ oSkeeterAngleVel OBJECT_FIELD_S16(0x49, 0) /* Jrb Sliding Box */ -#define /*0x0F4*/ oJrbSlidingBoxUnkF4 OBJECT_FIELD_OBJ(0x1B) -#define /*0x0F8*/ oJrbSlidingBoxUnkF8 OBJECT_FIELD_S32(0x1C) -#define /*0x0FC*/ oJrbSlidingBoxUnkFC OBJECT_FIELD_F32(0x1D) +#define /*0x0F4*/ oJrbSlidingBoxShipObj OBJECT_FIELD_OBJ(0x1B) +#define /*0x0F8*/ oJrbSlidingBoxAngle OBJECT_FIELD_S32(0x1C) +#define /*0x0FC*/ oJrbSlidingBoxAdditiveZ OBJECT_FIELD_F32(0x1D) /* WF Sliding Brick Platform */ -#define /*0x0F4*/ oWFSlidBrickPtfmMovVel OBJECT_FIELD_F32(0x1B) +#define /*0x0F4*/ oWFSlidBrickPtfmMovVel OBJECT_FIELD_F32(0x1B) /* Smoke */ -#define /*0x0F4*/ oSmokeTimer OBJECT_FIELD_S32(0x1B) +#define /*0x0F4*/ oSmokeTimer OBJECT_FIELD_S32(0x1B) /* Snowman's Bottom */ -#define /*0x0F4*/ oSnowmansBottomUnkF4 OBJECT_FIELD_F32(0x1B) -#define /*0x0F8*/ oSnowmansBottomUnkF8 OBJECT_FIELD_S32(0x1C) -#define /*0x1AC*/ oSnowmansBottomUnk1AC OBJECT_FIELD_S32(0x49) +#define /*0x0F4*/ oSnowmansBottomRollingFacePitch OBJECT_FIELD_F32(0x1B) +#define /*0x0F8*/ oSnowmansBottomTargetYaw OBJECT_FIELD_S32(0x1C) +#define /*0x1AC*/ oSnowmansBottomHitCheckpointNearMario OBJECT_FIELD_S32(0x49) // 0x1D-0x21 reserved for pathing /* Snowman's Head */ -#define /*0x0F4*/ oSnowmansHeadDialogActive OBJECT_FIELD_S32(0x1B) +#define /*0x0F4*/ oSnowmansHeadDialogActive OBJECT_FIELD_S32(0x1B) /* Snowman Wind Blowing */ -#define /*0x0F4*/ oSLSnowmanWindOriginalYaw OBJECT_FIELD_S32(0x1B) +#define /*0x0F4*/ oSLSnowmanWindOriginalYaw OBJECT_FIELD_S32(0x1B) /* Snufit */ -#define /*0x0F4*/ oSnufitRecoil OBJECT_FIELD_S32(0x1B) -#define /*0x0F8*/ oSnufitScale OBJECT_FIELD_F32(0x1C) -#define /*0x100*/ oSnufitCircularPeriod OBJECT_FIELD_S32(0x1E) -#define /*0x104*/ oSnufitBodyScalePeriod OBJECT_FIELD_S32(0x1F) -#define /*0x108*/ oSnufitBodyBaseScale OBJECT_FIELD_S32(0x20) -#define /*0x10C*/ oSnufitBullets OBJECT_FIELD_S32(0x21) -#define /*0x1AC*/ oSnufitXOffset OBJECT_FIELD_S16(0x49, 0) -#define /*0x1AE*/ oSnufitYOffset OBJECT_FIELD_S16(0x49, + 1) -#define /*0x1B0*/ oSnufitZOffset OBJECT_FIELD_S16(0x4A, 0) -#define /*0x1B2*/ oSnufitBodyScale OBJECT_FIELD_S16(0x4A, + 1) +#define /*0x0F4*/ oSnufitRecoil OBJECT_FIELD_S32(0x1B) +#define /*0x0F8*/ oSnufitScale OBJECT_FIELD_F32(0x1C) +// 0x1D +#define /*0x100*/ oSnufitCircularPeriod OBJECT_FIELD_S32(0x1E) +#define /*0x104*/ oSnufitBodyScalePeriod OBJECT_FIELD_S32(0x1F) +#define /*0x108*/ oSnufitBodyBaseScale OBJECT_FIELD_S32(0x20) +#define /*0x10C*/ oSnufitBullets OBJECT_FIELD_S32(0x21) +#define /*0x1AC*/ oSnufitOffsetVec OBJECT_FIELD_S16(0x49, 0) // start pos of s16 vec +#define /*0x1AC*/ oSnufitXOffset OBJECT_FIELD_S16(0x49, 0) +#define /*0x1AE*/ oSnufitYOffset OBJECT_FIELD_S16(0x49, + 1) +#define /*0x1B0*/ oSnufitZOffset OBJECT_FIELD_S16(0x4A, 0) +#define /*0x1B2*/ oSnufitBodyScale OBJECT_FIELD_S16(0x4A, + 1) /* Spindel */ -#define /*0x0F4*/ oSpindelUnkF4 OBJECT_FIELD_S32(0x1B) -#define /*0x0F8*/ oSpindelUnkF8 OBJECT_FIELD_S32(0x1C) +#define /*0x0F4*/ oSpindelMoveTimer OBJECT_FIELD_S32(0x1B) +#define /*0x0F8*/ oSpindelMoveDirection OBJECT_FIELD_S32(0x1C) /* Spinning Heart */ -#define /*0x0F4*/ oSpinningHeartTotalSpin OBJECT_FIELD_S32(0x1B) -#define /*0x0F8*/ oSpinningHeartPlayedSound OBJECT_FIELD_S32(0x1C) +#define /*0x0F4*/ oSpinningHeartTotalSpin OBJECT_FIELD_S32(0x1B) +#define /*0x0F8*/ oSpinningHeartPlayedSound OBJECT_FIELD_S32(0x1C) /* Spiny */ -#define /*0x0F4*/ oSpinyTimeUntilTurn OBJECT_FIELD_S32(0x1B) -#define /*0x0F8*/ oSpinyTargetYaw OBJECT_FIELD_S32(0x1C) -#define /*0x100*/ oSpinyTurningAwayFromWall OBJECT_FIELD_S32(0x1E) +#define /*0x0F4*/ oSpinyTimeUntilTurn OBJECT_FIELD_S32(0x1B) +#define /*0x0F8*/ oSpinyTargetYaw OBJECT_FIELD_S32(0x1C) +#define /*0x100*/ oSpinyTurningAwayFromWall OBJECT_FIELD_S32(0x1E) /* Sound Effect */ -#define /*0x0F4*/ oSoundEffectUnkF4 OBJECT_FIELD_S32(0x1B) +#define /*0x0F4*/ oSoundEffectBits OBJECT_FIELD_S32(0x1B) /* Star Spawn */ -#define /*0x0F4*/ oStarSpawnDisFromHome OBJECT_FIELD_F32(0x1B) -#define /*0x0FC*/ oStarSpawnUnkFC OBJECT_FIELD_F32(0x1D) +#define /*0x0F4*/ oStarSpawnDisFromHome OBJECT_FIELD_F32(0x1B) +#define /*0x0FC*/ oStarSpawnVelY OBJECT_FIELD_F32(0x1D) /* Hidden Star */ // Secrets/Red Coins -#define /*0x0F4*/ oHiddenStarTriggerCounter OBJECT_FIELD_S32(0x1B) +#define /*0x0F4*/ oHiddenStarTriggerCounter OBJECT_FIELD_S32(0x1B) /* Sealed Door Star */ -#define /*0x108*/ oUnlockDoorStarState OBJECT_FIELD_U32(0x20) -#define /*0x10C*/ oUnlockDoorStarTimer OBJECT_FIELD_S32(0x21) -#define /*0x110*/ oUnlockDoorStarYawVel OBJECT_FIELD_S32(0x22) +#define /*0x108*/ oUnlockDoorStarState OBJECT_FIELD_U32(0x20) +#define /*0x10C*/ oUnlockDoorStarTimer OBJECT_FIELD_S32(0x21) +#define /*0x110*/ oUnlockDoorStarYawVel OBJECT_FIELD_S32(0x22) /* Celebration Star */ -#define /*0x0F4*/ oCelebStarUnkF4 OBJECT_FIELD_S32(0x1B) -#define /*0x108*/ oCelebStarDiameterOfRotation OBJECT_FIELD_S32(0x20) +#define /*0x0F4*/ oCelebStarIsBowserKey OBJECT_FIELD_S32(0x1B) +#define /*0x108*/ oCelebStarDiameterOfRotation OBJECT_FIELD_S32(0x20) /* Star Selector */ -#define /*0x0F4*/ oStarSelectorType OBJECT_FIELD_S32(0x1B) -#define /*0x0F8*/ oStarSelectorTimer OBJECT_FIELD_S32(0x1C) -#define /*0x108*/ oStarSelectorSize OBJECT_FIELD_F32(0x20) +#define /*0x0F4*/ oStarSelectorType OBJECT_FIELD_S32(0x1B) +#define /*0x0F8*/ oStarSelectorTimer OBJECT_FIELD_S32(0x1C) +#define /*0x108*/ oStarSelectorSize OBJECT_FIELD_F32(0x20) /* Sushi Shark */ -#define /*0x0F4*/ oSushiSharkUnkF4 OBJECT_FIELD_S32(0x1B) // angle? +#define /*0x0F4*/ oSushiSharkAngleFromHome OBJECT_FIELD_S32(0x1B) /* Swing Platform */ -#define /*0x0F4*/ oSwingPlatformAngle OBJECT_FIELD_F32(0x1B) -#define /*0x0F8*/ oSwingPlatformSpeed OBJECT_FIELD_F32(0x1C) +#define /*0x0F4*/ oSwingPlatformAngle OBJECT_FIELD_F32(0x1B) +#define /*0x0F8*/ oSwingPlatformSpeed OBJECT_FIELD_F32(0x1C) /* Swoop */ -#define /*0x0F4*/ oSwoopBonkCountdown OBJECT_FIELD_S32(0x1B) -#define /*0x0F8*/ oSwoopTargetPitch OBJECT_FIELD_S32(0x1C) -#define /*0x0FC*/ oSwoopTargetYaw OBJECT_FIELD_S32(0x1D) +#define /*0x0F4*/ oSwoopBonkCountdown OBJECT_FIELD_S32(0x1B) +#define /*0x0F8*/ O_SWOOP_TARGET_ANGLE_INDEX 0x1C +#define /*0x0F8*/ O_SWOOP_TARGET_PITCH_INDEX (O_SWOOP_TARGET_ANGLE_INDEX + 0) // 0x1C +#define /*0x0F8*/ O_SWOOP_TARGET_YAW_INDEX (O_SWOOP_TARGET_ANGLE_INDEX + 1) // 0x1D +#define /*0x0F8*/ O_SWOOP_TARGET_ROLL_INDEX (O_SWOOP_TARGET_ANGLE_INDEX + 2) // 0x1E +#define /*0x0F8*/ oSwoopTargetAngleVec OBJECT_FIELD_S32(O_SWOOP_TARGET_ANGLE_INDEX) +#define /*0x0F8*/ oSwoopTargetPitch OBJECT_FIELD_S32(O_SWOOP_TARGET_PITCH_INDEX) +#define /*0x0FC*/ oSwoopTargetYaw OBJECT_FIELD_S32(O_SWOOP_TARGET_YAW_INDEX) +#define /*0x100*/ oSwoopTargetRoll OBJECT_FIELD_S32(O_SWOOP_TARGET_ROLL_INDEX) // unused /* Thwomp */ -#define /*0x0F4*/ oThwompRandomTimer OBJECT_FIELD_S32(0x1B) +#define /*0x0F4*/ oThwompRandomTimer OBJECT_FIELD_S32(0x1B) /* Tilting Platform */ -#define /*0x0F4*/ oTiltingPyramidNormalX OBJECT_FIELD_F32(0x1B) -#define /*0x0F8*/ oTiltingPyramidNormalY OBJECT_FIELD_F32(0x1C) -#define /*0x0FC*/ oTiltingPyramidNormalZ OBJECT_FIELD_F32(0x1D) -#define /*0x10C*/ oTiltingPyramidMarioOnPlatform OBJECT_FIELD_S32(0x21) +#define /*0x0F4*/ O_TILTING_PYRAMID_NORMAL_INDEX 0x1B +#define /*0x0F4*/ O_TILTING_PYRAMID_NORMAL_X_INDEX (O_TILTING_PYRAMID_NORMAL_INDEX + 0) // 0x1B +#define /*0x0F8*/ O_TILTING_PYRAMID_NORMAL_Y_INDEX (O_TILTING_PYRAMID_NORMAL_INDEX + 1) // 0x1C +#define /*0x0FC*/ O_TILTING_PYRAMID_NORMAL_Z_INDEX (O_TILTING_PYRAMID_NORMAL_INDEX + 2) // 0x1D +#define /*0x0F4*/ oTiltingPyramidNormalVec OBJECT_FIELD_F32(O_TILTING_PYRAMID_NORMAL_INDEX) +#define /*0x0F4*/ oTiltingPyramidNormalX OBJECT_FIELD_F32(O_TILTING_PYRAMID_NORMAL_X_INDEX) +#define /*0x0F8*/ oTiltingPyramidNormalY OBJECT_FIELD_F32(O_TILTING_PYRAMID_NORMAL_Y_INDEX) +#define /*0x0FC*/ oTiltingPyramidNormalZ OBJECT_FIELD_F32(O_TILTING_PYRAMID_NORMAL_Z_INDEX) +#define /*0x10C*/ oTiltingPyramidMarioOnPlatform OBJECT_FIELD_S32(0x21) /* Toad Message */ -#define /*0x108*/ oToadMessageDialogId OBJECT_FIELD_U32(0x20) -#define /*0x10C*/ oToadMessageRecentlyTalked OBJECT_FIELD_S32(0x21) -#define /*0x110*/ oToadMessageState OBJECT_FIELD_S32(0x22) +#define /*0x108*/ oToadMessageDialogId OBJECT_FIELD_U32(0x20) +#define /*0x10C*/ oToadMessageRecentlyTalked OBJECT_FIELD_S32(0x21) +#define /*0x110*/ oToadMessageState OBJECT_FIELD_S32(0x22) /* Tox Box */ -#define /*0x1AC*/ oToxBoxMovementPattern OBJECT_FIELD_VPTR(0x49) -#define /*0x1B0*/ oToxBoxMovementStep OBJECT_FIELD_S32(0x4A) +#define /*0x1AC*/ oToxBoxMovementPattern OBJECT_FIELD_VPTR(0x49) +#define /*0x1B0*/ oToxBoxMovementStep OBJECT_FIELD_S32(0x4A) /* TTC Rotating Solid */ -#define /*0x0F4*/ oTTCRotatingSolidNumTurns OBJECT_FIELD_S32(0x1B) -#define /*0x0F8*/ oTTCRotatingSolidNumSides OBJECT_FIELD_S32(0x1C) -#define /*0x0FC*/ oTTCRotatingSolidRotationDelay OBJECT_FIELD_S32(0x1D) -#define /*0x100*/ oTTCRotatingSolidVelY OBJECT_FIELD_F32(0x1E) -#define /*0x104*/ oTTCRotatingSolidSoundTimer OBJECT_FIELD_S32(0x1F) +#define /*0x0F4*/ oTTCRotatingSolidNumTurns OBJECT_FIELD_S32(0x1B) +#define /*0x0F8*/ oTTCRotatingSolidNumSides OBJECT_FIELD_S32(0x1C) +#define /*0x0FC*/ oTTCRotatingSolidRotationDelay OBJECT_FIELD_S32(0x1D) +#define /*0x100*/ oTTCRotatingSolidVelY OBJECT_FIELD_F32(0x1E) +#define /*0x104*/ oTTCRotatingSolidSoundTimer OBJECT_FIELD_S32(0x1F) /* TTC Pendulum */ -#define /*0x0F4*/ oTTCPendulumAccelDir OBJECT_FIELD_F32(0x1B) -#define /*0x0F8*/ oTTCPendulumAngle OBJECT_FIELD_F32(0x1C) -#define /*0x0FC*/ oTTCPendulumAngleVel OBJECT_FIELD_F32(0x1D) -#define /*0x100*/ oTTCPendulumAngleAccel OBJECT_FIELD_F32(0x1E) -#define /*0x104*/ oTTCPendulumDelay OBJECT_FIELD_S32(0x1F) -#define /*0x108*/ oTTCPendulumSoundTimer OBJECT_FIELD_S32(0x20) +#define /*0x0F4*/ oTTCPendulumAccelDir OBJECT_FIELD_F32(0x1B) +#define /*0x0F8*/ oTTCPendulumAngle OBJECT_FIELD_F32(0x1C) +#define /*0x0FC*/ oTTCPendulumAngleVel OBJECT_FIELD_F32(0x1D) +#define /*0x100*/ oTTCPendulumAngleAccel OBJECT_FIELD_F32(0x1E) +#define /*0x104*/ oTTCPendulumDelay OBJECT_FIELD_S32(0x1F) +#define /*0x108*/ oTTCPendulumSoundTimer OBJECT_FIELD_S32(0x20) /* TTC Treadmill */ -#define /*0x0F4*/ oTTCTreadmillBigSurface OBJECT_FIELD_S16P(0x1B) -#define /*0x0F8*/ oTTCTreadmillSmallSurface OBJECT_FIELD_S16P(0x1C) -#define /*0x0FC*/ oTTCTreadmillSpeed OBJECT_FIELD_F32(0x1D) -#define /*0x100*/ oTTCTreadmillTargetSpeed OBJECT_FIELD_F32(0x1E) -#define /*0x104*/ oTTCTreadmillTimeUntilSwitch OBJECT_FIELD_S32(0x1F) +#define /*0x0F4*/ oTTCTreadmillBigSurface OBJECT_FIELD_S16P(0x1B) +#define /*0x0F8*/ oTTCTreadmillSmallSurface OBJECT_FIELD_S16P(0x1C) +#define /*0x0FC*/ oTTCTreadmillSpeed OBJECT_FIELD_F32(0x1D) +#define /*0x100*/ oTTCTreadmillTargetSpeed OBJECT_FIELD_F32(0x1E) +#define /*0x104*/ oTTCTreadmillTimeUntilSwitch OBJECT_FIELD_S32(0x1F) /* TTC Moving Bar */ -#define /*0x0F4*/ oTTCMovingBarDelay OBJECT_FIELD_S32(0x1B) -#define /*0x0F8*/ oTTCMovingBarStoppedTimer OBJECT_FIELD_S32(0x1C) -#define /*0x0FC*/ oTTCMovingBarOffset OBJECT_FIELD_F32(0x1D) -#define /*0x100*/ oTTCMovingBarSpeed OBJECT_FIELD_F32(0x1E) -#define /*0x104*/ oTTCMovingBarStartOffset OBJECT_FIELD_F32(0x1F) +#define /*0x0F4*/ oTTCMovingBarDelay OBJECT_FIELD_S32(0x1B) +#define /*0x0F8*/ oTTCMovingBarStoppedTimer OBJECT_FIELD_S32(0x1C) +#define /*0x0FC*/ oTTCMovingBarOffset OBJECT_FIELD_F32(0x1D) +#define /*0x100*/ oTTCMovingBarSpeed OBJECT_FIELD_F32(0x1E) +#define /*0x104*/ oTTCMovingBarStartOffset OBJECT_FIELD_F32(0x1F) /* TTC Cog */ -#define /*0x0F4*/ oTTCCogDir OBJECT_FIELD_F32(0x1B) -#define /*0x0F8*/ oTTCCogSpeed OBJECT_FIELD_F32(0x1C) -#define /*0x0FC*/ oTTCCogTargetVel OBJECT_FIELD_F32(0x1D) +#define /*0x0F4*/ oTTCCogDir OBJECT_FIELD_F32(0x1B) +#define /*0x0F8*/ oTTCCogSpeed OBJECT_FIELD_F32(0x1C) +#define /*0x0FC*/ oTTCCogTargetVel OBJECT_FIELD_F32(0x1D) /* TTC Pit Block */ -#define /*0x0F4*/ oTTCPitBlockPeakY OBJECT_FIELD_F32(0x1B) -#define /*0x0F8*/ oTTCPitBlockDir OBJECT_FIELD_S32(0x1C) -#define /*0x0FC*/ oTTCPitBlockWaitTime OBJECT_FIELD_S32(0x1D) +#define /*0x0F4*/ oTTCPitBlockPeakY OBJECT_FIELD_F32(0x1B) +#define /*0x0F8*/ oTTCPitBlockDir OBJECT_FIELD_S32(0x1C) +#define /*0x0FC*/ oTTCPitBlockWaitTime OBJECT_FIELD_S32(0x1D) /* TTC Elevator */ -#define /*0x0F4*/ oTTCElevatorDir OBJECT_FIELD_F32(0x1B) -#define /*0x0F8*/ oTTCElevatorPeakY OBJECT_FIELD_F32(0x1C) -#define /*0x0FC*/ oTTCElevatorMoveTime OBJECT_FIELD_S32(0x1D) +#define /*0x0F4*/ oTTCElevatorDir OBJECT_FIELD_F32(0x1B) +#define /*0x0F8*/ oTTCElevatorPeakY OBJECT_FIELD_F32(0x1C) +#define /*0x0FC*/ oTTCElevatorMoveTime OBJECT_FIELD_S32(0x1D) /* TTC 2D Rotator */ -#define /*0x0F4*/ oTTC2DRotatorMinTimeUntilNextTurn OBJECT_FIELD_S32(0x1B) -#define /*0x0F8*/ oTTC2DRotatorTargetYaw OBJECT_FIELD_S32(0x1C) -#define /*0x0FC*/ oTTC2DRotatorIncrement OBJECT_FIELD_S32(0x1D) -#define /*0x104*/ oTTC2DRotatorRandomDirTimer OBJECT_FIELD_S32(0x1F) -#define /*0x108*/ oTTC2DRotatorSpeed OBJECT_FIELD_S32(0x20) +#define /*0x0F4*/ oTTC2DRotatorMinTimeUntilNextTurn OBJECT_FIELD_S32(0x1B) +#define /*0x0F8*/ oTTC2DRotatorTargetYaw OBJECT_FIELD_S32(0x1C) +#define /*0x0FC*/ oTTC2DRotatorIncrement OBJECT_FIELD_S32(0x1D) +#define /*0x104*/ oTTC2DRotatorRandomDirTimer OBJECT_FIELD_S32(0x1F) +#define /*0x108*/ oTTC2DRotatorSpeed OBJECT_FIELD_S32(0x20) /* TTC Spinner */ -#define /*0x0F4*/ oTTCSpinnerDir OBJECT_FIELD_S32(0x1B) -#define /*0x0F8*/ oTTCChangeDirTimer OBJECT_FIELD_S32(0x1C) +#define /*0x0F4*/ oTTCSpinnerDir OBJECT_FIELD_S32(0x1B) +#define /*0x0F8*/ oTTCChangeDirTimer OBJECT_FIELD_S32(0x1C) /* Beta Trampoline */ -#define /*0x110*/ oBetaTrampolineMarioOnTrampoline OBJECT_FIELD_S32(0x22) +#define /*0x110*/ oBetaTrampolineMarioOnTrampoline OBJECT_FIELD_S32(0x22) /* Treasure Chest */ -#define /*0x0F4*/ oTreasureChestUnkF4 OBJECT_FIELD_S32(0x1B) -#define /*0x0F8*/ oTreasureChestUnkF8 OBJECT_FIELD_S32(0x1C) -#define /*0x0FC*/ oTreasureChestUnkFC OBJECT_FIELD_S32(0x1D) +#define /*0x0F4*/ oTreasureChestNumOpenedChests OBJECT_FIELD_S32(0x1B) +#define /*0x0F8*/ oTreasureChestDoCloseChests OBJECT_FIELD_S32(0x1C) +#define /*0x0FC*/ oTreasureChestAboveWater OBJECT_FIELD_S32(0x1D) /* Tree Snow Or Leaf */ -#define /*0x0F4*/ oTreeSnowOrLeafUnkF4 OBJECT_FIELD_S32(0x1B) -#define /*0x0F8*/ oTreeSnowOrLeafUnkF8 OBJECT_FIELD_S32(0x1C) -#define /*0x0FC*/ oTreeSnowOrLeafUnkFC OBJECT_FIELD_S32(0x1D) +#define /*0x0F4*/ oTreeSnowOrLeafSidewardAngle OBJECT_FIELD_S32(0x1B) +#define /*0x0F8*/ oTreeSnowOrLeafSidewardVel OBJECT_FIELD_S32(0x1C) +#define /*0x0FC*/ oTreeSnowOrLeafSidewardAngleVel OBJECT_FIELD_S32(0x1D) /* Tumbling Bridge */ -#define /*0x0F4*/ oTumblingBridgeUnkF4 OBJECT_FIELD_S32(0x1B) +#define /*0x0F4*/ oTumblingBridgeRollAccel OBJECT_FIELD_S32(0x1B) /* Tweester */ -#define /*0x0F4*/ oTweesterScaleTimer OBJECT_FIELD_S32(0x1B) -#define /*0x0F8*/ oTweesterUnused OBJECT_FIELD_S32(0x1C) +#define /*0x0F4*/ oTweesterScaleTimer OBJECT_FIELD_S32(0x1B) +#define /*0x0F8*/ oTweesterUnused OBJECT_FIELD_S32(0x1C) /* Ukiki */ -#define /*0x0F4*/ oUkikiTauntCounter OBJECT_FIELD_S16(0x1B, 0) -#define /*0x0F6*/ oUkikiTauntsToBeDone OBJECT_FIELD_S16(0x1B, 1) +#define /*0x0F4*/ oUkikiTauntCounter OBJECT_FIELD_S16(0x1B, 0) +#define /*0x0F6*/ oUkikiTauntsToBeDone OBJECT_FIELD_S16(0x1B, 1) // 0x1D-0x21 reserved for pathing -#define /*0x110*/ oUkikiChaseFleeRange OBJECT_FIELD_F32(0x22) -#define /*0x1AC*/ oUkikiTextState OBJECT_FIELD_S16(0x49, 0) -#define /*0x1AE*/ oUkikiTextboxTimer OBJECT_FIELD_S16(0x49, 1) -#define /*0x1B0*/ oUkikiCageSpinTimer OBJECT_FIELD_S16(0x4A, 0) -#define /*0x1B2*/ oUkikiHasCap OBJECT_FIELD_S16(0x4A, 1) +#define /*0x110*/ oUkikiChaseFleeRange OBJECT_FIELD_F32(0x22) +#define /*0x1AC*/ oUkikiTextState OBJECT_FIELD_S16(0x49, 0) +#define /*0x1AE*/ oUkikiTextboxTimer OBJECT_FIELD_S16(0x49, 1) +#define /*0x1B0*/ oUkikiCageSpinTimer OBJECT_FIELD_S16(0x4A, 0) +#define /*0x1B2*/ oUkikiHasCap OBJECT_FIELD_S16(0x4A, 1) /* Ukiki Cage*/ -#define /*0x088*/ oUkikiCageNextAction OBJECT_FIELD_S32(0x00) +#define /*0x088*/ oUkikiCageNextAction OBJECT_FIELD_S32(0x00) /* Unagi */ -#define /*0x0F4*/ oUnagiUnkF4 OBJECT_FIELD_F32(0x1B) -#define /*0x0F8*/ oUnagiUnkF8 OBJECT_FIELD_F32(0x1C) +#define /*0x0F4*/ oUnagiDistFromHome OBJECT_FIELD_F32(0x1B) +#define /*0x0F8*/ oUnagiNextForwardVel OBJECT_FIELD_F32(0x1C) // 0x1D-0x21 reserved for pathing -#define /*0x110*/ oUnagiUnk110 OBJECT_FIELD_F32(0x22) -#define /*0x1AC*/ oUnagiUnk1AC OBJECT_FIELD_F32(0x49) -#define /*0x1B0*/ oUnagiUnk1B0 OBJECT_FIELD_S16(0x4A, 0) -#define /*0x1B2*/ oUnagiUnk1B2 OBJECT_FIELD_S16(0x4A, + 1) +#define /*0x110*/ oUnagiTargetNextForwardVel OBJECT_FIELD_F32(0x22) +#define /*0x1AC*/ oUnagiDistanceToMario OBJECT_FIELD_F32(0x49) +#define /*0x1B0*/ oUnagiInitMoveYaw OBJECT_FIELD_S16(0x4A, 0) +#define /*0x1B2*/ oUnagiHasStar OBJECT_FIELD_S16(0x4A, + 1) /* Water Bomb */ -#define /*0x0F8*/ oWaterBombVerticalStretch OBJECT_FIELD_F32(0x1C) -#define /*0x0FC*/ oWaterBombStretchSpeed OBJECT_FIELD_F32(0x1D) -#define /*0x100*/ oWaterBombOnGround OBJECT_FIELD_S32(0x1E) -#define /*0x104*/ oWaterBombNumBounces OBJECT_FIELD_F32(0x1F) +#define /*0x0F8*/ oWaterBombVerticalStretch OBJECT_FIELD_F32(0x1C) +#define /*0x0FC*/ oWaterBombStretchSpeed OBJECT_FIELD_F32(0x1D) +#define /*0x100*/ oWaterBombOnGround OBJECT_FIELD_S32(0x1E) +#define /*0x104*/ oWaterBombNumBounces OBJECT_FIELD_F32(0x1F) /* Water Bomb Spawner */ -#define /*0x0F4*/ oWaterBombSpawnerBombActive OBJECT_FIELD_S32(0x1B) -#define /*0x0F8*/ oWaterBombSpawnerTimeToSpawn OBJECT_FIELD_S32(0x1C) +#define /*0x0F4*/ oWaterBombSpawnerBombActive OBJECT_FIELD_S32(0x1B) +#define /*0x0F8*/ oWaterBombSpawnerTimeToSpawn OBJECT_FIELD_S32(0x1C) /* Water Bomb Cannon */ -#define /*0x0F4*/ oWaterCannonUnkF4 OBJECT_FIELD_S32(0x1B) -#define /*0x0F8*/ oWaterCannonUnkF8 OBJECT_FIELD_S32(0x1C) -#define /*0x0FC*/ oWaterCannonUnkFC OBJECT_FIELD_S32(0x1D) -#define /*0x100*/ oWaterCannonUnk100 OBJECT_FIELD_S32(0x1E) +#define /*0x0F4*/ oWaterCannonIdleTimer OBJECT_FIELD_S32(0x1B) +#define /*0x0F8*/ oWaterCannonRotationTimer OBJECT_FIELD_S32(0x1C) +#define /*0x0FC*/ oWaterCannonTargetMovePitch OBJECT_FIELD_S32(0x1D) +#define /*0x100*/ oWaterCannonTargetFaceYaw OBJECT_FIELD_S32(0x1E) /* Cannon Barrel Bubbles */ -#define /*0x0F4*/ oCannonBarrelBubblesUnkF4 OBJECT_FIELD_F32(0x1B) +#define /*0x0F4*/ oCannonBarrelBubblesForwardVelCheck OBJECT_FIELD_F32(0x1B) /* Water Level Pillar */ -#define /*0x0F8*/ oWaterLevelPillarDrained OBJECT_FIELD_S32(0x1C) +#define /*0x0F8*/ oWaterLevelPillarDrained OBJECT_FIELD_S32(0x1C) /* Water Level Trigger */ -#define /*0x0F4*/ oWaterLevelTriggerUnkF4 OBJECT_FIELD_S32(0x1B) -#define /*0x0F8*/ oWaterLevelTriggerTargetWaterLevel OBJECT_FIELD_S32(0x1C) +#define /*0x0F4*/ oWaterLevelTriggerAmbientWaves OBJECT_FIELD_S32(0x1B) +#define /*0x0F8*/ oWaterLevelTriggerTargetWaterLevel OBJECT_FIELD_S32(0x1C) /* Water Objects */ -#define /*0x0F4*/ oWaterObjUnkF4 OBJECT_FIELD_S32(0x1B) -#define /*0x0F8*/ oWaterObjUnkF8 OBJECT_FIELD_S32(0x1C) -#define /*0x0FC*/ oWaterObjUnkFC OBJECT_FIELD_S32(0x1D) -#define /*0x100*/ oWaterObjUnk100 OBJECT_FIELD_S32(0x1E) +#define /*0x0F4*/ oWaterObjScaleXAngle OBJECT_FIELD_S32(0x1B) +#define /*0x0F8*/ oWaterObjScaleYAngle OBJECT_FIELD_S32(0x1C) +#define /*0x0FC*/ oWaterObjScaleXAngleVel OBJECT_FIELD_S32(0x1D) +#define /*0x100*/ oWaterObjScaleYAngleVel OBJECT_FIELD_S32(0x1E) /* Water Ring (both variants) */ -#define /*0x0F4*/ oWaterRingScalePhaseX OBJECT_FIELD_S32(0x1B) -#define /*0x0F8*/ oWaterRingScalePhaseY OBJECT_FIELD_S32(0x1C) -#define /*0x0FC*/ oWaterRingScalePhaseZ OBJECT_FIELD_S32(0x1D) -#define /*0x100*/ oWaterRingNormalX OBJECT_FIELD_F32(0x1E) -#define /*0x104*/ oWaterRingNormalY OBJECT_FIELD_F32(0x1F) -#define /*0x108*/ oWaterRingNormalZ OBJECT_FIELD_F32(0x20) -#define /*0x10C*/ oWaterRingMarioDistInFront OBJECT_FIELD_F32(0x21) -#define /*0x110*/ oWaterRingIndex OBJECT_FIELD_S32(0x22) -#define /*0x1AC*/ oWaterRingAvgScale OBJECT_FIELD_F32(0x49) +#define /*0x0F4*/ O_WATER_RING_SCALE_PHASE_INDEX 0x1B +#define /*0x0F4*/ O_WATER_RING_SCALE_PHASE_X_INDEX (O_WATER_RING_SCALE_PHASE_INDEX + 0) // 0x1B +#define /*0x0F8*/ O_WATER_RING_SCALE_PHASE_Y_INDEX (O_WATER_RING_SCALE_PHASE_INDEX + 1) // 0x1C +#define /*0x0FC*/ O_WATER_RING_SCALE_PHASE_Z_INDEX (O_WATER_RING_SCALE_PHASE_INDEX + 2) // 0x1D +#define /*0x0F4*/ oWaterRingScalePhaseVec OBJECT_FIELD_S32(O_WATER_RING_SCALE_PHASE_INDEX) +#define /*0x0F4*/ oWaterRingScalePhaseX OBJECT_FIELD_S32(O_WATER_RING_SCALE_PHASE_X_INDEX) +#define /*0x0F8*/ oWaterRingScalePhaseY OBJECT_FIELD_S32(O_WATER_RING_SCALE_PHASE_Y_INDEX) +#define /*0x0FC*/ oWaterRingScalePhaseZ OBJECT_FIELD_S32(O_WATER_RING_SCALE_PHASE_Z_INDEX) +#define /*0x100*/ O_WATER_RING_NORMAL_INDEX 0x1E +#define /*0x100*/ O_WATER_RING_NORMAL_X_INDEX (O_WATER_RING_NORMAL_INDEX + 0) // 0x1E +#define /*0x104*/ O_WATER_RING_NORMAL_Y_INDEX (O_WATER_RING_NORMAL_INDEX + 1) // 0x1F +#define /*0x108*/ O_WATER_RING_NORMAL_Z_INDEX (O_WATER_RING_NORMAL_INDEX + 2) // 0x20 +#define /*0x100*/ oWaterRingNormalVec OBJECT_FIELD_F32(O_WATER_RING_NORMAL_INDEX) +#define /*0x100*/ oWaterRingNormalX OBJECT_FIELD_F32(O_WATER_RING_NORMAL_X_INDEX) +#define /*0x104*/ oWaterRingNormalY OBJECT_FIELD_F32(O_WATER_RING_NORMAL_Y_INDEX) +#define /*0x108*/ oWaterRingNormalZ OBJECT_FIELD_F32(O_WATER_RING_NORMAL_Z_INDEX) +#define /*0x10C*/ oWaterRingMarioDistInFront OBJECT_FIELD_F32(0x21) +#define /*0x110*/ oWaterRingIndex OBJECT_FIELD_S32(0x22) +#define /*0x1AC*/ oWaterRingAvgScale OBJECT_FIELD_F32(0x49) /* Water Ring Spawner (Jet Stream Ring Spawner and Manta Ray) */ -#define /*0x1AC*/ oWaterRingSpawnerRingsCollected OBJECT_FIELD_S32(0x49) +#define /*0x1AC*/ oWaterRingSpawnerRingsCollected OBJECT_FIELD_S32(0x49) /* Water Ring Manager (Jet Stream Ring Spawner and Manta Ray Ring Manager) */ -#define /*0x0F4*/ oWaterRingMgrNextRingIndex OBJECT_FIELD_S32(0x1B) -#define /*0x0F8*/ oWaterRingMgrLastRingCollected OBJECT_FIELD_S32(0x1C) +#define /*0x0F4*/ oWaterRingMgrNextRingIndex OBJECT_FIELD_S32(0x1B) +#define /*0x0F8*/ oWaterRingMgrLastRingCollected OBJECT_FIELD_S32(0x1C) /* Wave Trail */ -#define /*0x0F8*/ oWaveTrailSize OBJECT_FIELD_F32(0x1C) +#define /*0x0F8*/ oWaveTrailSize OBJECT_FIELD_F32(0x1C) /* Whirlpool */ -#define /*0x0F4*/ oWhirlpoolInitFacePitch OBJECT_FIELD_S32(0x1B) -#define /*0x0F8*/ oWhirlpoolInitFaceRoll OBJECT_FIELD_S32(0x1C) +#define /*0x0F4*/ oWhirlpoolInitFacePitch OBJECT_FIELD_S32(0x1B) +#define /*0x0F8*/ oWhirlpoolInitFaceRoll OBJECT_FIELD_S32(0x1C) /* White Puff Explode */ -#define /*0x0F4*/ oWhitePuffUnkF4 OBJECT_FIELD_F32(0x1B) -#define /*0x0F8*/ oWhitePuffUnkF8 OBJECT_FIELD_S32(0x1C) -#define /*0x0FC*/ oWhitePuffUnkFC OBJECT_FIELD_S32(0x1D) +#define /*0x0F4*/ oWhitePuffScaleX OBJECT_FIELD_F32(0x1B) +#define /*0x0F8*/ oWhitePuffOpacityDiff OBJECT_FIELD_S32(0x1C) +#define /*0x0FC*/ oWhitePuffSlowFade OBJECT_FIELD_S32(0x1D) /* White Wind Particle */ -#define /*0x0F4*/ oStrongWindParticlePenguinObj OBJECT_FIELD_OBJ(0x1B) +#define /*0x0F4*/ oStrongWindParticlePenguinObj OBJECT_FIELD_OBJ(0x1B) /* Whomp */ -#define /*0x0F8*/ oWhompShakeVal OBJECT_FIELD_S32(0x1C) +#define /*0x0F8*/ oWhompShakeVal OBJECT_FIELD_S32(0x1C) /* Wiggler */ -#define /*0x0F4*/ oWigglerFallThroughFloorsHeight OBJECT_FIELD_F32(0x1B) -#define /*0x0F8*/ oWigglerSegments OBJECT_FIELD_CHAIN_SEGMENT(0x1C) -#define /*0x0FC*/ oWigglerWalkAnimSpeed OBJECT_FIELD_F32(0x1D) -#define /*0x104*/ oWigglerSquishSpeed OBJECT_FIELD_F32(0x1F) -#define /*0x108*/ oWigglerTimeUntilRandomTurn OBJECT_FIELD_S32(0x20) -#define /*0x10C*/ oWigglerTargetYaw OBJECT_FIELD_S32(0x21) -#define /*0x110*/ oWigglerWalkAwayFromWallTimer OBJECT_FIELD_S32(0x22) -#define /*0x1AC*/ oWigglerUnused OBJECT_FIELD_S16(0x49, 0) -#define /*0x1AE*/ oWigglerTextStatus OBJECT_FIELD_S16(0x49, + 1) +#define /*0x0F4*/ oWigglerFallThroughFloorsHeight OBJECT_FIELD_F32(0x1B) +#define /*0x0F8*/ oWigglerSegments OBJECT_FIELD_CHAIN_SEGMENT(0x1C) +#define /*0x0FC*/ oWigglerWalkAnimSpeed OBJECT_FIELD_F32(0x1D) +#define /*0x104*/ oWigglerSquishSpeed OBJECT_FIELD_F32(0x1F) +#define /*0x108*/ oWigglerTimeUntilRandomTurn OBJECT_FIELD_S32(0x20) +#define /*0x10C*/ oWigglerTargetYaw OBJECT_FIELD_S32(0x21) +#define /*0x110*/ oWigglerWalkAwayFromWallTimer OBJECT_FIELD_S32(0x22) +#define /*0x1AC*/ oWigglerUnused OBJECT_FIELD_S16(0x49, 0) +#define /*0x1AE*/ oWigglerTextStatus OBJECT_FIELD_S16(0x49, + 1) /* Lll Wood Piece */ -#define /*0x0F4*/ oLllWoodPieceOscillationTimer OBJECT_FIELD_S32(0x1B) +#define /*0x0F4*/ oLllWoodPieceOscillationTimer OBJECT_FIELD_S32(0x1B) /* Wooden Post */ -#define /*0x0F4*/ oWoodenPostTotalMarioAngle OBJECT_FIELD_S32(0x1B) -#define /*0x0F8*/ oWoodenPostPrevAngleToMario OBJECT_FIELD_S32(0x1C) -#define /*0x0FC*/ oWoodenPostSpeedY OBJECT_FIELD_F32(0x1D) -#define /*0x100*/ oWoodenPostMarioPounding OBJECT_FIELD_S32(0x1E) -#define /*0x104*/ oWoodenPostOffsetY OBJECT_FIELD_F32(0x1F) +#define /*0x0F4*/ oWoodenPostTotalMarioAngle OBJECT_FIELD_S32(0x1B) +#define /*0x0F8*/ oWoodenPostPrevAngleToMario OBJECT_FIELD_S32(0x1C) +#define /*0x0FC*/ oWoodenPostSpeedY OBJECT_FIELD_F32(0x1D) +#define /*0x100*/ oWoodenPostMarioPounding OBJECT_FIELD_S32(0x1E) +#define /*0x104*/ oWoodenPostOffsetY OBJECT_FIELD_F32(0x1F) /* Yoshi */ -#define /*0x0F4*/ oYoshiBlinkTimer OBJECT_FIELD_S32(0x1B) -#define /*0x0FC*/ oYoshiChosenHome OBJECT_FIELD_S32(0x1D) -#define /*0x100*/ oYoshiTargetYaw OBJECT_FIELD_S32(0x1E) +#define /*0x0F4*/ oYoshiBlinkTimer OBJECT_FIELD_S32(0x1B) +#define /*0x0FC*/ oYoshiChosenHome OBJECT_FIELD_S32(0x1D) +#define /*0x100*/ oYoshiTargetYaw OBJECT_FIELD_S32(0x1E) /*Custom general defines: @@ -1188,59 +1293,58 @@ os1610E os16110 os16112*/ -#define /*0x0F4*/ oF4 OBJECT_FIELD_S32(0x1B) -#define /*0x0F8*/ oF8 OBJECT_FIELD_S32(0x1C) -#define /*0x0FC*/ oFC OBJECT_FIELD_S32(0x1D) -#define /*0x100*/ o100 OBJECT_FIELD_S32(0x1E) -#define /*0x104*/ o104 OBJECT_FIELD_S32(0x1F) -#define /*0x108*/ o108 OBJECT_FIELD_S32(0x20) -#define /*0x10C*/ o10C OBJECT_FIELD_S32(0x21) -#define /*0x110*/ o110 OBJECT_FIELD_S32(0x22) +#define /*0x0F4*/ oF4 OBJECT_FIELD_S32(0x1B) +#define /*0x0F8*/ oF8 OBJECT_FIELD_S32(0x1C) +#define /*0x0FC*/ oFC OBJECT_FIELD_S32(0x1D) +#define /*0x100*/ o100 OBJECT_FIELD_S32(0x1E) +#define /*0x104*/ o104 OBJECT_FIELD_S32(0x1F) +#define /*0x108*/ o108 OBJECT_FIELD_S32(0x20) +#define /*0x10C*/ o10C OBJECT_FIELD_S32(0x21) +#define /*0x110*/ o110 OBJECT_FIELD_S32(0x22) +#define /*0x0F4*/ oFloatF4 OBJECT_FIELD_F32(0x1B) +#define /*0x0F8*/ oFloatF8 OBJECT_FIELD_F32(0x1C) +#define /*0x0FC*/ oFloatFC OBJECT_FIELD_F32(0x1D) +#define /*0x100*/ oFloat100 OBJECT_FIELD_F32(0x1E) +#define /*0x104*/ oFloat104 OBJECT_FIELD_F32(0x1F) +#define /*0x108*/ oFloat108 OBJECT_FIELD_F32(0x20) +#define /*0x10C*/ oFloat10C OBJECT_FIELD_F32(0x21) +#define /*0x110*/ oFloat110 OBJECT_FIELD_F32(0x22) -#define /*0x0F4*/ oFloatF4 OBJECT_FIELD_F32(0x1B) -#define /*0x0F8*/ oFloatF8 OBJECT_FIELD_F32(0x1C) -#define /*0x0FC*/ oFloatFC OBJECT_FIELD_F32(0x1D) -#define /*0x100*/ oFloat100 OBJECT_FIELD_F32(0x1E) -#define /*0x104*/ oFloat104 OBJECT_FIELD_F32(0x1F) -#define /*0x108*/ oFloat108 OBJECT_FIELD_F32(0x20) -#define /*0x10C*/ oFloat10C OBJECT_FIELD_F32(0x21) -#define /*0x110*/ oFloat110 OBJECT_FIELD_F32(0x22) +#define /*0x0F4*/ oObjF4 OBJECT_FIELD_OBJ(0x1B) +#define /*0x0F8*/ oObjF8 OBJECT_FIELD_OBJ(0x1C) +#define /*0x0FC*/ oObjFC OBJECT_FIELD_OBJ(0x1D) +#define /*0x100*/ oObj100 OBJECT_FIELD_OBJ(0x1E) +#define /*0x104*/ oObj104 OBJECT_FIELD_OBJ(0x1F) +#define /*0x108*/ oObj108 OBJECT_FIELD_OBJ(0x20) +#define /*0x10C*/ oObj10C OBJECT_FIELD_OBJ(0x21) +#define /*0x110*/ oObj110 OBJECT_FIELD_OBJ(0x22) -#define /*0x0F4*/ oObjF4 OBJECT_FIELD_OBJ(0x1B) -#define /*0x0F8*/ oObjF8 OBJECT_FIELD_OBJ(0x1C) -#define /*0x0FC*/ oObjFC OBJECT_FIELD_OBJ(0x1D) -#define /*0x100*/ oObj100 OBJECT_FIELD_OBJ(0x1E) -#define /*0x104*/ oObj104 OBJECT_FIELD_OBJ(0x1F) -#define /*0x108*/ oObj108 OBJECT_FIELD_OBJ(0x20) -#define /*0x10C*/ oObj10C OBJECT_FIELD_OBJ(0x21) -#define /*0x110*/ oObj110 OBJECT_FIELD_OBJ(0x22) +#define /*0x0F4*/ oSurfF4 OBJECT_FIELD_SURFACE(0x1B) +#define /*0x0F8*/ oSurfF8 OBJECT_FIELD_SURFACE(0x1C) +#define /*0x0FC*/ oSurfFC OBJECT_FIELD_SURFACE(0x1D) +#define /*0x100*/ oSurf100 OBJECT_FIELD_SURFACE(0x1E) +#define /*0x104*/ oSurf104 OBJECT_FIELD_SURFACE(0x1F) +#define /*0x108*/ oSurf108 OBJECT_FIELD_SURFACE(0x20) +#define /*0x10C*/ oSurf10C OBJECT_FIELD_SURFACE(0x21) +#define /*0x110*/ oSurf110 OBJECT_FIELD_SURFACE(0x22) -#define /*0x0F4*/ oSurfF4 OBJECT_FIELD_SURFACE(0x1B) -#define /*0x0F8*/ oSurfF8 OBJECT_FIELD_SURFACE(0x1C) -#define /*0x0FC*/ oSurfFC OBJECT_FIELD_SURFACE(0x1D) -#define /*0x100*/ oSurf100 OBJECT_FIELD_SURFACE(0x1E) -#define /*0x104*/ oSurf104 OBJECT_FIELD_SURFACE(0x1F) -#define /*0x108*/ oSurf108 OBJECT_FIELD_SURFACE(0x20) -#define /*0x10C*/ oSurf10C OBJECT_FIELD_SURFACE(0x21) -#define /*0x110*/ oSurf110 OBJECT_FIELD_SURFACE(0x22) - -#define /*0x0F4*/ os16F4 OBJECT_FIELD_S16(0x1B, 0) -#define /*0x0F6*/ os16F6 OBJECT_FIELD_S16(0x1B, 1) -#define /*0x0F8*/ os16F8 OBJECT_FIELD_S16(0x1C, 0) -#define /*0x0FA*/ os16FA OBJECT_FIELD_S16(0x1C, 1) -#define /*0x0FC*/ os16FC OBJECT_FIELD_S16(0x1D, 0) -#define /*0x0FE*/ os16FE OBJECT_FIELD_S16(0x1D, 1) -#define /*0x100*/ os16100 OBJECT_FIELD_S16(0x1E, 0) -#define /*0x102*/ os16102 OBJECT_FIELD_S16(0x1E, 1) -#define /*0x104*/ os16104 OBJECT_FIELD_S16(0x1F, 0) -#define /*0x106*/ os16106 OBJECT_FIELD_S16(0x1F, 1) -#define /*0x108*/ os16108 OBJECT_FIELD_S16(0x20, 0) -#define /*0x10A*/ os1610A OBJECT_FIELD_S16(0x20, 1) -#define /*0x10C*/ os1610C OBJECT_FIELD_S16(0x21, 0) -#define /*0x10E*/ os1610E OBJECT_FIELD_S16(0x21, 1) -#define /*0x110*/ os16110 OBJECT_FIELD_S16(0x22, 0) -#define /*0x112*/ os16112 OBJECT_FIELD_S16(0x22, 1) +#define /*0x0F4*/ os16F4 OBJECT_FIELD_S16(0x1B, 0) +#define /*0x0F6*/ os16F6 OBJECT_FIELD_S16(0x1B, 1) +#define /*0x0F8*/ os16F8 OBJECT_FIELD_S16(0x1C, 0) +#define /*0x0FA*/ os16FA OBJECT_FIELD_S16(0x1C, 1) +#define /*0x0FC*/ os16FC OBJECT_FIELD_S16(0x1D, 0) +#define /*0x0FE*/ os16FE OBJECT_FIELD_S16(0x1D, 1) +#define /*0x100*/ os16100 OBJECT_FIELD_S16(0x1E, 0) +#define /*0x102*/ os16102 OBJECT_FIELD_S16(0x1E, 1) +#define /*0x104*/ os16104 OBJECT_FIELD_S16(0x1F, 0) +#define /*0x106*/ os16106 OBJECT_FIELD_S16(0x1F, 1) +#define /*0x108*/ os16108 OBJECT_FIELD_S16(0x20, 0) +#define /*0x10A*/ os1610A OBJECT_FIELD_S16(0x20, 1) +#define /*0x10C*/ os1610C OBJECT_FIELD_S16(0x21, 0) +#define /*0x10E*/ os1610E OBJECT_FIELD_S16(0x21, 1) +#define /*0x110*/ os16110 OBJECT_FIELD_S16(0x22, 0) +#define /*0x112*/ os16112 OBJECT_FIELD_S16(0x22, 1) #endif // OBJECT_FIELDS_H diff --git a/src/game/behaviors/animated_floor_switch.inc.c b/src/game/behaviors/animated_floor_switch.inc.c index 49f5392c7..7cbe323cf 100644 --- a/src/game/behaviors/animated_floor_switch.inc.c +++ b/src/game/behaviors/animated_floor_switch.inc.c @@ -36,42 +36,42 @@ void bhv_animates_on_floor_switch_press_init(void) { } void bhv_animates_on_floor_switch_press_loop(void) { - if (o->oFloorSwitchPressAnimationUnk100 != 0) { + if (o->oFloorSwitchPressAnimationSwitchNotTicking != 0) { if (o->parentObj->oAction != 2) { - o->oFloorSwitchPressAnimationUnk100 = 0; + o->oFloorSwitchPressAnimationSwitchNotTicking = 0; } - if (o->oFloorSwitchPressAnimationUnkFC != 0) { - o->oFloorSwitchPressAnimationUnkF4 = sAnimatesOnFloorSwitchPressTimers[o->oBehParams2ndByte]; + if (o->oFloorSwitchPressAnimationDoResetTime != 0) { + o->oFloorSwitchPressAnimationTickTimer = sAnimatesOnFloorSwitchPressTimers[o->oBehParams2ndByte]; } else { - o->oFloorSwitchPressAnimationUnkF4 = 0; + o->oFloorSwitchPressAnimationTickTimer = 0; } } else if (o->parentObj->oAction == 2) { - o->oFloorSwitchPressAnimationUnkFC ^= 1; - o->oFloorSwitchPressAnimationUnk100 = 1; + o->oFloorSwitchPressAnimationDoResetTime ^= 1; + o->oFloorSwitchPressAnimationSwitchNotTicking = 1; } - if (o->oFloorSwitchPressAnimationUnkF4 != 0) { - if (o->oFloorSwitchPressAnimationUnkF4 < 60) { + if (o->oFloorSwitchPressAnimationTickTimer != 0) { + if (o->oFloorSwitchPressAnimationTickTimer < 60) { cur_obj_play_sound_1(SOUND_GENERAL2_SWITCH_TICK_SLOW); } else { cur_obj_play_sound_1(SOUND_GENERAL2_SWITCH_TICK_FAST); } - if (--o->oFloorSwitchPressAnimationUnkF4 == 0) { - o->oFloorSwitchPressAnimationUnkFC = 0; + if (--o->oFloorSwitchPressAnimationTickTimer == 0) { + o->oFloorSwitchPressAnimationDoResetTime = 0; } - if (o->oFloorSwitchPressAnimationUnkF8 < 9) { - o->oFloorSwitchPressAnimationUnkF8 += 1; + if (o->oFloorSwitchPressAnimationDoubleFrame < 9) { + o->oFloorSwitchPressAnimationDoubleFrame += 1; } - } else if ((o->oFloorSwitchPressAnimationUnkF8 -= 2) < 0) { - o->oFloorSwitchPressAnimationUnkF8 = 0; - o->oFloorSwitchPressAnimationUnkFC = 1; + } else if ((o->oFloorSwitchPressAnimationDoubleFrame -= 2) < 0) { + o->oFloorSwitchPressAnimationDoubleFrame = 0; + o->oFloorSwitchPressAnimationDoResetTime = 1; } o->collisionData = segmented_to_virtual( - sFloorSwitchTriggeredAnimationFrames[o->oBehParams2ndByte][o->oFloorSwitchPressAnimationUnkF8 / 2].collisionDataPtr); + sFloorSwitchTriggeredAnimationFrames[o->oBehParams2ndByte][o->oFloorSwitchPressAnimationDoubleFrame / 2].collisionDataPtr); - cur_obj_set_model(sFloorSwitchTriggeredAnimationFrames[o->oBehParams2ndByte][o->oFloorSwitchPressAnimationUnkF8 / 2].model); + cur_obj_set_model(sFloorSwitchTriggeredAnimationFrames[o->oBehParams2ndByte][o->oFloorSwitchPressAnimationDoubleFrame / 2].model); } diff --git a/src/game/behaviors/bouncing_fireball.inc.c b/src/game/behaviors/bouncing_fireball.inc.c index 9dde41f0d..560c04065 100644 --- a/src/game/behaviors/bouncing_fireball.inc.c +++ b/src/game/behaviors/bouncing_fireball.inc.c @@ -46,8 +46,8 @@ void bhv_bouncing_fireball_spawner_loop(void) { break; case 2: if (o->oTimer == 0) - o->oBouncingFireBallUnkF4 = random_float() * 100.0f; - if (o->oBouncingFireBallUnkF4 + 100 < o->oTimer) + o->oBouncingFireBallSpawnerRandomCooldown = random_float() * 100.0f; + if (o->oBouncingFireBallSpawnerRandomCooldown + 100 < o->oTimer) o->oAction = 0; break; } diff --git a/src/game/behaviors/bub.inc.c b/src/game/behaviors/bub.inc.c index e8e630966..b208625fe 100644 --- a/src/game/behaviors/bub.inc.c +++ b/src/game/behaviors/bub.inc.c @@ -7,7 +7,7 @@ // TODO: Rename these. These have nothing to do with birds. void bub_spawner_act_0(void) { s32 i; - s32 sp18 = o->oBirdChirpChirpUnkF4; + s32 sp18 = o->oCheepCheepSpawnerSpawnAmount; if (o->oDistanceToMario < 1500.0f) { for (i = 0; i < sp18; i++) spawn_object(o, MODEL_BUB, bhvBub); @@ -37,16 +37,16 @@ void bhv_bub_spawner_loop(void) { void bub_move_vertically(s32 a0) { f32 sp1C = o->parentObj->oPosY; - if (sp1C - 100.0f - o->oCheepCheepUnk104 < o->oPosY - && o->oPosY < sp1C + 1000.0f + o->oCheepCheepUnk104) - o->oPosY = approach_f32_symmetric(o->oPosY, o->oCheepCheepUnkF8, a0); + if (sp1C - 100.0f - o->oCheepCheepMaxYOffset < o->oPosY + && o->oPosY < sp1C + 1000.0f + o->oCheepCheepMaxYOffset) + o->oPosY = approach_f32_symmetric(o->oPosY, o->oCheepCheepTargetY, a0); else { } } void bub_act_0(void) { - o->oCheepCheepUnkFC = random_float() * 100.0f; - o->oCheepCheepUnk104 = random_float() * 300.0f; + o->oCheepCheepTargetYOffset = random_float() * 100.0f; + o->oCheepCheepMaxYOffset = random_float() * 300.0f; o->oAction = 1; } @@ -54,10 +54,10 @@ void bub_act_1(void) { f32 dy; if (o->oTimer == 0) { o->oForwardVel = random_float() * 2 + 2; - o->oCheepCheepUnk108 = random_float(); + o->oCheepCheepRandomSwimAway = random_float(); } dy = o->oPosY - gMarioObject->oPosY; - if (o->oPosY < o->oCheepCheepUnkF4 - 50.0f) { + if (o->oPosY < o->oCheepCheepWaterLevel - 50.0f) { if (dy < 0.0f) dy = 0.0f - dy; if (dy < 500.0f) @@ -65,7 +65,7 @@ void bub_act_1(void) { else bub_move_vertically(4); } else { - o->oPosY = o->oCheepCheepUnkF4 - 50.0f; + o->oPosY = o->oCheepCheepWaterLevel - 50.0f; if (dy > 300.0f) o->oPosY = o->oPosY - 1.0f; } @@ -73,7 +73,7 @@ void bub_act_1(void) { o->oAngleToMario = cur_obj_angle_to_home(); cur_obj_rotate_yaw_toward(o->oAngleToMario, 0x100); if (o->oDistanceToMario < 200.0f) - if (o->oCheepCheepUnk108 < 0.5) + if (o->oCheepCheepRandomSwimAway < 0.5) o->oAction = 2; if (o->oInteractStatus & INT_STATUS_INTERACTED) o->oAction = 2; @@ -91,7 +91,7 @@ void bub_act_2(void) { if (o->oForwardVel == 0.0f) o->oForwardVel = 6.0f; dy = o->oPosY - gMarioObject->oPosY; - if (o->oPosY < o->oCheepCheepUnkF4 - 50.0f) { + if (o->oPosY < o->oCheepCheepWaterLevel - 50.0f) { if (dy < 0.0f) dy = 0.0f - dy; if (dy < 500.0f) @@ -99,7 +99,7 @@ void bub_act_2(void) { else bub_move_vertically(4); } else { - o->oPosY = o->oCheepCheepUnkF4 - 50.0f; + o->oPosY = o->oCheepCheepWaterLevel - 50.0f; if (dy > 300.0f) o->oPosY -= 1.0f; } @@ -113,8 +113,8 @@ void bub_act_2(void) { void (*sCheepCheepActions[])(void) = { bub_act_0, bub_act_1, bub_act_2 }; void bhv_bub_loop(void) { - o->oCheepCheepUnkF4 = find_water_level(o->oPosX, o->oPosZ); - o->oCheepCheepUnkF8 = gMarioObject->oPosY + o->oCheepCheepUnkFC; + o->oCheepCheepWaterLevel = find_water_level(o->oPosX, o->oPosZ); + o->oCheepCheepTargetY = gMarioObject->oPosY + o->oCheepCheepTargetYOffset; o->oWallHitboxRadius = 30.0f; cur_obj_update_floor_and_walls(); cur_obj_call_action_function(sCheepCheepActions); diff --git a/src/game/behaviors/bubba.inc.c b/src/game/behaviors/bubba.inc.c index 7bb521b7b..d51a4b40b 100644 --- a/src/game/behaviors/bubba.inc.c +++ b/src/game/behaviors/bubba.inc.c @@ -17,29 +17,29 @@ void bubba_act_0(void) { treat_far_home_as_mario(2000.0f); o->oAnimState = 0; - o->oBubbaUnk1AC = obj_get_pitch_to_home(lateralDistToHome); + o->oBubbaTargetPitch = obj_get_pitch_to_home(lateralDistToHome); - approach_f32_ptr(&o->oBubbaUnkF4, 5.0f, 0.5f); + approach_f32_ptr(&o->oBubbaMovePitch, 5.0f, 0.5f); - if (o->oBubbaUnkFC != 0) { - if (abs_angle_diff(o->oMoveAngleYaw, o->oBubbaUnk1AE) < 800) { - o->oBubbaUnkFC = 0; + if (o->oBubbaHitWall != 0) { + if (abs_angle_diff(o->oMoveAngleYaw, o->oBubbaTargetYaw) < 800) { + o->oBubbaHitWall = 0; } } else { if (o->oDistanceToMario >= 25000.0f) { - o->oBubbaUnk1AE = o->oAngleToMario; - o->oBubbaUnkF8 = random_linear_offset(20, 30); + o->oBubbaTargetYaw = o->oAngleToMario; + o->oBubbaRandomTimer = random_linear_offset(20, 30); } - if ((o->oBubbaUnkFC = o->oMoveFlags & OBJ_MOVE_HIT_WALL) != 0) { - o->oBubbaUnk1AE = cur_obj_reflect_move_angle_off_wall(); + if ((o->oBubbaHitWall = o->oMoveFlags & OBJ_MOVE_HIT_WALL) != 0) { + o->oBubbaTargetYaw = cur_obj_reflect_move_angle_off_wall(); } else if (o->oTimer > 30 && o->oDistanceToMario < 2000.0f) { o->oAction = 1; - } else if (o->oBubbaUnkF8 != 0) { - o->oBubbaUnkF8 -= 1; + } else if (o->oBubbaRandomTimer != 0) { + o->oBubbaRandomTimer -= 1; } else { - o->oBubbaUnk1AE = obj_random_fixed_turn(0x2000); - o->oBubbaUnkF8 = random_linear_offset(100, 100); + o->oBubbaTargetYaw = obj_random_fixed_turn(0x2000); + o->oBubbaRandomTimer = random_linear_offset(100, 100); } } } @@ -48,25 +48,25 @@ void bubba_act_1(void) { treat_far_home_as_mario(2500.0f); if (o->oDistanceToMario > 2500.0f) { o->oAction = 0; - } else if (o->oBubbaUnk100 != 0) { - if (--o->oBubbaUnk100 == 0) { + } else if (o->oBubbaLungeTimer != 0) { + if (--o->oBubbaLungeTimer == 0) { cur_obj_play_sound_2(SOUND_OBJ_BUBBA_CHOMP); o->oAction = 0; - } else if (o->oBubbaUnk100 < 15) { + } else if (o->oBubbaLungeTimer < 15) { o->oAnimState = 1; - } else if (o->oBubbaUnk100 == 20) { + } else if (o->oBubbaLungeTimer == 20) { s16 targetPitch = 10000 - (s16)(20.0f * (find_water_level(o->oPosX, o->oPosZ) - o->oPosY)); - o->oBubbaUnk1AC -= targetPitch; - o->oMoveAnglePitch = o->oBubbaUnk1AC; - o->oBubbaUnkF4 = 40.0f; - obj_compute_vel_from_move_pitch(o->oBubbaUnkF4); + o->oBubbaTargetPitch -= targetPitch; + o->oMoveAnglePitch = o->oBubbaTargetPitch; + o->oBubbaMovePitch = 40.0f; + obj_compute_vel_from_move_pitch(o->oBubbaMovePitch); o->oAnimState = 0; } else { - o->oBubbaUnk1AE = o->oAngleToMario; - o->oBubbaUnk1AC = o->oBubbaUnk104; + o->oBubbaTargetYaw = o->oAngleToMario; + o->oBubbaTargetPitch = o->oBubbaNextTargetPitchTowardMario; - cur_obj_rotate_yaw_toward(o->oBubbaUnk1AE, 400); - obj_move_pitch_approach(o->oBubbaUnk1AC, 400); + cur_obj_rotate_yaw_toward(o->oBubbaTargetYaw, 400); + obj_move_pitch_approach(o->oBubbaTargetPitch, 400); } } else { if (abs_angle_diff(gMarioObject->oFaceAngleYaw, o->oAngleToMario) < 0x3000) { @@ -75,30 +75,30 @@ void bubba_act_1(void) { targetDYaw = -targetDYaw; } - o->oBubbaUnk1AE = o->oAngleToMario + targetDYaw; + o->oBubbaTargetYaw = o->oAngleToMario + targetDYaw; } else { - o->oBubbaUnk1AE = o->oAngleToMario; + o->oBubbaTargetYaw = o->oAngleToMario; } - o->oBubbaUnk1AC = o->oBubbaUnk104; + o->oBubbaTargetPitch = o->oBubbaNextTargetPitchTowardMario; if (obj_is_near_to_and_facing_mario(500.0f, 3000) - && abs_angle_diff(o->oBubbaUnk1AC, o->oMoveAnglePitch) < 3000) { - o->oBubbaUnk100 = 30; - o->oBubbaUnkF4 = 0; + && abs_angle_diff(o->oBubbaTargetPitch, o->oMoveAnglePitch) < 3000) { + o->oBubbaLungeTimer = 30; + o->oBubbaMovePitch = 0; o->oAnimState = 1; } else { - approach_f32_ptr(&o->oBubbaUnkF4, 20.0f, 0.5f); + approach_f32_ptr(&o->oBubbaMovePitch, 20.0f, 0.5f); } } } void bhv_bubba_loop(void) { o->oInteractionSubtype &= ~INT_SUBTYPE_EATS_MARIO; - o->oBubbaUnk104 = obj_turn_pitch_toward_mario(120.0f, 0); + o->oBubbaNextTargetPitchTowardMario = obj_turn_pitch_toward_mario(120.0f, 0); if (abs_angle_diff(o->oAngleToMario, o->oMoveAngleYaw) < 0x1000 - && abs_angle_diff(o->oBubbaUnk104 + 0x800, o->oMoveAnglePitch) < 0x2000) { + && abs_angle_diff(o->oBubbaNextTargetPitchTowardMario + 0x800, o->oMoveAnglePitch) < 0x2000) { if (o->oAnimState != 0 && o->oDistanceToMario < 250.0f) { o->oInteractionSubtype |= INT_SUBTYPE_EATS_MARIO; } @@ -126,26 +126,26 @@ void bhv_bubba_loop(void) { obj_scale(splashObj, 3.0f); } - o->oBubbaUnk108 = o->oVelY; - o->oBubbaUnk10C = 0.0f; + o->oBubbaAirVelY = o->oVelY; + o->oBubbaJumpHeight = 0.0f; } else { - approach_f32_ptr(&o->oBubbaUnk108, 0.0f, 4.0f); - if ((o->oBubbaUnk10C -= o->oBubbaUnk108) > 1.0f) { + approach_f32_ptr(&o->oBubbaAirVelY, 0.0f, 4.0f); + if ((o->oBubbaJumpHeight -= o->oBubbaAirVelY) > 1.0f) { s16 rand = random_u16(); - o->oBubbaUnk10C -= 1.0f; + o->oBubbaJumpHeight -= 1.0f; spawn_object_relative(0, 150.0f * coss(rand), 0x64, 150.0f * sins(rand), o, MODEL_WHITE_PARTICLE_SMALL, bhvSmallParticleSnow); } } - obj_smooth_turn(&o->oBubbaUnk1B0, &o->oMoveAnglePitch, o->oBubbaUnk1AC, 0.05f, 10, 50, 2000); - obj_smooth_turn(&o->oBubbaUnk1B2, &o->oMoveAngleYaw, o->oBubbaUnk1AE, 0.05f, 10, 50, 2000); - obj_compute_vel_from_move_pitch(o->oBubbaUnkF4); + obj_smooth_turn(&o->oBubbaPitchVel, &o->oMoveAnglePitch, o->oBubbaTargetPitch, 0.05f, 10, 50, 2000); + obj_smooth_turn(&o->oBubbaYawVel, &o->oMoveAngleYaw, o->oBubbaTargetYaw, 0.05f, 10, 50, 2000); + obj_compute_vel_from_move_pitch(o->oBubbaMovePitch); } else { - o->oBubbaUnkF4 = sqrtf(o->oForwardVel * o->oForwardVel + o->oVelY * o->oVelY); + o->oBubbaMovePitch = sqrtf(o->oForwardVel * o->oForwardVel + o->oVelY * o->oVelY); o->oMoveAnglePitch = obj_get_pitch_from_vel(); obj_face_pitch_approach(o->oMoveAnglePitch, 400); - o->oBubbaUnk1B0 = 0; + o->oBubbaPitchVel = 0; } obj_face_pitch_approach(o->oMoveAnglePitch, 400); diff --git a/src/game/behaviors/camera_lakitu.inc.c b/src/game/behaviors/camera_lakitu.inc.c index 2b66cff3a..d4ab5f329 100644 --- a/src/game/behaviors/camera_lakitu.inc.c +++ b/src/game/behaviors/camera_lakitu.inc.c @@ -103,9 +103,9 @@ static void camera_lakitu_intro_act_show_dialog(void) { approach_f32_ptr(&o->oCameraLakituCircleRadius, 200.0f, 50.0f); if (o->oDistanceToMario < 1000.0f) { #ifndef VERSION_JP - if (!o->oCameraLakituUnk104) { + if (!o->oCameraLakituIntroMusicPlayed) { play_music(SEQ_PLAYER_LEVEL, SEQUENCE_ARGS(15, SEQ_EVENT_CUTSCENE_LAKITU), 0); - o->oCameraLakituUnk104 = TRUE; + o->oCameraLakituIntroMusicPlayed = TRUE; } #endif diff --git a/src/game/behaviors/cannon.inc.c b/src/game/behaviors/cannon.inc.c index 6a18f18de..242b964d9 100644 --- a/src/game/behaviors/cannon.inc.c +++ b/src/game/behaviors/cannon.inc.c @@ -12,8 +12,8 @@ void opened_cannon_act_0(void) { o->oPosZ = o->oHomeZ; o->oMoveAnglePitch = 0; o->oMoveAngleYaw = (s16)(o->oBehParams2ndByte << 8); - o->oCannonUnkF4 = 0; - o->oCannonUnk10C = 0; + o->oCannonAngle = 0; + o->oCannonIsActive = 0; cur_obj_enable_rendering(); cur_obj_become_tangible(); } @@ -25,14 +25,14 @@ void opened_cannon_act_0(void) { & INT_STATUS_TOUCHED_BOB_OMB))) // bob-omb explodes when it gets into a cannon { o->oAction = 4; - o->oCannonUnk10C = 1; - o->oCannonUnkF8 = 1; + o->oCannonIsActive = 1; + o->oCannonTimeSinceActivated = 1; } else o->oInteractStatus = 0; } else { cur_obj_become_intangible(); cur_obj_disable_rendering(); - o->oCannonUnk10C = 0; + o->oCannonIsActive = 0; } } @@ -60,11 +60,11 @@ void opened_cannon_act_6(void) { } else { if (o->oTimer < 22) { o->oMoveAngleYaw = - sins(o->oCannonUnkF4) * 0x4000 + ((s16)(o->oBehParams2ndByte << 8)); - o->oCannonUnkF4 += 0x400; + sins(o->oCannonAngle) * 0x4000 + ((s16)(o->oBehParams2ndByte << 8)); + o->oCannonAngle += 0x400; } else if (o->oTimer < 26) { } else { - o->oCannonUnkF4 = 0; + o->oCannonAngle = 0; o->oAction = 5; } } @@ -77,8 +77,8 @@ void opened_cannon_act_5(void) { if (o->oTimer < 4) { } else { if (o->oTimer < 20) { - o->oCannonUnkF4 += 0x400; - o->oMoveAnglePitch = sins(o->oCannonUnkF4) * 0x2000; + o->oCannonAngle += 0x400; + o->oMoveAnglePitch = sins(o->oCannonAngle) * 0x2000; } else if (o->oTimer < 25) { } else o->oAction = 1; @@ -89,7 +89,7 @@ void opened_cannon_act_1(void) { UNUSED s32 unused; cur_obj_become_intangible(); cur_obj_disable_rendering(); - o->oCannonUnk10C = 0; + o->oCannonIsActive = 0; gMarioShotFromCannon = 1; } @@ -109,8 +109,8 @@ void (*sOpenedCannonActions[])(void) = { opened_cannon_act_0, opened_cannon_act_ void bhv_cannon_base_loop(void) { cur_obj_call_action_function(sOpenedCannonActions); - if (o->oCannonUnkF8) - o->oCannonUnkF8++; + if (o->oCannonTimeSinceActivated) + o->oCannonTimeSinceActivated++; o->oInteractStatus = 0; } diff --git a/src/game/behaviors/cap.inc.c b/src/game/behaviors/cap.inc.c index 09e13d1a4..909c26a79 100644 --- a/src/game/behaviors/cap.inc.c +++ b/src/game/behaviors/cap.inc.c @@ -109,11 +109,11 @@ void bhv_wing_cap_init(void) { } void cap_scale_vertically(void) { - o->oCapUnkF8 += 0x2000; - o->header.gfx.scale[1] = coss(o->oCapUnkF8) * 0.3 + 0.7; - if (o->oCapUnkF8 == 0x10000) { - o->oCapUnkF8 = 0; - o->oCapUnkF4 = 2; + o->oCapScaleAngle += 0x2000; + o->header.gfx.scale[1] = coss(o->oCapScaleAngle) * 0.3 + 0.7; + if (o->oCapScaleAngle == 0x10000) { + o->oCapScaleAngle = 0; + o->oCapDoScaleVertically = 2; } } @@ -125,12 +125,12 @@ void wing_vanish_cap_act_0(void) { if (collisionFlags & OBJ_COL_FLAG_GROUNDED) { cap_check_quicksand(); if (o->oVelY != 0.0f) { - o->oCapUnkF4 = 1; + o->oCapDoScaleVertically = 1; o->oVelY = 0.0f; } } - if (o->oCapUnkF4 == 1) + if (o->oCapDoScaleVertically == 1) cap_scale_vertically(); } @@ -229,13 +229,13 @@ void normal_cap_act_0(void) { cap_check_quicksand(); if (o->oVelY != 0.0f) { - o->oCapUnkF4 = 1; + o->oCapDoScaleVertically = 1; o->oVelY = 0.0f; o->oFaceAnglePitch = 0; } } - if (o->oCapUnkF4 == 1) + if (o->oCapDoScaleVertically == 1) cap_scale_vertically(); } diff --git a/src/game/behaviors/celebration_star.inc.c b/src/game/behaviors/celebration_star.inc.c index 85f8964bf..8706adb62 100644 --- a/src/game/behaviors/celebration_star.inc.c +++ b/src/game/behaviors/celebration_star.inc.c @@ -12,13 +12,13 @@ void bhv_celebration_star_init(void) { o->oFaceAnglePitch = 0; o->oFaceAngleRoll = 49152; cur_obj_scale(0.1f); - o->oCelebStarUnkF4 = 1; + o->oCelebStarIsBowserKey = 1; } else { o->header.gfx.sharedChild = gLoadedGraphNodes[MODEL_STAR]; o->oFaceAnglePitch = 0; o->oFaceAngleRoll = 0; cur_obj_scale(0.4f); - o->oCelebStarUnkF4 = 0; + o->oCelebStarIsBowserKey = 0; } #else o->header.gfx.sharedChild = gLoadedGraphNodes[MODEL_STAR]; @@ -48,7 +48,7 @@ void celeb_star_act_face_camera(void) { if (o->oTimer < 10) { #if BUGFIX_STAR_BOWSER_KEY - if (o->oCelebStarUnkF4 == 0) { + if (o->oCelebStarIsBowserKey == 0) { cur_obj_scale((f32) o->oTimer / 10.0); } else { cur_obj_scale((f32) o->oTimer / 30.0); diff --git a/src/game/behaviors/chain_chomp.inc.c b/src/game/behaviors/chain_chomp.inc.c index 57afa831a..6af473e1c 100644 --- a/src/game/behaviors/chain_chomp.inc.c +++ b/src/game/behaviors/chain_chomp.inc.c @@ -214,7 +214,7 @@ static void chain_chomp_sub_act_lunge(void) { if (o->oChainChompRestrictedByChain == TRUE) { o->oForwardVel = o->oVelY = 0.0f; - o->oChainChompUnk104 = 30.0f; + o->oChainChompSignedMaxDistBetweenChainParts = 30.0f; } // TODO: What is this @@ -230,15 +230,15 @@ static void chain_chomp_sub_act_lunge(void) { cur_obj_rotate_yaw_toward(atan2s(o->oChainChompSegments[0].posZ, o->oChainChompSegments[0].posX), 0x1000); - if (o->oChainChompUnk104 != 0.0f) { - approach_f32_ptr(&o->oChainChompUnk104, 0.0f, 0.8f); + if (o->oChainChompSignedMaxDistBetweenChainParts != 0.0f) { + approach_f32_ptr(&o->oChainChompSignedMaxDistBetweenChainParts, 0.0f, 0.8f); } else { o->oSubAction = CHAIN_CHOMP_SUB_ACT_TURN; } - o->oChainChompMaxDistBetweenChainParts = o->oChainChompUnk104; + o->oChainChompMaxDistBetweenChainParts = o->oChainChompSignedMaxDistBetweenChainParts; if (gGlobalTimer % 2 != 0) { - o->oChainChompMaxDistBetweenChainParts = -o->oChainChompUnk104; + o->oChainChompMaxDistBetweenChainParts = -o->oChainChompSignedMaxDistBetweenChainParts; } } diff --git a/src/game/behaviors/checkerboard_platform.inc.c b/src/game/behaviors/checkerboard_platform.inc.c index 57d71dd5f..cf7c7f6c2 100644 --- a/src/game/behaviors/checkerboard_platform.inc.c +++ b/src/game/behaviors/checkerboard_platform.inc.c @@ -21,7 +21,7 @@ void bhv_checkerboard_elevator_group_init(void) { platformObj = spawn_object_relative(i, 0, i * relativePosY, relativePosZ, o, MODEL_CHECKERBOARD_PLATFORM, bhvCheckerboardPlatformSub); - platformObj->oCheckerBoardPlatformUnk1AC = sCheckerBoardPlatformInitPositions[type].radius; + platformObj->oCheckerBoardPlatformRadius = sCheckerBoardPlatformInitPositions[type].radius; vec3f_copy_2(platformObj->header.gfx.scale, sCheckerBoardPlatformInitPositions[type].scale); } } @@ -40,16 +40,16 @@ void checkerboard_plat_act_rotate(s32 nextAction, s16 pitch) { o->oAngleVelPitch = pitch; if (o->oTimer + 1 == 0x8000 / absi(pitch)) o->oAction = nextAction; - o->oCheckerBoardPlatformUnkF8 = nextAction; + o->oCheckerBoardPlatformRotateAction = nextAction; } void bhv_checkerboard_platform_init(void) { - o->oCheckerBoardPlatformUnkFC = o->parentObj->oBehParams2ndByte; + o->oCheckerBoardPlatformHeight = o->parentObj->oBehParams2ndByte; } void bhv_checkerboard_platform_loop(void) { - f32 radius = o->oCheckerBoardPlatformUnk1AC; - o->oCheckerBoardPlatformUnkF8 = 0; + f32 radius = o->oCheckerBoardPlatformRadius; + o->oCheckerBoardPlatformRotateAction = 0; if (o->oDistanceToMario < 1000.0f) cur_obj_play_sound_1(SOUND_ENV_ELEVATOR4); switch (o->oAction) { @@ -60,13 +60,13 @@ void bhv_checkerboard_platform_loop(void) { o->oAction = 3; break; case 1: - checkerboard_plat_act_move_y(2, 10.0f, o->oCheckerBoardPlatformUnkFC); + checkerboard_plat_act_move_y(2, 10.0f, o->oCheckerBoardPlatformHeight); break; case 2: checkerboard_plat_act_rotate(3, 512); break; case 3: - checkerboard_plat_act_move_y(4, -10.0f, o->oCheckerBoardPlatformUnkFC); + checkerboard_plat_act_move_y(4, -10.0f, o->oCheckerBoardPlatformHeight); break; case 4: checkerboard_plat_act_rotate(1, -512); @@ -79,7 +79,7 @@ void bhv_checkerboard_platform_loop(void) { o->oForwardVel = signum_positive(o->oAngleVelPitch) * sins(o->oMoveAnglePitch) * radius; o->oVelY = signum_positive(o->oAngleVelPitch) * coss(o->oMoveAnglePitch) * radius; } - if (o->oCheckerBoardPlatformUnkF8 == 1) { + if (o->oCheckerBoardPlatformRotateAction == 1) { o->oAngleVelPitch = 0; o->oFaceAnglePitch &= ~0x7FFF; cur_obj_move_using_fvel_and_gravity(); diff --git a/src/game/behaviors/chuckya.inc.c b/src/game/behaviors/chuckya.inc.c index a4e5eb0af..abafa4160 100644 --- a/src/game/behaviors/chuckya.inc.c +++ b/src/game/behaviors/chuckya.inc.c @@ -13,7 +13,7 @@ struct UnusedChuckyaData sUnusedChuckyaData[] = { { 2, 0.f, 1.f }, { 8, 10.f, 1.f }}; void common_anchor_mario_behavior(f32 forwardVel, f32 yVel, s32 flag) { - switch (o->parentObj->oChuckyaUnk88) { + switch (o->parentObj->oCommonAnchorAction) { case 0: break; case 1: @@ -23,14 +23,14 @@ void common_anchor_mario_behavior(f32 forwardVel, f32 yVel, s32 flag) { gMarioObject->oInteractStatus |= (flag + INT_STATUS_MARIO_UNK2); gMarioStates[0].forwardVel = forwardVel; gMarioStates[0].vel[1] = yVel; - o->parentObj->oChuckyaUnk88 = 0; + o->parentObj->oCommonAnchorAction = 0; break; case 3: gMarioObject->oInteractStatus |= (INT_STATUS_MARIO_UNK2 + INT_STATUS_MARIO_UNK6); // loads 2 interactions at once? gMarioStates[0].forwardVel = 10.0f; gMarioStates[0].vel[1] = 10.0f; - o->parentObj->oChuckyaUnk88 = 0; + o->parentObj->oCommonAnchorAction = 0; break; } o->oMoveAngleYaw = o->parentObj->oMoveAngleYaw; @@ -44,7 +44,7 @@ void bhv_chuckya_anchor_mario_loop(void) { s32 unknown_chuckya_function(s32 sp20, f32 sp24, f32 sp28, s32 sp2C) { s32 sp1C = 0; - if (o->oChuckyaUnkF8 != 4) { + if (o->oChuckyaUnused != 4) { if (sp24 < cur_obj_lateral_dist_from_mario_to_home()) { if (cur_obj_lateral_dist_to_home() < 200.0f) sp1C = 0; @@ -60,7 +60,7 @@ s32 unknown_chuckya_function(s32 sp20, f32 sp24, f32 sp28, s32 sp2C) { sp1C = 3; if (sp20 && update_angle_from_move_flags(&o->oAngleToMario)) { sp1C = 4; - o->oChuckyaUnkF8 = 4; + o->oChuckyaUnused = 4; } } else sp1C = 4; @@ -85,14 +85,14 @@ s32 approach_forward_vel(f32 *arr, f32 target, f32 inc) { void chuckya_act_0(void) { s32 initialSubAction; if (o->oTimer == 0) - o->oChuckyaUnkFC = 0; + o->oChuckyaSubActionTimer = 0; o->oAngleToMario = obj_angle_to_object(o, gMarioObject); switch (initialSubAction = o->oSubAction) { case 0: o->oForwardVel = 0; if (cur_obj_lateral_dist_from_mario_to_home() < 2000.0f) { cur_obj_rotate_yaw_toward(o->oAngleToMario, 0x400); - if (o->oChuckyaUnkFC > 40 + if (o->oChuckyaSubActionTimer > 40 || abs_angle_diff(o->oMoveAngleYaw, o->oAngleToMario) < 0x1000) o->oSubAction = 1; } else @@ -107,7 +107,7 @@ void chuckya_act_0(void) { break; case 2: approach_forward_vel(&o->oForwardVel, 0, 4.0f); - if (o->oChuckyaUnkFC > 48) + if (o->oChuckyaSubActionTimer > 48) o->oSubAction = 0; break; case 3: @@ -123,9 +123,9 @@ void chuckya_act_0(void) { break; } if (o->oSubAction != initialSubAction) - o->oChuckyaUnkFC = 0; + o->oChuckyaSubActionTimer = 0; else - o->oChuckyaUnkFC++; + o->oChuckyaSubActionTimer++; cur_obj_init_animation_with_sound(4); if (o->oForwardVel > 1.0f) cur_obj_play_sound_1(SOUND_AIR_CHUCKYA_MOVE); @@ -136,22 +136,22 @@ void chuckya_act_1(void) { if (o->oSubAction == 0) { if (cur_obj_init_animation_and_check_if_near_end(0)) o->oSubAction++; - o->oChuckyaUnkFC = random_float() * 30.0f + 10.0f; - o->oChuckyaUnk100 = 0; + o->oChuckyaSubActionTimer = random_float() * 30.0f + 10.0f; + o->oChuckyaNumPlayerEscapeActions = 0; o->oForwardVel = 0.0f; } else { if (o->oSubAction == 1) { - o->oChuckyaUnk100 += player_performed_grab_escape_action(); - print_debug_bottom_up("%d", o->oChuckyaUnk100); - if (o->oChuckyaUnk100 > 10) { - o->oChuckyaUnk88 = 3; + o->oChuckyaNumPlayerEscapeActions += player_performed_grab_escape_action(); + print_debug_bottom_up("%d", o->oChuckyaNumPlayerEscapeActions); + if (o->oChuckyaNumPlayerEscapeActions > 10) { + o->oCommonAnchorAction = 3; o->oAction = 3; o->oInteractStatus &= ~(INT_STATUS_GRABBED_MARIO); } else { cur_obj_init_animation_with_sound(1); o->oMoveAngleYaw += INT_STATUS_GRABBED_MARIO; - if (o->oChuckyaUnkFC-- < 0) - if (check_if_moving_over_floor(50.0f, 150.0f) || o->oChuckyaUnkFC < -16) { + if (o->oChuckyaSubActionTimer-- < 0) + if (check_if_moving_over_floor(50.0f, 150.0f) || o->oChuckyaSubActionTimer < -16) { o->oSubAction++; } } @@ -159,7 +159,7 @@ void chuckya_act_1(void) { cur_obj_init_animation_with_sound(3); if (cur_obj_check_anim_frame(18)) { cur_obj_play_sound_2(SOUND_OBJ_UNKNOWN4); - o->oChuckyaUnk88 = 2; + o->oCommonAnchorAction = 2; o->oAction = 3; o->oInteractStatus &= ~(INT_STATUS_GRABBED_MARIO); } @@ -191,7 +191,7 @@ void chuckya_move(void) { cur_obj_move_standard(-30); if (o->oInteractStatus & INT_STATUS_GRABBED_MARIO) { o->oAction = 1; - o->oChuckyaUnk88 = 1; + o->oCommonAnchorAction = 1; cur_obj_play_sound_2(SOUND_OBJ_UNKNOWN3); } } diff --git a/src/game/behaviors/clam.inc.c b/src/game/behaviors/clam.inc.c index 0b9973488..b9ef50387 100644 --- a/src/game/behaviors/clam.inc.c +++ b/src/game/behaviors/clam.inc.c @@ -18,13 +18,13 @@ void clam_act_0(void) { spawn_mist_from_global(); cur_obj_become_tangible(); - o->oClamUnkF4 = 10; + o->oClamShakeTimer = 10; o->oTimer = 0; } else if (o->oTimer > 150 && o->oDistanceToMario < 500.0f) { cur_obj_play_sound_2(SOUND_GENERAL_CLAM_SHELL2); o->oAction = 1; - } else if (o->oClamUnkF4 != 0) { - o->oClamUnkF4 -= 1; + } else if (o->oClamShakeTimer != 0) { + o->oClamShakeTimer -= 1; cur_obj_shake_y(3.0f); } } diff --git a/src/game/behaviors/coin.inc.c b/src/game/behaviors/coin.inc.c index 00274f2e4..1620de1c5 100644 --- a/src/game/behaviors/coin.inc.c +++ b/src/game/behaviors/coin.inc.c @@ -49,7 +49,7 @@ void bhv_temp_coin_loop(void) { } void bhv_coin_init(void) { - o->oVelY = random_float() * 10.0f + 30 + o->oCoinUnk110; + o->oVelY = random_float() * 10.0f + 30 + o->oCoinBaseYVel; o->oForwardVel = random_float() * 10.0f; o->oMoveAngleYaw = random_u16(); cur_obj_set_behavior(bhvYellowCoin); @@ -94,9 +94,9 @@ void bhv_coin_loop(void) { } #ifndef VERSION_JP if (o->oMoveFlags & OBJ_MOVE_BOUNCE) { - if (o->oCoinUnk1B0 < 5) + if (o->oCoinBounceTimer < 5) cur_obj_play_sound_2(SOUND_GENERAL_COIN_DROP); - o->oCoinUnk1B0++; + o->oCoinBounceTimer++; } #else if (o->oMoveFlags & OBJ_MOVE_BOUNCE) @@ -112,7 +112,7 @@ void bhv_coin_formation_spawn_loop(void) { cur_obj_set_behavior(bhvYellowCoin); obj_set_hitbox(o, &sYellowCoinHitbox); bhv_init_room(); - if (o->oCoinUnkF8) { + if (o->oCoinSnapToGround) { o->oPosY += 300.0f; cur_obj_update_floor_height(); if (o->oPosY < o->oFloorHeight || o->oFloorHeight < FLOOR_LOWER_LIMIT_MISC) @@ -126,7 +126,7 @@ void bhv_coin_formation_spawn_loop(void) { } } else { if (bhv_coin_sparkles_init()) - o->parentObj->oCoinUnkF4 |= (1 << o->oBehParams2ndByte); + o->parentObj->oCoinRespawnBits |= (1 << o->oBehParams2ndByte); o->oAnimState++; } if (o->parentObj->oAction == 2) @@ -170,12 +170,12 @@ void spawn_coin_in_formation(s32 index, s32 shape) { if (spawnCoin) { newCoin = spawn_object_relative(index, pos[0], pos[1], pos[2], o, MODEL_YELLOW_COIN, bhvCoinFormationSpawn); - newCoin->oCoinUnkF8 = snapToGround; + newCoin->oCoinSnapToGround = snapToGround; } } void bhv_coin_formation_init(void) { - o->oCoinUnkF4 = (o->oBehParams >> 8) & 0xFF; + o->oCoinRespawnBits = (o->oBehParams >> 8) & 0xFF; } void bhv_coin_formation_loop(void) { @@ -184,7 +184,7 @@ void bhv_coin_formation_loop(void) { case 0: if (o->oDistanceToMario < 2000.0f) { for (bitIndex = 0; bitIndex < 8; bitIndex++) { - if (!(o->oCoinUnkF4 & (1 << bitIndex))) + if (!(o->oCoinRespawnBits & (1 << bitIndex))) spawn_coin_in_formation(bitIndex, o->oBehParams2ndByte); } o->oAction++; @@ -200,7 +200,7 @@ void bhv_coin_formation_loop(void) { } // Casting to u8 doesn't seem to match - set_object_respawn_info_bits(o, o->oCoinUnkF4 & 0xFF); + set_object_respawn_info_bits(o, o->oCoinRespawnBits & 0xFF); } void coin_inside_boo_act_1(void) { diff --git a/src/game/behaviors/collide_particles.inc.c b/src/game/behaviors/collide_particles.inc.c index 605e8a923..67ca9566c 100644 --- a/src/game/behaviors/collide_particles.inc.c +++ b/src/game/behaviors/collide_particles.inc.c @@ -10,14 +10,14 @@ void bhv_punch_tiny_triangle_loop(void) { s16 yaw; if (o->oTimer == 0) { yaw = o->oMoveAngleYaw; - o->oCollisionParticleUnkF4 = 1.28f; + o->oCollisionParticleScale = 1.28f; cur_obj_set_pos_relative(gMarioObject, 0.0f, 60.0f, 100.0f); o->oMoveAngleYaw = yaw; } cur_obj_move_using_fvel_and_gravity(); o->oAnimState = 5; - cur_obj_scale(o->oCollisionParticleUnkF4); - o->oCollisionParticleUnkF4 -= 0.2f; + cur_obj_scale(o->oCollisionParticleScale); + o->oCollisionParticleScale -= 0.2f; if (gDebugInfo[4][0] + 6 < o->oTimer) obj_mark_for_deletion(o); } @@ -38,14 +38,14 @@ void bhv_wall_tiny_star_particle_loop(void) { s16 yaw; if (o->oTimer == 0) { yaw = o->oMoveAngleYaw; - o->oCollisionParticleUnkF4 = 0.28f; + o->oCollisionParticleScale = 0.28f; cur_obj_set_pos_relative(gMarioObject, 0.0f, 30.0f, 110.0f); o->oMoveAngleYaw = yaw; } cur_obj_move_using_fvel_and_gravity(); o->oAnimState = 4; - cur_obj_scale(o->oCollisionParticleUnkF4); - o->oCollisionParticleUnkF4 -= 0.015f; + cur_obj_scale(o->oCollisionParticleScale); + o->oCollisionParticleScale -= 0.015f; } void bhv_tiny_star_particles_init(void) { @@ -62,15 +62,15 @@ void bhv_tiny_star_particles_init(void) { void bhv_pound_tiny_star_particle_loop(void) { if (o->oTimer == 0) { - o->oCollisionParticleUnkF4 = 0.28f; + o->oCollisionParticleScale = 0.28f; o->oForwardVel = 25.0f; o->oPosY -= 20.0f; o->oVelY = 14.0f; } cur_obj_move_using_fvel_and_gravity(); o->oAnimState = 4; - cur_obj_scale(o->oCollisionParticleUnkF4); - o->oCollisionParticleUnkF4 -= 0.015f; + cur_obj_scale(o->oCollisionParticleScale); + o->oCollisionParticleScale -= 0.015f; } void bhv_pound_tiny_star_particle_init(void) { diff --git a/src/game/behaviors/controllable_platform.inc.c b/src/game/behaviors/controllable_platform.inc.c index 09322fbce..b453402e9 100644 --- a/src/game/behaviors/controllable_platform.inc.c +++ b/src/game/behaviors/controllable_platform.inc.c @@ -70,11 +70,11 @@ void bhv_controllable_platform_init(void) { sControllablePlatformDirectionState = 0; - o->oControllablePlatformUnkFC = o->oPosY; + o->oControllablePlatformInitPosY = o->oPosY; } void controllable_platform_hit_wall(s8 nextDirection) { - o->oControllablePlatformUnkF8 = nextDirection; + o->oControllablePlatformWallHitDirection = nextDirection; o->oTimer = 0; sControllablePlatformDirectionState = 5; @@ -111,25 +111,25 @@ void controllable_platform_check_walls(s8 nextDirection, s8 wallDisplacement[3], if (!is_point_within_radius_of_mario(o->oPosX, o->oPosY, o->oPosZ, 400)) { sControllablePlatformDirectionState = 6; - o->oControllablePlatformUnk100 = 1; + o->oControllablePlatformIsFarFromMario = 1; o->oTimer = 0; } } void controllable_platform_shake_on_wall_hit(void) { - if (o->oControllablePlatformUnkF8 == 1 || o->oControllablePlatformUnkF8 == 2) { + if (o->oControllablePlatformWallHitDirection == 1 || o->oControllablePlatformWallHitDirection == 2) { o->oFaceAnglePitch = sins(o->oTimer * 0x1000) * 182.04444 * 10.0; - o->oPosY = o->oControllablePlatformUnkFC + sins(o->oTimer * 0x2000) * 20.0f; + o->oPosY = o->oControllablePlatformInitPosY + sins(o->oTimer * 0x2000) * 20.0f; } else { o->oFaceAngleRoll = sins(o->oTimer * 0x1000) * 182.04444 * 10.0; - o->oPosY = o->oControllablePlatformUnkFC + sins(o->oTimer * 0x2000) * 20.0f; + o->oPosY = o->oControllablePlatformInitPosY + sins(o->oTimer * 0x2000) * 20.0f; } if (o->oTimer == 32) { - sControllablePlatformDirectionState = o->oControllablePlatformUnkF8; + sControllablePlatformDirectionState = o->oControllablePlatformWallHitDirection; o->oFaceAnglePitch = 0; o->oFaceAngleRoll = 0; - o->oPosY = o->oControllablePlatformUnkFC; + o->oPosY = o->oControllablePlatformInitPosY; } } @@ -163,7 +163,7 @@ void bhv_controllable_platform_loop(void) { case 0: o->oFaceAnglePitch /= 2; o->oFaceAngleRoll /= 2; - if (o->oControllablePlatformUnk100 == 1 && o->oTimer > 30) { + if (o->oControllablePlatformIsFarFromMario == 1 && o->oTimer > 30) { sControllablePlatformDirectionState = 6; o->oTimer = 0; } diff --git a/src/game/behaviors/cruiser.inc.c b/src/game/behaviors/cruiser.inc.c index a705bb2c3..0d3366959 100644 --- a/src/game/behaviors/cruiser.inc.c +++ b/src/game/behaviors/cruiser.inc.c @@ -1,17 +1,17 @@ // cruiser.c.inc void bhv_rr_cruiser_wing_init(void) { - o->oRRCruiserWingUnkF4 = o->oFaceAngleYaw; - o->oRRCruiserWingUnkF8 = o->oFaceAnglePitch; + o->oRRCruiserWingInitYaw = o->oFaceAngleYaw; + o->oRRCruiserWingInitPitch = o->oFaceAnglePitch; } void bhv_rr_cruiser_wing_loop(void) { if (o->oBehParams2ndByte == 0) { - o->oFaceAngleYaw = o->oRRCruiserWingUnkF4 + sins(o->oTimer * 0x400) * 8192.0f; - o->oFaceAnglePitch = o->oRRCruiserWingUnkF8 + coss(o->oTimer * 0x400) * 2048.0f; + o->oFaceAngleYaw = o->oRRCruiserWingInitYaw + sins(o->oTimer * 0x400) * 8192.0f; + o->oFaceAnglePitch = o->oRRCruiserWingInitPitch + coss(o->oTimer * 0x400) * 2048.0f; } else { - o->oFaceAngleYaw = o->oRRCruiserWingUnkF4 - sins(o->oTimer * 0x400) * 8192.0f; - o->oFaceAnglePitch = o->oRRCruiserWingUnkF8 + coss(o->oTimer * 0x400) * 2048.0f; + o->oFaceAngleYaw = o->oRRCruiserWingInitYaw - sins(o->oTimer * 0x400) * 8192.0f; + o->oFaceAnglePitch = o->oRRCruiserWingInitPitch + coss(o->oTimer * 0x400) * 2048.0f; } #ifndef VERSION_JP if (o->oTimer == 64) { diff --git a/src/game/behaviors/door.inc.c b/src/game/behaviors/door.inc.c index 5c108784d..0a68204f5 100644 --- a/src/game/behaviors/door.inc.c +++ b/src/game/behaviors/door.inc.c @@ -86,45 +86,45 @@ void bhv_door_init(void) { struct Surface *floor; find_floor(x, o->oPosY, z, &floor); if (floor != NULL) { - o->oDoorUnkF8 = floor->room; + o->oDoorSelfRoom = floor->room; } x = o->oPosX + sins(o->oMoveAngleYaw) * 200.0f; z = o->oPosZ + coss(o->oMoveAngleYaw) * 200.0f; find_floor(x, o->oPosY, z, &floor); if (floor != NULL) { - o->oDoorUnkFC = floor->room; + o->oDoorForwardRoom = floor->room; } x = o->oPosX + sins(o->oMoveAngleYaw) * -200.0f; z = o->oPosZ + coss(o->oMoveAngleYaw) * -200.0f; find_floor(x, o->oPosY, z, &floor); if (floor != NULL) { - o->oDoorUnk100 = floor->room; + o->oDoorBackwardRoom = floor->room; } - if (o->oDoorUnkF8 > 0 && o->oDoorUnkF8 < 60) { - gDoorAdjacentRooms[o->oDoorUnkF8][0] = o->oDoorUnkFC; - gDoorAdjacentRooms[o->oDoorUnkF8][1] = o->oDoorUnk100; + if (o->oDoorSelfRoom > 0 && o->oDoorSelfRoom < 60) { + gDoorAdjacentRooms[o->oDoorSelfRoom][0] = o->oDoorForwardRoom; + gDoorAdjacentRooms[o->oDoorSelfRoom][1] = o->oDoorBackwardRoom; } } void bhv_star_door_loop_2(void) { s32 doorIsRendering = FALSE; if (gMarioCurrentRoom != 0) { - if (o->oDoorUnkF8 == gMarioCurrentRoom) + if (o->oDoorSelfRoom == gMarioCurrentRoom) doorIsRendering = TRUE; - else if (gMarioCurrentRoom == o->oDoorUnkFC) + else if (gMarioCurrentRoom == o->oDoorForwardRoom) doorIsRendering = TRUE; - else if (gMarioCurrentRoom == o->oDoorUnk100) + else if (gMarioCurrentRoom == o->oDoorBackwardRoom) doorIsRendering = TRUE; - else if (gDoorAdjacentRooms[gMarioCurrentRoom][0] == o->oDoorUnkFC) + else if (gDoorAdjacentRooms[gMarioCurrentRoom][0] == o->oDoorForwardRoom) doorIsRendering = TRUE; - else if (gDoorAdjacentRooms[gMarioCurrentRoom][0] == o->oDoorUnk100) + else if (gDoorAdjacentRooms[gMarioCurrentRoom][0] == o->oDoorBackwardRoom) doorIsRendering = TRUE; - else if (gDoorAdjacentRooms[gMarioCurrentRoom][1] == o->oDoorUnkFC) + else if (gDoorAdjacentRooms[gMarioCurrentRoom][1] == o->oDoorForwardRoom) doorIsRendering = TRUE; - else if (gDoorAdjacentRooms[gMarioCurrentRoom][1] == o->oDoorUnk100) + else if (gDoorAdjacentRooms[gMarioCurrentRoom][1] == o->oDoorBackwardRoom) doorIsRendering = TRUE; } else doorIsRendering = TRUE; @@ -134,5 +134,5 @@ void bhv_star_door_loop_2(void) { } else { o->header.gfx.node.flags &= ~GRAPH_RENDER_ACTIVE; } - o->oDoorUnk88 = doorIsRendering; + o->oDoorIsRendering = doorIsRendering; } diff --git a/src/game/behaviors/elevator.inc.c b/src/game/behaviors/elevator.inc.c index f53a91aa9..b143bef67 100644 --- a/src/game/behaviors/elevator.inc.c +++ b/src/game/behaviors/elevator.inc.c @@ -15,19 +15,19 @@ void elevator_starting_shake(void) { void elevator_act_0(void) { o->oVelY = 0; - if (o->oElevatorUnk100 == 2) { + if (o->oElevatorType == 2) { if (gMarioObject->platform == o) { - if (o->oPosY > o->oElevatorUnkFC) + if (o->oPosY > o->oElevatorMidY) o->oAction = 2; else o->oAction = 1; } - } else if (gMarioObject->oPosY > o->oElevatorUnkFC || o->oElevatorUnk100 == 1) { - o->oPosY = o->oElevatorUnkF8; + } else if (gMarioObject->oPosY > o->oElevatorMidY || o->oElevatorType == 1) { + o->oPosY = o->oElevatorMaxY; if (gMarioObject->platform == o) o->oAction = 2; } else { - o->oPosY = o->oElevatorUnkF4; + o->oPosY = o->oElevatorMinY; if (gMarioObject->platform == o) o->oAction = 1; } @@ -39,11 +39,11 @@ void elevator_act_1(void) { elevator_starting_shake(); approach_f32_signed(&o->oVelY, 10.0f, 2.0f); o->oPosY += o->oVelY; - if (o->oPosY > o->oElevatorUnkF8) { - o->oPosY = o->oElevatorUnkF8; - if (o->oElevatorUnk100 == 2 || o->oElevatorUnk100 == 1) + if (o->oPosY > o->oElevatorMaxY) { + o->oPosY = o->oElevatorMaxY; + if (o->oElevatorType == 2 || o->oElevatorType == 1) o->oAction = 3; - else if (gMarioObject->oPosY < o->oElevatorUnkFC) + else if (gMarioObject->oPosY < o->oElevatorMidY) o->oAction = 2; else o->oAction = 3; @@ -57,13 +57,13 @@ void elevator_act_2(void) // Pretty similar code to action 1 elevator_starting_shake(); approach_f32_signed(&o->oVelY, -10.0f, -2.0f); o->oPosY += o->oVelY; - if (o->oPosY < o->oElevatorUnkF4) { - o->oPosY = o->oElevatorUnkF4; - if (o->oElevatorUnk100 == 1) + if (o->oPosY < o->oElevatorMinY) { + o->oPosY = o->oElevatorMinY; + if (o->oElevatorType == 1) o->oAction = 4; - else if (o->oElevatorUnk100 == 2) + else if (o->oElevatorType == 2) o->oAction = 3; - else if (gMarioObject->oPosY > o->oElevatorUnkFC) + else if (gMarioObject->oPosY > o->oElevatorMidY) o->oAction = 1; else o->oAction = 3; @@ -94,15 +94,15 @@ void elevator_act_3(void) // nearly identical to action 2 void bhv_elevator_init(void) { s32 index = sElevatorHeights[o->oBehParams2ndByte * 3 + 2]; if (index == 0) { - o->oElevatorUnkF4 = sElevatorHeights[o->oBehParams2ndByte * 3]; - o->oElevatorUnkF8 = o->oHomeY; - o->oElevatorUnkFC = (o->oElevatorUnkF4 + o->oElevatorUnkF8) / 2; - o->oElevatorUnk100 = cur_obj_has_behavior(bhvRrElevatorPlatform); + o->oElevatorMinY = sElevatorHeights[o->oBehParams2ndByte * 3]; + o->oElevatorMaxY = o->oHomeY; + o->oElevatorMidY = (o->oElevatorMinY + o->oElevatorMaxY) / 2; + o->oElevatorType = cur_obj_has_behavior(bhvRrElevatorPlatform); } else { - o->oElevatorUnkF4 = sElevatorHeights[o->oBehParams2ndByte * 3]; - o->oElevatorUnkF8 = sElevatorHeights[o->oBehParams2ndByte * 3 + 1]; - o->oElevatorUnkFC = (o->oElevatorUnkF4 + o->oElevatorUnkF8) / 2; - o->oElevatorUnk100 = 2; + o->oElevatorMinY = sElevatorHeights[o->oBehParams2ndByte * 3]; + o->oElevatorMaxY = sElevatorHeights[o->oBehParams2ndByte * 3 + 1]; + o->oElevatorMidY = (o->oElevatorMinY + o->oElevatorMaxY) / 2; + o->oElevatorType = 2; } } diff --git a/src/game/behaviors/end_birds_1.inc.c b/src/game/behaviors/end_birds_1.inc.c index 72cd9a082..38deec598 100644 --- a/src/game/behaviors/end_birds_1.inc.c +++ b/src/game/behaviors/end_birds_1.inc.c @@ -6,18 +6,18 @@ void bhv_end_birds_1_loop(void) { switch (gCurrentObject->oAction) { case 0: cur_obj_scale(0.7f); - gCurrentObject->oIntroLakituUnk110 = -554.f; - gCurrentObject->oIntroLakituUnk10C = 3044.f; - gCurrentObject->oIntroLakituUnk108 = -1314.f; + gCurrentObject->oIntroLakituEndBirds1DestX = -554.f; + gCurrentObject->oIntroLakituEndBirds1DestY = 3044.f; + gCurrentObject->oIntroLakituEndBirds1DestZ = -1314.f; gCurrentObject->oAction += 1; break; case 1: - vec3f_set(pos, gCurrentObject->oIntroLakituUnk110, gCurrentObject->oIntroLakituUnk10C, - gCurrentObject->oIntroLakituUnk108); + vec3f_set(pos, gCurrentObject->oIntroLakituEndBirds1DestX, gCurrentObject->oIntroLakituEndBirds1DestY, + gCurrentObject->oIntroLakituEndBirds1DestZ); if (gCurrentObject->oTimer < 100) obj_rotate_towards_point(gCurrentObject, pos, 0, 0, 0x20, 0x20); - if ((gCurrentObject->oEndBirdUnk104 == 0.f) && (gCurrentObject->oTimer == 0)) + if ((gCurrentObject->oEndBirdCutsceneVars9PointX == 0.f) && (gCurrentObject->oTimer == 0)) cur_obj_play_sound_2(SOUND_GENERAL_BIRDS_FLY_AWAY); if (gCutsceneTimer == 0) obj_mark_for_deletion(gCurrentObject); diff --git a/src/game/behaviors/end_birds_2.inc.c b/src/game/behaviors/end_birds_2.inc.c index b0f84ccf3..44fdd0f2c 100644 --- a/src/game/behaviors/end_birds_2.inc.c +++ b/src/game/behaviors/end_birds_2.inc.c @@ -18,7 +18,7 @@ void bhv_end_birds_2_loop(void) { vec3f_set_dist_and_angle(gCamera->pos, pos, 14000.f, pitch, yaw); obj_rotate_towards_point(gCurrentObject, pos, 0, 0, 8, 8); - if ((gCurrentObject->oEndBirdUnk104 == 0.f) && (gCurrentObject->oTimer == 0)) + if ((gCurrentObject->oEndBirdCutsceneVars9PointX == 0.f) && (gCurrentObject->oTimer == 0)) cur_obj_play_sound_2(SOUND_GENERAL_BIRDS_FLY_AWAY); break; } diff --git a/src/game/behaviors/exclamation_box.inc.c b/src/game/behaviors/exclamation_box.inc.c index 7c98afbdd..a05ff0407 100644 --- a/src/game/behaviors/exclamation_box.inc.c +++ b/src/game/behaviors/exclamation_box.inc.c @@ -73,7 +73,7 @@ void exclamation_box_act_2(void) { } if (cur_obj_was_attacked_or_ground_pounded()) { cur_obj_become_intangible(); - o->oExclamationBoxUnkFC = 0x4000; + o->oExclamationBoxScaleAngle = 0x4000; o->oVelY = 30.0f; o->oGravity = -8.0f; o->oFloorHeight = o->oPosY; @@ -92,13 +92,13 @@ void exclamation_box_act_3(void) { o->oVelY = 0.0f; o->oGravity = 0.0f; } - o->oExclamationBoxUnkF8 = (sins(o->oExclamationBoxUnkFC) + 1.0) * 0.3 + 0.0; - o->oExclamationBoxUnkF4 = (-sins(o->oExclamationBoxUnkFC) + 1.0) * 0.5 + 1.0; - o->oGraphYOffset = (-sins(o->oExclamationBoxUnkFC) + 1.0) * 26.0; - o->oExclamationBoxUnkFC += 0x1000; - o->header.gfx.scale[0] = o->oExclamationBoxUnkF4 * 2.0f; - o->header.gfx.scale[1] = o->oExclamationBoxUnkF8 * 2.0f; - o->header.gfx.scale[2] = o->oExclamationBoxUnkF4 * 2.0f; + o->oExclamationBoxVerticalScale = (sins(o->oExclamationBoxScaleAngle) + 1.0) * 0.3 + 0.0; + o->oExclamationBoxHorizontalScale = (-sins(o->oExclamationBoxScaleAngle) + 1.0) * 0.5 + 1.0; + o->oGraphYOffset = (-sins(o->oExclamationBoxScaleAngle) + 1.0) * 26.0; + o->oExclamationBoxScaleAngle += 0x1000; + o->header.gfx.scale[0] = o->oExclamationBoxHorizontalScale * 2.0f; + o->header.gfx.scale[1] = o->oExclamationBoxVerticalScale * 2.0f; + o->header.gfx.scale[2] = o->oExclamationBoxHorizontalScale * 2.0f; if (o->oTimer == 7) o->oAction = 4; } diff --git a/src/game/behaviors/eyerok.inc.c b/src/game/behaviors/eyerok.inc.c index 46d750b11..eb7f7c735 100644 --- a/src/game/behaviors/eyerok.inc.c +++ b/src/game/behaviors/eyerok.inc.c @@ -47,14 +47,14 @@ static void eyerok_boss_act_wake_up(void) { o->oSubAction += 1; } - if (o->oEyerokBossUnk110 == 0.0f && mario_ready_to_speak() != 0) { + if (o->oEyerokBossOffsetFromHome == 0.0f && mario_ready_to_speak() != 0) { o->oAction = EYEROK_BOSS_ACT_SHOW_INTRO_TEXT; } else if (o->oTimer > 150) { - if (approach_f32_ptr(&o->oEyerokBossUnk110, 0.0f, 10.0f)) { + if (approach_f32_ptr(&o->oEyerokBossOffsetFromHome, 0.0f, 10.0f)) { o->oTimer = 0; } } else if (o->oTimer > 90) { - approach_f32_ptr(&o->oEyerokBossUnk110, 300.f, 10.0f); + approach_f32_ptr(&o->oEyerokBossOffsetFromHome, 300.f, 10.0f); } } } else { @@ -71,44 +71,44 @@ static void eyerok_boss_act_show_intro_text(void) { static void eyerok_boss_act_fight(void) { if (o->oEyerokBossNumHands == 0) { o->oAction = EYEROK_BOSS_ACT_DIE; - } else if (o->oEyerokBossUnk1AC == 0 && o->oEyerokBossActiveHand == 0) { - if (o->oEyerokBossUnk104 != 0) { - if (approach_f32_ptr(&o->oEyerokBossUnk110, 1.0f, 0.02f)) { - if (o->oEyerokBossUnk104 < 0) { - if (eyerok_check_mario_relative_z(400) == 0 && ++o->oEyerokBossUnk104 == 0) { - o->oEyerokBossUnk104 = 1; + } else if (o->oEyerokBossActiveHandId == 0 && o->oEyerokBossActiveHand == 0) { + if (o->oEyerokBossAttackCountdown != 0) { + if (approach_f32_ptr(&o->oEyerokBossOffsetFromHome, 1.0f, 0.02f)) { + if (o->oEyerokBossAttackCountdown < 0) { + if (eyerok_check_mario_relative_z(400) == 0 && ++o->oEyerokBossAttackCountdown == 0) { + o->oEyerokBossAttackCountdown = 1; } } else { - o->oEyerokBossUnk104 -= 1; + o->oEyerokBossAttackCountdown -= 1; } - if (o->oEyerokBossUnk104 != 0 && o->oEyerokBossUnk104 != 1) { - o->oEyerokBossUnkFC += 1; - if ((o->oEyerokBossActiveHand = o->oEyerokBossUnkFC & 0x1) == 0) { + if (o->oEyerokBossAttackCountdown != 0 && o->oEyerokBossAttackCountdown != 1) { + o->oEyerokBossAttackPhase += 1; + if ((o->oEyerokBossActiveHand = o->oEyerokBossAttackPhase & 0x1) == 0) { o->oEyerokBossActiveHand = -1; } } } } else { - o->oEyerokBossUnkFC += 1; + o->oEyerokBossAttackPhase += 1; if (eyerok_check_mario_relative_z(400)) { - o->oEyerokBossUnk104 = -8; - o->oEyerokBossUnk110 = 1.0f; - o->oEyerokBossUnk108 = 0.0f; - } else if (o->oEyerokBossNumHands == 2 && o->oEyerokBossUnkFC % 6 == 0) { - o->oEyerokBossUnk104 = 8; - o->oEyerokBossUnk110 = 0.0f; + o->oEyerokBossAttackCountdown = -8; + o->oEyerokBossOffsetFromHome = 1.0f; + o->oEyerokBossFightSideZ = 0.0f; + } else if (o->oEyerokBossNumHands == 2 && o->oEyerokBossAttackPhase % 6 == 0) { + o->oEyerokBossAttackCountdown = 8; + o->oEyerokBossOffsetFromHome = 0.0f; - if ((o->oEyerokBossUnkFC = random_u16() & 0x1) != 0) { - o->oEyerokBossUnk108 = -1.0f; + if ((o->oEyerokBossAttackPhase = random_u16() & 0x1) != 0) { + o->oEyerokBossFightSideZ = -1.0f; } else { - o->oEyerokBossUnk108 = 1.0f; + o->oEyerokBossFightSideZ = 1.0f; } - o->oEyerokBossUnk10C = gMarioObject->oPosZ; - clamp_f32(&o->oEyerokBossUnk10C, o->oPosZ + 400.0f, o->oPosZ + 1600.0f); - } else if ((o->oEyerokBossActiveHand = o->oEyerokBossUnkFC & 0x1) == 0) { + o->oEyerokBossClampedMarioPosZ = gMarioObject->oPosZ; + clamp_f32(&o->oEyerokBossClampedMarioPosZ, o->oPosZ + 400.0f, o->oPosZ + 1600.0f); + } else if ((o->oEyerokBossActiveHand = o->oEyerokBossAttackPhase & 0x1) == 0) { o->oEyerokBossActiveHand = -1; } } @@ -209,12 +209,12 @@ static void eyerok_hand_act_idle(void) { cur_obj_init_animation_with_sound(2); if (o->parentObj->oAction == EYEROK_BOSS_ACT_FIGHT) { - if (o->parentObj->oEyerokBossUnk104 != 0) { - if (o->parentObj->oEyerokBossUnk104 != 1) { + if (o->parentObj->oEyerokBossAttackCountdown != 0) { + if (o->parentObj->oEyerokBossAttackCountdown != 1) { o->oAction = EYEROK_HAND_ACT_BEGIN_DOUBLE_POUND; o->oGravity = 0.0f; } - } else if (o->parentObj->oEyerokBossUnk1AC == 0 && o->parentObj->oEyerokBossActiveHand != 0) { + } else if (o->parentObj->oEyerokBossActiveHandId == 0 && o->parentObj->oEyerokBossActiveHand != 0) { if (o->parentObj->oEyerokBossActiveHand == o->oBehParams2ndByte) { if (eyerok_check_mario_relative_z(400) != 0 || random_u16() % 2 != 0) { o->oAction = EYEROK_HAND_ACT_TARGET_MARIO; @@ -236,17 +236,17 @@ static void eyerok_hand_act_idle(void) { } } } else { - o->oPosY = o->oHomeY + o->parentObj->oEyerokBossUnk110; + o->oPosY = o->oHomeY + o->parentObj->oEyerokBossOffsetFromHome; } } static void eyerok_hand_act_open(void) { - o->parentObj->oEyerokBossUnk1AC = o->oBehParams2ndByte; + o->parentObj->oEyerokBossActiveHandId = o->oBehParams2ndByte; if (cur_obj_init_anim_and_check_if_end(4)) { o->oAction = EYEROK_HAND_ACT_SHOW_EYE; - o->oEyerokHandUnkFC = 2; - o->oEyerokHandUnk100 = 60; + o->oEyerokHandAnimStateIndex = 2; + o->oEyerokHandEyeShownTimer = 60; o->collisionData = segmented_to_virtual(ssl_seg7_collision_070282F8); @@ -273,14 +273,14 @@ static void eyerok_hand_act_show_eye(void) { o->oAction = EYEROK_HAND_ACT_CLOSE; } } else { - if (o->oEyerokHandUnk100--) { - if (o->oEyerokHandUnkFC != 0) { - o->oEyerokHandUnkFC -= 1; + if (o->oEyerokHandEyeShownTimer--) { + if (o->oEyerokHandAnimStateIndex != 0) { + o->oEyerokHandAnimStateIndex -= 1; } - o->oAnimState = sEyerokAnimStatesList[o->oEyerokHandUnkFC]; + o->oAnimState = sEyerokAnimStatesList[o->oEyerokHandAnimStateIndex]; } else { - o->oEyerokHandUnkFC = 5; - o->oEyerokHandUnk100 = random_linear_offset(20, 50); + o->oEyerokHandAnimStateIndex = 5; + o->oEyerokHandEyeShownTimer = random_linear_offset(20, 50); } if (o->parentObj->oEyerokBossNumHands != 2) { @@ -304,7 +304,7 @@ static void eyerok_hand_act_close(void) { o->parentObj->oEyerokBossActiveHand = o->oBehParams2ndByte; } else if (o->parentObj->oEyerokBossActiveHand == 0) { o->oAction = EYEROK_HAND_ACT_IDLE; - o->parentObj->oEyerokBossUnk1AC = 0; + o->parentObj->oEyerokBossActiveHandId = 0; } } } @@ -335,7 +335,7 @@ static void eyerok_hand_act_become_active(void) { static void eyerok_hand_act_die(void) { if (cur_obj_init_anim_and_check_if_end(1)) { - o->parentObj->oEyerokBossUnk1AC = 0; + o->parentObj->oEyerokBossActiveHandId = 0; obj_explode_and_spawn_coins(150.0f, 1); create_sound_spawner(SOUND_OBJ2_EYEROK_SOUND_LONG); } @@ -363,8 +363,8 @@ static void eyerok_hand_act_retreat(void) { o->oAction = EYEROK_HAND_ACT_IDLE; o->parentObj->oEyerokBossActiveHand -= o->oBehParams2ndByte; - if (o->parentObj->oEyerokBossUnk1AC == o->oBehParams2ndByte) { - o->parentObj->oEyerokBossUnk1AC = 0; + if (o->parentObj->oEyerokBossActiveHandId == o->oBehParams2ndByte) { + o->parentObj->oEyerokBossActiveHandId = 0; } } } @@ -440,18 +440,18 @@ static void eyerok_hand_act_fist_sweep(void) { static void eyerok_hand_act_begin_double_pound(void) { f32 homeXOffset; - if (o->parentObj->oEyerokBossUnk104 < 0 + if (o->parentObj->oEyerokBossAttackCountdown < 0 || o->parentObj->oEyerokBossActiveHand == o->oBehParams2ndByte) { o->oAction = EYEROK_HAND_ACT_DOUBLE_POUND; - o->oMoveAngleYaw = (s32)(o->oFaceAngleYaw - 0x4000 * o->parentObj->oEyerokBossUnk108); + o->oMoveAngleYaw = (s32)(o->oFaceAngleYaw - 0x4000 * o->parentObj->oEyerokBossFightSideZ); } else { - homeXOffset = o->parentObj->oPosX + 400.0f * o->parentObj->oEyerokBossUnk108 + homeXOffset = o->parentObj->oPosX + 400.0f * o->parentObj->oEyerokBossFightSideZ - 180.0f * o->oBehParams2ndByte; - o->oPosX = o->oHomeX + (homeXOffset - o->oHomeX) * o->parentObj->oEyerokBossUnk110; - o->oPosY = o->oHomeY + 300.0f * o->parentObj->oEyerokBossUnk110; + o->oPosX = o->oHomeX + (homeXOffset - o->oHomeX) * o->parentObj->oEyerokBossOffsetFromHome; + o->oPosY = o->oHomeY + 300.0f * o->parentObj->oEyerokBossOffsetFromHome; o->oPosZ = - o->oHomeZ + (o->parentObj->oEyerokBossUnk10C - o->oHomeZ) * o->parentObj->oEyerokBossUnk110; + o->oHomeZ + (o->parentObj->oEyerokBossClampedMarioPosZ - o->oHomeZ) * o->parentObj->oEyerokBossOffsetFromHome; } } @@ -460,9 +460,9 @@ static void eyerok_hand_act_double_pound(void) { o->parentObj->oEyerokBossActiveHand = o->oBehParams2ndByte; } - if (o->parentObj->oEyerokBossUnk104 == 1) { + if (o->parentObj->oEyerokBossAttackCountdown == 1) { o->oAction = EYEROK_HAND_ACT_RETREAT; - o->parentObj->oEyerokBossUnk1AC = o->oBehParams2ndByte; + o->parentObj->oEyerokBossActiveHandId = o->oBehParams2ndByte; } else if (o->parentObj->oEyerokBossActiveHand == o->oBehParams2ndByte) { if (o->oMoveFlags & OBJ_MOVE_MASK_ON_GROUND) { if (o->oGravity < -15.0f) { @@ -471,7 +471,7 @@ static void eyerok_hand_act_double_pound(void) { o->oForwardVel = 0.0f; o->oGravity = -15.0f; } else { - o->oForwardVel = 30.0f * absf(o->parentObj->oEyerokBossUnk108); + o->oForwardVel = 30.0f * absf(o->parentObj->oEyerokBossFightSideZ); o->oVelY = 100.0f; o->oMoveFlags = 0; } diff --git a/src/game/behaviors/flame_mario.inc.c b/src/game/behaviors/flame_mario.inc.c index 52e4bae6f..c82ff13fa 100644 --- a/src/game/behaviors/flame_mario.inc.c +++ b/src/game/behaviors/flame_mario.inc.c @@ -9,7 +9,7 @@ void bhv_black_smoke_bowser_loop(void) { o->oForwardVel = random_float() * 2 + 0.5; o->oMoveAngleYaw = random_u16(); o->oVelY = 8; - o->oBlackSmokeBowserUnkF4 = o->header.gfx.scale[0]; + o->oFlameScale = o->header.gfx.scale[0]; } o->oMoveAngleYaw += o->oAngleVelYaw; o->oPosY += o->oVelY; diff --git a/src/game/behaviors/flamethrower.inc.c b/src/game/behaviors/flamethrower.inc.c index 798e6f1a9..4d1bb9093 100644 --- a/src/game/behaviors/flamethrower.inc.c +++ b/src/game/behaviors/flamethrower.inc.c @@ -20,9 +20,9 @@ void bhv_flamethrower_flame_loop(void) { o->oVelY = 0; o->oPosY = o->oFloorHeight + 25.0f * size; } - remainingTime = o->parentObj->oFlameThowerFlameUnk110 / 1.2; + remainingTime = o->parentObj->oFlameThowerTimeRemaining / 1.2; } else - remainingTime = o->parentObj->oFlameThowerFlameUnk110; + remainingTime = o->parentObj->oFlameThowerTimeRemaining; cur_obj_scale(size); if (o->oBehParams2ndByte == 4) o->oPosY += o->oForwardVel; // weird? @@ -57,7 +57,7 @@ void bhv_flamethrower_loop(void) { flameTimeRemaining = 75 - o->oTimer; // Range: [15..2] else o->oAction++; - o->oFlameThowerUnk110 = flameTimeRemaining; + o->oFlameThowerTimeRemaining = flameTimeRemaining; flame = spawn_object_relative(o->oBehParams2ndByte, 0, 0, 0, o, model, bhvFlamethrowerFlame); flame->oForwardVel = flameVel; cur_obj_play_sound_1(SOUND_AIR_BLOW_FIRE); diff --git a/src/game/behaviors/floating_platform.inc.c b/src/game/behaviors/floating_platform.inc.c index 31b736026..1d9c986f0 100644 --- a/src/game/behaviors/floating_platform.inc.c +++ b/src/game/behaviors/floating_platform.inc.c @@ -4,12 +4,12 @@ f32 floating_platform_find_home_y(void) { struct Surface *floor; f32 waterLevel = find_water_level(o->oPosX, o->oPosZ); f32 floorHeight = find_floor(o->oPosX, o->oPosY, o->oPosZ, &floor); - if (waterLevel > floorHeight + o->oFloatingPlatformUnkFC) { - o->oFloatingPlatformUnkF4 = 0; - return waterLevel + o->oFloatingPlatformUnkFC; + if (waterLevel > floorHeight + o->oFloatingPlatformHeightOffset) { + o->oFloatingPlatformIsOnFloor = 0; + return waterLevel + o->oFloatingPlatformHeightOffset; } else { - o->oFloatingPlatformUnkF4 = 1; - return floorHeight + o->oFloatingPlatformUnkFC; + o->oFloatingPlatformIsOnFloor = 1; + return floorHeight + o->oFloatingPlatformHeightOffset; } } @@ -25,27 +25,27 @@ void floating_platform_act_0(void) { if (o->oVelY < 0.0f) o->oVelY = 0.0f; - o->oFloatingPlatformUnkF8 += o->oVelY; - if (o->oFloatingPlatformUnkF8 > 90.0f) - o->oFloatingPlatformUnkF8 = 90.0f; + o->oFloatingPlatformMarioWeightWobbleOffset += o->oVelY; + if (o->oFloatingPlatformMarioWeightWobbleOffset > 90.0f) + o->oFloatingPlatformMarioWeightWobbleOffset = 90.0f; } else { o->oFaceAnglePitch /= 2; o->oFaceAngleRoll /= 2; - o->oFloatingPlatformUnkF8 -= 5.0; + o->oFloatingPlatformMarioWeightWobbleOffset -= 5.0; o->oVelY = 10.0f; - if (o->oFloatingPlatformUnkF8 < 0.0f) - o->oFloatingPlatformUnkF8 = 0.0f; + if (o->oFloatingPlatformMarioWeightWobbleOffset < 0.0f) + o->oFloatingPlatformMarioWeightWobbleOffset = 0.0f; } - o->oPosY = o->oHomeY - 64.0f - o->oFloatingPlatformUnkF8 + sins(o->oFloatingPlatformUnk100 * 0x800) * 10.0f; - o->oFloatingPlatformUnk100++; - if (o->oFloatingPlatformUnk100 == 32) - o->oFloatingPlatformUnk100 = 0; + o->oPosY = o->oHomeY - 64.0f - o->oFloatingPlatformMarioWeightWobbleOffset + sins(o->oFloatingPlatformWaterSurfaceWobbleOffset * 0x800) * 10.0f; + o->oFloatingPlatformWaterSurfaceWobbleOffset++; + if (o->oFloatingPlatformWaterSurfaceWobbleOffset == 32) + o->oFloatingPlatformWaterSurfaceWobbleOffset = 0; } void bhv_floating_platform_loop(void) { o->oHomeY = floating_platform_find_home_y(); - if (o->oFloatingPlatformUnkF4 == 0) + if (o->oFloatingPlatformIsOnFloor == 0) o->oAction = 0; else o->oAction = 1; diff --git a/src/game/behaviors/flying_bookend_switch.inc.c b/src/game/behaviors/flying_bookend_switch.inc.c index 8fb2e1bd3..76418346e 100644 --- a/src/game/behaviors/flying_bookend_switch.inc.c +++ b/src/game/behaviors/flying_bookend_switch.inc.c @@ -39,8 +39,8 @@ void flying_bookend_act_0(void) { if (obj_is_near_to_and_facing_mario(400.0f, 0x3000)) { cur_obj_play_sound_2(SOUND_OBJ_DEFAULT_DEATH); o->oAction = 1; - o->oBookendUnkF4 = o->oFaceAnglePitch + 0x7FFF; - o->oBookendUnkF8 = o->oFaceAngleRoll - 0x7FFF; + o->oBookendTargetPitch = o->oFaceAnglePitch + 0x7FFF; + o->oBookendTargetRoll = o->oFaceAngleRoll - 0x7FFF; cur_obj_set_model(MODEL_BOOKEND_PART); } } @@ -53,9 +53,9 @@ void flying_bookend_act_1(void) { } else { o->oForwardVel = 3.0f; if (o->oTimer > 5) { - obj_face_pitch_approach(o->oBookendUnkF4, 2000); + obj_face_pitch_approach(o->oBookendTargetPitch, 2000); if (o->oTimer >= 10) { - obj_face_roll_approach(o->oBookendUnkF8, 2000); + obj_face_roll_approach(o->oBookendTargetRoll, 2000); if (o->oTimer >= 20) { approach_f32_ptr(&o->header.gfx.scale[0], 3.0f, 0.2f); } @@ -156,26 +156,26 @@ void bookshelf_manager_act_0(void) { } void bookshelf_manager_act_1(void) { - if (o->oBookSwitchManagerUnkF8 == 0) { + if (o->oBookSwitchManagerIsActive == 0) { if (obj_is_near_to_and_facing_mario(500.0f, 0x3000)) { - o->oBookSwitchManagerUnkF8 = 1; + o->oBookSwitchManagerIsActive = 1; } } else if (o->oTimer > 60) { o->oAction = 2; - o->oBookSwitchManagerUnkF8 = 0; + o->oBookSwitchManagerIsActive = 0; } } void bookshelf_manager_act_2(void) { if (!(o->activeFlags & ACTIVE_FLAG_IN_DIFFERENT_ROOM)) { - if (o->oBookSwitchManagerUnkF4 < 0) { + if (o->oBookSwitchManagerNumCorrectChoices < 0) { if (o->oTimer > 30) { - o->oBookSwitchManagerUnkF4 = o->oBookSwitchManagerUnkF8 = 0; + o->oBookSwitchManagerNumCorrectChoices = o->oBookSwitchManagerIsActive = 0; } else if (o->oTimer > 10) { - o->oBookSwitchManagerUnkF8 = 1; + o->oBookSwitchManagerIsActive = 1; } } else { - if (o->oBookSwitchManagerUnkF4 >= 3) { + if (o->oBookSwitchManagerNumCorrectChoices >= 3) { if (o->oTimer > 100) { o->parentObj = cur_obj_nearest_object_with_behavior(bhvHauntedBookshelf); o->parentObj->oAction = 1; @@ -203,7 +203,7 @@ void bookshelf_manager_act_3(void) { } void bookshelf_manager_act_4(void) { - if (o->oBookSwitchManagerUnkF4 >= 3) { + if (o->oBookSwitchManagerNumCorrectChoices >= 3) { obj_mark_for_deletion(o); } else { o->oAction = 0; @@ -243,7 +243,7 @@ void bhv_book_switch_loop(void) { obj_mark_for_deletion(o); } else { attackType = obj_check_attacks(&sBookSwitchHitbox, o->oAction); - if (o->parentObj->oBookSwitchManagerUnkF8 != 0 || o->oAction == 1) { + if (o->parentObj->oBookSwitchManagerIsActive != 0 || o->oAction == 1) { if (o->oDistanceToMario < 100.0f) { cur_obj_become_tangible(); } else { @@ -251,12 +251,12 @@ void bhv_book_switch_loop(void) { } o->oAction = 1; - if (o->oBookSwitchUnkF4 == 0.0f) { + if (o->oBookSwitchDistFromHome == 0.0f) { cur_obj_play_sound_2(SOUND_OBJ_DEFAULT_DEATH); } - if (approach_f32_ptr(&o->oBookSwitchUnkF4, 50.0f, 20.0f)) { - if (o->parentObj->oBookSwitchManagerUnkF4 >= 0 && o->oTimer > 60) { + if (approach_f32_ptr(&o->oBookSwitchDistFromHome, 50.0f, 20.0f)) { + if (o->parentObj->oBookSwitchManagerNumCorrectChoices >= 0 && o->oTimer > 60) { if (attackType == 1 || attackType == 2 || attackType == 6) { o->oAction = 2; } @@ -266,11 +266,11 @@ void bhv_book_switch_loop(void) { } } else { cur_obj_become_intangible(); - if (approach_f32_ptr(&o->oBookSwitchUnkF4, 0.0f, 20.0f)) { + if (approach_f32_ptr(&o->oBookSwitchDistFromHome, 0.0f, 20.0f)) { if (o->oAction != 0) { - if (o->parentObj->oBookSwitchManagerUnkF4 == o->oBehParams2ndByte) { + if (o->parentObj->oBookSwitchManagerNumCorrectChoices == o->oBehParams2ndByte) { play_sound(SOUND_GENERAL2_RIGHT_ANSWER, gGlobalSoundSource); - o->parentObj->oBookSwitchManagerUnkF4 += 1; + o->parentObj->oBookSwitchManagerNumCorrectChoices += 1; } else { rand01 = random_u16() & 0x1; z = gMarioObject->oPosZ + 1.5f * gMarioStates[0].vel[2]; @@ -288,7 +288,7 @@ void bhv_book_switch_loop(void) { bookendObj->oAction = 3; } - o->parentObj->oBookSwitchManagerUnkF4 = -1; + o->parentObj->oBookSwitchManagerNumCorrectChoices = -1; } o->oAction = 0; @@ -297,7 +297,7 @@ void bhv_book_switch_loop(void) { } o->oPosX += o->parentObj->oForwardVel; - o->oPosZ = o->oHomeZ - o->oBookSwitchUnkF4; + o->oPosZ = o->oHomeZ - o->oBookSwitchDistFromHome; cur_obj_push_mario_away_from_cylinder(70.0f, 70.0f); } } diff --git a/src/game/behaviors/grand_star.inc.c b/src/game/behaviors/grand_star.inc.c index 7069ed19c..333aea6cd 100644 --- a/src/game/behaviors/grand_star.inc.c +++ b/src/game/behaviors/grand_star.inc.c @@ -34,7 +34,7 @@ void bhv_grand_star_loop(void) { if (o->oTimer == 0) { cur_obj_play_sound_2(SOUND_GENERAL_GRAND_STAR); cutscene_object(CUTSCENE_STAR_SPAWN, o); - o->oGrandStarUnk108 = arc_to_goal_pos(dest, &o->oPosX, 80.0f, -2.0f); + o->oGrandStarArcTime = arc_to_goal_pos(dest, &o->oPosX, 80.0f, -2.0f); } cur_obj_move_using_fvel_and_gravity(); if (o->oSubAction == 0) { diff --git a/src/game/behaviors/grill_door.inc.c b/src/game/behaviors/grill_door.inc.c index 3cff966b0..74dd82faa 100644 --- a/src/game/behaviors/grill_door.inc.c +++ b/src/game/behaviors/grill_door.inc.c @@ -5,7 +5,7 @@ struct OpenableGrill gOpenableGrills[] = { { 320, MODEL_BOB_BARS_GRILLS, bob_seg void bhv_openable_cage_door_loop(void) { if (gCurrentObject->oAction == 0) { - if (gCurrentObject->parentObj->oOpenableGrillUnk88 != 0) + if (gCurrentObject->parentObj->oOpenableGrillIsOpen != 0) gCurrentObject->oAction++; } else if (gCurrentObject->oAction == 1) { if (gCurrentObject->oTimer < 64) @@ -31,14 +31,14 @@ void bhv_openable_grill_loop(void) { o->oAction++; break; case 1: - if ((o->oOpenableGrillUnkF4 = cur_obj_nearest_object_with_behavior(bhvFloorSwitchGrills)) + if ((o->oOpenableGrillFloorSwitchObj = cur_obj_nearest_object_with_behavior(bhvFloorSwitchGrills)) != NULL) o->oAction++; break; case 2: - grillObj = o->oOpenableGrillUnkF4; + grillObj = o->oOpenableGrillFloorSwitchObj; if (grillObj->oAction == 2) { - o->oOpenableGrillUnk88 = 2; + o->oOpenableGrillIsOpen = 2; cur_obj_play_sound_2(SOUND_GENERAL_CAGE_OPEN); o->oAction++; if (o->oBehParams2ndByte != 0) diff --git a/src/game/behaviors/haunted_chair.inc.c b/src/game/behaviors/haunted_chair.inc.c index 509f7319b..4b6a61204 100644 --- a/src/game/behaviors/haunted_chair.inc.c +++ b/src/game/behaviors/haunted_chair.inc.c @@ -20,7 +20,7 @@ void bhv_haunted_chair_init(void) { if (pianoObj != NULL && dist < 300.0f) { o->parentObj = pianoObj; } else { - o->oHauntedChairUnkF4 = 1; + o->oHauntedChairSpinTimer = 1; } } @@ -28,38 +28,38 @@ void haunted_chair_act_0(void) { s16 dAngleToPiano; if (o->parentObj != o) { - if (o->oHauntedChairUnk104 == 0) { + if (o->oHauntedChairFallTargetAngle == 0) { if (lateral_dist_between_objects(o, o->parentObj) < 250.0f) { dAngleToPiano = obj_angle_to_object(o, o->parentObj) - o->oFaceAngleYaw + 0x2000; if (dAngleToPiano & 0x4000) { - o->oHauntedChairUnk100 = &o->oFaceAngleRoll; + o->oHauntedChairFallFromPianoAngle = &o->oFaceAngleRoll; if (dAngleToPiano > 0) { - o->oHauntedChairUnk104 = 0x4000; + o->oHauntedChairFallTargetAngle = 0x4000; } else { - o->oHauntedChairUnk104 = -0x4000; + o->oHauntedChairFallTargetAngle = -0x4000; } } else { - o->oHauntedChairUnk100 = &o->oFaceAnglePitch; + o->oHauntedChairFallFromPianoAngle = &o->oFaceAnglePitch; if (dAngleToPiano < 0) { - o->oHauntedChairUnk104 = 0x5000; + o->oHauntedChairFallTargetAngle = 0x5000; } else { - o->oHauntedChairUnk104 = -0x4000; + o->oHauntedChairFallTargetAngle = -0x4000; } } - if (o->oHauntedChairUnk104 < 0) { - o->oHauntedChairUnkF8 = -1500.0f; + if (o->oHauntedChairFallTargetAngle < 0) { + o->oHauntedChairPitchVel = -1500.0f; } else { - o->oHauntedChairUnkF8 = 1500.0f; + o->oHauntedChairPitchVel = 1500.0f; } } } else { - oscillate_toward(o->oHauntedChairUnk100, &o->oHauntedChairUnkF8, o->oHauntedChairUnk104, + oscillate_toward(o->oHauntedChairFallFromPianoAngle, &o->oHauntedChairPitchVel, o->oHauntedChairFallTargetAngle, 4000.0f, 20.0f, 2.0f); } - } else if (o->oHauntedChairUnkF4 != 0) { + } else if (o->oHauntedChairSpinTimer != 0) { if (o->oDistanceToMario < 500.0f) { - o->oHauntedChairUnkF4 -= 1; + o->oHauntedChairSpinTimer -= 1; } o->oTimer = 0.0f; } else { @@ -83,9 +83,9 @@ void haunted_chair_act_0(void) { if (o->oTimer > 30) { o->oAction = 1; - o->oHauntedChairUnkF8 = 0.0f; - o->oHauntedChairUnkFC = 200.0f; - o->oHauntedChairUnkF4 = 40; + o->oHauntedChairPitchVel = 0.0f; + o->oHauntedChairRollVel = 200.0f; + o->oHauntedChairSpinTimer = 40; } } @@ -103,16 +103,16 @@ void haunted_chair_act_1(void) { } o->oGravity = 0.0f; - oscillate_toward(&o->oFaceAnglePitch, &o->oHauntedChairUnkF8, -4000, 200.0f, 20.0f, 2.0f); - oscillate_toward(&o->oFaceAngleRoll, &o->oHauntedChairUnkFC, 0, 0.0f, 20.0f, 1.0f); + oscillate_toward(&o->oFaceAnglePitch, &o->oHauntedChairPitchVel, -4000, 200.0f, 20.0f, 2.0f); + oscillate_toward(&o->oFaceAngleRoll, &o->oHauntedChairRollVel, 0, 0.0f, 20.0f, 1.0f); } else { - if (o->oHauntedChairUnkF4 != 0) { - if (--o->oHauntedChairUnkF4 == 0) { + if (o->oHauntedChairSpinTimer != 0) { + if (--o->oHauntedChairSpinTimer == 0) { cur_obj_play_sound_2(SOUND_GENERAL_HAUNTED_CHAIR); o->oMoveAnglePitch = obj_turn_pitch_toward_mario(120.0f, 0); o->oMoveAngleYaw = o->oAngleToMario; obj_compute_vel_from_move_pitch(50.0f); - } else if (o->oHauntedChairUnkF4 > 20) { + } else if (o->oHauntedChairSpinTimer > 20) { if (gGlobalTimer % 4 == 0) { cur_obj_play_sound_2(SOUND_GENERAL_SWISH_AIR_2); } diff --git a/src/game/behaviors/heave_ho.inc.c b/src/game/behaviors/heave_ho.inc.c index 7dbd5092d..a69c68f70 100644 --- a/src/game/behaviors/heave_ho.inc.c +++ b/src/game/behaviors/heave_ho.inc.c @@ -8,7 +8,7 @@ void bhv_heave_ho_throw_mario_loop(void) { o->oParentRelativePosY = -50.0f; o->oParentRelativePosZ = 0.0f; o->oMoveAngleYaw = o->parentObj->oMoveAngleYaw; - switch (o->parentObj->oHeaveHoUnk88) { + switch (o->parentObj->oHeaveHoThrowState) { case 0: break; case 1: @@ -18,7 +18,7 @@ void bhv_heave_ho_throw_mario_loop(void) { gMarioObject->oInteractStatus |= INT_STATUS_MARIO_UNK2; gMarioStates[0].forwardVel = -45.0f; gMarioStates[0].vel[1] = 95.0f; - o->parentObj->oHeaveHoUnk88 = 0; + o->parentObj->oHeaveHoThrowState = 0; break; } } @@ -46,23 +46,23 @@ void heave_ho_act_2(void) { if (1000.0f < cur_obj_lateral_dist_from_mario_to_home()) o->oAngleToMario = cur_obj_angle_to_home(); if (o->oTimer > 150) { - o->oHeaveHoUnkF4 = (302 - o->oTimer) / 152.0f; - if (o->oHeaveHoUnkF4 < 0.1) { - o->oHeaveHoUnkF4 = 0.1; + o->oHeaveHoTimedSpeed = (302 - o->oTimer) / 152.0f; + if (o->oHeaveHoTimedSpeed < 0.1) { + o->oHeaveHoTimedSpeed = 0.1; o->oAction = 1; } } else - o->oHeaveHoUnkF4 = 1.0f; - cur_obj_init_animation_with_accel_and_sound(0, o->oHeaveHoUnkF4); - o->oForwardVel = o->oHeaveHoUnkF4 * 10.0f; - angleVel = o->oHeaveHoUnkF4 * 0x400; + o->oHeaveHoTimedSpeed = 1.0f; + cur_obj_init_animation_with_accel_and_sound(0, o->oHeaveHoTimedSpeed); + o->oForwardVel = o->oHeaveHoTimedSpeed * 10.0f; + angleVel = o->oHeaveHoTimedSpeed * 0x400; o->oMoveAngleYaw = approach_s16_symmetric(o->oMoveAngleYaw, o->oAngleToMario, angleVel); } void heave_ho_act_3(void) { o->oForwardVel = 0.0f; if (o->oTimer == 0) - o->oHeaveHoUnk88 = 2; + o->oHeaveHoThrowState = 2; if (o->oTimer == 1) { cur_obj_init_animation_with_accel_and_sound(1, 1.0f); o->numCollidedObjs = 20; @@ -99,7 +99,7 @@ void heave_ho_move(void) { o->oAction = 0; if (o->oInteractStatus & INT_STATUS_GRABBED_MARIO) { o->oInteractStatus = 0; - o->oHeaveHoUnk88 = 1; + o->oHeaveHoThrowState = 1; o->oAction = 3; } } diff --git a/src/game/behaviors/intro_lakitu.inc.c b/src/game/behaviors/intro_lakitu.inc.c index 963064f84..275baffd8 100644 --- a/src/game/behaviors/intro_lakitu.inc.c +++ b/src/game/behaviors/intro_lakitu.inc.c @@ -124,10 +124,10 @@ void bhv_intro_lakitu_loop(void) { if (gCutsceneTimer > 720) { #endif gCurrentObject->oAction += 1; - gCurrentObject->oIntroLakituUnk100 = 1400.f; - gCurrentObject->oIntroLakituUnk104 = -4096.f; - gCurrentObject->oIntroLakituUnk108 = 2048.f; - gCurrentObject->oIntroLakituUnk10C = -200.f; + gCurrentObject->oIntroLakituDistToBirdsX = 1400.f; + gCurrentObject->oIntroLakituDistToBirdsZ = -4096.f; + gCurrentObject->oIntroLakituEndBirds1DestZ = 2048.f; + gCurrentObject->oIntroLakituEndBirds1DestY = -200.f; gCurrentObject->oMoveAngleYaw = 0x8000; gCurrentObject->oFaceAngleYaw = gCurrentObject->oMoveAngleYaw + 0x4000; gCurrentObject->oMoveAnglePitch = 0x800; @@ -139,20 +139,20 @@ void bhv_intro_lakitu_loop(void) { cur_obj_play_sound_1(SOUND_AIR_LAKITU_FLY_HIGHPRIO); vec3f_set(fromPoint, -1128.f, 560.f, 4664.f); gCurrentObject->oMoveAngleYaw += 0x200; - gCurrentObject->oIntroLakituUnk100 = - approach_f32_asymptotic(gCurrentObject->oIntroLakituUnk100, 100.f, 0.03f); + gCurrentObject->oIntroLakituDistToBirdsX = + approach_f32_asymptotic(gCurrentObject->oIntroLakituDistToBirdsX, 100.f, 0.03f); gCurrentObject->oFaceAnglePitch = atan2s(200.f, gCurrentObject->oPosY - 400.f); gCurrentObject->oFaceAngleYaw = approach_s16_asymptotic( gCurrentObject->oFaceAngleYaw, gCurrentObject->oMoveAngleYaw + 0x8000, 4); - vec3f_set_dist_and_angle(fromPoint, toPoint, gCurrentObject->oIntroLakituUnk100, 0, + vec3f_set_dist_and_angle(fromPoint, toPoint, gCurrentObject->oIntroLakituDistToBirdsX, 0, gCurrentObject->oMoveAngleYaw); - toPoint[1] += 150.f * coss((s16) gCurrentObject->oIntroLakituUnk104); - gCurrentObject->oIntroLakituUnk104 += gCurrentObject->oIntroLakituUnk108; - gCurrentObject->oIntroLakituUnk108 = - approach_f32_asymptotic(gCurrentObject->oIntroLakituUnk108, 512.f, 0.05f); - toPoint[0] += gCurrentObject->oIntroLakituUnk10C; - gCurrentObject->oIntroLakituUnk10C = - approach_f32_asymptotic(gCurrentObject->oIntroLakituUnk10C, 0.f, 0.05f); + toPoint[1] += 150.f * coss((s16) gCurrentObject->oIntroLakituDistToBirdsZ); + gCurrentObject->oIntroLakituDistToBirdsZ += gCurrentObject->oIntroLakituEndBirds1DestZ; + gCurrentObject->oIntroLakituEndBirds1DestZ = + approach_f32_asymptotic(gCurrentObject->oIntroLakituEndBirds1DestZ, 512.f, 0.05f); + toPoint[0] += gCurrentObject->oIntroLakituEndBirds1DestY; + gCurrentObject->oIntroLakituEndBirds1DestY = + approach_f32_asymptotic(gCurrentObject->oIntroLakituEndBirds1DestY, 0.f, 0.05f); vec3f_to_object_pos(gCurrentObject, toPoint); if (gCurrentObject->oTimer == 31) { diff --git a/src/game/behaviors/intro_scene.inc.c b/src/game/behaviors/intro_scene.inc.c index 6b1136f98..2cf1f5eeb 100644 --- a/src/game/behaviors/intro_scene.inc.c +++ b/src/game/behaviors/intro_scene.inc.c @@ -6,7 +6,7 @@ void spawn_child_obj_relative(struct Object *parent, s16 xOffset, s16 yOffset, s struct Object *obj = spawn_object(parent, model, behavior); obj->header.gfx.animInfo.animFrame = random_float() * 6.f; - obj->oEndBirdUnk104 = sCutsceneVars[9].point[0]; + obj->oEndBirdCutsceneVars9PointX = sCutsceneVars[9].point[0]; sCutsceneVars[9].point[0] += 1.f; obj->oPosX += xOffset; obj->oPosY += yOffset; diff --git a/src/game/behaviors/jrb_ship.inc.c b/src/game/behaviors/jrb_ship.inc.c index 1d5fc2dbc..43ad25b7b 100644 --- a/src/game/behaviors/jrb_ship.inc.c +++ b/src/game/behaviors/jrb_ship.inc.c @@ -24,9 +24,9 @@ void bhv_ship_part_3_loop(void) { s16 initialPitch = o->oFaceAnglePitch; s16 initialRoll = o->oFaceAngleRoll; cur_obj_set_pos_to_home_with_debug(); - o->oShipPart3UnkF4 += 0x100; - o->oFaceAnglePitch = sins(o->oShipPart3UnkF4) * 1024.0f; - o->oFaceAngleRoll = sins(o->oShipPart3UnkF8) * 1024.0f; + o->oShipPart3LoopPitch += 0x100; + o->oFaceAnglePitch = sins(o->oShipPart3LoopPitch) * 1024.0f; + o->oFaceAngleRoll = sins(o->oShipPart3LoopRoll) * 1024.0f; o->oAngleVelPitch = o->oFaceAnglePitch - initialPitch; o->oAngleVelRoll = o->oFaceAngleRoll - initialRoll; if (gMarioObject->oPosY > 1000.0f) @@ -39,16 +39,16 @@ void bhv_jrb_sliding_box_loop(void) { Vec3f shipToBoxPos2; Vec3s shipRotation; struct Object *shipObj; - if (o->oJrbSlidingBoxUnkF4 == NULL) { + if (o->oJrbSlidingBoxShipObj == NULL) { shipObj = cur_obj_nearest_object_with_behavior(bhvInSunkenShip3); if (shipObj != NULL) { - o->oJrbSlidingBoxUnkF4 = shipObj; + o->oJrbSlidingBoxShipObj = shipObj; o->oParentRelativePosX = o->oPosX - shipObj->oPosX; o->oParentRelativePosY = o->oPosY - shipObj->oPosY; o->oParentRelativePosZ = o->oPosZ - shipObj->oPosZ; } } else { - shipObj = o->oJrbSlidingBoxUnkF4; + shipObj = o->oJrbSlidingBoxShipObj; shipRotation[0] = shipObj->oFaceAnglePitch; shipRotation[1] = shipObj->oFaceAngleYaw; shipRotation[2] = shipObj->oFaceAngleRoll; @@ -62,14 +62,14 @@ void bhv_jrb_sliding_box_loop(void) { o->oPosZ = shipObj->oPosZ + shipToBoxPos2[2]; o->oFaceAnglePitch = shipObj->oFaceAnglePitch; } - o->oJrbSlidingBoxUnkFC = sins(o->oJrbSlidingBoxUnkF8) * 20.0f; - o->oJrbSlidingBoxUnkF8 += 0x100; - o->oParentRelativePosZ += o->oJrbSlidingBoxUnkFC; + o->oJrbSlidingBoxAdditiveZ = sins(o->oJrbSlidingBoxAngle) * 20.0f; + o->oJrbSlidingBoxAngle += 0x100; + o->oParentRelativePosZ += o->oJrbSlidingBoxAdditiveZ; if (gMarioObject->oPosY > 1000.0f) - if (absf(o->oJrbSlidingBoxUnkFC) > 3.0f) + if (absf(o->oJrbSlidingBoxAdditiveZ) > 3.0f) cur_obj_play_sound_1(SOUND_AIR_ROUGH_SLIDE); obj_set_hitbox(o, &sSkullSlidingBoxHitbox); - if (!(o->oJrbSlidingBoxUnkF8 & 0x7FFF)) + if (!(o->oJrbSlidingBoxAngle & 0x7FFF)) cur_obj_become_tangible(); if (obj_check_if_collided_with_object(o, gMarioObject)) { o->oInteractStatus = 0; diff --git a/src/game/behaviors/jumping_box.inc.c b/src/game/behaviors/jumping_box.inc.c index 5c86169d9..90b5b9a18 100644 --- a/src/game/behaviors/jumping_box.inc.c +++ b/src/game/behaviors/jumping_box.inc.c @@ -14,15 +14,15 @@ struct ObjectHitbox sJumpingBoxHitbox = { void jumping_box_act_0(void) { if (o->oSubAction == 0) { - if (o->oJumpingBoxUnkF8-- < 0) + if (o->oJumpingBoxRandomTimer-- < 0) o->oSubAction++; - if (o->oTimer > o->oJumpingBoxUnkF4) { + if (o->oTimer > o->oJumpingBoxUnusedTimerMin) { o->oVelY = random_float() * 5.0f + 15.0f; o->oSubAction++; } } else if (o->oMoveFlags & OBJ_MOVE_ON_GROUND) { o->oSubAction = 0; - o->oJumpingBoxUnkF8 = random_float() * 60.0f + 30.0f; + o->oJumpingBoxRandomTimer = random_float() * 60.0f + 30.0f; } } diff --git a/src/game/behaviors/kickable_board.inc.c b/src/game/behaviors/kickable_board.inc.c index 2821debcb..a0cfa5f1b 100644 --- a/src/game/behaviors/kickable_board.inc.c +++ b/src/game/behaviors/kickable_board.inc.c @@ -21,8 +21,8 @@ s32 check_mario_attacking(void) { } void init_kickable_board_rock(void) { - o->oKickableBoardF8 = 1600; - o->oKickableBoardF4 = 0; + o->oKickableBoardRockingTimer = 1600; + o->oKickableBoardRockingAngleAmount = 0; } void bhv_kickable_board_loop(void) { @@ -39,7 +39,7 @@ void bhv_kickable_board_loop(void) { case 1: o->oFaceAnglePitch = 0; load_object_collision_model(); - o->oFaceAnglePitch = -sins(o->oKickableBoardF4) * o->oKickableBoardF8; + o->oFaceAnglePitch = -sins(o->oKickableBoardRockingAngleAmount) * o->oKickableBoardRockingTimer; if (o->oTimer > 30 && (attackValue = check_mario_attacking())) { if (gMarioObject->oPosY > o->oPosY + 160.0f && attackValue == 2) { o->oAction++; @@ -48,14 +48,14 @@ void bhv_kickable_board_loop(void) { o->oTimer = 0; } if (o->oTimer != 0) { - o->oKickableBoardF8 -= 8; - if (o->oKickableBoardF8 < 0) + o->oKickableBoardRockingTimer -= 8; + if (o->oKickableBoardRockingTimer < 0) o->oAction = 0; } else init_kickable_board_rock(); - if (!(o->oKickableBoardF4 & 0x7FFF)) + if (!(o->oKickableBoardRockingAngleAmount & 0x7FFF)) cur_obj_play_sound_2(SOUND_GENERAL_BUTTON_PRESS_2); - o->oKickableBoardF4 += 0x400; + o->oKickableBoardRockingAngleAmount += 0x400; break; case 2: cur_obj_become_intangible(); diff --git a/src/game/behaviors/king_bobomb.inc.c b/src/game/behaviors/king_bobomb.inc.c index 4718477ea..beb404620 100644 --- a/src/game/behaviors/king_bobomb.inc.c +++ b/src/game/behaviors/king_bobomb.inc.c @@ -56,23 +56,23 @@ void king_bobomb_act_2(void) { o->oAction = 5; cur_obj_become_intangible(); } - if (o->oKingBobombUnk100 == 0) { + if (o->oKingBobombShouldStomp == 0) { if (cur_obj_check_anim_frame(15)) cur_obj_shake_screen(SHAKE_POS_SMALL); if (cur_obj_init_animation_and_check_if_near_end(4)) - o->oKingBobombUnk100++; + o->oKingBobombShouldStomp++; } else { - if (o->oKingBobombUnk100 == 1) { + if (o->oKingBobombShouldStomp == 1) { cur_obj_init_animation_and_anim_frame(11, 7); - o->oKingBobombUnk100 = 2; + o->oKingBobombShouldStomp = 2; } else cur_obj_init_animation_with_sound(11); - if (o->oKingBobombUnk108 == 0) { + if (o->oKingBobombPlayerGrabEscapeCooldown == 0) { o->oForwardVel = 3.0f; cur_obj_rotate_yaw_toward(o->oAngleToMario, 0x100); } else { o->oForwardVel = 0.0f; - o->oKingBobombUnk108--; + o->oKingBobombPlayerGrabEscapeCooldown--; } } if (cur_obj_check_grabbed_mario()) @@ -86,8 +86,8 @@ void king_bobomb_act_2(void) { void king_bobomb_act_3(void) { if (o->oSubAction == 0) { o->oForwardVel = 0; - o->oKingBobombUnk104 = 0; - o->oKingBobombUnkFC = 0; + o->oKingBobombStationaryTimer = 0; + o->oKingBobombPlayerGrabEscapeActions = 0; if (o->oTimer == 0) cur_obj_play_sound_2(SOUND_OBJ_UNKNOWN3); if (cur_obj_init_animation_and_check_if_near_end(0)) { @@ -97,25 +97,25 @@ void king_bobomb_act_3(void) { } else { if (o->oSubAction == 1) { cur_obj_init_animation_with_sound(1); - o->oKingBobombUnkFC += player_performed_grab_escape_action(); - print_debug_bottom_up("%d", o->oKingBobombUnkFC); - if (o->oKingBobombUnkFC > 10) { - o->oKingBobombUnk88 = 3; + o->oKingBobombPlayerGrabEscapeActions += player_performed_grab_escape_action(); + print_debug_bottom_up("%d", o->oKingBobombPlayerGrabEscapeActions); + if (o->oKingBobombPlayerGrabEscapeActions > 10) { + o->oKingBobombHoldingMarioState = 3; o->oAction = 2; - o->oKingBobombUnk108 = 35; + o->oKingBobombPlayerGrabEscapeCooldown = 35; o->oInteractStatus &= ~(INT_STATUS_GRABBED_MARIO); } else { o->oForwardVel = 3.0f; - if (o->oKingBobombUnk104 > 20 && cur_obj_rotate_yaw_toward(0, 0x400)) { + if (o->oKingBobombStationaryTimer > 20 && cur_obj_rotate_yaw_toward(0, 0x400)) { o->oSubAction++; cur_obj_init_animation_and_anim_frame(9, 22); } } - o->oKingBobombUnk104++; + o->oKingBobombStationaryTimer++; } else { cur_obj_init_animation_with_sound(9); if (cur_obj_check_anim_frame(31)) { - o->oKingBobombUnk88 = 2; + o->oKingBobombHoldingMarioState = 2; cur_obj_play_sound_2(SOUND_OBJ_UNKNOWN4); } else if (cur_obj_check_if_near_animation_end()) { o->oAction = 1; @@ -141,7 +141,7 @@ void king_bobomb_act_1(void) { void king_bobomb_act_6(void) { if (o->oSubAction == 0) { if (o->oTimer == 0) { - o->oKingBobombUnk104 = 0; + o->oKingBobombStationaryTimer = 0; cur_obj_play_sound_2(SOUND_OBJ_KING_BOBOMB); cur_obj_play_sound_2(SOUND_OBJ2_KING_BOBOMB_DAMAGE); cur_obj_shake_screen(SHAKE_POS_SMALL); @@ -150,8 +150,8 @@ void king_bobomb_act_6(void) { cur_obj_become_tangible(); } if (cur_obj_init_animation_and_check_if_near_end(2)) - o->oKingBobombUnk104++; - if (o->oKingBobombUnk104 > 3) { + o->oKingBobombStationaryTimer++; + if (o->oKingBobombStationaryTimer > 3) { o->oSubAction++; } } else { @@ -227,7 +227,7 @@ void king_bobomb_act_5(void) { // bobomb returns home case 0: if (o->oTimer == 0) cur_obj_play_sound_2(SOUND_OBJ_KING_BOBOMB_JUMP); - o->oKingBobombUnkF8 = 1; + o->oKingBobombIsJumping = 1; cur_obj_init_animation_and_extend_if_at_end(8); o->oMoveAngleYaw = cur_obj_angle_to_home(); if (o->oPosY < o->oHomeY) @@ -244,7 +244,7 @@ void king_bobomb_act_5(void) { // bobomb returns home o->oVelY = 0; o->oForwardVel = 0; o->oGravity = -4.0f; - o->oKingBobombUnkF8 = 0; + o->oKingBobombIsJumping = 0; cur_obj_init_animation_with_sound(7); cur_obj_play_sound_2(SOUND_OBJ_KING_BOBOMB); cur_obj_shake_screen(SHAKE_POS_SMALL); @@ -292,7 +292,7 @@ struct SoundState sKingBobombSoundStates[] = { void king_bobomb_move(void) { cur_obj_update_floor_and_walls(); - if (o->oKingBobombUnkF8 == 0) + if (o->oKingBobombIsJumping == 0) cur_obj_move_standard(-78); else cur_obj_move_using_fvel_and_gravity(); diff --git a/src/game/behaviors/klepto.inc.c b/src/game/behaviors/klepto.inc.c index 1a5768a5f..e0ff9830d 100644 --- a/src/game/behaviors/klepto.inc.c +++ b/src/game/behaviors/klepto.inc.c @@ -20,9 +20,9 @@ static u8 sKleptoAttackHandlers[] = { 2, 2, 5, 5, 2, 2 }; static void klepto_target_mario(void) { o->oKleptoDistanceToTarget = lateral_dist_between_objects(gMarioObject, o); - o->oKleptoUnk1B0 = obj_turn_pitch_toward_mario(250.0f, 0); + o->oKleptoPitchToTarget = obj_turn_pitch_toward_mario(250.0f, 0); o->oKleptoYawToTarget = o->oAngleToMario; - o->oKleptoUnk1AE = -60; + o->oKleptoDiveTimer = -60; } static s32 klepto_set_and_check_if_anim_at_end(void) { @@ -44,28 +44,28 @@ static s32 klepto_set_and_check_if_anim_at_end(void) { } static void klepto_anim_dive(void) { - if (o->oKleptoUnk1AE > 0) { - if (o->oKleptoUnk1B0 < -400) { - o->oKleptoUnk1AE = 0; + if (o->oKleptoDiveTimer > 0) { + if (o->oKleptoPitchToTarget < -400) { + o->oKleptoDiveTimer = 0; } else { if (o->oSoundStateID == 0) { if (cur_obj_check_anim_frame(9)) { cur_obj_play_sound_2(SOUND_GENERAL_SWISH_WATER); cur_obj_init_animation_with_sound(6); } - } else if (--o->oKleptoUnk1AE == 0) { - o->oKleptoUnk1AE = -random_linear_offset(60, 60); + } else if (--o->oKleptoDiveTimer == 0) { + o->oKleptoDiveTimer = -random_linear_offset(60, 60); } obj_move_pitch_approach(400, 10); } } else { - obj_move_pitch_approach(o->oKleptoUnk1B0, 600); + obj_move_pitch_approach(o->oKleptoPitchToTarget, 600); if (klepto_set_and_check_if_anim_at_end() != 0) { - if (o->oKleptoUnk1AE != 0) { - o->oKleptoUnk1AE += 1; - } else if (o->oKleptoUnk1B0 > -100) { - o->oKleptoUnk1AE = random_linear_offset(60, 60); + if (o->oKleptoDiveTimer != 0) { + o->oKleptoDiveTimer += 1; + } else if (o->oKleptoPitchToTarget > -100) { + o->oKleptoDiveTimer = random_linear_offset(60, 60); } } } @@ -114,14 +114,14 @@ static void klepto_change_target(void) { newTarget = random_u16() % 3; } - o->oKleptoUnkF8 = 400 * absi(newTarget - o->oKleptoTargetNumber); + o->oKleptoHomeYOffset = 400 * absi(newTarget - o->oKleptoTargetNumber); o->oKleptoTargetNumber = newTarget; o->oHomeX = sKleptoTargetPositions[o->oKleptoTargetNumber][0]; - o->oHomeY = sKleptoTargetPositions[o->oKleptoTargetNumber][1] + o->oKleptoUnkF8; + o->oHomeY = sKleptoTargetPositions[o->oKleptoTargetNumber][1] + o->oKleptoHomeYOffset; o->oHomeZ = sKleptoTargetPositions[o->oKleptoTargetNumber][2]; - o->oKleptoUnkFC = cur_obj_lateral_dist_to_home() / 2; + o->oKleptoHalfLateralDistToHome = cur_obj_lateral_dist_to_home() / 2; } static void klepto_circle_target(f32 radius, f32 targetSpeed) { @@ -163,9 +163,9 @@ static void klepto_approach_target(f32 targetSpeed) { if (o->oKleptoDistanceToTarget < 1800.0f) { o->oAction = KLEPTO_ACT_CIRCLE_TARGET_HOLDING; } else { - if (o->oKleptoUnkFC > 0.0f) { - if ((o->oKleptoUnkFC -= o->oForwardVel) <= 0.0f) { - o->oHomeY -= o->oKleptoUnkF8; + if (o->oKleptoHalfLateralDistToHome > 0.0f) { + if ((o->oKleptoHalfLateralDistToHome -= o->oForwardVel) <= 0.0f) { + o->oHomeY -= o->oKleptoHomeYOffset; } } @@ -191,7 +191,7 @@ static void klepto_act_turn_toward_mario(void) { klepto_target_mario(); if (klepto_set_and_check_if_anim_at_end() && cur_obj_check_if_at_animation_end() && o->oKleptoDistanceToTarget > 800.0f - && abs_angle_diff(o->oAngleToMario, o->oFaceAngleYaw) < 0x800 && o->oKleptoUnk1B0 < 0x400) { + && abs_angle_diff(o->oAngleToMario, o->oFaceAngleYaw) < 0x800 && o->oKleptoPitchToTarget < 0x400) { cur_obj_play_sound_2(SOUND_OBJ_KLEPTO1); o->oAction = KLEPTO_ACT_DIVE_AT_MARIO; o->oMoveAngleYaw = o->oFaceAngleYaw; @@ -227,10 +227,10 @@ static void klepto_act_dive_at_mario(void) { cur_obj_init_animation_with_sound(2); } - o->oKleptoUnk1B0 = -0x3000; + o->oKleptoPitchToTarget = -0x3000; if (o->oAnimState == KLEPTO_ANIM_STATE_HOLDING_NOTHING) { if (o->oSubAction == 0) { - o->oKleptoUnk1B0 = obj_turn_pitch_toward_mario(0.0f, 0); + o->oKleptoPitchToTarget = obj_turn_pitch_toward_mario(0.0f, 0); o->oKleptoYawToTarget = o->oAngleToMario; if (dy < 160.0f) { @@ -248,7 +248,7 @@ static void klepto_act_dive_at_mario(void) { } } - obj_move_pitch_approach(o->oKleptoUnk1B0, 600); + obj_move_pitch_approach(o->oKleptoPitchToTarget, 600); obj_face_pitch_approach(o->oMoveAnglePitch, 600); obj_rotate_yaw_and_bounce_off_walls(o->oKleptoYawToTarget, 600); } @@ -277,7 +277,7 @@ static void klepto_act_retreat(void) { cur_obj_init_animation_with_sound(0); approach_f32_ptr(&o->oKleptoSpeed, 40.0f, 10.0f); - obj_move_pitch_approach(o->oKleptoUnk1B0, 1000); + obj_move_pitch_approach(o->oKleptoPitchToTarget, 1000); obj_face_pitch_approach(o->oMoveAnglePitch, 1000); obj_rotate_yaw_and_bounce_off_walls(o->oKleptoYawToTarget, 600); @@ -286,7 +286,7 @@ static void klepto_act_retreat(void) { if (abs_angle_diff(o->oFaceAnglePitch, o->oMoveAnglePitch) == 0) { o->oAction = KLEPTO_ACT_RESET_POSITION; o->oHomeY = 1500.0f; - o->oKleptoUnk1AE = -100; + o->oKleptoDiveTimer = -100; o->oFlags |= OBJ_FLAG_SET_FACE_YAW_TO_MOVE_YAW; cur_obj_become_tangible(); } @@ -324,7 +324,7 @@ void bhv_klepto_update(void) { cur_obj_update_floor_and_walls(); o->oKleptoDistanceToTarget = cur_obj_lateral_dist_to_home(); - o->oKleptoUnk1B0 = obj_get_pitch_to_home(o->oKleptoDistanceToTarget); + o->oKleptoPitchToTarget = obj_get_pitch_to_home(o->oKleptoDistanceToTarget); o->oKleptoYawToTarget = cur_obj_angle_to_home(); if (o->oAction == KLEPTO_ACT_STRUCK_BY_MARIO) { diff --git a/src/game/behaviors/koopa_shell.inc.c b/src/game/behaviors/koopa_shell.inc.c index a7c7071ea..4a790de95 100644 --- a/src/game/behaviors/koopa_shell.inc.c +++ b/src/game/behaviors/koopa_shell.inc.c @@ -30,14 +30,14 @@ void bhv_koopa_shell_flame_loop(void) { o->oGravity = -4.0f; o->oAnimState = random_float() * 10.0f; obj_translate_xz_random(o, 110.0f); - o->oKoopaShellFlameUnkF8 = 4.0f; + o->oKoopaShellFlameScale = 4.0f; } cur_obj_update_floor_height(); cur_obj_move_using_fvel_and_gravity(); if (o->oFloorHeight > o->oPosY || o->oTimer > 10) obj_mark_for_deletion(o); - o->oKoopaShellFlameUnkF8 += -0.3; - cur_obj_scale(o->oKoopaShellFlameUnkF8); + o->oKoopaShellFlameScale += -0.3; + cur_obj_scale(o->oKoopaShellFlameScale); } void bhv_koopa_shell_flame_spawn(void) { diff --git a/src/game/behaviors/lll_octagonal_rotating_mesh.inc.c b/src/game/behaviors/lll_octagonal_rotating_mesh.inc.c index 8070da3dc..97df3a20f 100644 --- a/src/game/behaviors/lll_octagonal_rotating_mesh.inc.c +++ b/src/game/behaviors/lll_octagonal_rotating_mesh.inc.c @@ -105,9 +105,9 @@ void bhv_lll_moving_octagonal_mesh_platform_loop(void) { lll_octagonal_mesh_move(gLllOctagonalMeshActionList[o->oBehParams2ndByte], o->oLllOctMeshActionOffset); print_debug_top_down_objectinfo("number %d\n", o->oLllOctMeshActionOffset); cur_obj_move_using_fvel_and_gravity(); - if (lll_octagonal_mesh_find_y_offset(&o->oLllOctMeshStandTimer, &o->oLllOctMeshWaveOffset2, 0x400, -80)) { + if (lll_octagonal_mesh_find_y_offset(&o->oLllOctMeshStandTimer, &o->oLllOctMeshYOffsetFromHome, 0x400, -80)) { o->oLllOctMeshWaveTimer += 0x800; - o->oLllOctMeshWaveOffset1 -= sins(o->oLllOctMeshWaveTimer) * 2; + o->oLllOctMeshWaveYOffset -= sins(o->oLllOctMeshWaveTimer) * 2; } - o->oPosY = o->oLllOctMeshWaveOffset1 + o->oHomeY + o->oLllOctMeshWaveOffset2; + o->oPosY = o->oLllOctMeshWaveYOffset + o->oHomeY + o->oLllOctMeshYOffsetFromHome; } diff --git a/src/game/behaviors/lll_rotating_hex_flame.inc.c b/src/game/behaviors/lll_rotating_hex_flame.inc.c index 0284a538c..668a3a8d0 100644 --- a/src/game/behaviors/lll_rotating_hex_flame.inc.c +++ b/src/game/behaviors/lll_rotating_hex_flame.inc.c @@ -1,9 +1,9 @@ // lll_rotating_hex_flame.c.inc void bhv_lll_rotating_hex_flame_loop(void) { - f32 relPosX = o->oLllRotatingHexFlameUnkF4; - f32 relPosY = o->oLllRotatingHexFlameUnkF8; - f32 relPosZ = o->oLllRotatingHexFlameUnkFC; + f32 relPosX = o->oLllRotatingHexFlameRelativePosX; + f32 relPosY = o->oLllRotatingHexFlameRelativePosY; + f32 relPosZ = o->oLllRotatingHexFlameRelativePosZ; cur_obj_set_pos_relative(o->parentObj, relPosX, relPosY, relPosZ); o->oPosY = o->parentObj->oPosY + 100.0f; if (o->parentObj->oAction == 3) @@ -18,9 +18,9 @@ void fire_bar_spawn_flames(s16 yaw) { s32 amt = (o->oBehParams2ndByte == 0) ? 4 : 3; for (i = 0; i < amt; i++) { flameObj = spawn_object(o, MODEL_RED_FLAME, bhvLllRotatingHexFlame); - flameObj->oLllRotatingHexFlameUnkF4 += xOffset; - flameObj->oLllRotatingHexFlameUnkF8 = o->oPosY - 200.0f; - flameObj->oLllRotatingHexFlameUnkFC += zOffset; + flameObj->oLllRotatingHexFlameRelativePosX += xOffset; + flameObj->oLllRotatingHexFlameRelativePosY = o->oPosY - 200.0f; + flameObj->oLllRotatingHexFlameRelativePosZ += zOffset; obj_scale_xyz(flameObj, 6.0f, 6.0f, 6.0f); xOffset += sins(yaw) * 150.0f; zOffset += coss(yaw) * 150.0f; diff --git a/src/game/behaviors/lll_sinking_rock_block.inc.c b/src/game/behaviors/lll_sinking_rock_block.inc.c index 056d0aaa6..cb014c3e4 100644 --- a/src/game/behaviors/lll_sinking_rock_block.inc.c +++ b/src/game/behaviors/lll_sinking_rock_block.inc.c @@ -1,7 +1,7 @@ // lll_sinking_rock_block.c.inc void bhv_lll_sinking_rock_block_loop(void) { - lll_octagonal_mesh_find_y_offset(&o->oSinkWhenSteppedOnUnk104, &o->oSinkWhenSteppedOnUnk108, 124, -110); + lll_octagonal_mesh_find_y_offset(&o->oSinkWhenSteppedOnTimer, &o->oSinkWhenSteppedOnYOffsetFromHome, 124, -110); o->oGraphYOffset = 0.0f; - o->oPosY = o->oHomeY + o->oSinkWhenSteppedOnUnk108; + o->oPosY = o->oHomeY + o->oSinkWhenSteppedOnYOffsetFromHome; } diff --git a/src/game/behaviors/mr_i.inc.c b/src/game/behaviors/mr_i.inc.c index 507bf1f66..e100756b3 100644 --- a/src/game/behaviors/mr_i.inc.c +++ b/src/game/behaviors/mr_i.inc.c @@ -56,12 +56,12 @@ void bhv_mr_i_body_loop(void) { o->oFaceAnglePitch = o->oMoveAnglePitch; o->oGraphYOffset = o->header.gfx.scale[1] * 100.f; } - if (o->parentObj->oMrIUnk110 != 1) + if (o->parentObj->oMrIBlinking != 1) o->oAnimState = -1; else { o->oAnimState++; if (o->oAnimState == 15) - o->parentObj->oMrIUnk110 = 0; + o->parentObj->oMrIBlinking = 0; } if (o->parentObj->activeFlags == ACTIVE_FLAG_DEACTIVATED) obj_mark_for_deletion(o); @@ -78,7 +78,7 @@ void mr_i_act_3(void) { scaleModifier = 2.0f; else scaleModifier = 1.0f; - if (o->oMrIUnk100 < 0) + if (o->oMrISpinDirection < 0) direction = 0x1000; else direction = -0x1000; @@ -126,53 +126,53 @@ void mr_i_act_2(void) { s16 startYaw = o->oMoveAngleYaw; if (o->oTimer == 0) { if (o->oBehParams2ndByte) - o->oMrIUnkF4 = 200; + o->oMrISpinAngle = 200; else - o->oMrIUnkF4 = 120; - o->oMrIUnkFC = 0; - o->oMrIUnk100 = 0; - o->oMrIUnk104 = 0; + o->oMrISpinAngle = 120; + o->oMrISpinAmount = 0; + o->oMrISpinDirection = 0; + o->oMrIParticleTimer = 0; } obj_turn_toward_object(o, gMarioObject, 0x10, 0x800); obj_turn_toward_object(o, gMarioObject, 0x0F, 0x400); dYaw = startYaw - (s16)(o->oMoveAngleYaw); if (!dYaw) { - o->oMrIUnkFC = 0; - o->oMrIUnk100 = 0; + o->oMrISpinAmount = 0; + o->oMrISpinDirection = 0; } else if (dYaw > 0) { - if (o->oMrIUnk100 > 0) - o->oMrIUnkFC += dYaw; + if (o->oMrISpinDirection > 0) + o->oMrISpinAmount += dYaw; else - o->oMrIUnkFC = 0; - o->oMrIUnk100 = 1; + o->oMrISpinAmount = 0; + o->oMrISpinDirection = 1; } else { - if (o->oMrIUnk100 < 0) - o->oMrIUnkFC -= dYaw; + if (o->oMrISpinDirection < 0) + o->oMrISpinAmount -= dYaw; else - o->oMrIUnkFC = 0; - o->oMrIUnk100 = -1; + o->oMrISpinAmount = 0; + o->oMrISpinDirection = -1; } - if (!o->oMrIUnkFC) - o->oMrIUnkF4 = 120; - if (o->oMrIUnkFC > 1 << 16) + if (!o->oMrISpinAmount) + o->oMrISpinAngle = 120; + if (o->oMrISpinAmount > 1 << 16) o->oAction = 3; - o->oMrIUnkF4 -= 1; - if (!o->oMrIUnkF4) { - o->oMrIUnkF4 = 120; - o->oMrIUnkFC = 0; + o->oMrISpinAngle -= 1; + if (!o->oMrISpinAngle) { + o->oMrISpinAngle = 120; + o->oMrISpinAmount = 0; } - if (o->oMrIUnkFC < 5000) { - if (o->oMrIUnk104 == o->oMrIUnk108) - o->oMrIUnk110 = 1; - if (o->oMrIUnk104 == o->oMrIUnk108 + 20) { + if (o->oMrISpinAmount < 5000) { + if (o->oMrIParticleTimer == o->oMrIParticleTimerTarget) + o->oMrIBlinking = 1; + if (o->oMrIParticleTimer == o->oMrIParticleTimerTarget + 20) { spawn_mr_i_particle(); - o->oMrIUnk104 = 0; - o->oMrIUnk108 = (s32)(random_float() * 50.0f + 50.0f); + o->oMrIParticleTimer = 0; + o->oMrIParticleTimerTarget = (s32)(random_float() * 50.0f + 50.0f); } - o->oMrIUnk104++; + o->oMrIParticleTimer++; } else { - o->oMrIUnk104 = 0; - o->oMrIUnk108 = (s32)(random_float() * 50.0f + 50.0f); + o->oMrIParticleTimer = 0; + o->oMrIParticleTimerTarget = (s32)(random_float() * 50.0f + 50.0f); } if (o->oDistanceToMario > 800.0f) o->oAction = 1; @@ -185,9 +185,9 @@ void mr_i_act_1(void) { if (o->oTimer == 0) { cur_obj_become_tangible(); o->oMoveAnglePitch = 0; - o->oMrIUnk104 = 30; - o->oMrIUnk108 = random_float() * 20.0f; - if (o->oMrIUnk108 & 1) + o->oMrIParticleTimer = 30; + o->oMrIParticleTimerTarget = random_float() * 20.0f; + if (o->oMrIParticleTimerTarget & 1) o->oAngleVelYaw = -256; else o->oAngleVelYaw = 256; @@ -196,16 +196,16 @@ void mr_i_act_1(void) { if (o->oDistanceToMario < 700.0f) o->oAction = 2; else - o->oMrIUnk104++; + o->oMrIParticleTimer++; } else { o->oMoveAngleYaw += o->oAngleVelYaw; - o->oMrIUnk104 = 30; + o->oMrIParticleTimer = 30; } - if (o->oMrIUnk104 == o->oMrIUnk108 + 60) - o->oMrIUnk110 = 1; - if (o->oMrIUnk108 + 80 < o->oMrIUnk104) { - o->oMrIUnk104 = 0; - o->oMrIUnk108 = random_float() * 80.0f; + if (o->oMrIParticleTimer == o->oMrIParticleTimerTarget + 60) + o->oMrIBlinking = 1; + if (o->oMrIParticleTimerTarget + 80 < o->oMrIParticleTimer) { + o->oMrIParticleTimer = 0; + o->oMrIParticleTimerTarget = random_float() * 80.0f; spawn_mr_i_particle(); } } diff --git a/src/game/behaviors/mushroom_1up.inc.c b/src/game/behaviors/mushroom_1up.inc.c index 96781a482..a7f006f62 100644 --- a/src/game/behaviors/mushroom_1up.inc.c +++ b/src/game/behaviors/mushroom_1up.inc.c @@ -210,7 +210,7 @@ void bhv_1up_hidden_loop(void) { switch (o->oAction) { case 0: o->header.gfx.node.flags |= GRAPH_RENDER_INVISIBLE; - if (o->o1UpHiddenUnkF4 == o->oBehParams2ndByte) { + if (o->o1UpHiddenTimesTriggered == o->oBehParams2ndByte) { o->oVelY = 40.0f; o->oAction = 3; o->header.gfx.node.flags &= ~GRAPH_RENDER_INVISIBLE; @@ -251,7 +251,7 @@ void bhv_1up_hidden_trigger_loop(void) { if (obj_check_if_collided_with_object(o, gMarioObject) == 1) { nearestHidden1up = cur_obj_nearest_object_with_behavior(bhvHidden1up); if (nearestHidden1up != NULL) - nearestHidden1up->o1UpHiddenUnkF4++; + nearestHidden1up->o1UpHiddenTimesTriggered++; o->activeFlags = ACTIVE_FLAG_DEACTIVATED; } @@ -261,7 +261,7 @@ void bhv_1up_hidden_in_pole_loop(void) { switch (o->oAction) { case 0: o->header.gfx.node.flags |= GRAPH_RENDER_INVISIBLE; - if (o->o1UpHiddenUnkF4 == o->oBehParams2ndByte) { + if (o->o1UpHiddenTimesTriggered == o->oBehParams2ndByte) { o->oVelY = 40.0f; o->oAction = 3; o->header.gfx.node.flags &= ~GRAPH_RENDER_INVISIBLE; @@ -296,7 +296,7 @@ void bhv_1up_hidden_in_pole_trigger_loop(void) { if (obj_check_if_collided_with_object(o, gMarioObject) == 1) { nearestHidden1upInPole = cur_obj_nearest_object_with_behavior(bhvHidden1upInPole); if (nearestHidden1upInPole != NULL) { - nearestHidden1upInPole->o1UpHiddenUnkF4++; + nearestHidden1upInPole->o1UpHiddenTimesTriggered++; } o->activeFlags = ACTIVE_FLAG_DEACTIVATED; diff --git a/src/game/behaviors/rolling_log.inc.c b/src/game/behaviors/rolling_log.inc.c index e3af4dc5f..652e0a178 100644 --- a/src/game/behaviors/rolling_log.inc.c +++ b/src/game/behaviors/rolling_log.inc.c @@ -7,9 +7,9 @@ // a rolling log of another variation. void bhv_ttm_rolling_log_init(void) { - o->oPitouneUnkF8 = 3970.0f; - o->oPitouneUnkFC = 3654.0f; - o->oPitouneUnkF4 = 271037.0f; + o->oRollingLogX = 3970.0f; + o->oRollingLogZ = 3654.0f; + o->oRollingLogMaxDist = 271037.0f; o->oMoveAngleYaw = 8810; o->oForwardVel = 0; o->oVelX = 0; @@ -72,7 +72,7 @@ void bhv_rolling_log_loop(void) { o->oPosX += o->oVelX; o->oPosZ += o->oVelZ; - if (o->oPitouneUnkF4 < sqr(o->oPosX - o->oPitouneUnkF8) + sqr(o->oPosZ - o->oPitouneUnkFC)) { + if (o->oRollingLogMaxDist < sqr(o->oPosX - o->oRollingLogX) + sqr(o->oPosZ - o->oRollingLogZ)) { o->oForwardVel = 0; o->oPosX = prevX; o->oPosZ = prevZ; @@ -87,14 +87,14 @@ void bhv_rolling_log_loop(void) { } void volcano_act_1(void) { - o->oRollingLogUnkF4 += 4.0f; - o->oAngleVelPitch += o->oRollingLogUnkF4; + o->oVolcanoTrapPitchVel += 4.0f; + o->oAngleVelPitch += o->oVolcanoTrapPitchVel; o->oFaceAnglePitch -= o->oAngleVelPitch; if (o->oFaceAnglePitch < -0x4000) { o->oFaceAnglePitch = -0x4000; o->oAngleVelPitch = 0; - o->oRollingLogUnkF4 = 0; + o->oVolcanoTrapPitchVel = 0; o->oAction = 2; cur_obj_play_sound_2(SOUND_GENERAL_BIG_POUND); set_camera_shake_from_point(SHAKE_POS_LARGE, o->oPosX, o->oPosY, o->oPosZ); @@ -141,9 +141,9 @@ void bhv_volcano_trap_loop(void) { } void bhv_lll_rolling_log_init(void) { - o->oPitouneUnkF8 = 5120.0f; - o->oPitouneUnkFC = 6016.0f; - o->oPitouneUnkF4 = 1048576.0f; + o->oRollingLogX = 5120.0f; + o->oRollingLogZ = 6016.0f; + o->oRollingLogMaxDist = 1048576.0f; o->oMoveAngleYaw = 0x3FFF; o->oForwardVel = 0; diff --git a/src/game/behaviors/scuttlebug.inc.c b/src/game/behaviors/scuttlebug.inc.c index 8b480a065..c7631cd6f 100644 --- a/src/game/behaviors/scuttlebug.inc.c +++ b/src/game/behaviors/scuttlebug.inc.c @@ -29,10 +29,10 @@ void bhv_scuttlebug_loop(void) { cur_obj_update_floor_and_walls(); if (o->oSubAction != 0 && cur_obj_set_hitbox_and_die_if_attacked(&sScuttlebugHitbox, SOUND_OBJ_DYING_ENEMY1, - o->oScuttlebugUnkF4)) + o->oScuttlebugHasNoLootCoins)) o->oSubAction = 3; if (o->oSubAction != 1) - o->oScuttlebugUnkF8 = 0; + o->oScuttlebugIsAtttacking = 0; switch (o->oSubAction) { case 0: if (o->oMoveFlags & OBJ_MOVE_LANDED) @@ -49,19 +49,19 @@ void bhv_scuttlebug_loop(void) { if (cur_obj_lateral_dist_from_mario_to_home() > 1000.0f) o->oAngleToMario = cur_obj_angle_to_home(); else { - if (o->oScuttlebugUnkF8 == 0) { - o->oScuttlebugUnkFC = 0; + if (o->oScuttlebugIsAtttacking == 0) { + o->oScuttlebugTimer = 0; o->oAngleToMario = obj_angle_to_object(o, gMarioObject); if (abs_angle_diff(o->oAngleToMario, o->oMoveAngleYaw) < 0x800) { - o->oScuttlebugUnkF8 = 1; + o->oScuttlebugIsAtttacking = 1; o->oVelY = 20.0f; cur_obj_play_sound_2(SOUND_OBJ2_SCUTTLEBUG_ALERT); } - } else if (o->oScuttlebugUnkF8 == 1) { + } else if (o->oScuttlebugIsAtttacking == 1) { o->oForwardVel = 15.0f; - o->oScuttlebugUnkFC++; - if (o->oScuttlebugUnkFC > 50) - o->oScuttlebugUnkF8 = 0; + o->oScuttlebugTimer++; + if (o->oScuttlebugTimer > 50) + o->oScuttlebugIsAtttacking = 0; } } if (update_angle_from_move_flags(&o->oAngleToMario)) @@ -88,15 +88,15 @@ void bhv_scuttlebug_loop(void) { if (o->oMoveFlags & OBJ_MOVE_LANDED) { o->oSubAction++; o->oVelY = 0.0f; - o->oScuttlebugUnkFC = 0; + o->oScuttlebugTimer = 0; o->oFlags |= OBJ_FLAG_SET_FACE_YAW_TO_MOVE_YAW; o->oInteractStatus = 0; } break; case 5: o->oForwardVel = 2.0f; - o->oScuttlebugUnkFC++; - if (o->oScuttlebugUnkFC > 30) + o->oScuttlebugTimer++; + if (o->oScuttlebugTimer > 30) o->oSubAction = 0; break; } @@ -111,7 +111,7 @@ void bhv_scuttlebug_loop(void) { if (obj_is_hidden(o)) obj_mark_for_deletion(o); if (o->activeFlags == ACTIVE_FLAG_DEACTIVATED) - o->parentObj->oScuttlebugSpawnerUnk88 = 1; + o->parentObj->oScuttlebugSpawnerIsDeactivated = 1; } cur_obj_move_standard(-50); } @@ -122,14 +122,14 @@ void bhv_scuttlebug_spawn_loop(void) { if (o->oTimer > 30 && 500.0f < o->oDistanceToMario && o->oDistanceToMario < 1500.0f) { cur_obj_play_sound_2(SOUND_OBJ2_SCUTTLEBUG_ALERT); scuttlebug = spawn_object(o, MODEL_SCUTTLEBUG, bhvScuttlebug); - scuttlebug->oScuttlebugUnkF4 = o->oScuttlebugSpawnerUnkF4; + scuttlebug->oScuttlebugHasNoLootCoins = o->oScuttlebugSpawnerSpawnWithNoLootCoins; scuttlebug->oForwardVel = 30.0f; scuttlebug->oVelY = 80.0f; o->oAction++; - o->oScuttlebugUnkF4 = 1; + o->oScuttlebugHasNoLootCoins = 1; } - } else if (o->oScuttlebugSpawnerUnk88 != 0) { - o->oScuttlebugSpawnerUnk88 = 0; + } else if (o->oScuttlebugSpawnerIsDeactivated != 0) { + o->oScuttlebugSpawnerIsDeactivated = 0; o->oAction = 0; } } diff --git a/src/game/behaviors/skeeter.inc.c b/src/game/behaviors/skeeter.inc.c index 0a60eaaa5..f44c749dd 100644 --- a/src/game/behaviors/skeeter.inc.c +++ b/src/game/behaviors/skeeter.inc.c @@ -45,7 +45,7 @@ static void skeeter_act_idle(void) { if (o->oMoveFlags & OBJ_MOVE_AT_WATER_SURFACE) { skeeter_spawn_waves(); if (o->oTimer > 60 - && obj_smooth_turn(&o->oSkeeterUnk1AC, &o->oMoveAngleYaw, o->oSkeeterTargetAngle, 0.02f, + && obj_smooth_turn(&o->oSkeeterAngleVel, &o->oMoveAngleYaw, o->oSkeeterTargetAngle, 0.02f, 5, 50, 200)) { if (o->oSkeeterWaitTime != 0) { o->oSkeeterWaitTime -= 1; @@ -53,7 +53,7 @@ static void skeeter_act_idle(void) { cur_obj_play_sound_2(SOUND_OBJ_WALKING_WATER); o->oAction = SKEETER_ACT_LUNGE; o->oForwardVel = 80.0f; - o->oSkeeterUnk1AC = 0; + o->oSkeeterAngleVel = 0; } } } @@ -95,26 +95,26 @@ static void skeeter_act_walk(void) { if (!(o->oMoveFlags & OBJ_MOVE_MASK_ON_GROUND)) { o->oAction = SKEETER_ACT_IDLE; } else { - obj_forward_vel_approach(o->oSkeeterUnkFC, 0.4f); + obj_forward_vel_approach(o->oSkeeterTargetForwardVel, 0.4f); accel = 0.12f * o->oForwardVel; cur_obj_init_animation_with_accel_and_sound(2, accel); cur_obj_play_sound_at_anim_range(3, 13, SOUND_OBJ_SKEETER_WALK); - if (o->oSkeeterUnkF8 != 0) { - o->oSkeeterUnkF8 = obj_resolve_collisions_and_turn(o->oSkeeterTargetAngle, 0x400); + if (o->oSkeeterTurningAwayFromWall != 0) { + o->oSkeeterTurningAwayFromWall = obj_resolve_collisions_and_turn(o->oSkeeterTargetAngle, 0x400); } else { if (o->oDistanceToMario >= 25000.0f) { o->oSkeeterTargetAngle = o->oAngleToMario; o->oSkeeterWaitTime = random_linear_offset(20, 30); } - if ((o->oSkeeterUnkF8 = obj_bounce_off_walls_edges_objects(&o->oSkeeterTargetAngle)) == 0) { + if ((o->oSkeeterTurningAwayFromWall = obj_bounce_off_walls_edges_objects(&o->oSkeeterTargetAngle)) == 0) { if (o->oDistanceToMario < 500.0f) { o->oSkeeterTargetAngle = o->oAngleToMario; - o->oSkeeterUnkFC = 20.0f; + o->oSkeeterTargetForwardVel = 20.0f; } else { - o->oSkeeterUnkFC = 10.0f; + o->oSkeeterTargetForwardVel = 10.0f; if (o->oSkeeterWaitTime != 0) { o->oSkeeterWaitTime -= 1; } else if (cur_obj_check_if_near_animation_end() != 0) { diff --git a/src/game/behaviors/snowman.inc.c b/src/game/behaviors/snowman.inc.c index e6d73709c..a2989bf42 100644 --- a/src/game/behaviors/snowman.inc.c +++ b/src/game/behaviors/snowman.inc.c @@ -25,7 +25,7 @@ void bhv_snowmans_bottom_init(void) { o->oVelY = 0; o->oForwardVel = 0; - o->oSnowmansBottomUnkF4 = 0.4f; + o->oSnowmansBottomRollingFacePitch = 0.4f; headObj = cur_obj_nearest_object_with_behavior(bhvSnowmansHead); if (headObj != NULL) { @@ -44,10 +44,10 @@ void set_rolling_sphere_hitbox(void) { void adjust_rolling_face_pitch(f32 f12) { o->oFaceAnglePitch += (s16)(o->oForwardVel * (100.0f / f12)); - o->oSnowmansBottomUnkF4 += o->oForwardVel * 1e-4; + o->oSnowmansBottomRollingFacePitch += o->oForwardVel * 1e-4; - if (o->oSnowmansBottomUnkF4 > 1.0) - o->oSnowmansBottomUnkF4 = 1.0f; + if (o->oSnowmansBottomRollingFacePitch > 1.0) + o->oSnowmansBottomRollingFacePitch = 1.0f; } void snowmans_bottom_act_1(void) { @@ -56,18 +56,18 @@ void snowmans_bottom_act_1(void) { o->oPathedStartWaypoint = segmented_to_virtual(&ccm_seg7_trajectory_snowman); object_step_without_floor_orient(); pathResult = cur_obj_follow_path(pathResult); - o->oSnowmansBottomUnkF8 = o->oPathedTargetYaw; - o->oMoveAngleYaw = approach_s16_symmetric(o->oMoveAngleYaw, o->oSnowmansBottomUnkF8, 0x400); + o->oSnowmansBottomTargetYaw = o->oPathedTargetYaw; + o->oMoveAngleYaw = approach_s16_symmetric(o->oMoveAngleYaw, o->oSnowmansBottomTargetYaw, 0x400); if (o->oForwardVel > 70.0) o->oForwardVel = 70.0f; if (pathResult == -1) { if (obj_check_if_facing_toward_angle(o->oMoveAngleYaw, o->oAngleToMario, 0x2000) == TRUE - && o->oSnowmansBottomUnk1AC == 1) { - o->oSnowmansBottomUnkF8 = o->oAngleToMario; + && o->oSnowmansBottomHitCheckpointNearMario == 1) { + o->oSnowmansBottomTargetYaw = o->oAngleToMario; } else { - o->oSnowmansBottomUnkF8 = o->oMoveAngleYaw; + o->oSnowmansBottomTargetYaw = o->oMoveAngleYaw; } o->oAction = 2; } @@ -78,7 +78,7 @@ void snowmans_bottom_act_2(void) { if (o->oForwardVel > 70.0) o->oForwardVel = 70.0f; - o->oMoveAngleYaw = approach_s16_symmetric(o->oMoveAngleYaw, o->oSnowmansBottomUnkF8, 0x400); + o->oMoveAngleYaw = approach_s16_symmetric(o->oMoveAngleYaw, o->oSnowmansBottomTargetYaw, 0x400); if (is_point_close_to_object(o, -4230.0f, -1344.0f, 1813.0f, 300)) { spawn_mist_particles_variable(0, 0, 70.0f); o->oMoveAngleYaw = atan2s(1813.0f - o->oPosZ, -4230.0f - o->oPosX); @@ -127,13 +127,13 @@ void bhv_snowmans_bottom_loop(void) { case 1: snowmans_bottom_act_1(); - adjust_rolling_face_pitch(o->oSnowmansBottomUnkF4); + adjust_rolling_face_pitch(o->oSnowmansBottomRollingFacePitch); cur_obj_play_sound_1(SOUND_ENV_UNKNOWN2); break; case 2: snowmans_bottom_act_2(); - adjust_rolling_face_pitch(o->oSnowmansBottomUnkF4); + adjust_rolling_face_pitch(o->oSnowmansBottomRollingFacePitch); cur_obj_play_sound_1(SOUND_ENV_UNKNOWN2); break; @@ -148,8 +148,8 @@ void bhv_snowmans_bottom_loop(void) { set_rolling_sphere_hitbox(); set_object_visibility(o, 8000); - cur_obj_scale(o->oSnowmansBottomUnkF4); - o->oGraphYOffset = o->oSnowmansBottomUnkF4 * 180.0f; + cur_obj_scale(o->oSnowmansBottomRollingFacePitch); + o->oGraphYOffset = o->oSnowmansBottomRollingFacePitch * 180.0f; } void bhv_snowmans_head_init(void) { @@ -217,7 +217,7 @@ void bhv_snowmans_head_loop(void) { void bhv_snowmans_body_checkpoint_loop(void) { if (is_point_within_radius_of_mario(o->oPosX, o->oPosY, o->oPosZ, 800)) { - o->parentObj->oSnowmansBottomUnk1AC++; + o->parentObj->oSnowmansBottomHitCheckpointNearMario++; o->activeFlags = ACTIVE_FLAG_DEACTIVATED; } diff --git a/src/game/behaviors/sound_spawner.inc.c b/src/game/behaviors/sound_spawner.inc.c index e5e2943d6..b753af079 100644 --- a/src/game/behaviors/sound_spawner.inc.c +++ b/src/game/behaviors/sound_spawner.inc.c @@ -1,5 +1,5 @@ // sound_spawner.c.inc void bhv_sound_spawner_init(void) { - play_sound(o->oSoundEffectUnkF4, o->header.gfx.cameraToObject); + play_sound(o->oSoundEffectBits, o->header.gfx.cameraToObject); } diff --git a/src/game/behaviors/spawn_star.inc.c b/src/game/behaviors/spawn_star.inc.c index 859f6b25d..5c7509b9a 100644 --- a/src/game/behaviors/spawn_star.inc.c +++ b/src/game/behaviors/spawn_star.inc.c @@ -48,7 +48,7 @@ void bhv_star_spawn_init(void) { o->oStarSpawnDisFromHome = sqrtf(sqr(o->oHomeX - o->oPosX) + sqr(o->oHomeZ - o->oPosZ)); o->oVelY = (o->oHomeY - o->oPosY) / 30.0f; o->oForwardVel = o->oStarSpawnDisFromHome / 30.0f; - o->oStarSpawnUnkFC = o->oPosY; + o->oStarSpawnVelY = o->oPosY; if (o->oBehParams2ndByte == 0 || gCurrCourseNum == COURSE_BBH) cutscene_object(CUTSCENE_STAR_SPAWN, o); else @@ -69,8 +69,8 @@ void bhv_star_spawn_loop(void) { case 1: obj_move_xyz_using_fvel_and_yaw(o); - o->oStarSpawnUnkFC += o->oVelY; - o->oPosY = o->oStarSpawnUnkFC + sins((o->oTimer * 0x8000) / 30) * 400.0f; + o->oStarSpawnVelY += o->oVelY; + o->oPosY = o->oStarSpawnVelY + sins((o->oTimer * 0x8000) / 30) * 400.0f; o->oFaceAngleYaw += 0x1000; spawn_object(o, MODEL_NONE, bhvSparkleSpawn); cur_obj_play_sound_1(SOUND_ENV_STAR); diff --git a/src/game/behaviors/spindel.inc.c b/src/game/behaviors/spindel.inc.c index 38b4a57a7..6ca17abca 100644 --- a/src/game/behaviors/spindel.inc.c +++ b/src/game/behaviors/spindel.inc.c @@ -2,17 +2,17 @@ void bhv_spindel_init(void) { o->oHomeY = o->oPosY; - o->oSpindelUnkF4 = 0; - o->oSpindelUnkF8 = 0; + o->oSpindelMoveTimer = 0; + o->oSpindelMoveDirection = 0; } void bhv_spindel_loop(void) { f32 homeYOffset; s32 shake; - if (o->oSpindelUnkF4 == -1) { + if (o->oSpindelMoveTimer == -1) { if (o->oTimer == 32) { - o->oSpindelUnkF4 = 0; + o->oSpindelMoveTimer = 0; o->oTimer = 0; } else { o->oVelZ = 0.0f; @@ -21,7 +21,7 @@ void bhv_spindel_loop(void) { } } - shake = 10 - o->oSpindelUnkF4; + shake = 10 - o->oSpindelMoveTimer; if (shake < 0) shake *= -1; @@ -32,15 +32,15 @@ void bhv_spindel_loop(void) { if (o->oTimer == shake + 8) { o->oTimer = 0; - o->oSpindelUnkF4++; - if (o->oSpindelUnkF4 == 20) { - if (o->oSpindelUnkF8 == 0) { - o->oSpindelUnkF8 = 1; + o->oSpindelMoveTimer++; + if (o->oSpindelMoveTimer == 20) { + if (o->oSpindelMoveDirection == 0) { + o->oSpindelMoveDirection = 1; } else { - o->oSpindelUnkF8 = 0; + o->oSpindelMoveDirection = 0; } - o->oSpindelUnkF4 = -1; + o->oSpindelMoveTimer = -1; } } @@ -52,7 +52,7 @@ void bhv_spindel_loop(void) { shake = 1; if (o->oTimer < shake * 8) { - if (o->oSpindelUnkF8 == 0) { + if (o->oSpindelMoveDirection == 0) { o->oVelZ = 20 / shake; o->oAngleVelPitch = 1024 / shake; } else { diff --git a/src/game/behaviors/sushi.inc.c b/src/game/behaviors/sushi.inc.c index 912096e50..6accfefc2 100644 --- a/src/game/behaviors/sushi.inc.c +++ b/src/game/behaviors/sushi.inc.c @@ -5,11 +5,11 @@ void bhv_sushi_shark_collision_loop(void) { void bhv_sushi_shark_loop(void) { f32 waterLevel = find_water_level(o->oPosX, o->oPosZ); - o->oPosX = o->oHomeX + sins(o->oSushiSharkUnkF4) * 1700.0f; - o->oPosZ = o->oHomeZ + coss(o->oSushiSharkUnkF4) * 1700.0f; - o->oPosY = waterLevel + o->oHomeY + sins(o->oSushiSharkUnkF4) * 200.0f; - o->oMoveAngleYaw = o->oSushiSharkUnkF4 + 0x4000; - o->oSushiSharkUnkF4 += 0x80; + o->oPosX = o->oHomeX + sins(o->oSushiSharkAngleFromHome) * 1700.0f; + o->oPosZ = o->oHomeZ + coss(o->oSushiSharkAngleFromHome) * 1700.0f; + o->oPosY = waterLevel + o->oHomeY + sins(o->oSushiSharkAngleFromHome) * 200.0f; + o->oMoveAngleYaw = o->oSushiSharkAngleFromHome + 0x4000; + o->oSushiSharkAngleFromHome += 0x80; if (gMarioObject->oPosY - waterLevel > -500.0f) if (o->oPosY - waterLevel > -200.0f) spawn_object_with_scale(o, MODEL_WAVE_TRAIL, bhvObjectWaveTrail, 4.0f); diff --git a/src/game/behaviors/switch_hidden_objects.inc.c b/src/game/behaviors/switch_hidden_objects.inc.c index 09875866c..0bf7cd6df 100644 --- a/src/game/behaviors/switch_hidden_objects.inc.c +++ b/src/game/behaviors/switch_hidden_objects.inc.c @@ -13,7 +13,7 @@ struct ObjectHitbox sBreakableBoxHitbox = { }; void breakable_box_init(void) { - o->oHiddenObjectUnkF4 = NULL; + o->oHiddenObjectSwitchObj = NULL; o->oAnimState = 1; switch (o->oBehParams2ndByte) { case 0: @@ -40,9 +40,9 @@ void hidden_breakable_box_actions(void) { cur_obj_become_intangible(); if (o->oTimer == 0) breakable_box_init(); - if (o->oHiddenObjectUnkF4 == NULL) - o->oHiddenObjectUnkF4 = cur_obj_nearest_object_with_behavior(bhvFloorSwitchHiddenObjects); - if ((sp1C = o->oHiddenObjectUnkF4) != NULL) + if (o->oHiddenObjectSwitchObj == NULL) + o->oHiddenObjectSwitchObj = cur_obj_nearest_object_with_behavior(bhvFloorSwitchHiddenObjects); + if ((sp1C = o->oHiddenObjectSwitchObj) != NULL) if (sp1C->oAction == 2) { o->oAction++; cur_obj_enable_rendering(); @@ -63,7 +63,7 @@ void hidden_breakable_box_actions(void) { cur_obj_become_intangible(); cur_obj_disable_rendering(); o->oInteractStatus = 0; - if ((sp1C = o->oHiddenObjectUnkF4) != NULL) + if ((sp1C = o->oHiddenObjectSwitchObj) != NULL) if (sp1C->oAction == 0) o->oAction = 0; } @@ -75,9 +75,9 @@ void hidden_unbreakable_box_actions(void) { if (o->oAction == 0) { cur_obj_disable_rendering(); cur_obj_become_intangible(); - if (o->oHiddenObjectUnkF4 == NULL) - o->oHiddenObjectUnkF4 = cur_obj_nearest_object_with_behavior(bhvFloorSwitchHiddenObjects); - if ((sp1C = o->oHiddenObjectUnkF4) != NULL) + if (o->oHiddenObjectSwitchObj == NULL) + o->oHiddenObjectSwitchObj = cur_obj_nearest_object_with_behavior(bhvFloorSwitchHiddenObjects); + if ((sp1C = o->oHiddenObjectSwitchObj) != NULL) if (sp1C->oAction == 2) { o->oAction++; cur_obj_enable_rendering(); diff --git a/src/game/behaviors/tower_platform.inc.c b/src/game/behaviors/tower_platform.inc.c index 5a973dff2..2bf4ce347 100644 --- a/src/game/behaviors/tower_platform.inc.c +++ b/src/game/behaviors/tower_platform.inc.c @@ -35,17 +35,17 @@ void bhv_wf_elevator_tower_platform_loop(void) { } void bhv_wf_sliding_tower_platform_loop(void) { - s32 moveTimer = o->oPlatformUnk110 / o->oPlatformUnk10C; + s32 moveTimer = o->oPlatformWFTowerMoveDistance / o->oPlatformWFTowerForwardVel; switch (o->oAction) { case 0: if (o->oTimer > moveTimer) o->oAction++; - o->oForwardVel = -o->oPlatformUnk10C; + o->oForwardVel = -o->oPlatformWFTowerForwardVel; break; case 1: if (o->oTimer > moveTimer) o->oAction = 0; - o->oForwardVel = o->oPlatformUnk10C; + o->oForwardVel = o->oPlatformWFTowerForwardVel; break; } cur_obj_compute_vel_xz(); @@ -58,24 +58,24 @@ void bhv_wf_sliding_tower_platform_loop(void) { void spawn_and_init_wf_platforms(s16 a, const BehaviorScript *bhv) { s16 yaw; struct Object *platform = spawn_object(o, a, bhv); - yaw = o->oPlatformSpawnerUnkF4 * o->oPlatformSpawnerUnkFC + o->oPlatformSpawnerUnkF8; + yaw = o->oPlatformSpawnerWFTowerPlatformNum * o->oPlatformSpawnerWFTowerDYaw + o->oPlatformSpawnerWFTowerYawOffset; platform->oMoveAngleYaw = yaw; - platform->oPosX += o->oPlatformSpawnerUnk100 * sins(yaw); - platform->oPosY += 100 * o->oPlatformSpawnerUnkF4; - platform->oPosZ += o->oPlatformSpawnerUnk100 * coss(yaw); - platform->oPlatformUnk110 = o->oPlatformSpawnerUnk104; - platform->oPlatformUnk10C = o->oPlatformSpawnerUnk108; - o->oPlatformSpawnerUnkF4++; + platform->oPosX += o->oPlatformSpawnerWFTowerRadius * sins(yaw); + platform->oPosY += 100 * o->oPlatformSpawnerWFTowerPlatformNum; + platform->oPosZ += o->oPlatformSpawnerWFTowerRadius * coss(yaw); + platform->oPlatformWFTowerMoveDistance = o->oPlatformSpawnerWFTowerMoveDistance; + platform->oPlatformWFTowerForwardVel = o->oPlatformSpawnerWFTowerForwardVel; + o->oPlatformSpawnerWFTowerPlatformNum++; } void spawn_wf_platform_group(void) { UNUSED s32 unused = 8; - o->oPlatformSpawnerUnkF4 = 0; - o->oPlatformSpawnerUnkF8 = 0; - o->oPlatformSpawnerUnkFC = 0x2000; - o->oPlatformSpawnerUnk100 = 704.0f; - o->oPlatformSpawnerUnk104 = 380.0f; - o->oPlatformSpawnerUnk108 = 3.0f; + o->oPlatformSpawnerWFTowerPlatformNum = 0; + o->oPlatformSpawnerWFTowerYawOffset = 0; + o->oPlatformSpawnerWFTowerDYaw = 0x2000; + o->oPlatformSpawnerWFTowerRadius = 704.0f; + o->oPlatformSpawnerWFTowerMoveDistance = 380.0f; + o->oPlatformSpawnerWFTowerForwardVel = 3.0f; spawn_and_init_wf_platforms(MODEL_WF_TOWER_SQUARE_PLATORM, bhvWfSolidTowerPlatform); spawn_and_init_wf_platforms(MODEL_WF_TOWER_SQUARE_PLATORM, bhvWfSlidingTowerPlatform); spawn_and_init_wf_platforms(MODEL_WF_TOWER_SQUARE_PLATORM, bhvWfSolidTowerPlatform); diff --git a/src/game/behaviors/tox_box.inc.c b/src/game/behaviors/tox_box.inc.c index 1055c1e7c..a731d4fbb 100644 --- a/src/game/behaviors/tox_box.inc.c +++ b/src/game/behaviors/tox_box.inc.c @@ -14,10 +14,10 @@ void tox_box_shake_screen(void) { } } -void tox_box_move(f32 forwardVel, f32 a1, s16 deltaPitch, s16 deltaRoll) { +void tox_box_move(f32 forwardVel, f32 leftVel, s16 deltaPitch, s16 deltaRoll) { o->oPosY = 99.41124 * sins((f32)(o->oTimer + 1) / 8 * 0x8000) + o->oHomeY + 3.0f; o->oForwardVel = forwardVel; - o->oUpVel = a1; + o->oLeftVel = leftVel; o->oFaceAnglePitch += deltaPitch; if ((s16) o->oFaceAnglePitch < 0) deltaRoll = -deltaRoll; diff --git a/src/game/behaviors/treasure_chest.inc.c b/src/game/behaviors/treasure_chest.inc.c index 1851b7789..afb7a05e2 100644 --- a/src/game/behaviors/treasure_chest.inc.c +++ b/src/game/behaviors/treasure_chest.inc.c @@ -26,7 +26,7 @@ void bhv_treasure_chest_top_loop(void) { case 1: if (o->oTimer == 0) { - if (parent->oTreasureChestUnkFC == 0) { + if (parent->oTreasureChestAboveWater == 0) { spawn_object_relative(0, 0, -80, 120, o, MODEL_BUBBLE, bhvWaterAirBubble); play_sound(SOUND_GENERAL_CLAM_SHELL1, o->header.gfx.cameraToObject); } else { @@ -67,14 +67,14 @@ void bhv_treasure_chest_bottom_loop(void) { case 0: if (obj_check_if_facing_toward_angle(o->oMoveAngleYaw, gMarioObject->header.gfx.angle[1] + 0x8000, 0x3000)) { if (is_point_within_radius_of_mario(o->oPosX, o->oPosY, o->oPosZ, 150)) { - if (!o->parentObj->oTreasureChestUnkF8) { - if (o->parentObj->oTreasureChestUnkF4 == o->oBehParams2ndByte) { + if (!o->parentObj->oTreasureChestDoCloseChests) { + if (o->parentObj->oTreasureChestNumOpenedChests == o->oBehParams2ndByte) { play_sound(SOUND_GENERAL2_RIGHT_ANSWER, gGlobalSoundSource); - o->parentObj->oTreasureChestUnkF4++; + o->parentObj->oTreasureChestNumOpenedChests++; o->oAction = 1; } else { - o->parentObj->oTreasureChestUnkF4 = 1; - o->parentObj->oTreasureChestUnkF8 = 1; + o->parentObj->oTreasureChestNumOpenedChests = 1; + o->parentObj->oTreasureChestDoCloseChests = 1; o->oAction = 2; cur_obj_become_tangible(); play_sound(SOUND_MENU_CAMERA_BUZZ, gGlobalSoundSource); @@ -85,14 +85,14 @@ void bhv_treasure_chest_bottom_loop(void) { break; case 1: - if (o->parentObj->oTreasureChestUnkF8 == 1) + if (o->parentObj->oTreasureChestDoCloseChests == 1) o->oAction = 0; break; case 2: cur_obj_become_intangible(); if (!is_point_within_radius_of_mario(o->oPosX, o->oPosY, o->oPosZ, 500)) { - o->parentObj->oTreasureChestUnkF8 = 0; + o->parentObj->oTreasureChestDoCloseChests = 0; o->oAction = 0; } } @@ -113,14 +113,14 @@ void bhv_treasure_chest_ship_init(void) { spawn_treasure_chest(2, 650, -350, -940, -0x6001); spawn_treasure_chest(3, -550, -350, -770, 0x5FFF); spawn_treasure_chest(4, 100, -350, -1700, 0); - o->oTreasureChestUnkF4 = 1; - o->oTreasureChestUnkFC = 0; + o->oTreasureChestNumOpenedChests = 1; + o->oTreasureChestAboveWater = 0; } void bhv_treasure_chest_ship_loop(void) { switch (o->oAction) { case 0: - if (o->oTreasureChestUnkF4 == 5) { + if (o->oTreasureChestNumOpenedChests == 5) { play_puzzle_jingle(); fade_volume_scale(0, 127, 1000); o->oAction = 1; @@ -149,14 +149,14 @@ void bhv_treasure_chest_jrb_init(void) { spawn_treasure_chest(2, -1150, -2812, -1550, 0x7FFF); spawn_treasure_chest(3, -2400, -2812, -1800, 0x7FFF); spawn_treasure_chest(4, -1800, -2812, -2100, 0x7FFF); - o->oTreasureChestUnkF4 = 1; - o->oTreasureChestUnkFC = 1; + o->oTreasureChestNumOpenedChests = 1; + o->oTreasureChestAboveWater = 1; } void bhv_treasure_chest_jrb_loop(void) { switch (o->oAction) { case 0: - if (o->oTreasureChestUnkF4 == 5) { + if (o->oTreasureChestNumOpenedChests == 5) { play_puzzle_jingle(); o->oAction = 1; } @@ -181,14 +181,14 @@ void bhv_treasure_chest_init(void) { spawn_treasure_chest(3, -4500, -5119, -1100, 9102); spawn_treasure_chest(4, -2400, -4607, 125, 16019); - o->oTreasureChestUnkF4 = 1; - o->oTreasureChestUnkFC = 0; + o->oTreasureChestNumOpenedChests = 1; + o->oTreasureChestAboveWater = 0; } void bhv_treasure_chest_loop(void) { switch (o->oAction) { case 0: - if (o->oTreasureChestUnkF4 == 5) { + if (o->oTreasureChestNumOpenedChests == 5) { play_puzzle_jingle(); o->oAction = 1; } diff --git a/src/game/behaviors/tree_particles.inc.c b/src/game/behaviors/tree_particles.inc.c index 2ae44920b..34c2e02c2 100644 --- a/src/game/behaviors/tree_particles.inc.c +++ b/src/game/behaviors/tree_particles.inc.c @@ -6,8 +6,8 @@ void bhv_tree_snow_or_leaf_loop(void) { if (o->oTimer == 0) { o->oAngleVelPitch = (random_float() - 0.5) * 0x1000; o->oAngleVelRoll = (random_float() - 0.5) * 0x1000; - o->oTreeSnowOrLeafUnkF8 = 4; - o->oTreeSnowOrLeafUnkFC = random_float() * 0x400 + 0x600; + o->oTreeSnowOrLeafSidewardVel = 4; + o->oTreeSnowOrLeafSidewardAngleVel = random_float() * 0x400 + 0x600; } if (o->oPosY < o->oFloorHeight) obj_mark_for_deletion(o); @@ -26,9 +26,9 @@ void bhv_tree_snow_or_leaf_loop(void) { o->oForwardVel -= 0.3; else o->oForwardVel = 0; - o->oPosX += sins(o->oMoveAngleYaw) * sins(o->oTreeSnowOrLeafUnkF4) * o->oTreeSnowOrLeafUnkF8; - o->oPosZ += coss(o->oMoveAngleYaw) * sins(o->oTreeSnowOrLeafUnkF4) * o->oTreeSnowOrLeafUnkF8; - o->oTreeSnowOrLeafUnkF4 += o->oTreeSnowOrLeafUnkFC; + o->oPosX += sins(o->oMoveAngleYaw) * sins(o->oTreeSnowOrLeafSidewardAngle) * o->oTreeSnowOrLeafSidewardVel; + o->oPosZ += coss(o->oMoveAngleYaw) * sins(o->oTreeSnowOrLeafSidewardAngle) * o->oTreeSnowOrLeafSidewardVel; + o->oTreeSnowOrLeafSidewardAngle += o->oTreeSnowOrLeafSidewardAngleVel; o->oPosY += o->oVelY; } diff --git a/src/game/behaviors/tumbling_bridge.inc.c b/src/game/behaviors/tumbling_bridge.inc.c index cd5bdf91c..86f3915ce 100644 --- a/src/game/behaviors/tumbling_bridge.inc.c +++ b/src/game/behaviors/tumbling_bridge.inc.c @@ -17,7 +17,7 @@ void bhv_tumbling_bridge_platform_loop(void) { case 0: if (gMarioObject->platform == o) { o->oAction++; - o->oTumblingBridgeUnkF4 = random_sign() * 0x80; + o->oTumblingBridgeRollAccel = random_sign() * 0x80; } break; case 1: @@ -31,7 +31,7 @@ void bhv_tumbling_bridge_platform_loop(void) { if (o->oAngleVelPitch < 0x400) o->oAngleVelPitch += 0x80; if (o->oAngleVelRoll > -0x400 && o->oAngleVelRoll < 0x400) - o->oAngleVelRoll += o->oTumblingBridgeUnkF4; // acceleration? + o->oAngleVelRoll += o->oTumblingBridgeRollAccel; // acceleration? o->oGravity = -3.0f; cur_obj_rotate_face_angle_using_vel(); cur_obj_move_using_fvel_and_gravity(); diff --git a/src/game/behaviors/tuxie.inc.c b/src/game/behaviors/tuxie.inc.c index a2434251a..30515a9a7 100644 --- a/src/game/behaviors/tuxie.inc.c +++ b/src/game/behaviors/tuxie.inc.c @@ -34,7 +34,7 @@ void tuxies_mother_act_2(void) { } if (smallPenguinObj != NULL && dist < 300.0f && smallPenguinObj->oHeldState != HELD_FREE) { o->oAction = 1; - smallPenguinObj->oSmallPenguinUnk88 = 1; + smallPenguinObj->oSmallPenguinReturnedToMother = 1; o->prevObj = smallPenguinObj; } } @@ -105,7 +105,7 @@ void tuxies_mother_act_0(void) { nearBaby = TRUE; if (smallPenguinObj != NULL && dist < 300.0f && smallPenguinObj->oHeldState != HELD_FREE) { o->oAction = 1; - smallPenguinObj->oSmallPenguinUnk88 = 1; + smallPenguinObj->oSmallPenguinReturnedToMother = 1; o->prevObj = smallPenguinObj; } else { switch (o->oSubAction) { @@ -143,7 +143,7 @@ void bhv_tuxies_mother_loop(void) { void small_penguin_dive_with_mario(void) { if (mario_is_dive_sliding()) { - o->oSmallPenguinUnk100 = o->oAction; + o->oSmallPenguinStoredAction = o->oAction; o->oAction = 3; } } @@ -154,9 +154,9 @@ void small_penguin_act_2(void) { if (cur_obj_dist_to_nearest_object_with_behavior(bhvTuxiesMother) < 1000.0f) nearMother = TRUE; cur_obj_init_animation_with_sound(0); - o->oForwardVel = o->oSmallPenguinUnk104 + 3.0f; - cur_obj_rotate_yaw_toward(o->oAngleToMario + 0x8000, o->oSmallPenguinUnk110 + 0x600); - if (o->oDistanceToMario > o->oSmallPenguinUnk108 + 500.0f) + o->oForwardVel = o->oSmallPenguinNextForwardVel + 3.0f; + cur_obj_rotate_yaw_toward(o->oAngleToMario + 0x8000, o->oSmallPenguinYawIncrement + 0x600); + if (o->oDistanceToMario > o->oSmallPenguinRandomDistanceCheck + 500.0f) o->oAction = 0; small_penguin_dive_with_mario(); if (nearMother) @@ -165,9 +165,9 @@ void small_penguin_act_2(void) { void small_penguin_act_1(void) { cur_obj_init_animation_with_sound(0); - o->oForwardVel = o->oSmallPenguinUnk104 + 3.0f; - cur_obj_rotate_yaw_toward(o->oAngleToMario, o->oSmallPenguinUnk110 + 0x600); - if (o->oDistanceToMario < o->oSmallPenguinUnk108 + 300.0f) + o->oForwardVel = o->oSmallPenguinNextForwardVel + 3.0f; + cur_obj_rotate_yaw_toward(o->oAngleToMario, o->oSmallPenguinYawIncrement + 0x600); + if (o->oDistanceToMario < o->oSmallPenguinRandomDistanceCheck + 300.0f) o->oAction = 0; if (o->oDistanceToMario > 1100.0f) o->oAction = 0; @@ -190,7 +190,7 @@ void small_penguin_act_4(void) { o->oForwardVel = 0.0f; cur_obj_init_animation_with_sound(2); if (o->oTimer > 40) - o->oAction = o->oSmallPenguinUnk100; + o->oAction = o->oSmallPenguinStoredAction; } } @@ -198,16 +198,16 @@ void small_penguin_act_0(void) { s32 nearMother = FALSE; cur_obj_init_animation_with_sound(3); if (o->oTimer == 0) { - o->oSmallPenguinUnk110 = (s32)(random_float() * 0x400); - o->oSmallPenguinUnk108 = random_float() * 100.0f; - o->oSmallPenguinUnk104 = random_float(); + o->oSmallPenguinYawIncrement = (s32)(random_float() * 0x400); + o->oSmallPenguinRandomDistanceCheck = random_float() * 100.0f; + o->oSmallPenguinNextForwardVel = random_float(); o->oForwardVel = 0.0f; if (cur_obj_dist_to_nearest_object_with_behavior(bhvTuxiesMother) < 1000.0f) nearMother = TRUE; } - if (o->oDistanceToMario < 1000.0f && o->oSmallPenguinUnk108 + 600.0f < o->oDistanceToMario) + if (o->oDistanceToMario < 1000.0f && o->oSmallPenguinRandomDistanceCheck + 600.0f < o->oDistanceToMario) o->oAction = 1; - else if (o->oDistanceToMario < o->oSmallPenguinUnk108 + 300.0f) + else if (o->oDistanceToMario < o->oSmallPenguinRandomDistanceCheck + 300.0f) o->oAction = 2; if (nearMother) o->oAction = 5; @@ -241,9 +241,9 @@ void (*sSmallPenguinActions[])(void) = { }; void small_penguin_free_actions(void) { - if (o->oSmallPenguinUnk88 != 0) { + if (o->oSmallPenguinReturnedToMother != 0) { o->oAction = 5; - o->oSmallPenguinUnk88 = 0; + o->oSmallPenguinReturnedToMother = 0; } cur_obj_update_floor_and_walls(); cur_obj_call_action_function(sSmallPenguinActions); diff --git a/src/game/behaviors/unagi.inc.c b/src/game/behaviors/unagi.inc.c index da2e036c0..e500ff126 100644 --- a/src/game/behaviors/unagi.inc.c +++ b/src/game/behaviors/unagi.inc.c @@ -25,7 +25,7 @@ void bhv_unagi_init(void) { o->oAction = 3; o->oAnimState = 1; - o->oUnagiUnk1B0 = o->oMoveAngleYaw; + o->oUnagiInitMoveYaw = o->oMoveAngleYaw; } o->oPathedPrevWaypoint = o->oPathedStartWaypoint; @@ -37,7 +37,7 @@ void unagi_act_0(void) { o->oPosX = o->oPathedStartWaypoint->pos[0]; o->oPosY = o->oPathedStartWaypoint->pos[1]; o->oPosZ = o->oPathedStartWaypoint->pos[2]; - } else if (o->oUnagiUnk1AC < 700.0f) { + } else if (o->oUnagiDistanceToMario < 700.0f) { o->oSubAction = 1; } } @@ -82,76 +82,76 @@ void unagi_act_2(void) { cur_obj_set_pos_to_home(); o->oMoveAnglePitch = o->oFaceAnglePitch = 0; - o->oMoveAngleYaw = o->oFaceAngleYaw = o->oUnagiUnk1B0; + o->oMoveAngleYaw = o->oFaceAngleYaw = o->oUnagiInitMoveYaw; o->oFaceAngleRoll = 0; - o->oForwardVel = o->oVelX = o->oVelZ = o->oUnagiUnkF8 = 0.0f; + o->oForwardVel = o->oVelX = o->oVelZ = o->oUnagiNextForwardVel = 0.0f; - o->oUnagiUnkF4 = -800.0f; + o->oUnagiDistFromHome = -800.0f; o->oAction = 3; } void unagi_act_3(void) { - if (o->oUnagiUnkF4 < 0.0f) { + if (o->oUnagiDistFromHome < 0.0f) { cur_obj_init_animation_with_sound(6); - if ((o->oUnagiUnkF4 += 10.0f) > 0.0f) { - o->oUnagiUnkF4 = 0.0f; + if ((o->oUnagiDistFromHome += 10.0f) > 0.0f) { + o->oUnagiDistFromHome = 0.0f; } } else { - if (o->oUnagiUnkF4 == 0.0f) { + if (o->oUnagiDistFromHome == 0.0f) { cur_obj_init_animation_with_sound(6); - if (o->oTimer > 60 && o->oUnagiUnk1AC < 1000.0f) { + if (o->oTimer > 60 && o->oUnagiDistanceToMario < 1000.0f) { cur_obj_play_sound_2(SOUND_OBJ_EEL_2); - o->oUnagiUnkF8 = o->oUnagiUnk110 = 30.0f; + o->oUnagiNextForwardVel = o->oUnagiTargetNextForwardVel = 30.0f; } else { - o->oUnagiUnk110 = 0.0f; + o->oUnagiTargetNextForwardVel = 0.0f; } - } else if (o->oUnagiUnk110 > 0.0f) { + } else if (o->oUnagiTargetNextForwardVel > 0.0f) { if (cur_obj_init_anim_and_check_if_end(5)) { - o->oUnagiUnk110 = 0.0f; + o->oUnagiTargetNextForwardVel = 0.0f; } - } else if (o->oUnagiUnk110 == 0.0f) { + } else if (o->oUnagiTargetNextForwardVel == 0.0f) { cur_obj_init_animation_with_sound(0); if (cur_obj_check_if_at_animation_end()) { - if (o->oUnagiUnk1AC < 1000.0f) { + if (o->oUnagiDistanceToMario < 1000.0f) { o->oAction = 4; - o->oForwardVel = o->oUnagiUnkF8; + o->oForwardVel = o->oUnagiNextForwardVel; cur_obj_init_animation_with_sound(1); } else { - o->oUnagiUnk110 = -50.0f; + o->oUnagiTargetNextForwardVel = -50.0f; cur_obj_init_animation_with_sound(4); } } } - approach_f32_ptr(&o->oUnagiUnkF8, o->oUnagiUnk110, 4.0f); + approach_f32_ptr(&o->oUnagiNextForwardVel, o->oUnagiTargetNextForwardVel, 4.0f); - if ((o->oUnagiUnkF4 += o->oUnagiUnkF8) < 0.0f) { - o->oUnagiUnkF4 = o->oUnagiUnkF8 = 0.0f; + if ((o->oUnagiDistFromHome += o->oUnagiNextForwardVel) < 0.0f) { + o->oUnagiDistFromHome = o->oUnagiNextForwardVel = 0.0f; o->oTimer = 0; } } - o->oPosX = o->oHomeX + o->oUnagiUnkF4 * sins(o->oMoveAngleYaw); - o->oPosZ = o->oHomeZ + o->oUnagiUnkF4 * coss(o->oMoveAngleYaw); + o->oPosX = o->oHomeX + o->oUnagiDistFromHome * sins(o->oMoveAngleYaw); + o->oPosZ = o->oHomeZ + o->oUnagiDistFromHome * coss(o->oMoveAngleYaw); } void bhv_unagi_loop(void) { s32 i; - if (o->oUnagiUnk1B2 == 0) { - o->oUnagiUnk1AC = 99999.0f; + if (o->oUnagiHasStar == 0) { + o->oUnagiDistanceToMario = 99999.0f; if (o->oDistanceToMario < 3000.0f) { for (i = -4; i < 4; i++) { spawn_object_relative(i, 0, 0, 0, o, MODEL_NONE, bhvUnagiSubobject); } - o->oUnagiUnk1B2 = 1; + o->oUnagiHasStar = 1; } } else if (o->oDistanceToMario > 4000.0f) { - o->oUnagiUnk1B2 = 0; + o->oUnagiHasStar = 0; } switch (o->oAction) { @@ -176,7 +176,7 @@ void bhv_unagi_loop(void) { void bhv_unagi_subobject_loop(void) { f32 offset; - if (o->parentObj->oUnagiUnk1B2 == 0) { + if (o->parentObj->oUnagiHasStar == 0) { obj_mark_for_deletion(o); } else { offset = 300.0f * o->oBehParams2ndByte; @@ -197,7 +197,7 @@ void bhv_unagi_subobject_loop(void) { } else { obj_check_attacks(&sUnagiHitbox, o->oAction); if (o->oBehParams2ndByte == 3) { - o->parentObj->oUnagiUnk1AC = o->oDistanceToMario; + o->parentObj->oUnagiDistanceToMario = o->oDistanceToMario; } } } diff --git a/src/game/behaviors/water_bomb_cannon.inc.c b/src/game/behaviors/water_bomb_cannon.inc.c index 66057fd55..a606d48dd 100644 --- a/src/game/behaviors/water_bomb_cannon.inc.c +++ b/src/game/behaviors/water_bomb_cannon.inc.c @@ -10,15 +10,15 @@ void bhv_bubble_cannon_barrel_loop(void) { o->oMoveAnglePitch = o->parentObj->oMoveAnglePitch + 0x4000; o->oFaceAnglePitch = o->parentObj->oMoveAnglePitch; - if ((o->oCannonBarrelBubblesUnkF4 += o->oForwardVel) > 0.0f) { + if ((o->oCannonBarrelBubblesForwardVelCheck += o->oForwardVel) > 0.0f) { cur_obj_set_pos_via_transform(); obj_forward_vel_approach(-5.0f, 18.0f); } else { - o->oCannonBarrelBubblesUnkF4 = 0.0f; + o->oCannonBarrelBubblesForwardVelCheck = 0.0f; obj_copy_pos(o, o->parentObj); // check this - if (o->parentObj->oWaterCannonUnkF4 != 0) { + if (o->parentObj->oWaterCannonIdleTimer != 0) { if (o->oForwardVel == 0.0f) { o->oForwardVel = 35.0f; @@ -43,7 +43,7 @@ void water_bomb_cannon_act_0(void) { cur_obj_unhide(); o->oAction = 1; - o->oMoveAnglePitch = o->oWaterCannonUnkFC = 0x1C00; + o->oMoveAnglePitch = o->oWaterCannonTargetMovePitch = 0x1C00; } } @@ -51,21 +51,21 @@ void water_bomb_cannon_act_1(void) { if (o->oDistanceToMario > 2500.0f) { o->oAction = 2; } else if (o->oBehParams2ndByte == 0) { - if (o->oWaterCannonUnkF4 != 0) { - o->oWaterCannonUnkF4 -= 1; + if (o->oWaterCannonIdleTimer != 0) { + o->oWaterCannonIdleTimer -= 1; } else { - obj_move_pitch_approach(o->oWaterCannonUnkFC, 0x80); - obj_face_yaw_approach(o->oWaterCannonUnk100, 0x100); + obj_move_pitch_approach(o->oWaterCannonTargetMovePitch, 0x80); + obj_face_yaw_approach(o->oWaterCannonTargetFaceYaw, 0x100); - if ((s16) o->oFaceAngleYaw == (s16) o->oWaterCannonUnk100) { - if (o->oWaterCannonUnkF8 != 0) { - o->oWaterCannonUnkF8 -= 1; + if ((s16) o->oFaceAngleYaw == (s16) o->oWaterCannonTargetFaceYaw) { + if (o->oWaterCannonRotationTimer != 0) { + o->oWaterCannonRotationTimer -= 1; } else { cur_obj_play_sound_2(SOUND_OBJ_CANNON4); - o->oWaterCannonUnkF4 = 70; - o->oWaterCannonUnkFC = 0x1000 + 0x400 * (random_u16() & 0x3); - o->oWaterCannonUnk100 = -0x2000 + o->oMoveAngleYaw + 0x1000 * (random_u16() % 5); - o->oWaterCannonUnkF8 = 60; + o->oWaterCannonIdleTimer = 70; + o->oWaterCannonTargetMovePitch = 0x1000 + 0x400 * (random_u16() & 0x3); + o->oWaterCannonTargetFaceYaw = -0x2000 + o->oMoveAngleYaw + 0x1000 * (random_u16() % 5); + o->oWaterCannonRotationTimer = 60; } } } diff --git a/src/game/behaviors/water_objs.inc.c b/src/game/behaviors/water_objs.inc.c index df729cf4c..4746cb84d 100644 --- a/src/game/behaviors/water_objs.inc.c +++ b/src/game/behaviors/water_objs.inc.c @@ -9,9 +9,9 @@ void bhv_water_air_bubble_init(void) { void bhv_water_air_bubble_loop(void) { s32 i; - o->header.gfx.scale[0] = sins(o->oWaterObjUnkF4) * 0.5 + 4.0; - o->header.gfx.scale[1] = -sins(o->oWaterObjUnkF4) * 0.5 + 4.0; - o->oWaterObjUnkF4 += 0x400; + o->header.gfx.scale[0] = sins(o->oWaterObjScaleXAngle) * 0.5 + 4.0; + o->header.gfx.scale[1] = -sins(o->oWaterObjScaleXAngle) * 0.5 + 4.0; + o->oWaterObjScaleXAngle += 0x400; if (o->oTimer < 30) { cur_obj_become_intangible(); o->oPosY += 3.0f; @@ -35,8 +35,8 @@ void bhv_water_air_bubble_loop(void) { } void bhv_bubble_wave_init(void) { - o->oWaterObjUnkFC = 0x800 + (s32)(random_float() * 2048.0f); - o->oWaterObjUnk100 = 0x800 + (s32)(random_float() * 2048.0f); + o->oWaterObjScaleXAngleVel = 0x800 + (s32)(random_float() * 2048.0f); + o->oWaterObjScaleYAngleVel = 0x800 + (s32)(random_float() * 2048.0f); cur_obj_play_sound_2(SOUND_GENERAL_QUIET_BUBBLE); } @@ -48,18 +48,18 @@ void bhv_bubble_maybe_loop(void) { o->oPosY += random_float() * 3.0f + 6.0f; o->oPosX += random_float() * 10.0f - 5.0f; o->oPosZ += random_float() * 10.0f - 5.0f; - o->header.gfx.scale[0] = sins(o->oWaterObjUnkF4) * 0.2 + 1.0; - o->oWaterObjUnkF4 += o->oWaterObjUnkFC; - o->header.gfx.scale[1] = sins(o->oWaterObjUnkF8) * 0.2 + 1.0; - o->oWaterObjUnkF8 += o->oWaterObjUnk100; + o->header.gfx.scale[0] = sins(o->oWaterObjScaleXAngle) * 0.2 + 1.0; + o->oWaterObjScaleXAngle += o->oWaterObjScaleXAngleVel; + o->header.gfx.scale[1] = sins(o->oWaterObjScaleYAngle) * 0.2 + 1.0; + o->oWaterObjScaleYAngle += o->oWaterObjScaleYAngleVel; } void bhv_small_water_wave_loop(void) { f32 waterLevel = find_water_level(o->oPosX, o->oPosZ); - o->header.gfx.scale[0] = sins(o->oWaterObjUnkF4) * 0.2 + 1.0; - o->oWaterObjUnkF4 += o->oWaterObjUnkFC; - o->header.gfx.scale[1] = sins(o->oWaterObjUnkF8) * 0.2 + 1.0; - o->oWaterObjUnkF8 += o->oWaterObjUnk100; + o->header.gfx.scale[0] = sins(o->oWaterObjScaleXAngle) * 0.2 + 1.0; + o->oWaterObjScaleXAngle += o->oWaterObjScaleXAngleVel; + o->header.gfx.scale[1] = sins(o->oWaterObjScaleYAngle) * 0.2 + 1.0; + o->oWaterObjScaleYAngle += o->oWaterObjScaleYAngleVel; if (o->oPosY > waterLevel) { o->activeFlags = ACTIVE_FLAG_DEACTIVATED; o->oPosY += 5.0f; @@ -71,16 +71,16 @@ void bhv_small_water_wave_loop(void) { } void scale_bubble_sin(void) { - o->header.gfx.scale[0] = sins(o->oWaterObjUnkF4) * 0.5 + 2.0; - o->oWaterObjUnkF4 += o->oWaterObjUnkFC; - o->header.gfx.scale[1] = sins(o->oWaterObjUnkF8) * 0.5 + 2.0; - o->oWaterObjUnkF8 += o->oWaterObjUnk100; + o->header.gfx.scale[0] = sins(o->oWaterObjScaleXAngle) * 0.5 + 2.0; + o->oWaterObjScaleXAngle += o->oWaterObjScaleXAngleVel; + o->header.gfx.scale[1] = sins(o->oWaterObjScaleYAngle) * 0.5 + 2.0; + o->oWaterObjScaleYAngle += o->oWaterObjScaleYAngleVel; } void bhv_particle_init(void) { obj_scale_xyz(o, 2.0f, 2.0f, 1.0f); - o->oWaterObjUnkFC = 0x800 + (s32)(random_float() * 2048.0f); - o->oWaterObjUnk100 = 0x800 + (s32)(random_float() * 2048.0f); + o->oWaterObjScaleXAngleVel = 0x800 + (s32)(random_float() * 2048.0f); + o->oWaterObjScaleYAngleVel = 0x800 + (s32)(random_float() * 2048.0f); obj_translate_xyz_random(o, 100.0f); } diff --git a/src/game/behaviors/wdw_water_level.inc.c b/src/game/behaviors/wdw_water_level.inc.c index 544692112..40de162b0 100644 --- a/src/game/behaviors/wdw_water_level.inc.c +++ b/src/game/behaviors/wdw_water_level.inc.c @@ -8,8 +8,8 @@ void bhv_init_changing_water_level_loop(void) { } else if (gCurrentObject->oTimer < 10) *gEnvironmentLevels = gEnvironmentRegions[6]; else { - gEnvironmentRegions[6] = *gEnvironmentLevels + sins(o->oWaterLevelTriggerUnkF4) * 20.0f; - gCurrentObject->oWaterLevelTriggerUnkF4 += 0x200; + gEnvironmentRegions[6] = *gEnvironmentLevels + sins(o->oWaterLevelTriggerAmbientWaves) * 20.0f; + gCurrentObject->oWaterLevelTriggerAmbientWaves += 0x200; } } diff --git a/src/game/behaviors/white_puff_explode.inc.c b/src/game/behaviors/white_puff_explode.inc.c index 0e48c7821..9ff322ff1 100644 --- a/src/game/behaviors/white_puff_explode.inc.c +++ b/src/game/behaviors/white_puff_explode.inc.c @@ -4,17 +4,17 @@ void bhv_white_puff_exploding_loop(void) { f32 scale; if (o->oTimer == 0) { cur_obj_compute_vel_xz(); - o->oWhitePuffUnkF4 = o->header.gfx.scale[0]; + o->oWhitePuffScaleX = o->header.gfx.scale[0]; switch (o->oBehParams2ndByte) { case 2: o->oOpacity = 254; - o->oWhitePuffUnkF8 = -21; - o->oWhitePuffUnkFC = 0; + o->oWhitePuffOpacityDiff = -21; + o->oWhitePuffSlowFade = 0; break; case 3: o->oOpacity = 254; - o->oWhitePuffUnkF8 = -13; - o->oWhitePuffUnkFC = 1; + o->oWhitePuffOpacityDiff = -13; + o->oWhitePuffSlowFade = 1; break; } } @@ -25,13 +25,13 @@ void bhv_white_puff_exploding_loop(void) { if (o->oTimer > 20) obj_mark_for_deletion(o); if (o->oOpacity) { - o->oOpacity += o->oWhitePuffUnkF8; + o->oOpacity += o->oWhitePuffOpacityDiff; if (o->oOpacity < 2) obj_mark_for_deletion(o); - if (o->oWhitePuffUnkFC) - scale = o->oWhitePuffUnkF4 * ((254 - o->oOpacity) / 254.0); + if (o->oWhitePuffSlowFade) + scale = o->oWhitePuffScaleX * ((254 - o->oOpacity) / 254.0); else - scale = o->oWhitePuffUnkF4 * (o->oOpacity / 254.0); + scale = o->oWhitePuffScaleX * (o->oOpacity / 254.0); cur_obj_scale(scale); } } diff --git a/src/game/mario.c b/src/game/mario.c index f427db40f..3a48d8981 100644 --- a/src/game/mario.c +++ b/src/game/mario.c @@ -1871,7 +1871,7 @@ void init_mario(void) { capObject->oPosY = capPos[1]; capObject->oPosZ = capPos[2]; - capObject->oForwardVelS32 = 0; + capObject->oForwardVel = 0; capObject->oMoveAngleYaw = 0; } diff --git a/src/game/object_helpers.c b/src/game/object_helpers.c index 4bc808b99..37aa9c4cc 100644 --- a/src/game/object_helpers.c +++ b/src/game/object_helpers.c @@ -1611,7 +1611,7 @@ static void obj_spawn_loot_coins(struct Object *obj, s32 numCoins, f32 baseYVel, coin = spawn_object(obj, model, coinBehavior); obj_translate_xz_random(coin, posJitter); coin->oPosY = spawnHeight; - coin->oCoinUnk110 = baseYVel; + coin->oCoinBaseYVel = baseYVel; } } @@ -1905,8 +1905,8 @@ void obj_translate_local(struct Object *obj, s16 posIndex, s16 localTranslateInd } void obj_build_transform_from_pos_and_angle(struct Object *obj, s16 posIndex, s16 angleIndex) { - f32 translate[3]; - s16 rotation[3]; + Vec3f translate; + Vec3s rotation; translate[0] = obj->rawData.asF32[posIndex + 0]; translate[1] = obj->rawData.asF32[posIndex + 1]; @@ -1945,9 +1945,7 @@ void obj_build_transform_relative_to_parent(struct Object *obj) { obj->header.gfx.throwMatrix = &obj->transform; - //! Sets scale of gCurrentObject instead of obj. Not exploitable since this - // function is only called with obj = gCurrentObject - cur_obj_scale(1.0f); + obj_scale(obj, 1.0f); } void obj_create_transform_from_self(struct Object *obj) { @@ -2062,9 +2060,9 @@ static void obj_build_vel_from_transform(struct Object *obj) { f32 forward = obj->oForwardVel; //! Typo, up and left should be swapped - obj->oVelX = obj->transform[0][0] * up + obj->transform[1][0] * left + obj->transform[2][0] * forward; - obj->oVelY = obj->transform[0][1] * up + obj->transform[1][1] * left + obj->transform[2][1] * forward; - obj->oVelZ = obj->transform[0][2] * up + obj->transform[1][2] * left + obj->transform[2][2] * forward; + obj->oVelX = obj->transform[0][0] * left + obj->transform[1][0] * up + obj->transform[2][0] * forward; + obj->oVelY = obj->transform[0][1] * left + obj->transform[1][1] * up + obj->transform[2][1] * forward; + obj->oVelZ = obj->transform[0][2] * left + obj->transform[1][2] * up + obj->transform[2][2] * forward; } void cur_obj_set_pos_via_transform(void) { @@ -2837,7 +2835,7 @@ void cur_obj_init_animation_and_extend_if_at_end(s32 animIndex) { s32 cur_obj_check_grabbed_mario(void) { if (o->oInteractStatus & INT_STATUS_GRABBED_MARIO) { - o->oKingBobombUnk88 = 1; + o->oKingBobombHoldingMarioState = 1; cur_obj_become_intangible(); return TRUE; } diff --git a/src/game/spawn_sound.c b/src/game/spawn_sound.c index 18168b599..6e2ce2733 100644 --- a/src/game/spawn_sound.c +++ b/src/game/spawn_sound.c @@ -51,7 +51,7 @@ void exec_anim_sound_state(struct SoundState *soundStates) { void create_sound_spawner(s32 soundMagic) { struct Object *obj = spawn_object(gCurrentObject, 0, bhvSoundSpawner); - obj->oSoundEffectUnkF4 = soundMagic; + obj->oSoundEffectBits = soundMagic; } /* From 2e13bd6635c54b5c6fe76112f68c6a5c6abaf8f1 Mon Sep 17 00:00:00 2001 From: Fazana <52551480+FazanaJ@users.noreply.github.com> Date: Tue, 21 Sep 2021 21:49:13 +0100 Subject: [PATCH 02/26] Puppyprint CPU Profiler now disregards itself --- src/game/puppyprint.c | 13 ++++++++++++- src/game/puppyprint.h | 1 + 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/game/puppyprint.c b/src/game/puppyprint.c index d0281491c..bc831fc9e 100644 --- a/src/game/puppyprint.c +++ b/src/game/puppyprint.c @@ -78,6 +78,8 @@ OSTime dmaTime[NUM_PERF_ITERATIONS+1]; OSTime dmaAudioTime[NUM_PERF_ITERATIONS+1]; OSTime faultTime[NUM_PERF_ITERATIONS+1]; OSTime taskTime[NUM_PERF_ITERATIONS+1]; +OSTime profilerTime[NUM_PERF_ITERATIONS+1]; +OSTime profilerTime2[NUM_PERF_ITERATIONS+1]; //RSP OSTime audioTime[NUM_PERF_ITERATIONS+1]; OSTime rspGenTime[NUM_PERF_ITERATIONS+1]; @@ -364,11 +366,16 @@ void puppyprint_render_profiler(void) s32 perfPercentage[5]; s32 graphPos; s32 prevGraph; - OSTime cpuCount = OS_CYCLES_TO_USEC(cpuTime+audioTime[NUM_PERF_ITERATIONS]+dmaAudioTime[NUM_PERF_ITERATIONS]+faultTime[NUM_PERF_ITERATIONS]+taskTime[NUM_PERF_ITERATIONS]); + 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]); + OSTime first = osGetTime(); char textBytes[80]; if (!fDebug) + { + profiler_update(profilerTime, first); return; + } sprintf(textBytes, "RAM: %06X /%06X (%d_)", main_pool_available(), mempool, (s32)(((f32)main_pool_available()/(f32)mempool)*100)); print_small_text(160, 224, textBytes, PRINT_TEXT_ALIGN_CENTRE, PRINT_ALL); @@ -454,6 +461,7 @@ void puppyprint_render_profiler(void) print_which_benchmark(); print_ram_bar(); + profiler_update(profilerTime, first); } void profiler_update(OSTime *time, OSTime time2) @@ -491,6 +499,8 @@ void puppyprint_profiler_process(void) get_average_perf_time(dmaAudioTime); get_average_perf_time(faultTime); get_average_perf_time(taskTime); + get_average_perf_time(profilerTime); + get_average_perf_time(profilerTime2); dmaTime[NUM_PERF_ITERATIONS] += dmaAudioTime[NUM_PERF_ITERATIONS]; @@ -569,6 +579,7 @@ void puppyprint_profiler_process(void) if (perfIteration++ == NUM_PERF_ITERATIONS-1) perfIteration = 0; + profiler_update(profilerTime2, newTime); } #endif diff --git a/src/game/puppyprint.h b/src/game/puppyprint.h index ca738286e..cb54e509b 100644 --- a/src/game/puppyprint.h +++ b/src/game/puppyprint.h @@ -47,6 +47,7 @@ extern OSTime dmaTime[NUM_PERF_ITERATIONS+1]; extern OSTime dmaAudioTime[NUM_PERF_ITERATIONS+1]; extern OSTime faultTime[NUM_PERF_ITERATIONS+1]; extern OSTime taskTime[NUM_PERF_ITERATIONS+1]; +extern OSTime profilerTime[NUM_PERF_ITERATIONS+1]; //RSP extern OSTime rspGenTime[NUM_PERF_ITERATIONS+1]; //RDP From 55afd6d0dc2bfe08b9c12fe6fd5b8e231ecd7122 Mon Sep 17 00:00:00 2001 From: Arceveti <73617174+Arceveti@users.noreply.github.com> Date: Tue, 21 Sep 2021 15:43:29 -0700 Subject: [PATCH 03/26] Some more names --- include/object_fields.h | 8 ++-- src/engine/graph_node.h | 8 ++-- src/engine/surface_collision.h | 4 +- src/game/behaviors/bub.inc.c | 14 +++---- src/game/behaviors/chuckya.inc.c | 40 ++++++++++--------- .../behaviors/switch_hidden_objects.inc.c | 16 ++++---- src/game/object_helpers.c | 4 +- 7 files changed, 46 insertions(+), 48 deletions(-) diff --git a/include/object_fields.h b/include/object_fields.h index 02bb58725..99f0e7190 100644 --- a/include/object_fields.h +++ b/include/object_fields.h @@ -720,13 +720,13 @@ #define /*0x100*/ oIntroLakituDistToBirdsX OBJECT_FIELD_F32(0x1E) #define /*0x104*/ oIntroLakituDistToBirdsZ OBJECT_FIELD_F32(0x1F) #define /*0x108*/ O_INTRO_LAKITU_END_BIRDS_DEST_INDEX 0x20 -#define /*0x108*/ O_INTRO_LAKITU_END_BIRDS_DEST_Z_INDEX (O_INTRO_LAKITU_END_BIRDS_DEST_INDEX + 0) // 0x20 +#define /*0x108*/ O_INTRO_LAKITU_END_BIRDS_DEST_X_INDEX (O_INTRO_LAKITU_END_BIRDS_DEST_INDEX + 0) // 0x20 #define /*0x10C*/ O_INTRO_LAKITU_END_BIRDS_DEST_Y_INDEX (O_INTRO_LAKITU_END_BIRDS_DEST_INDEX + 1) // 0x21 -#define /*0x110*/ O_INTRO_LAKITU_END_BIRDS_DEST_X_INDEX (O_INTRO_LAKITU_END_BIRDS_DEST_INDEX + 2) // 0x22 +#define /*0x110*/ O_INTRO_LAKITU_END_BIRDS_DEST_Z_INDEX (O_INTRO_LAKITU_END_BIRDS_DEST_INDEX + 2) // 0x22 #define /*0x108*/ oIntroLakituEndBirds1DestVec OBJECT_FIELD_F32(O_INTRO_LAKITU_END_BIRDS_DEST_INDEX) -#define /*0x108*/ oIntroLakituEndBirds1DestZ OBJECT_FIELD_F32(O_INTRO_LAKITU_END_BIRDS_DEST_Z_INDEX) -#define /*0x10C*/ oIntroLakituEndBirds1DestY OBJECT_FIELD_F32(O_INTRO_LAKITU_END_BIRDS_DEST_Y_INDEX) #define /*0x110*/ oIntroLakituEndBirds1DestX OBJECT_FIELD_F32(O_INTRO_LAKITU_END_BIRDS_DEST_X_INDEX) +#define /*0x10C*/ oIntroLakituEndBirds1DestY OBJECT_FIELD_F32(O_INTRO_LAKITU_END_BIRDS_DEST_Y_INDEX) +#define /*0x108*/ oIntroLakituEndBirds1DestZ OBJECT_FIELD_F32(O_INTRO_LAKITU_END_BIRDS_DEST_Z_INDEX) #define /*0x1AC*/ oIntroLakituCloud OBJECT_FIELD_OBJ(0x49) /* Main Menu Button */ diff --git a/src/engine/graph_node.h b/src/engine/graph_node.h index 51d77a256..20466df1d 100644 --- a/src/engine/graph_node.h +++ b/src/engine/graph_node.h @@ -409,13 +409,13 @@ struct GraphNodeDisplayList *init_graph_node_display_list(struct AllocOnlyPool * s32 drawingLayer, void *displayList); struct GraphNodeShadow *init_graph_node_shadow(struct AllocOnlyPool *pool, struct GraphNodeShadow *graphNode, s16 shadowScale, u8 shadowSolidity, u8 shadowType); -struct GraphNodeObjectParent *init_graph_node_object_parent(struct AllocOnlyPool *pool, struct GraphNodeObjectParent *sp1c, +struct GraphNodeObjectParent *init_graph_node_object_parent(struct AllocOnlyPool *pool, struct GraphNodeObjectParent *graphNode, struct GraphNode *sharedChild); -struct GraphNodeGenerated *init_graph_node_generated(struct AllocOnlyPool *pool, struct GraphNodeGenerated *sp1c, +struct GraphNodeGenerated *init_graph_node_generated(struct AllocOnlyPool *pool, struct GraphNodeGenerated *graphNode, GraphNodeFunc gfxFunc, s32 parameter); -struct GraphNodeBackground *init_graph_node_background(struct AllocOnlyPool *pool, struct GraphNodeBackground *sp1c, +struct GraphNodeBackground *init_graph_node_background(struct AllocOnlyPool *pool, struct GraphNodeBackground *graphNode, u16 background, GraphNodeFunc backgroundFunc, s32 zero); -struct GraphNodeHeldObject *init_graph_node_held_object(struct AllocOnlyPool *pool, struct GraphNodeHeldObject *sp1c, +struct GraphNodeHeldObject *init_graph_node_held_object(struct AllocOnlyPool *pool, struct GraphNodeHeldObject *graphNode, struct Object *objNode, Vec3s translation, GraphNodeFunc nodeFunc, s32 playerIndex); struct GraphNode *geo_add_child(struct GraphNode *parent, struct GraphNode *childNode); diff --git a/src/engine/surface_collision.h b/src/engine/surface_collision.h index cfa87987d..c5f062cfe 100644 --- a/src/engine/surface_collision.h +++ b/src/engine/surface_collision.h @@ -13,9 +13,9 @@ // same as FLOOR_LOWER_LIMIT_MISC, explicitly for shadow.c #define FLOOR_LOWER_LIMIT_SHADOW (FLOOR_LOWER_LIMIT + 1000) -#define is_outside_level_bounds(x, z) (((x) <= -LEVEL_BOUNDARY_MAX) || ((x) >= LEVEL_BOUNDARY_MAX) || ((z) <= -LEVEL_BOUNDARY_MAX) || ((z) >= LEVEL_BOUNDARY_MAX)) +#define is_outside_level_bounds(xPos, zPos) (((xPos) <= -LEVEL_BOUNDARY_MAX) || ((xPos) >= LEVEL_BOUNDARY_MAX) || ((zPos) <= -LEVEL_BOUNDARY_MAX) || ((zPos) >= LEVEL_BOUNDARY_MAX)) -#define get_surface_height_at_location(x, z, surf) (-((x) * (surf)->normal.x + (surf)->normal.z * (z) + (surf)->originOffset) / (surf)->normal.y); +#define get_surface_height_at_location(xPos, zPos, surf) (-((xPos) * (surf)->normal.x + (surf)->normal.z * (zPos) + (surf)->originOffset) / (surf)->normal.y) #define SURFACE_YAW(s) (atan2s(((s)->normal.z), ((s)->normal.x))) diff --git a/src/game/behaviors/bub.inc.c b/src/game/behaviors/bub.inc.c index b208625fe..8ee5f28f2 100644 --- a/src/game/behaviors/bub.inc.c +++ b/src/game/behaviors/bub.inc.c @@ -7,9 +7,9 @@ // TODO: Rename these. These have nothing to do with birds. void bub_spawner_act_0(void) { s32 i; - s32 sp18 = o->oCheepCheepSpawnerSpawnAmount; + s32 amt = o->oCheepCheepSpawnerSpawnAmount; if (o->oDistanceToMario < 1500.0f) { - for (i = 0; i < sp18; i++) + for (i = 0; i < amt; i++) spawn_object(o, MODEL_BUB, bhvBub); o->oAction = 1; } @@ -35,12 +35,10 @@ void bhv_bub_spawner_loop(void) { cur_obj_call_action_function(sBirdChirpChirpActions); } -void bub_move_vertically(s32 a0) { - f32 sp1C = o->parentObj->oPosY; - if (sp1C - 100.0f - o->oCheepCheepMaxYOffset < o->oPosY - && o->oPosY < sp1C + 1000.0f + o->oCheepCheepMaxYOffset) - o->oPosY = approach_f32_symmetric(o->oPosY, o->oCheepCheepTargetY, a0); - else { +void bub_move_vertically(s32 ySpeed) { + f32 parentY = o->parentObj->oPosY; + if (parentY - 100.0f - o->oCheepCheepMaxYOffset < o->oPosY && o->oPosY < parentY + 1000.0f + o->oCheepCheepMaxYOffset) { + o->oPosY = approach_f32_symmetric(o->oPosY, o->oCheepCheepTargetY, ySpeed); } } diff --git a/src/game/behaviors/chuckya.inc.c b/src/game/behaviors/chuckya.inc.c index abafa4160..8e70e957b 100644 --- a/src/game/behaviors/chuckya.inc.c +++ b/src/game/behaviors/chuckya.inc.c @@ -26,8 +26,7 @@ void common_anchor_mario_behavior(f32 forwardVel, f32 yVel, s32 flag) { o->parentObj->oCommonAnchorAction = 0; break; case 3: - gMarioObject->oInteractStatus |= - (INT_STATUS_MARIO_UNK2 + INT_STATUS_MARIO_UNK6); // loads 2 interactions at once? + gMarioObject->oInteractStatus |= (INT_STATUS_MARIO_UNK2 + INT_STATUS_MARIO_UNK6); // loads 2 interactions at once? gMarioStates[0].forwardVel = 10.0f; gMarioStates[0].vel[1] = 10.0f; o->parentObj->oCommonAnchorAction = 0; @@ -42,29 +41,32 @@ void bhv_chuckya_anchor_mario_loop(void) { common_anchor_mario_behavior(40.0f, 40.0f, 64); } -s32 unknown_chuckya_function(s32 sp20, f32 sp24, f32 sp28, s32 sp2C) { - s32 sp1C = 0; +s32 unknown_chuckya_function(s32 updateAngle, f32 latDist, f32 dist, s32 time) { + s32 ret = 0; if (o->oChuckyaUnused != 4) { - if (sp24 < cur_obj_lateral_dist_from_mario_to_home()) { - if (cur_obj_lateral_dist_to_home() < 200.0f) - sp1C = 0; - else { - sp1C = 1; + if (latDist < cur_obj_lateral_dist_from_mario_to_home()) { + if (cur_obj_lateral_dist_to_home() < 200.0f) { + ret = 0; + } else { + ret = 1; o->oAngleToMario = cur_obj_angle_to_home(); } - } else if (o->oDistanceToMario > sp28) { - if (gGlobalTimer % (s16) sp2C == 0) + } else if (o->oDistanceToMario > dist) { + if ((gGlobalTimer % (s16) time) == 0) { o->oAngleToMario = obj_angle_to_object(o, gMarioObject); - sp1C = 2; - } else - sp1C = 3; - if (sp20 && update_angle_from_move_flags(&o->oAngleToMario)) { - sp1C = 4; + } + ret = 2; + } else { + ret = 3; + } + if (updateAngle && update_angle_from_move_flags(&o->oAngleToMario)) { + ret = 4; o->oChuckyaUnused = 4; } - } else - sp1C = 4; - return sp1C; + } else { + ret = 4; + } + return ret; } s32 approach_forward_vel(f32 *arr, f32 target, f32 inc) { diff --git a/src/game/behaviors/switch_hidden_objects.inc.c b/src/game/behaviors/switch_hidden_objects.inc.c index 0bf7cd6df..cc06c53af 100644 --- a/src/game/behaviors/switch_hidden_objects.inc.c +++ b/src/game/behaviors/switch_hidden_objects.inc.c @@ -32,7 +32,7 @@ void breakable_box_init(void) { } void hidden_breakable_box_actions(void) { - struct Object *sp1C; + struct Object *switchObj; obj_set_hitbox(o, &sBreakableBoxHitbox); cur_obj_set_model(MODEL_BREAKABLE_BOX_SMALL); if (o->oAction == 0) { @@ -42,8 +42,8 @@ void hidden_breakable_box_actions(void) { breakable_box_init(); if (o->oHiddenObjectSwitchObj == NULL) o->oHiddenObjectSwitchObj = cur_obj_nearest_object_with_behavior(bhvFloorSwitchHiddenObjects); - if ((sp1C = o->oHiddenObjectSwitchObj) != NULL) - if (sp1C->oAction == 2) { + if ((switchObj = o->oHiddenObjectSwitchObj) != NULL) + if (switchObj->oAction == 2) { o->oAction++; cur_obj_enable_rendering(); cur_obj_unhide(); @@ -63,22 +63,22 @@ void hidden_breakable_box_actions(void) { cur_obj_become_intangible(); cur_obj_disable_rendering(); o->oInteractStatus = 0; - if ((sp1C = o->oHiddenObjectSwitchObj) != NULL) - if (sp1C->oAction == 0) + if ((switchObj = o->oHiddenObjectSwitchObj) != NULL) + if (switchObj->oAction == 0) o->oAction = 0; } } void hidden_unbreakable_box_actions(void) { - struct Object *sp1C; + struct Object *switchObj; obj_set_collision_data(o, wdw_seg7_collision_07018528); if (o->oAction == 0) { cur_obj_disable_rendering(); cur_obj_become_intangible(); if (o->oHiddenObjectSwitchObj == NULL) o->oHiddenObjectSwitchObj = cur_obj_nearest_object_with_behavior(bhvFloorSwitchHiddenObjects); - if ((sp1C = o->oHiddenObjectSwitchObj) != NULL) - if (sp1C->oAction == 2) { + if ((switchObj = o->oHiddenObjectSwitchObj) != NULL) + if (switchObj->oAction == 2) { o->oAction++; cur_obj_enable_rendering(); cur_obj_unhide(); diff --git a/src/game/object_helpers.c b/src/game/object_helpers.c index 37aa9c4cc..f0412cfa6 100644 --- a/src/game/object_helpers.c +++ b/src/game/object_helpers.c @@ -171,8 +171,7 @@ Gfx *geo_switch_area(s32 callContext, struct GraphNode *node) { #endif s16 roomCase; struct Surface *floor; - UNUSED struct Object *sp1C = - (struct Object *) gCurGraphNodeObject; // TODO: change global type to Object pointer + UNUSED struct Object *obj = (struct Object *) gCurGraphNodeObject; // TODO: change global type to Object pointer struct GraphNodeSwitchCase *switchCase = (struct GraphNodeSwitchCase *) node; if (callContext == GEO_CONTEXT_RENDER) { @@ -2059,7 +2058,6 @@ static void obj_build_vel_from_transform(struct Object *obj) { f32 left = obj->oLeftVel; f32 forward = obj->oForwardVel; - //! Typo, up and left should be swapped obj->oVelX = obj->transform[0][0] * left + obj->transform[1][0] * up + obj->transform[2][0] * forward; obj->oVelY = obj->transform[0][1] * left + obj->transform[1][1] * up + obj->transform[2][1] * forward; obj->oVelZ = obj->transform[0][2] * left + obj->transform[1][2] * up + obj->transform[2][2] * forward; From 93000a11d49feecc5af297e44a0370f45a84bed9 Mon Sep 17 00:00:00 2001 From: Arceveti <73617174+Arceveti@users.noreply.github.com> Date: Wed, 22 Sep 2021 00:02:04 -0700 Subject: [PATCH 04/26] OBJ_FLAG_UCODE_LARGE for thwomps and tilting inverted pyramid --- data/behavior_data.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/data/behavior_data.c b/data/behavior_data.c index 7e8ad4378..d2119d981 100644 --- a/data/behavior_data.c +++ b/data/behavior_data.c @@ -1096,7 +1096,7 @@ const BehaviorScript bhvGrindel[] = { const BehaviorScript bhvThwomp2[] = { BEGIN(OBJ_LIST_SURFACE), LOAD_COLLISION_DATA(thwomp_seg5_collision_0500B92C), - OR_INT(oFlags, (OBJ_FLAG_COMPUTE_DIST_TO_MARIO | OBJ_FLAG_SET_FACE_YAW_TO_MOVE_YAW | OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE)), + OR_LONG(oFlags, (OBJ_FLAG_COMPUTE_DIST_TO_MARIO | OBJ_FLAG_SET_FACE_YAW_TO_MOVE_YAW | OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE | OBJ_FLAG_UCODE_LARGE)), DROP_TO_FLOOR(), ADD_FLOAT(oPosY, 1), SET_HOME(), @@ -1111,7 +1111,7 @@ const BehaviorScript bhvThwomp2[] = { const BehaviorScript bhvThwomp[] = { BEGIN(OBJ_LIST_SURFACE), LOAD_COLLISION_DATA(thwomp_seg5_collision_0500B7D0), - OR_INT(oFlags, (OBJ_FLAG_COMPUTE_DIST_TO_MARIO | OBJ_FLAG_SET_FACE_YAW_TO_MOVE_YAW | OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE)), + OR_LONG(oFlags, (OBJ_FLAG_COMPUTE_DIST_TO_MARIO | OBJ_FLAG_SET_FACE_YAW_TO_MOVE_YAW | OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE | OBJ_FLAG_UCODE_LARGE)), DROP_TO_FLOOR(), ADD_FLOAT(oPosY, 1), SCALE(/*Unused*/ 0, /*Field*/ 140), @@ -1395,7 +1395,7 @@ const BehaviorScript bhvDddMovingPole[] = { const BehaviorScript bhvBitfsTiltingInvertedPyramid[] = { BEGIN(OBJ_LIST_SURFACE), - OR_INT(oFlags, (OBJ_FLAG_COMPUTE_DIST_TO_MARIO | OBJ_FLAG_SET_FACE_YAW_TO_MOVE_YAW | OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE)), + OR_LONG(oFlags, (OBJ_FLAG_COMPUTE_DIST_TO_MARIO | OBJ_FLAG_SET_FACE_YAW_TO_MOVE_YAW | OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE | OBJ_FLAG_UCODE_LARGE)), LOAD_COLLISION_DATA(bitfs_seg7_collision_inverted_pyramid), SET_HOME(), CALL_NATIVE(bhv_platform_normals_init), From 164650b82acc62e47fede23fd53e6efb57e88442 Mon Sep 17 00:00:00 2001 From: Fazana <52551480+FazanaJ@users.noreply.github.com> Date: Wed, 22 Sep 2021 17:33:34 +0100 Subject: [PATCH 05/26] Vanilla ending credits bugfixes The black border's a bit hacky because I don't remember where the original game did it lol, so ideally write over it with the original implementation if possible. --- src/game/camera.c | 62 ------------------------------- src/game/ingame_menu.c | 15 +++++++- src/game/level_update.c | 4 ++ src/game/mario_actions_cutscene.c | 42 +++++---------------- src/game/mario_actions_cutscene.h | 2 + src/game/rendering_graph_node.c | 15 +++++++- 6 files changed, 42 insertions(+), 98 deletions(-) diff --git a/src/game/camera.c b/src/game/camera.c index 19dffee66..930644b20 100644 --- a/src/game/camera.c +++ b/src/game/camera.c @@ -3725,18 +3725,6 @@ s32 move_point_along_spline(Vec3f p, struct CutsceneSplinePoint spline[], s16 *s } progressChange = (secondSpeed - firstSpeed) * *progress + firstSpeed; -#ifdef VERSION_EU - if (gCamera->cutscene == CUTSCENE_INTRO_PEACH) { - progressChange += progressChange * 0.19f; - } - if (gCamera->cutscene == CUTSCENE_CREDITS) { - progressChange += progressChange * 0.15f; - } - if (gCamera->cutscene == CUTSCENE_ENDING) { - progressChange += progressChange * 0.1f; - } -#endif - if (1 <= (*progress += progressChange)) { (*splineSegment)++; if (spline[*splineSegment + 3].index == -1) { @@ -6490,15 +6478,6 @@ struct CutsceneSplinePoint sIntroPipeToDialogPosition[] = { /** * Describes the spline that the camera's focus follows, during the same part of the intro as the above. */ -#ifdef VERSION_EU -struct CutsceneSplinePoint sIntroPipeToDialogFocus[] = { - { 0, 25, { -1248, 450, 4596 } }, { 1, 71, { -1258, 485, 4606 } }, { 2, 71, { -1379, 344, 4769 } }, - { 3, 22, { -1335, 366, 4815 } }, { 4, 23, { -1315, 370, 4450 } }, { 5, 40, { -1322, 333, 4591 } }, - { 6, 25, { -1185, 329, 4616 } }, { 7, 21, { -1059, 380, 4487 } }, { 8, 14, { -1086, 421, 4206 } }, - { 9, 21, { -1321, 346, 4098 } }, { 0, 0, { -1328, 385, 4354 } }, { 0, 0, { -1328, 385, 4354 } }, - { 0, 0, { -1328, 385, 4354 } }, { -1, 0, { -1328, 385, 4354 } } -}; -#else struct CutsceneSplinePoint sIntroPipeToDialogFocus[] = { { 0, 20, { -1248, 450, 4596 } }, { 1, 59, { -1258, 485, 4606 } }, { 2, 59, { -1379, 344, 4769 } }, { 3, 20, { -1335, 366, 4815 } }, { 4, 23, { -1315, 370, 4450 } }, { 5, 40, { -1322, 333, 4591 } }, @@ -6506,7 +6485,6 @@ struct CutsceneSplinePoint sIntroPipeToDialogFocus[] = { { 9, 21, { -1321, 346, 4098 } }, { 0, 0, { -1328, 385, 4354 } }, { 0, 0, { -1328, 385, 4354 } }, { 0, 0, { -1328, 385, 4354 } }, { -1, 0, { -1328, 385, 4354 } } }; -#endif struct CutsceneSplinePoint sEndingFlyToWindowPos[] = { { 0, 0, { -86, 876, 640 } }, { 1, 0, { -86, 876, 610 } }, { 2, 0, { -66, 945, 393 } }, @@ -6551,11 +6529,7 @@ struct CutsceneSplinePoint sEndingLookUpAtCastle[] = { }; struct CutsceneSplinePoint sEndingLookAtSkyFocus[] = { -#ifdef VERSION_EU - { 0, 50, { 484, 1368, -868 } }, { 0, 72, { 479, 1372, -872 } }, { 0, 50, { 351, 1817, -918 } }, -#else { 0, 50, { 484, 1368, -888 } }, { 0, 72, { 479, 1372, -892 } }, { 0, 50, { 351, 1817, -918 } }, -#endif { 0, 50, { 351, 1922, -598 } }, { 0, 0, { 636, 2027, -415 } }, { 0, 0, { 636, 2027, -415 } }, { -1, 0, { 636, 2027, -415 } } }; @@ -7448,15 +7422,9 @@ BAD_RETURN(s32) cutscene_ending_look_up_at_castle(UNUSED struct Camera *c) { BAD_RETURN(s32) cutscene_ending_peach_wakeup(struct Camera *c) { cutscene_event(cutscene_ending_reset_spline, c, 0, 0); cutscene_event(cutscene_ending_look_up_at_castle, c, 0, 0); -#ifdef VERSION_EU - cutscene_event(cutscene_ending_look_up_at_castle, c, 265, -1); - cutscene_spawn_obj(7, 315); - cutscene_spawn_obj(9, 355); -#else cutscene_event(cutscene_ending_look_up_at_castle, c, 250, -1); cutscene_spawn_obj(7, 300); cutscene_spawn_obj(9, 340); -#endif vec3f_set(c->pos, -163.f, 978.f, -1082.f); player2_rotate_cam(c, -0x800, 0x2000, -0x2000, 0x2000); } @@ -7498,11 +7466,7 @@ BAD_RETURN(s32) cutscene_ending_kiss_here_we_go(struct Camera *c) { */ BAD_RETURN(s32) cutscene_ending_kiss(struct Camera *c) { cutscene_event(cutscene_ending_kiss_closeup, c, 0, 0); -#ifdef VERSION_EU - cutscene_event(cutscene_ending_kiss_here_we_go, c, 185, -1); -#else cutscene_event(cutscene_ending_kiss_here_we_go, c, 155, -1); -#endif player2_rotate_cam(c, -0x800, 0x2000, -0x2000, 0x2000); } @@ -9667,19 +9631,11 @@ BAD_RETURN(s32) play_sound_intro_turn_on_hud(UNUSED struct Camera *c) { * Fly to the pipe. Near the end, the camera jumps to Lakitu's position and the hud turns on. */ BAD_RETURN(s32) cutscene_intro_peach_fly_to_pipe(struct Camera *c) { -#if defined(VERSION_US) || defined(VERSION_SH) cutscene_event(play_sound_intro_turn_on_hud, c, 818, 818); -#elif defined(VERSION_EU) - cutscene_event(play_sound_intro_turn_on_hud, c, 673, 673); -#endif cutscene_spawn_obj(6, 1); cutscene_event(cutscene_intro_peach_start_flying_music, c, 0, 0); cutscene_event(cutscene_intro_peach_start_to_pipe_spline, c, 0, -1); -#ifdef VERSION_EU - cutscene_event(cutscene_intro_peach_clear_cutscene_status, c, 572, 572); -#else cutscene_event(cutscene_intro_peach_clear_cutscene_status, c, 717, 717); -#endif clamp_pitch(c->pos, c->focus, 0x3B00, -0x3B00); sCutsceneVars[1].point[1] = 400.f; } @@ -9721,9 +9677,6 @@ BAD_RETURN(s32) cutscene_intro_peach_letter(struct Camera *c) { cutscene_spawn_obj(5, 0); cutscene_event(cutscene_intro_peach_zoom_fov, c, 0, 0); cutscene_event(cutscene_intro_peach_start_letter_music, c, 65, 65); -#ifdef VERSION_EU - cutscene_event(cutscene_intro_peach_eu_lower_volume, c, 68, 68); -#endif cutscene_event(cutscene_intro_peach_start_to_pipe_spline, c, 0, 0); cutscene_event(peach_letter_text, c, 65, 65); #ifndef VERSION_JP @@ -10437,16 +10390,6 @@ BAD_RETURN(s32) cutscene_door_mode(struct Camera *c) { struct Cutscene sCutsceneEnding[] = { { cutscene_ending_mario_fall, 170 }, { cutscene_ending_mario_land, 70 }, -#ifdef VERSION_EU - { cutscene_ending_mario_land_closeup, 0x44 }, - { cutscene_ending_stars_free_peach, 0x15c }, - { cutscene_ending_peach_appears, 0x6d }, - { cutscene_ending_peach_descends, 0x212 }, - { cutscene_ending_mario_to_peach, 0x69 }, - { cutscene_ending_peach_wakeup, 0x1a4 }, - { cutscene_ending_dialog, 0x114 }, - { cutscene_ending_kiss, 0x10b }, -#else { cutscene_ending_mario_land_closeup, 75 }, #ifdef VERSION_SH { cutscene_ending_stars_free_peach, 431 }, @@ -10464,7 +10407,6 @@ struct Cutscene sCutsceneEnding[] = { { cutscene_ending_dialog, 236 }, #endif { cutscene_ending_kiss, 245 }, -#endif { cutscene_ending_cake_for_mario, CUTSCENE_LOOP }, { cutscene_ending_stop, 0 } }; @@ -10608,11 +10550,7 @@ struct Cutscene sCutsceneUnusedExit[] = { struct Cutscene sCutsceneIntroPeach[] = { { cutscene_intro_peach_letter, CUTSCENE_LOOP }, { cutscene_intro_peach_reset_fov, 35 }, -#ifdef VERSION_EU - { cutscene_intro_peach_fly_to_pipe, 675 }, -#else { cutscene_intro_peach_fly_to_pipe, 820 }, -#endif { cutscene_intro_peach_mario_appears, 270 }, { cutscene_intro_peach_dialog, CUTSCENE_LOOP } }; diff --git a/src/game/ingame_menu.c b/src/game/ingame_menu.c index ff23c9075..0292ebf78 100644 --- a/src/game/ingame_menu.c +++ b/src/game/ingame_menu.c @@ -1369,13 +1369,24 @@ void set_cutscene_message(s16 xOffset, s16 yOffset, s16 msgIndex, s16 msgDuratio void do_cutscene_handler(void) { s16 x; + create_dl_ortho_matrix(); + + if (gMarioState->action == ACT_CREDITS_CUTSCENE || gMarioState->action == ACT_END_PEACH_CUTSCENE || gMarioState->action == ACT_END_WAVING_CUTSCENE) + { + gDPSetRenderMode(gDisplayListHead++, G_RM_OPA_SURF, G_RM_OPA_SURF2); + gDPSetCycleType(gDisplayListHead++, G_CYC_FILL); + + gDPSetFillColor(gDisplayListHead++, GPACK_RGBA5551(0, 0, 0, 0) << 16 | GPACK_RGBA5551(0, 0, 0, 0)); + gDPFillRectangle(gDisplayListHead++, GFX_DIMENSIONS_RECT_FROM_LEFT_EDGE(0), 0, GFX_DIMENSIONS_RECT_FROM_RIGHT_EDGE(0) - 1, 32 - 1); + gDPFillRectangle(gDisplayListHead++, GFX_DIMENSIONS_RECT_FROM_LEFT_EDGE(0), SCREEN_HEIGHT - 32, GFX_DIMENSIONS_RECT_FROM_RIGHT_EDGE(0) - 1, SCREEN_HEIGHT - 1); + gDPSetCycleType(gDisplayListHead++, G_CYC_1CYCLE); + } + // is a cutscene playing? do not perform this handler's actions if so. if (gCutsceneMsgIndex == -1) { return; } - create_dl_ortho_matrix(); - gSPDisplayList(gDisplayListHead++, dl_ia_text_begin); gDPSetEnvColor(gDisplayListHead++, 255, 255, 255, gCutsceneMsgFade); diff --git a/src/game/level_update.c b/src/game/level_update.c index 91253bb7d..d449c5b89 100644 --- a/src/game/level_update.c +++ b/src/game/level_update.c @@ -500,6 +500,10 @@ void warp_credits(void) { break; case WARP_NODE_CREDITS_NEXT: + sEndCutsceneVp.vp.vscale[0] = 640; + sEndCutsceneVp.vp.vscale[1] = 360; + sEndCutsceneVp.vp.vtrans[0] = 640; + sEndCutsceneVp.vp.vtrans[1] = 480; marioAction = ACT_CREDITS_CUTSCENE; break; diff --git a/src/game/mario_actions_cutscene.c b/src/game/mario_actions_cutscene.c index d4f2775fa..76fb96f36 100644 --- a/src/game/mario_actions_cutscene.c +++ b/src/game/mario_actions_cutscene.c @@ -38,8 +38,8 @@ static UNUSED s32 sUnused; static s16 sEndPeachAnimation; static s16 sEndToadAnims[2]; -static Vp sEndCutsceneVp = { { { 640, 480, 511, 0 }, { 640, 480, 511, 0 } } }; -static struct CreditsEntry *sDispCreditsEntry = NULL; +Vp sEndCutsceneVp = { { { 640, 480, 511, 0 }, { 640, 480, 511, 0 } } }; +struct CreditsEntry *sDispCreditsEntry = NULL; // related to peach gfx? static s8 sPeachManualBlinkTime = 0; @@ -1667,11 +1667,7 @@ static void intro_cutscene_hide_hud_and_mario(struct MarioState *m) { advance_cutscene_step(m); } -#ifdef VERSION_EU - #define TIMER_SPAWN_PIPE 47 -#else - #define TIMER_SPAWN_PIPE 37 -#endif +#define TIMER_SPAWN_PIPE 37 static void intro_cutscene_peach_lakitu_scene(struct MarioState *m) { if ((s16) m->statusForCamera->cameraEvent != CAM_EVENT_START_INTRO) { @@ -1685,11 +1681,7 @@ static void intro_cutscene_peach_lakitu_scene(struct MarioState *m) { } #undef TIMER_SPAWN_PIPE -#ifdef VERSION_EU - #define TIMER_RAISE_PIPE 28 -#else - #define TIMER_RAISE_PIPE 38 -#endif +#define TIMER_RAISE_PIPE 38 static void intro_cutscene_raise_pipe(struct MarioState *m) { sIntroWarpPipeObj->oPosY = camera_approach_f32_symmetric(sIntroWarpPipeObj->oPosY, 260.0f, 10.0f); @@ -2049,10 +2041,7 @@ static void end_peach_cutscene_summon_jumbo_star(struct MarioState *m) { play_sound(SOUND_AIR_PEACH_TWINKLE, sEndJumboStarObj->header.gfx.cameraToObject); } -#if defined(VERSION_EU) - #define TIMER_FADE_IN_PEACH 201 - #define TIMER_DESCEND_PEACH 280 -#elif defined(VERSION_SH) +#if defined(VERSION_SH) #define TIMER_FADE_IN_PEACH 276 #define TIMER_DESCEND_PEACH 400 #else @@ -2111,11 +2100,7 @@ static void end_peach_cutscene_spawn_peach(struct MarioState *m) { } } -#ifdef VERSION_EU - #define TIMER_RUN_TO_PEACH 531 -#else - #define TIMER_RUN_TO_PEACH 584 -#endif +#define TIMER_RUN_TO_PEACH 584 // descend peach static void end_peach_cutscene_descend_peach(struct MarioState *m) { @@ -2192,7 +2177,7 @@ static void end_peach_cutscene_dialog_1(struct MarioState *m) { #endif sEndPeachAnimation = 6; break; - + #ifdef VERSION_SH case 111: #else @@ -2260,10 +2245,7 @@ static void end_peach_cutscene_dialog_1(struct MarioState *m) { } } -#if defined(VERSION_EU) - #define TIMER_SOMETHING_SPECIAL 150 - #define TIMER_PEACH_KISS 260 -#elif defined(VERSION_SH) +#if defined(VERSION_SH) #define TIMER_SOMETHING_SPECIAL 170 #define TIMER_PEACH_KISS 250 #else @@ -2292,7 +2274,7 @@ static void end_peach_cutscene_dialog_2(struct MarioState *m) { #ifdef VERSION_SH case 65: -#else +#else case 45: #endif sPeachIsBlinking = 1; @@ -2564,11 +2546,7 @@ static s32 act_end_peach_cutscene(struct MarioState *m) { return FALSE; } -#if defined(VERSION_EU) - #define TIMER_CREDITS_SHOW 51 - #define TIMER_CREDITS_PROGRESS 80 - #define TIMER_CREDITS_WARP 160 -#elif defined(VERSION_SH) +#if defined(VERSION_SH) #define TIMER_CREDITS_SHOW 61 #define TIMER_CREDITS_PROGRESS 90 #define TIMER_CREDITS_WARP 204 diff --git a/src/game/mario_actions_cutscene.h b/src/game/mario_actions_cutscene.h index ff42031d6..75a629295 100644 --- a/src/game/mario_actions_cutscene.h +++ b/src/game/mario_actions_cutscene.h @@ -24,5 +24,7 @@ Gfx *geo_switch_peach_eyes(s32 callContext, struct GraphNode *node, UNUSED s32 c s32 mario_ready_to_speak(void); s32 set_mario_npc_dialog(s32 actionArg); s32 mario_execute_cutscene_action(struct MarioState *m); +extern Vp sEndCutsceneVp; +extern struct CreditsEntry *sDispCreditsEntry; #endif // MARIO_ACTIONS_CUTSCENE_H diff --git a/src/game/rendering_graph_node.c b/src/game/rendering_graph_node.c index 253ea0d43..5e707191b 100644 --- a/src/game/rendering_graph_node.c +++ b/src/game/rendering_graph_node.c @@ -14,6 +14,7 @@ #include "engine/extended_bounds.h" #include "puppyprint.h" #include "debug_box.h" +#include "level_update.h" #include "config.h" @@ -226,6 +227,14 @@ LookAt lookAt; u8 ucodeTestSwitch = 1; +void reset_clipping(void) +{ + if (gMarioState->action == ACT_CREDITS_CUTSCENE) + make_viewport_clip_rect(&sEndCutsceneVp); + else + gDPSetScissor(gDisplayListHead++, G_SC_NON_INTERLACE, 0, gBorderHeight, SCREEN_WIDTH, SCREEN_HEIGHT - gBorderHeight); +} + /** * Process a master list node. This has been modified, so now it runs twice, for each microcode. It iterates through the first 5 layers of if the first index using F3DLX2.Rej, then it switches @@ -236,8 +245,8 @@ u8 ucodeTestSwitch = 1; static void geo_process_master_list_sub(struct GraphNodeMasterList *node) { struct DisplayListNode *currList; s32 startLayer, endLayer, currLayer = LAYER_FORCE; - s32 headsIndex = 1; - s32 renderPhase = 0; + s32 headsIndex = LIST_HEADS_REJ; + s32 renderPhase = RENDER_PHASE_REJ_ZB; s32 enableZBuffer = (node->node.flags & GRAPH_RENDER_Z_BUFFER) != 0; struct RenderModeContainer *mode1List = &renderModeTable_1Cycle[enableZBuffer]; struct RenderModeContainer *mode2List = &renderModeTable_2Cycle[enableZBuffer]; @@ -283,6 +292,7 @@ static void geo_process_master_list_sub(struct GraphNodeMasterList *node) { gSPClipRatio(gDisplayListHead++, FRUSTRATIO_1); } gSPLookAt(gDisplayListHead++, &lookAt); + reset_clipping(); #endif if (enableZBuffer) { gDPPipeSync(gDisplayListHead++); @@ -324,6 +334,7 @@ static void geo_process_master_list_sub(struct GraphNodeMasterList *node) { gSPLoadUcodeL(gDisplayListHead++, gspF3DZEX2_PosLight_fifo); init_rcp(KEEP_ZBUFFER); gSPClipRatio(gDisplayListHead++, FRUSTRATIO_1); + reset_clipping(); #endif #ifdef VISUAL_DEBUG From 78864302f76cbf17eef68ed5ea2d8f9421dd0f69 Mon Sep 17 00:00:00 2001 From: Arceveti <73617174+Arceveti@users.noreply.github.com> Date: Wed, 22 Sep 2021 11:00:10 -0700 Subject: [PATCH 06/26] OBJ_FLAG_UCODE_LARGE for breakable boxes and LLL tilting inverted pyramid --- data/behavior_data.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/data/behavior_data.c b/data/behavior_data.c index d2119d981..cb91fc2ea 100644 --- a/data/behavior_data.c +++ b/data/behavior_data.c @@ -1715,7 +1715,7 @@ const BehaviorScript bhvFloorSwitchHiddenObjects[] = { const BehaviorScript bhvHiddenObject[] = { BEGIN(OBJ_LIST_SURFACE), - OR_INT(oFlags, OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE), + OR_LONG(oFlags, (OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE | OBJ_FLAG_UCODE_LARGE)), LOAD_COLLISION_DATA(breakable_box_seg8_collision_08012D70), SET_FLOAT(oCollisionDistance, 300), BEGIN_LOOP(), @@ -1725,7 +1725,7 @@ const BehaviorScript bhvHiddenObject[] = { const BehaviorScript bhvBreakableBox[] = { BEGIN(OBJ_LIST_SURFACE), - OR_INT(oFlags, OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE), + OR_LONG(oFlags, (OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE | OBJ_FLAG_UCODE_LARGE)), LOAD_COLLISION_DATA(breakable_box_seg8_collision_08012D70), SET_FLOAT(oCollisionDistance, 500), CALL_NATIVE(bhv_init_room), @@ -2358,7 +2358,7 @@ const BehaviorScript bhvLllSinkingSquarePlatforms[] = { const BehaviorScript bhvLllTiltingInvertedPyramid[] = { BEGIN(OBJ_LIST_SURFACE), - OR_INT(oFlags, (OBJ_FLAG_COMPUTE_DIST_TO_MARIO | OBJ_FLAG_SET_FACE_YAW_TO_MOVE_YAW | OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE)), + OR_LONG(oFlags, (OBJ_FLAG_COMPUTE_DIST_TO_MARIO | OBJ_FLAG_SET_FACE_YAW_TO_MOVE_YAW | OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE | OBJ_FLAG_UCODE_LARGE)), LOAD_COLLISION_DATA(lll_seg7_collision_inverted_pyramid), ADD_FLOAT(oPosY, 5), SET_HOME(), From 9e4a569cf662fc0f2385a7ac02a591e9c7e453b8 Mon Sep 17 00:00:00 2001 From: Arceveti <73617174+Arceveti@users.noreply.github.com> Date: Wed, 22 Sep 2021 11:19:46 -0700 Subject: [PATCH 07/26] Add GRAPH_NODE_TYPES_MASK and MODEL_STATE_MASK --- enhancements/platform_displacement_2.diff | 4 +-- include/sm64.h | 2 ++ src/engine/graph_node.c | 16 +++++----- src/engine/graph_node.h | 2 ++ src/game/behaviors/bowser.inc.c | 4 +-- src/game/geo_misc.c | 14 ++++---- src/game/level_geo.c | 2 +- src/game/mario.c | 4 +-- src/game/mario_misc.c | 39 +++++++++++------------ src/game/moving_texture.c | 10 +++--- src/game/obj_behaviors.c | 3 +- src/game/object_helpers.c | 8 ++--- src/game/paintings.c | 4 +-- src/game/screen_transition.c | 2 +- src/menu/intro_geo.c | 14 ++++---- 15 files changed, 64 insertions(+), 64 deletions(-) diff --git a/enhancements/platform_displacement_2.diff b/enhancements/platform_displacement_2.diff index ea8bb1294..0e5aec8c8 100644 --- a/enhancements/platform_displacement_2.diff +++ b/enhancements/platform_displacement_2.diff @@ -1595,9 +1595,9 @@ index 0000000..97cba2a + if (gCurGraphNodeHeldObject != 0) + sp24 = gCurGraphNodeHeldObject->objNode; + if (sp24->oOpacity == 0xFF) -+ sp20->fnNode.node.flags = (sp20->fnNode.node.flags & 0xFF) | GRAPH_NODE_TYPE_FUNCTIONAL; ++ sp20->fnNode.node.flags = (sp20->fnNode.node.flags & GRAPH_NODE_TYPES_MASK) | GRAPH_NODE_TYPE_FUNCTIONAL; + else -+ sp20->fnNode.node.flags = (sp20->fnNode.node.flags & 0xFF) | (GRAPH_NODE_TYPE_FUNCTIONAL | GRAPH_NODE_TYPE_400); ++ sp20->fnNode.node.flags = (sp20->fnNode.node.flags & GRAPH_NODE_TYPES_MASK) | (GRAPH_NODE_TYPE_FUNCTIONAL | GRAPH_NODE_TYPE_400); + sp28 = sp2C = alloc_display_list(2 * sizeof(Gfx)); + + if (sp24->oBowserUnk1B2 != 0) { diff --git a/include/sm64.h b/include/sm64.h index c0c32b7dc..9953b1aa3 100644 --- a/include/sm64.h +++ b/include/sm64.h @@ -154,6 +154,8 @@ #define MODEL_STATE_NOISE_ALPHA ((1 << 7) | MODEL_STATE_ALPHA) // (0x080 | MODEL_STATE_ALPHA) #define MODEL_STATE_METAL (1 << 9) // 0x200 +#define MODEL_STATE_MASK 0xFF + #define MARIO_NORMAL_CAP /* 0x00000001 */ (1 << 0) #define MARIO_VANISH_CAP /* 0x00000002 */ (1 << 1) #define MARIO_METAL_CAP /* 0x00000004 */ (1 << 2) diff --git a/src/engine/graph_node.c b/src/engine/graph_node.c index aa0a9616f..c26ca2bb0 100644 --- a/src/engine/graph_node.c +++ b/src/engine/graph_node.c @@ -226,7 +226,7 @@ init_graph_node_translation_rotation(struct AllocOnlyPool *pool, vec3s_copy(graphNode->translation, translation); vec3s_copy(graphNode->rotation, rotation); - graphNode->node.flags = (drawingLayer << 8) | (graphNode->node.flags & 0xFF); + graphNode->node.flags = (drawingLayer << 8) | (graphNode->node.flags & GRAPH_NODE_TYPES_MASK); graphNode->displayList = displayList; } @@ -248,7 +248,7 @@ struct GraphNodeTranslation *init_graph_node_translation(struct AllocOnlyPool *p init_scene_graph_node_links(&graphNode->node, GRAPH_NODE_TYPE_TRANSLATION); vec3s_copy(graphNode->translation, translation); - graphNode->node.flags = (drawingLayer << 8) | (graphNode->node.flags & 0xFF); + graphNode->node.flags = (drawingLayer << 8) | (graphNode->node.flags & GRAPH_NODE_TYPES_MASK); graphNode->displayList = displayList; } @@ -269,7 +269,7 @@ struct GraphNodeRotation *init_graph_node_rotation(struct AllocOnlyPool *pool, if (graphNode != NULL) { init_scene_graph_node_links(&graphNode->node, GRAPH_NODE_TYPE_ROTATION); vec3s_copy(graphNode->rotation, rotation); - graphNode->node.flags = (drawingLayer << 8) | (graphNode->node.flags & 0xFF); + graphNode->node.flags = (drawingLayer << 8) | (graphNode->node.flags & GRAPH_NODE_TYPES_MASK); graphNode->displayList = displayList; } @@ -288,7 +288,7 @@ struct GraphNodeScale *init_graph_node_scale(struct AllocOnlyPool *pool, if (graphNode != NULL) { init_scene_graph_node_links(&graphNode->node, GRAPH_NODE_TYPE_SCALE); - graphNode->node.flags = (drawingLayer << 8) | (graphNode->node.flags & 0xFF); + graphNode->node.flags = (drawingLayer << 8) | (graphNode->node.flags & GRAPH_NODE_TYPES_MASK); graphNode->scale = scale; graphNode->displayList = displayList; } @@ -358,7 +358,7 @@ struct GraphNodeAnimatedPart *init_graph_node_animated_part(struct AllocOnlyPool if (graphNode != NULL) { init_scene_graph_node_links(&graphNode->node, GRAPH_NODE_TYPE_ANIMATED_PART); vec3s_copy(graphNode->translation, translation); - graphNode->node.flags = (drawingLayer << 8) | (graphNode->node.flags & 0xFF); + graphNode->node.flags = (drawingLayer << 8) | (graphNode->node.flags & GRAPH_NODE_TYPES_MASK); graphNode->displayList = displayList; } @@ -380,7 +380,7 @@ struct GraphNodeBone *init_graph_node_bone(struct AllocOnlyPool *pool, init_scene_graph_node_links(&graphNode->node, GRAPH_NODE_TYPE_BONE); vec3s_copy(graphNode->translation, translation); vec3s_copy(graphNode->rotation, rotation); - graphNode->node.flags = (drawingLayer << 8) | (graphNode->node.flags & 0xFF); + graphNode->node.flags = (drawingLayer << 8) | (graphNode->node.flags & GRAPH_NODE_TYPES_MASK); graphNode->displayList = displayList; } @@ -401,7 +401,7 @@ struct GraphNodeBillboard *init_graph_node_billboard(struct AllocOnlyPool *pool, if (graphNode != NULL) { init_scene_graph_node_links(&graphNode->node, GRAPH_NODE_TYPE_BILLBOARD); vec3s_copy(graphNode->translation, translation); - graphNode->node.flags = (drawingLayer << 8) | (graphNode->node.flags & 0xFF); + graphNode->node.flags = (drawingLayer << 8) | (graphNode->node.flags & GRAPH_NODE_TYPES_MASK); graphNode->displayList = displayList; } @@ -420,7 +420,7 @@ struct GraphNodeDisplayList *init_graph_node_display_list(struct AllocOnlyPool * if (graphNode != NULL) { init_scene_graph_node_links(&graphNode->node, GRAPH_NODE_TYPE_DISPLAY_LIST); - graphNode->node.flags = (drawingLayer << 8) | (graphNode->node.flags & 0xFF); + graphNode->node.flags = (drawingLayer << 8) | (graphNode->node.flags & GRAPH_NODE_TYPES_MASK); graphNode->displayList = displayList; } diff --git a/src/engine/graph_node.h b/src/engine/graph_node.h index 20466df1d..61e4f687a 100644 --- a/src/engine/graph_node.h +++ b/src/engine/graph_node.h @@ -46,6 +46,8 @@ #define GRAPH_NODE_TYPE_HELD_OBJ (0x02E | GRAPH_NODE_TYPE_FUNCTIONAL) #define GRAPH_NODE_TYPE_CULLING_RADIUS 0x02F +#define GRAPH_NODE_TYPES_MASK 0xFF + // The number of master lists. A master list determines the order and render // mode with which display lists are drawn. #define GFX_NUM_MASTER_LISTS (LAYER_LAST_ALL + 1) diff --git a/src/game/behaviors/bowser.inc.c b/src/game/behaviors/bowser.inc.c index 93394344a..6c8f42416 100644 --- a/src/game/behaviors/bowser.inc.c +++ b/src/game/behaviors/bowser.inc.c @@ -1912,9 +1912,9 @@ Gfx *geo_bits_bowser_coloring(s32 callContext, struct GraphNode *node, UNUSED s3 } // Set layers if object is transparent or not if (obj->oOpacity == 0xFF) { - graphNode->fnNode.node.flags = (graphNode->fnNode.node.flags & 0xFF) | (LAYER_OPAQUE << 8); + graphNode->fnNode.node.flags = (graphNode->fnNode.node.flags & GRAPH_NODE_TYPES_MASK) | (LAYER_OPAQUE << 8); } else { - graphNode->fnNode.node.flags = (graphNode->fnNode.node.flags & 0xFF) | (LAYER_TRANSPARENT << 8); + graphNode->fnNode.node.flags = (graphNode->fnNode.node.flags & GRAPH_NODE_TYPES_MASK) | (LAYER_TRANSPARENT << 8); } gfx = gfxHead = alloc_display_list(2 * sizeof(Gfx)); // If TRUE, clear lighting to give rainbow color diff --git a/src/game/geo_misc.c b/src/game/geo_misc.c index 383f5fff3..eef196739 100644 --- a/src/game/geo_misc.c +++ b/src/game/geo_misc.c @@ -78,7 +78,7 @@ s16 round_float(f32 num) { * Create a display list for the light in the castle lobby that shows the * player where to look to enter Tower of the Wing Cap. */ -Gfx *geo_exec_inside_castle_light(s32 callContext, struct GraphNode *node, UNUSED f32 mtx[4][4]) { +Gfx *geo_exec_inside_castle_light(s32 callContext, struct GraphNode *node, UNUSED Mat4 mtx) { s32 flags; struct GraphNodeGenerated *generatedNode; Gfx *displayListHead = NULL; @@ -96,7 +96,7 @@ Gfx *geo_exec_inside_castle_light(s32 callContext, struct GraphNode *node, UNUSE } generatedNode = (struct GraphNodeGenerated *) node; - generatedNode->fnNode.node.flags = (generatedNode->fnNode.node.flags & 0xFF) | (LAYER_TRANSPARENT << 8); + generatedNode->fnNode.node.flags = (generatedNode->fnNode.node.flags & GRAPH_NODE_TYPES_MASK) | (LAYER_TRANSPARENT << 8); gSPDisplayList(displayListHead++, dl_castle_lobby_wing_cap_light); gSPEndDisplayList(displayListHead); @@ -110,7 +110,7 @@ Gfx *geo_exec_inside_castle_light(s32 callContext, struct GraphNode *node, UNUSE * Update static timer variables that control the flying carpets' ripple effect. */ Gfx *geo_exec_flying_carpet_timer_update(s32 callContext, UNUSED struct GraphNode *node, - UNUSED f32 mtx[4][4]) { + UNUSED Mat4 mtx) { if (callContext != GEO_CONTEXT_RENDER) { sFlyingCarpetRippleTimer = 0; sPrevAreaTimer = gAreaUpdateCounter - 1; @@ -130,7 +130,7 @@ Gfx *geo_exec_flying_carpet_timer_update(s32 callContext, UNUSED struct GraphNod /** * Create a display list for a flying carpet with dynamic ripples. */ -Gfx *geo_exec_flying_carpet_create(s32 callContext, struct GraphNode *node, UNUSED f32 mtx[4][4]) { +Gfx *geo_exec_flying_carpet_create(s32 callContext, struct GraphNode *node, UNUSED Mat4 mtx) { s16 n, row, col, x, y, z, tx, ty; Vtx *verts; struct GraphNodeGenerated *generatedNode = (struct GraphNodeGenerated *) node; @@ -149,7 +149,7 @@ Gfx *geo_exec_flying_carpet_create(s32 callContext, struct GraphNode *node, UNUS return NULL; } - generatedNode->fnNode.node.flags = (generatedNode->fnNode.node.flags & 0xFF) | (LAYER_OPAQUE << 8); + generatedNode->fnNode.node.flags = (generatedNode->fnNode.node.flags & GRAPH_NODE_TYPES_MASK) | (LAYER_OPAQUE << 8); for (n = 0; n <= 20; n++) { row = n / 3; @@ -193,7 +193,7 @@ Gfx *geo_exec_flying_carpet_create(s32 callContext, struct GraphNode *node, UNUS /** * Create a display list for the end screen with Peach's delicious cake. */ -Gfx *geo_exec_cake_end_screen(s32 callContext, struct GraphNode *node, UNUSED f32 mtx[4][4]) { +Gfx *geo_exec_cake_end_screen(s32 callContext, struct GraphNode *node, UNUSED Mat4 mtx) { struct GraphNodeGenerated *generatedNode = (struct GraphNodeGenerated *) node; Gfx *displayList = NULL; Gfx *displayListHead = NULL; @@ -202,7 +202,7 @@ Gfx *geo_exec_cake_end_screen(s32 callContext, struct GraphNode *node, UNUSED f3 displayList = alloc_display_list(3 * sizeof(*displayList)); displayListHead = displayList; - generatedNode->fnNode.node.flags = (generatedNode->fnNode.node.flags & 0xFF) | (LAYER_OPAQUE << 8); + generatedNode->fnNode.node.flags = (generatedNode->fnNode.node.flags & GRAPH_NODE_TYPES_MASK) | (LAYER_OPAQUE << 8); #ifdef VERSION_EU gSPDisplayList(displayListHead++, dl_cake_end_screen); #else diff --git a/src/game/level_geo.c b/src/game/level_geo.c index 113bcd1a3..a108e7a34 100644 --- a/src/game/level_geo.c +++ b/src/game/level_geo.c @@ -40,7 +40,7 @@ Gfx *geo_envfx_main(s32 callContext, struct GraphNode *node, Mat4 mtxf) { mtxf_to_mtx(mtx, mtxf); gSPMatrix(&gfx[0], VIRTUAL_TO_PHYSICAL(mtx), G_MTX_MODELVIEW | G_MTX_LOAD | G_MTX_NOPUSH); gSPBranchList(&gfx[1], VIRTUAL_TO_PHYSICAL(particleList)); - execNode->fnNode.node.flags = (execNode->fnNode.node.flags & 0xFF) | (LAYER_ALPHA << 8); + execNode->fnNode.node.flags = (execNode->fnNode.node.flags & GRAPH_NODE_TYPES_MASK) | (LAYER_ALPHA << 8); } SET_HIGH_U16_OF_32(*params, gAreaUpdateCounter); } diff --git a/src/game/mario.c b/src/game/mario.c index 3a48d8981..a7fa35267 100644 --- a/src/game/mario.c +++ b/src/game/mario.c @@ -1664,8 +1664,8 @@ void mario_update_hitbox_and_cap_model(struct MarioState *m) { m->marioObj->hitboxHeight = 160.0f; } - if ((m->flags & MARIO_TELEPORTING) && (m->fadeWarpOpacity != 0xFF)) { - bodyState->modelState &= ~0xFF; + if ((m->flags & MARIO_TELEPORTING) && (m->fadeWarpOpacity != MODEL_STATE_MASK)) { + bodyState->modelState &= ~MODEL_STATE_MASK; bodyState->modelState |= (MODEL_STATE_ALPHA | m->fadeWarpOpacity); } } diff --git a/src/game/mario_misc.c b/src/game/mario_misc.c index c8cd5b31d..054f1ac8d 100644 --- a/src/game/mario_misc.c +++ b/src/game/mario_misc.c @@ -308,19 +308,16 @@ static Gfx *make_gfx_mario_alpha(struct GraphNodeGenerated *node, s16 alpha) { Gfx *gfxHead = NULL; if (alpha == 255) { - node->fnNode.node.flags = (node->fnNode.node.flags & 0xFF) | (LAYER_OPAQUE << 8); + node->fnNode.node.flags = (node->fnNode.node.flags & GRAPH_NODE_TYPES_MASK) | (LAYER_OPAQUE << 8); gfxHead = alloc_display_list(2 * sizeof(*gfxHead)); gfx = gfxHead; } else { - node->fnNode.node.flags = (node->fnNode.node.flags & 0xFF) | (LAYER_TRANSPARENT << 8); + node->fnNode.node.flags = (node->fnNode.node.flags & GRAPH_NODE_TYPES_MASK) | (LAYER_TRANSPARENT << 8); gfxHead = alloc_display_list(3 * sizeof(*gfxHead)); gfx = gfxHead; - if (gMarioState->flags & MARIO_VANISH_CAP) - { + if (gMarioState->flags & MARIO_VANISH_CAP) { gDPSetAlphaCompare(gfx++, G_AC_DITHER); - } - else - { + } else { gDPSetAlphaCompare(gfx++, G_AC_NONE); } } @@ -339,7 +336,7 @@ Gfx *geo_mirror_mario_set_alpha(s32 callContext, struct GraphNode *node, UNUSED s16 alpha; if (callContext == GEO_CONTEXT_RENDER) { - alpha = (bodyState->modelState & MODEL_STATE_ALPHA) ? (bodyState->modelState & 0xFF) : 0xFF; + alpha = (bodyState->modelState & MODEL_STATE_ALPHA) ? (bodyState->modelState & MODEL_STATE_MASK) : 0xFF; #ifdef PUPPYCAM if (alpha > gPuppyCam.opacity) { alpha = gPuppyCam.opacity; @@ -370,7 +367,7 @@ Gfx *geo_switch_mario_stand_run(s32 callContext, struct GraphNode *node, UNUSED /** * Geo node script that makes Mario blink */ -Gfx *geo_switch_mario_eyes(s32 callContext, struct GraphNode *node, UNUSED Mat4 *c) { +Gfx *geo_switch_mario_eyes(s32 callContext, struct GraphNode *node, UNUSED Mat4 *mtx) { struct GraphNodeSwitchCase *switchCase = (struct GraphNodeSwitchCase *) node; struct MarioBodyState *bodyState = &gBodyStates[switchCase->numCases]; s16 blinkFrame; @@ -393,7 +390,7 @@ Gfx *geo_switch_mario_eyes(s32 callContext, struct GraphNode *node, UNUSED Mat4 /** * Makes Mario's upper body tilt depending on the rotation stored in his bodyState */ -Gfx *geo_mario_tilt_torso(s32 callContext, struct GraphNode *node, UNUSED Mat4 *c) { +Gfx *geo_mario_tilt_torso(s32 callContext, struct GraphNode *node, UNUSED Mat4 *mtx) { struct GraphNodeGenerated *asGenerated = (struct GraphNodeGenerated *) node; struct MarioBodyState *bodyState = &gBodyStates[asGenerated->parameter]; s32 action = bodyState->action; @@ -415,7 +412,7 @@ Gfx *geo_mario_tilt_torso(s32 callContext, struct GraphNode *node, UNUSED Mat4 * /** * Makes Mario's head rotate with the camera angle when in C-up mode */ -Gfx *geo_mario_head_rotation(s32 callContext, struct GraphNode *node, UNUSED Mat4 *c) { +Gfx *geo_mario_head_rotation(s32 callContext, struct GraphNode *node, UNUSED Mat4 *mtx) { struct GraphNodeGenerated *asGenerated = (struct GraphNodeGenerated *) node; struct MarioBodyState *bodyState = &gBodyStates[asGenerated->parameter]; s32 action = bodyState->action; @@ -443,7 +440,7 @@ Gfx *geo_mario_head_rotation(s32 callContext, struct GraphNode *node, UNUSED Mat * Switch between hand models. * Possible options are described in the MarioHandGSCId enum. */ -Gfx *geo_switch_mario_hand(s32 callContext, struct GraphNode *node, UNUSED Mat4 *c) { +Gfx *geo_switch_mario_hand(s32 callContext, struct GraphNode *node, UNUSED Mat4 *mtx) { struct GraphNodeSwitchCase *switchCase = (struct GraphNodeSwitchCase *) node; struct MarioBodyState *bodyState = &gBodyStates[0]; @@ -472,7 +469,7 @@ Gfx *geo_switch_mario_hand(s32 callContext, struct GraphNode *node, UNUSED Mat4 * ! Since the animation gets updated in GEO_CONTEXT_RENDER, drawing Mario multiple times * (such as in the mirror room) results in a faster and desynced punch / kick animation. */ -Gfx *geo_mario_hand_foot_scaler(s32 callContext, struct GraphNode *node, UNUSED Mat4 *c) { +Gfx *geo_mario_hand_foot_scaler(s32 callContext, struct GraphNode *node, UNUSED Mat4 *mtx) { static s16 sMarioAttackAnimCounter = 0; struct GraphNodeGenerated *asGenerated = (struct GraphNodeGenerated *) node; struct GraphNodeScale *scaleNode = (struct GraphNodeScale *) node->next; @@ -496,7 +493,7 @@ Gfx *geo_mario_hand_foot_scaler(s32 callContext, struct GraphNode *node, UNUSED /** * Switch between normal cap, wing cap, vanish cap and metal cap. */ -Gfx *geo_switch_mario_cap_effect(s32 callContext, struct GraphNode *node, UNUSED Mat4 *c) { +Gfx *geo_switch_mario_cap_effect(s32 callContext, struct GraphNode *node, UNUSED Mat4 *mtx) { struct GraphNodeSwitchCase *switchCase = (struct GraphNodeSwitchCase *) node; struct MarioBodyState *bodyState = &gBodyStates[switchCase->numCases]; @@ -510,7 +507,7 @@ Gfx *geo_switch_mario_cap_effect(s32 callContext, struct GraphNode *node, UNUSED * Determine whether Mario's head is drawn with or without a cap on. * Also sets the visibility of the wing cap wings on or off. */ -Gfx *geo_switch_mario_cap_on_off(s32 callContext, struct GraphNode *node, UNUSED Mat4 *c) { +Gfx *geo_switch_mario_cap_on_off(s32 callContext, struct GraphNode *node, UNUSED Mat4 *mtx) { struct GraphNode *next = node->next; struct GraphNodeSwitchCase *switchCase = (struct GraphNodeSwitchCase *) node; struct MarioBodyState *bodyState = &gBodyStates[switchCase->numCases]; @@ -535,7 +532,7 @@ Gfx *geo_switch_mario_cap_on_off(s32 callContext, struct GraphNode *node, UNUSED * Geo node script that makes the wings on Mario's wing cap flap. * Should be placed before a rotation node. */ -Gfx *geo_mario_rotate_wing_cap_wings(s32 callContext, struct GraphNode *node, UNUSED Mat4 *c) { +Gfx *geo_mario_rotate_wing_cap_wings(s32 callContext, struct GraphNode *node, UNUSED Mat4 *mtx) { s16 rotX; struct GraphNodeGenerated *asGenerated = (struct GraphNodeGenerated *) node; @@ -601,7 +598,7 @@ Gfx *geo_switch_mario_hand_grab_pos(s32 callContext, struct GraphNode *b, Mat4 * * Geo node that creates a clone of Mario's geo node and updates it to becomes * a mirror image of the player. */ -Gfx *geo_render_mirror_mario(s32 callContext, struct GraphNode *node, UNUSED Mat4 *c) { +Gfx *geo_render_mirror_mario(s32 callContext, struct GraphNode *node, UNUSED Mat4 *mtx) { f32 mirroredX; struct Object *mario = gMarioStates[0].marioObj; @@ -629,9 +626,9 @@ Gfx *geo_render_mirror_mario(s32 callContext, struct GraphNode *node, UNUSED Mat gMirrorMario.pos[0] = mirroredX + MIRROR_X; gMirrorMario.angle[1] = -gMirrorMario.angle[1]; gMirrorMario.scale[0] *= -1.0f; - ((struct GraphNode *) &gMirrorMario)->flags |= 1; + ((struct GraphNode *) &gMirrorMario)->flags |= GRAPH_RENDER_ACTIVE; } else { - ((struct GraphNode *) &gMirrorMario)->flags &= ~1; + ((struct GraphNode *) &gMirrorMario)->flags &= ~GRAPH_RENDER_ACTIVE; } break; } @@ -642,7 +639,7 @@ Gfx *geo_render_mirror_mario(s32 callContext, struct GraphNode *node, UNUSED Mat * Since Mirror Mario has an x scale of -1, the mesh becomes inside out. * This node corrects that by changing the culling mode accordingly. */ -Gfx *geo_mirror_mario_backface_culling(s32 callContext, struct GraphNode *node, UNUSED Mat4 *c) { +Gfx *geo_mirror_mario_backface_culling(s32 callContext, struct GraphNode *node, UNUSED Mat4 *mtx) { struct GraphNodeGenerated *asGenerated = (struct GraphNodeGenerated *) node; Gfx *gfx = NULL; @@ -658,7 +655,7 @@ Gfx *geo_mirror_mario_backface_culling(s32 callContext, struct GraphNode *node, gSPSetGeometryMode(&gfx[1], G_CULL_BACK); gSPEndDisplayList(&gfx[2]); } - asGenerated->fnNode.node.flags = (asGenerated->fnNode.node.flags & 0xFF) | (LAYER_OPAQUE << 8); + asGenerated->fnNode.node.flags = (asGenerated->fnNode.node.flags & GRAPH_NODE_TYPES_MASK) | (LAYER_OPAQUE << 8); } return gfx; } diff --git a/src/game/moving_texture.c b/src/game/moving_texture.c index 8978fa5ea..c0794c285 100644 --- a/src/game/moving_texture.c +++ b/src/game/moving_texture.c @@ -661,7 +661,7 @@ Gfx *geo_movtex_draw_water_regions(s32 callContext, struct GraphNode *node, UNUS } asGenerated->fnNode.node.flags = - (asGenerated->fnNode.node.flags & 0xFF) | (LAYER_TRANSPARENT_INTER << 8); + (asGenerated->fnNode.node.flags & GRAPH_NODE_TYPES_MASK) | (LAYER_TRANSPARENT_INTER << 8); movtex_change_texture_format(asGenerated->parameter, &gfx); gMovetexLastTextureId = -1; @@ -841,7 +841,7 @@ Gfx *geo_movtex_draw_nocolor(s32 callContext, struct GraphNode *node, UNUSED Mat while (gMovtexNonColored[i].movtexVerts != 0) { if (gMovtexNonColored[i].geoId == asGenerated->parameter) { asGenerated->fnNode.node.flags = - (asGenerated->fnNode.node.flags & 0xFF) | (gMovtexNonColored[i].layer << 8); + (asGenerated->fnNode.node.flags & GRAPH_NODE_TYPES_MASK) | (gMovtexNonColored[i].layer << 8); movtexVerts = segmented_to_virtual(gMovtexNonColored[i].movtexVerts); update_moving_texture_offset(movtexVerts, MOVTEX_ATTR_NOCOLOR_S); gfx = movtex_gen_list(movtexVerts, &gMovtexNonColored[i], @@ -869,7 +869,7 @@ Gfx *geo_movtex_draw_colored(s32 callContext, struct GraphNode *node, UNUSED Mat while (gMovtexColored[i].movtexVerts != 0) { if (gMovtexColored[i].geoId == asGenerated->parameter) { asGenerated->fnNode.node.flags = - (asGenerated->fnNode.node.flags & 0xFF) | (gMovtexColored[i].layer << 8); + (asGenerated->fnNode.node.flags & GRAPH_NODE_TYPES_MASK) | (gMovtexColored[i].layer << 8); movtexVerts = segmented_to_virtual(gMovtexColored[i].movtexVerts); update_moving_texture_offset(movtexVerts, MOVTEX_ATTR_COLORED_S); gfx = movtex_gen_list(movtexVerts, &gMovtexColored[i], MOVTEX_LAYOUT_COLORED); @@ -900,7 +900,7 @@ Gfx *geo_movtex_draw_colored_no_update(s32 callContext, struct GraphNode *node, while (gMovtexColored[i].movtexVerts != 0) { if (gMovtexColored[i].geoId == asGenerated->parameter) { asGenerated->fnNode.node.flags = - (asGenerated->fnNode.node.flags & 0xFF) | (gMovtexColored[i].layer << 8); + (asGenerated->fnNode.node.flags & GRAPH_NODE_TYPES_MASK) | (gMovtexColored[i].layer << 8); movtexVerts = segmented_to_virtual(gMovtexColored[i].movtexVerts); gfx = movtex_gen_list(movtexVerts, &gMovtexColored[i], MOVTEX_LAYOUT_COLORED); break; @@ -927,7 +927,7 @@ Gfx *geo_movtex_draw_colored_2_no_update(s32 callContext, struct GraphNode *node while (gMovtexColored2[i].movtexVerts != 0) { if (gMovtexColored2[i].geoId == asGenerated->parameter) { asGenerated->fnNode.node.flags = - (asGenerated->fnNode.node.flags & 0xFF) | (gMovtexColored2[i].layer << 8); + (asGenerated->fnNode.node.flags & GRAPH_NODE_TYPES_MASK) | (gMovtexColored2[i].layer << 8); movtexVerts = segmented_to_virtual(gMovtexColored2[i].movtexVerts); gfx = movtex_gen_list(movtexVerts, &gMovtexColored2[i], MOVTEX_LAYOUT_COLORED); break; diff --git a/src/game/obj_behaviors.c b/src/game/obj_behaviors.c index 6b869ec17..d5b913243 100644 --- a/src/game/obj_behaviors.c +++ b/src/game/obj_behaviors.c @@ -92,7 +92,6 @@ Gfx UNUSED *geo_obj_transparency_something(s32 callContext, struct GraphNode *no struct Object *heldObject; struct Object *obj; UNUSED struct Object *unusedObject; - UNUSED s32 pad; gfxHead = NULL; @@ -109,7 +108,7 @@ Gfx UNUSED *geo_obj_transparency_something(s32 callContext, struct GraphNode *no gfxHead = alloc_display_list(3 * sizeof(Gfx)); gfx = gfxHead; obj->header.gfx.node.flags = - (obj->header.gfx.node.flags & 0xFF) | (LAYER_TRANSPARENT << 8); + (obj->header.gfx.node.flags & GRAPH_NODE_TYPES_MASK) | (LAYER_TRANSPARENT << 8); gDPSetEnvColor(gfx++, 255, 255, 255, heldObject->oOpacity); diff --git a/src/game/object_helpers.c b/src/game/object_helpers.c index f0412cfa6..a19843983 100644 --- a/src/game/object_helpers.c +++ b/src/game/object_helpers.c @@ -74,20 +74,20 @@ Gfx *geo_update_layer_transparency(s32 callContext, struct GraphNode *node, UNUS if (objectOpacity == 0xFF) { if (currentGraphNode->parameter == 20) { currentGraphNode->fnNode.node.flags = - (LAYER_TRANSPARENT_DECAL << 8) | (currentGraphNode->fnNode.node.flags & 0xFF); + (LAYER_TRANSPARENT_DECAL << 8) | (currentGraphNode->fnNode.node.flags & GRAPH_NODE_TYPES_MASK); } else { currentGraphNode->fnNode.node.flags = - (LAYER_OPAQUE << 8) | (currentGraphNode->fnNode.node.flags & 0xFF); + (LAYER_OPAQUE << 8) | (currentGraphNode->fnNode.node.flags & GRAPH_NODE_TYPES_MASK); } objectGraphNode->oAnimState = 0; } else { if (currentGraphNode->parameter == 20) { currentGraphNode->fnNode.node.flags = - (LAYER_TRANSPARENT_DECAL << 8) | (currentGraphNode->fnNode.node.flags & 0xFF); + (LAYER_TRANSPARENT_DECAL << 8) | (currentGraphNode->fnNode.node.flags & GRAPH_NODE_TYPES_MASK); } else { currentGraphNode->fnNode.node.flags = - (LAYER_TRANSPARENT << 8) | (currentGraphNode->fnNode.node.flags & 0xFF); + (LAYER_TRANSPARENT << 8) | (currentGraphNode->fnNode.node.flags & GRAPH_NODE_TYPES_MASK); } objectGraphNode->oAnimState = 1; diff --git a/src/game/paintings.c b/src/game/paintings.c index a1946f53c..006319915 100644 --- a/src/game/paintings.c +++ b/src/game/paintings.c @@ -1144,10 +1144,10 @@ void move_ddd_painting(struct Painting *painting, f32 frontPos, f32 backPos, f32 void set_painting_layer(struct GraphNodeGenerated *gen, struct Painting *painting) { switch (painting->alpha) { case 0xFF: // Opaque - gen->fnNode.node.flags = (gen->fnNode.node.flags & 0xFF) | (LAYER_OPAQUE << 8); + gen->fnNode.node.flags = (gen->fnNode.node.flags & GRAPH_NODE_TYPES_MASK) | (LAYER_OPAQUE << 8); break; default: - gen->fnNode.node.flags = (gen->fnNode.node.flags & 0xFF) | (LAYER_TRANSPARENT << 8); + gen->fnNode.node.flags = (gen->fnNode.node.flags & GRAPH_NODE_TYPES_MASK) | (LAYER_TRANSPARENT << 8); break; } } diff --git a/src/game/screen_transition.c b/src/game/screen_transition.c index a2bf00189..e04486b18 100644 --- a/src/game/screen_transition.c +++ b/src/game/screen_transition.c @@ -297,7 +297,7 @@ Gfx *geo_cannon_circle_base(s32 callContext, struct GraphNode *node, UNUSED Mat4 if (callContext == GEO_CONTEXT_RENDER && gCurrentArea != NULL && gCurrentArea->camera->mode == CAMERA_MODE_INSIDE_CANNON) { - graphNode->fnNode.node.flags = (graphNode->fnNode.node.flags & 0xFF) | (LAYER_TRANSPARENT << 8); + graphNode->fnNode.node.flags = (graphNode->fnNode.node.flags & GRAPH_NODE_TYPES_MASK) | (LAYER_TRANSPARENT << 8); #ifndef L3DEX2_ALONE dlist = render_cannon_circle_base(); #endif diff --git a/src/menu/intro_geo.c b/src/menu/intro_geo.c index 50c2574d7..e3068ef36 100644 --- a/src/menu/intro_geo.c +++ b/src/menu/intro_geo.c @@ -53,7 +53,7 @@ Gfx *geo_intro_super_mario_64_logo(s32 state, struct GraphNode *node, UNUSED voi if (state != 1) { sIntroFrameCounter = 0; } else if (state == 1) { - graphNode->flags = (graphNode->flags & 0xFF) | (LAYER_OPAQUE << 8); + graphNode->flags = (graphNode->flags & GRAPH_NODE_TYPES_MASK) | (LAYER_OPAQUE << 8); scaleMat = alloc_display_list(sizeof(*scaleMat)); dl = alloc_display_list(4 * sizeof(*dl)); dlIter = dl; @@ -109,11 +109,11 @@ Gfx *geo_intro_tm_copyright(s32 state, struct GraphNode *node, UNUSED void *cont gDPSetEnvColor(dlIter++, 255, 255, 255, sTmCopyrightAlpha); switch (sTmCopyrightAlpha) { case 255: // opaque - graphNode->flags = (graphNode->flags & 0xFF) | (LAYER_OPAQUE << 8); + graphNode->flags = (graphNode->flags & GRAPH_NODE_TYPES_MASK) | (LAYER_OPAQUE << 8); gDPSetRenderMode(dlIter++, G_RM_AA_OPA_SURF, G_RM_AA_OPA_SURF2); break; default: // blend - graphNode->flags = (graphNode->flags & 0xFF) | (LAYER_TRANSPARENT << 8); + graphNode->flags = (graphNode->flags & GRAPH_NODE_TYPES_MASK) | (LAYER_TRANSPARENT << 8); gDPSetRenderMode(dlIter++, G_RM_AA_XLU_SURF, G_RM_AA_XLU_SURF2); break; } @@ -202,7 +202,7 @@ Gfx *geo_intro_regular_backdrop(s32 state, struct GraphNode *node, UNUSED void * if (state == 1) { // draw dl = alloc_display_list(16 * sizeof(*dl)); dlIter = dl; - graphNode->node.flags = (graphNode->node.flags & 0xFF) | (LAYER_OPAQUE << 8); + graphNode->node.flags = (graphNode->node.flags & GRAPH_NODE_TYPES_MASK) | (LAYER_OPAQUE << 8); gSPDisplayList(dlIter++, &dl_proj_mtx_fullscreen); gSPDisplayList(dlIter++, &title_screen_bg_dl_0A000100); for (i = 0; i < 12; ++i) { @@ -258,7 +258,7 @@ Gfx *geo_intro_gameover_backdrop(s32 state, struct GraphNode *node, UNUSED void if (sGameOverTableIndex != 11) { sGameOverFrameCounter++; } - graphNode->flags = (graphNode->flags & 0xFF) | (LAYER_OPAQUE << 8); + graphNode->flags = (graphNode->flags & GRAPH_NODE_TYPES_MASK) | (LAYER_OPAQUE << 8); // draw all the tiles gSPDisplayList(dlIter++, &dl_proj_mtx_fullscreen); @@ -424,7 +424,7 @@ Gfx *geo_intro_face_easter_egg(s32 state, struct GraphNode *node, UNUSED void *c if (sFaceVisible[0] == 1 || sFaceVisible[17] == 1) { image = intro_sample_frame_buffer(40, 40, 2, 2); if (image != NULL) { - genNode->fnNode.node.flags = (genNode->fnNode.node.flags & 0xFF) | (LAYER_OPAQUE << 8); + genNode->fnNode.node.flags = (genNode->fnNode.node.flags & GRAPH_NODE_TYPES_MASK) | (LAYER_OPAQUE << 8); dl = intro_draw_face(image, 40, 40); } } @@ -447,7 +447,7 @@ Gfx *geo_intro_rumble_pak_graphic(s32 state, struct GraphNode *node, UNUSED void if (state != 1) { dl = NULL; } else if (state == 1) { - genNode->fnNode.node.flags = (genNode->fnNode.node.flags & 0xFF) | (LAYER_OPAQUE << 8); + genNode->fnNode.node.flags = (genNode->fnNode.node.flags & GRAPH_NODE_TYPES_MASK) | (LAYER_OPAQUE << 8); introContext = genNode->parameter & 0xFF; if (introContext == 0) { backgroundTileSix = introBackgroundIndexTable[6]; From f40a1978d96515a9c38c6f6b9879baf293ec4570 Mon Sep 17 00:00:00 2001 From: Arceveti <73617174+Arceveti@users.noreply.github.com> Date: Wed, 22 Sep 2021 11:21:23 -0700 Subject: [PATCH 08/26] Remove BAD_RETURN --- include/types.h | 11 - src/audio/load.h | 2 +- src/audio/load_sh.c | 6 +- src/game/camera.c | 590 ++++++++++++++--------------- src/game/camera.h | 2 +- src/game/mario_actions_submerged.c | 2 +- src/game/mario_step.h | 2 +- src/game/obj_behaviors_2.c | 2 +- src/game/object_helpers.h | 4 +- src/game/save_file.c | 2 +- src/game/save_file.h | 2 +- 11 files changed, 307 insertions(+), 318 deletions(-) diff --git a/include/types.h b/include/types.h index d484a4012..d39e629a9 100644 --- a/include/types.h +++ b/include/types.h @@ -8,17 +8,6 @@ #include "macros.h" #include "config.h" - -// Certain functions are marked as having return values, but do not -// actually return a value. This causes undefined behavior, which we'd rather -// avoid on modern GCC. This only impacts -O2 and can matter for both the function -// itself and functions that call it. -#ifdef AVOID_UB - #define BAD_RETURN(cmd) void -#else - #define BAD_RETURN(cmd) cmd -#endif - struct Config { f32 audioFrequency; diff --git a/src/audio/load.h b/src/audio/load.h index 002974d90..506e4202a 100644 --- a/src/audio/load.h +++ b/src/audio/load.h @@ -104,7 +104,7 @@ struct AudioBankSample *func_sh_802f4978(s32 bankId, s32 idx); s32 func_sh_802f47c8(s32 bankId, u8 idx, s8 *io); void *func_sh_802f3f08(s32 poolIdx, s32 arg1, s32 arg2, s32 arg3, OSMesgQueue *retQueue); void func_sh_802f41e4(s32 audioResetStatus); -BAD_RETURN(s32) func_sh_802f3368(s32 bankId); +void func_sh_802f3368(s32 bankId); void *func_sh_802f3764(s32 arg0, s32 idx, s32 *arg2); s32 func_sh_802f3024(s32 bankId, s32 instId, s32 arg2); void func_sh_802f30f4(s32 arg0, s32 arg1, s32 arg2, OSMesgQueue *arg3); diff --git a/src/audio/load_sh.c b/src/audio/load_sh.c index 240722ed0..28ff6c667 100644 --- a/src/audio/load_sh.c +++ b/src/audio/load_sh.c @@ -127,7 +127,7 @@ void func_sh_802f4dcc(s32 audioResetStatus); void func_sh_802f4e50(struct PendingDmaAudioBank *audioBank, s32 audioResetStatus); void func_sh_802f50ec(struct PendingDmaAudioBank *arg0, size_t len); void func_sh_802f517c(uintptr_t devAddr, void *vAddr, size_t nbytes, s32 arg3); -BAD_RETURN(s32) func_sh_802f5310(s32 bankId, struct AudioBank *mem, struct PatchStruct *patchInfo, s32 arg3); +void func_sh_802f5310(s32 bankId, struct AudioBank *mem, struct PatchStruct *patchInfo, s32 arg3); s32 func_sh_802f573c(s32 audioResetStatus); void *func_sh_802f3564(s32 seqId); s32 func_sh_802f3ec4(s32 arg0, uintptr_t *arg1); @@ -452,7 +452,7 @@ void func_sh_802f3288(s32 idx) { } } -BAD_RETURN(s32) func_sh_802f3368(s32 bankId) { +void func_sh_802f3368(s32 bankId) { struct SoundMultiPool *pool = &gBankLoadedPool; struct TemporaryPool *temporary = &pool->temporary; struct PersistentPool *persistent; @@ -1428,7 +1428,7 @@ void patch_sound(struct AudioBankSound *sound, struct AudioBank *memBase, struct #undef PATCH } -BAD_RETURN(s32) func_sh_802f5310(s32 bankId, struct AudioBank *mem, struct PatchStruct *patchInfo, s32 arg3) { +void func_sh_802f5310(s32 bankId, struct AudioBank *mem, struct PatchStruct *patchInfo, s32 arg3) { UNUSED u32 pad[2]; u8 *addr; UNUSED u32 pad1[3]; diff --git a/src/game/camera.c b/src/game/camera.c index 930644b20..4ccd37047 100644 --- a/src/game/camera.c +++ b/src/game/camera.c @@ -666,7 +666,7 @@ void unused_set_camera_pitch_shake_env(s16 shake) { * posOff and focOff are sometimes the same address, which just ignores the pos calculation *! Doesn't return anything, but required to match on -O2 */ -BAD_RETURN(f32) calc_y_to_curr_floor(f32 *posOff, f32 posMul, f32 posBound, f32 *focOff, f32 focMul, f32 focBound) { +void calc_y_to_curr_floor(f32 *posOff, f32 posMul, f32 posBound, f32 *focOff, f32 focMul, f32 focBound) { f32 floorHeight = sMarioGeometry.currFloorHeight; f32 waterHeight; UNUSED s32 filler; @@ -5681,12 +5681,12 @@ void check_blocking_area_processing(const u8 *mode) { } } -BAD_RETURN(s32) cam_rr_exit_building_side(struct Camera *c) { +void cam_rr_exit_building_side(struct Camera *c) { set_camera_mode_8_directions(c); s8DirModeBaseYaw = DEGREES(90); } -BAD_RETURN(s32) cam_rr_exit_building_top(struct Camera *c) { +void cam_rr_exit_building_top(struct Camera *c) { set_camera_mode_8_directions(c); if (c->pos[1] < 6343.f) { c->pos[1] = 7543.f; @@ -5696,13 +5696,13 @@ BAD_RETURN(s32) cam_rr_exit_building_top(struct Camera *c) { } } -BAD_RETURN(s32) cam_rr_enter_building_window(struct Camera *c) { +void cam_rr_enter_building_window(struct Camera *c) { if (c->mode != CAMERA_MODE_FIXED) { set_camera_mode_fixed(c, -2974, 478, -3975); } } -BAD_RETURN(s32) cam_rr_enter_building(struct Camera *c) { +void cam_rr_enter_building(struct Camera *c) { if (c->mode != CAMERA_MODE_FIXED) { set_camera_mode_fixed(c, -2953, 798, -3943); } @@ -5712,7 +5712,7 @@ BAD_RETURN(s32) cam_rr_enter_building(struct Camera *c) { } } -BAD_RETURN(s32) cam_rr_enter_building_side(struct Camera *c) { +void cam_rr_enter_building_side(struct Camera *c) { if (c->mode != CAMERA_MODE_FIXED) { sStatusFlags &= ~CAM_FLAG_SMOOTH_MOVEMENT; c->mode = CAMERA_MODE_FIXED; @@ -5722,7 +5722,7 @@ BAD_RETURN(s32) cam_rr_enter_building_side(struct Camera *c) { /** * Fix the camera in place as Mario gets exits out the MC cave into the waterfall. */ -BAD_RETURN(s32) cam_cotmc_exit_waterfall(UNUSED struct Camera *c) { +void cam_cotmc_exit_waterfall(UNUSED struct Camera *c) { gCameraMovementFlags |= CAM_MOVE_FIX_IN_PLACE; } @@ -5730,7 +5730,7 @@ BAD_RETURN(s32) cam_cotmc_exit_waterfall(UNUSED struct Camera *c) { * Sets 8 directional mode and blocks the next trigger from processing. * Activated when Mario is walking in front of the snowman's head. */ -BAD_RETURN(s32) cam_sl_snowman_head_8dir(struct Camera *c) { +void cam_sl_snowman_head_8dir(struct Camera *c) { sStatusFlags |= CAM_FLAG_BLOCK_AREA_PROCESSING; transition_to_camera_mode(c, CAMERA_MODE_8_DIRECTIONS, 60); s8DirModeBaseYaw = 0x1D27; @@ -5740,7 +5740,7 @@ BAD_RETURN(s32) cam_sl_snowman_head_8dir(struct Camera *c) { * Sets free roam mode in SL, called by a trigger that covers a large area and surrounds the 8 direction * trigger. */ -BAD_RETURN(s32) cam_sl_free_roam(struct Camera *c) { +void cam_sl_free_roam(struct Camera *c) { transition_to_camera_mode(c, CAMERA_MODE_FREE_ROAM, 60); } @@ -5758,7 +5758,7 @@ void move_camera_through_floor_while_descending(struct Camera *c, f32 height) { } } -BAD_RETURN(s32) cam_hmc_enter_maze(struct Camera *c) { +void cam_hmc_enter_maze(struct Camera *c) { s16 pitch, yaw; f32 dist; @@ -5774,26 +5774,26 @@ BAD_RETURN(s32) cam_hmc_enter_maze(struct Camera *c) { } } -BAD_RETURN(s32) cam_hmc_elevator_black_hole(struct Camera *c) { +void cam_hmc_elevator_black_hole(struct Camera *c) { move_camera_through_floor_while_descending(c, 1536.f); } -BAD_RETURN(s32) cam_hmc_elevator_maze_emergency_exit(struct Camera *c) { +void cam_hmc_elevator_maze_emergency_exit(struct Camera *c) { move_camera_through_floor_while_descending(c, 2355.f); } -BAD_RETURN(s32) cam_hmc_elevator_lake(struct Camera *c) { +void cam_hmc_elevator_lake(struct Camera *c) { move_camera_through_floor_while_descending(c, 1843.f); } -BAD_RETURN(s32) cam_hmc_elevator_maze(struct Camera *c) { +void cam_hmc_elevator_maze(struct Camera *c) { move_camera_through_floor_while_descending(c, 1843.f); } /** * Starts the "Enter Pyramid Top" cutscene. */ -BAD_RETURN(s32) cam_ssl_enter_pyramid_top(UNUSED struct Camera *c) { +void cam_ssl_enter_pyramid_top(UNUSED struct Camera *c) { start_object_cutscene_without_focus(CUTSCENE_ENTER_PYRAMID_TOP); } @@ -5801,7 +5801,7 @@ BAD_RETURN(s32) cam_ssl_enter_pyramid_top(UNUSED struct Camera *c) { * Change to close mode in the center of the pyramid. Outside this trigger, the default mode is outwards * radial. */ -BAD_RETURN(s32) cam_ssl_pyramid_center(struct Camera *c) { +void cam_ssl_pyramid_center(struct Camera *c) { sStatusFlags |= CAM_FLAG_BLOCK_AREA_PROCESSING; transition_to_camera_mode(c, CAMERA_MODE_CLOSE, 90); } @@ -5809,7 +5809,7 @@ BAD_RETURN(s32) cam_ssl_pyramid_center(struct Camera *c) { /** * Changes the mode back to outward radial in the boss room inside the pyramid. */ -BAD_RETURN(s32) cam_ssl_boss_room(struct Camera *c) { +void cam_ssl_boss_room(struct Camera *c) { sStatusFlags |= CAM_FLAG_BLOCK_AREA_PROCESSING; transition_to_camera_mode(c, CAMERA_MODE_OUTWARD_RADIAL, 90); } @@ -5817,7 +5817,7 @@ BAD_RETURN(s32) cam_ssl_boss_room(struct Camera *c) { /** * Moves the camera to through the tunnel by forcing sModeOffsetYaw */ -BAD_RETURN(s32) cam_thi_move_cam_through_tunnel(UNUSED struct Camera *c) { +void cam_thi_move_cam_through_tunnel(UNUSED struct Camera *c) { if (sModeOffsetYaw < DEGREES(60)) { sModeOffsetYaw = DEGREES(60); } @@ -5826,7 +5826,7 @@ BAD_RETURN(s32) cam_thi_move_cam_through_tunnel(UNUSED struct Camera *c) { /** * Aligns the camera to look through the tunnel */ -BAD_RETURN(s32) cam_thi_look_through_tunnel(UNUSED struct Camera *c) { +void cam_thi_look_through_tunnel(UNUSED struct Camera *c) { // ~82.5 degrees if (sModeOffsetYaw > 0x3AAA) { sModeOffsetYaw = 0x3AAA; @@ -5838,7 +5838,7 @@ BAD_RETURN(s32) cam_thi_look_through_tunnel(UNUSED struct Camera *c) { * * @see sCamBOB for bounds. */ -BAD_RETURN(s32) cam_bob_tower(struct Camera *c) { +void cam_bob_tower(struct Camera *c) { sStatusFlags |= CAM_FLAG_BLOCK_AREA_PROCESSING; transition_to_camera_mode(c, CAMERA_MODE_RADIAL, 90); } @@ -5851,7 +5851,7 @@ BAD_RETURN(s32) cam_bob_tower(struct Camera *c) { * * @see sCamBOB */ -BAD_RETURN(s32) cam_bob_default_free_roam(struct Camera *c) { +void cam_bob_default_free_roam(struct Camera *c) { transition_to_camera_mode(c, CAMERA_MODE_FREE_ROAM, 90); } @@ -5859,7 +5859,7 @@ BAD_RETURN(s32) cam_bob_default_free_roam(struct Camera *c) { * Starts the pool entrance cutscene if Mario is not exiting the pool. * Used in both the castle and HMC. */ -BAD_RETURN(s32) cam_castle_hmc_start_pool_cutscene(struct Camera *c) { +void cam_castle_hmc_start_pool_cutscene(struct Camera *c) { if ((sMarioCamState->action != ACT_SPECIAL_DEATH_EXIT) && (sMarioCamState->action != ACT_SPECIAL_EXIT_AIRBORNE)) { start_cutscene(c, CUTSCENE_ENTER_POOL); @@ -5870,7 +5870,7 @@ BAD_RETURN(s32) cam_castle_hmc_start_pool_cutscene(struct Camera *c) { * Sets the fixed mode pos offset so that the camera faces the doorway when Mario is near the entrance * to the castle lobby */ -BAD_RETURN(s32) cam_castle_lobby_entrance(UNUSED struct Camera *c) { +void cam_castle_lobby_entrance(UNUSED struct Camera *c) { vec3f_set(sCastleEntranceOffset, -813.f - sFixedModeBasePosition[0], 378.f - sFixedModeBasePosition[1], 1103.f - sFixedModeBasePosition[2]); } @@ -5878,7 +5878,7 @@ BAD_RETURN(s32) cam_castle_lobby_entrance(UNUSED struct Camera *c) { /** * Make the camera look up the stairs from the 2nd to 3rd floor of the castle */ -BAD_RETURN(s32) cam_castle_look_upstairs(struct Camera *c) { +void cam_castle_look_upstairs(struct Camera *c) { struct Surface *floor; f32 floorHeight = find_floor(c->pos[0], c->pos[1], c->pos[2], &floor); @@ -5892,7 +5892,7 @@ BAD_RETURN(s32) cam_castle_look_upstairs(struct Camera *c) { /** * Make the camera look down the stairs towards the basement star door */ -BAD_RETURN(s32) cam_castle_basement_look_downstairs(struct Camera *c) { +void cam_castle_basement_look_downstairs(struct Camera *c) { struct Surface *floor; f32 floorHeight = find_floor(c->pos[0], c->pos[1], c->pos[2], &floor); @@ -5906,7 +5906,7 @@ BAD_RETURN(s32) cam_castle_basement_look_downstairs(struct Camera *c) { * Enter the fixed-mode castle lobby. A trigger for this is placed in every entrance so that the camera * changes to fixed mode. */ -BAD_RETURN(s32) cam_castle_enter_lobby(struct Camera *c) { +void cam_castle_enter_lobby(struct Camera *c) { if (c->mode != CAMERA_MODE_FIXED) { sStatusFlags &= ~CAM_FLAG_SMOOTH_MOVEMENT; set_fixed_cam_axis_sa_lobby(c->mode); @@ -5917,7 +5917,7 @@ BAD_RETURN(s32) cam_castle_enter_lobby(struct Camera *c) { /** * Starts spiral stairs mode. */ -BAD_RETURN(s32) cam_castle_enter_spiral_stairs(struct Camera *c) { +void cam_castle_enter_spiral_stairs(struct Camera *c) { transition_to_camera_mode(c, CAMERA_MODE_SPIRAL_STAIRS, 20); } @@ -5925,7 +5925,7 @@ BAD_RETURN(s32) cam_castle_enter_spiral_stairs(struct Camera *c) { * unused, starts close mode if the camera is in spiral stairs mode. * This was replaced with cam_castle_close_mode */ -static UNUSED BAD_RETURN(s32) cam_castle_leave_spiral_stairs(struct Camera *c) { +static UNUSED void cam_castle_leave_spiral_stairs(struct Camera *c) { if (c->mode == CAMERA_MODE_SPIRAL_STAIRS) { transition_to_camera_mode(c, CAMERA_MODE_CLOSE, 30); } else { @@ -5937,7 +5937,7 @@ static UNUSED BAD_RETURN(s32) cam_castle_leave_spiral_stairs(struct Camera *c) { * The default mode when outside of the lobby and spiral staircase. A trigger for this is placed at * every door leaving the lobby and spiral staircase. */ -BAD_RETURN(s32) cam_castle_close_mode(struct Camera *c) { +void cam_castle_close_mode(struct Camera *c) { set_camera_mode_close_cam(&c->mode); } @@ -5945,7 +5945,7 @@ BAD_RETURN(s32) cam_castle_close_mode(struct Camera *c) { * Functions the same as cam_castle_close_mode, but sets doorStatus so that the camera will enter * fixed-mode when Mario leaves the room. */ -BAD_RETURN(s32) cam_castle_leave_lobby_sliding_door(struct Camera *c) { +void cam_castle_leave_lobby_sliding_door(struct Camera *c) { cam_castle_close_mode(c); c->doorStatus = DOOR_ENTER_LOBBY; } @@ -5953,19 +5953,19 @@ BAD_RETURN(s32) cam_castle_leave_lobby_sliding_door(struct Camera *c) { /** * Just calls cam_castle_enter_lobby */ -BAD_RETURN(s32) cam_castle_enter_lobby_sliding_door(struct Camera *c) { +void cam_castle_enter_lobby_sliding_door(struct Camera *c) { cam_castle_enter_lobby(c); } -BAD_RETURN(s32) cam_bbh_room_6(struct Camera *c) { +void cam_bbh_room_6(struct Camera *c) { parallel_tracking_init(c, sBBHLibraryParTrackPath); } -BAD_RETURN(s32) cam_bbh_fall_off_roof(struct Camera *c) { +void cam_bbh_fall_off_roof(struct Camera *c) { set_camera_mode_close_cam(&c->mode); } -BAD_RETURN(s32) cam_bbh_fall_into_pool(struct Camera *c) { +void cam_bbh_fall_into_pool(struct Camera *c) { Vec3f dir; set_camera_mode_close_cam(&c->mode); vec3f_set(dir, 0.f, 0.f, 300.f); @@ -5975,24 +5975,24 @@ BAD_RETURN(s32) cam_bbh_fall_into_pool(struct Camera *c) { sStatusFlags &= ~CAM_FLAG_SMOOTH_MOVEMENT; } -BAD_RETURN(s32) cam_bbh_room_1(struct Camera *c) { +void cam_bbh_room_1(struct Camera *c) { set_camera_mode_fixed(c, 956, 440, 1994); } -BAD_RETURN(s32) cam_bbh_leave_front_door(struct Camera *c) { +void cam_bbh_leave_front_door(struct Camera *c) { c->doorStatus = DOOR_LEAVING_SPECIAL; cam_bbh_room_1(c); } -BAD_RETURN(s32) cam_bbh_room_2_lower(struct Camera *c) { +void cam_bbh_room_2_lower(struct Camera *c) { set_camera_mode_fixed(c, 2591, 400, 1284); } -BAD_RETURN(s32) cam_bbh_room_4(struct Camera *c) { +void cam_bbh_room_4(struct Camera *c) { set_camera_mode_fixed(c, 3529, 340, -1384); } -BAD_RETURN(s32) cam_bbh_room_8(struct Camera *c) { +void cam_bbh_room_8(struct Camera *c) { set_camera_mode_fixed(c, -500, 740, -1306); } @@ -6000,7 +6000,7 @@ BAD_RETURN(s32) cam_bbh_room_8(struct Camera *c) { * In BBH's room 5's library (the first floor room with the vanish cap/boo painting) * set the camera mode to fixed and position to (-2172, 200, 675) */ -BAD_RETURN(s32) cam_bbh_room_5_library(struct Camera *c) { +void cam_bbh_room_5_library(struct Camera *c) { set_camera_mode_fixed(c, -2172, 200, 675); } @@ -6009,53 +6009,53 @@ BAD_RETURN(s32) cam_bbh_room_5_library(struct Camera *c) { * set the camera mode to to the hidden room's position * if coming from the library. */ -BAD_RETURN(s32) cam_bbh_room_5_library_to_hidden_transition(struct Camera *c) { +void cam_bbh_room_5_library_to_hidden_transition(struct Camera *c) { if (set_camera_mode_fixed(c, -2172, 200, 675) == 1) { transition_next_state(c, 20); } } -BAD_RETURN(s32) cam_bbh_room_5_hidden_to_library_transition(struct Camera *c) { +void cam_bbh_room_5_hidden_to_library_transition(struct Camera *c) { if (set_camera_mode_fixed(c, -1542, 320, -307) == 1) { transition_next_state(c, 20); } } -BAD_RETURN(s32) cam_bbh_room_5_hidden(struct Camera *c) { +void cam_bbh_room_5_hidden(struct Camera *c) { c->doorStatus = DOOR_LEAVING_SPECIAL; set_camera_mode_fixed(c, -1542, 320, -307); } -BAD_RETURN(s32) cam_bbh_room_3(struct Camera *c) { +void cam_bbh_room_3(struct Camera *c) { set_camera_mode_fixed(c, -1893, 320, 2327); } -BAD_RETURN(s32) cam_bbh_room_7_mr_i(struct Camera *c) { +void cam_bbh_room_7_mr_i(struct Camera *c) { set_camera_mode_fixed(c, 1371, 360, -1302); } -BAD_RETURN(s32) cam_bbh_room_7_mr_i_to_coffins_transition(struct Camera *c) { +void cam_bbh_room_7_mr_i_to_coffins_transition(struct Camera *c) { if (set_camera_mode_fixed(c, 1371, 360, -1302) == 1) { transition_next_state(c, 20); } } -BAD_RETURN(s32) cam_bbh_room_7_coffins_to_mr_i_transition(struct Camera *c) { +void cam_bbh_room_7_coffins_to_mr_i_transition(struct Camera *c) { if (set_camera_mode_fixed(c, 2115, 260, -772) == 1) { transition_next_state(c, 20); } } -BAD_RETURN(s32) cam_bbh_elevator_room_lower(struct Camera *c) { +void cam_bbh_elevator_room_lower(struct Camera *c) { c->doorStatus = DOOR_LEAVING_SPECIAL; set_camera_mode_close_cam(&c->mode); } -BAD_RETURN(s32) cam_bbh_room_0_back_entrance(struct Camera *c) { +void cam_bbh_room_0_back_entrance(struct Camera *c) { set_camera_mode_close_cam(&c->mode); } -BAD_RETURN(s32) cam_bbh_elevator(struct Camera *c) { +void cam_bbh_elevator(struct Camera *c) { if (c->mode == CAMERA_MODE_FIXED) { set_camera_mode_close_cam(&c->mode); c->pos[1] = -405.f; @@ -6063,65 +6063,65 @@ BAD_RETURN(s32) cam_bbh_elevator(struct Camera *c) { } } -BAD_RETURN(s32) cam_bbh_room_12_upper(struct Camera *c) { +void cam_bbh_room_12_upper(struct Camera *c) { c->doorStatus = DOOR_LEAVING_SPECIAL; set_camera_mode_fixed(c, -2932, 296, 4429); } -BAD_RETURN(s32) cam_bbh_enter_front_door(struct Camera *c) { +void cam_bbh_enter_front_door(struct Camera *c) { set_camera_mode_close_cam(&c->mode); } -BAD_RETURN(s32) cam_bbh_room_2_library(struct Camera *c) { +void cam_bbh_room_2_library(struct Camera *c) { set_camera_mode_fixed(c, 3493, 440, 617); } -BAD_RETURN(s32) cam_bbh_room_2_library_to_trapdoor_transition(struct Camera *c) { +void cam_bbh_room_2_library_to_trapdoor_transition(struct Camera *c) { if (set_camera_mode_fixed(c, 3493, 440, 617) == 1) { transition_next_state(c, 20); } } -BAD_RETURN(s32) cam_bbh_room_2_trapdoor(struct Camera *c) { +void cam_bbh_room_2_trapdoor(struct Camera *c) { set_camera_mode_fixed(c, 3502, 440, 1217); } -BAD_RETURN(s32) cam_bbh_room_2_trapdoor_transition(struct Camera *c) { +void cam_bbh_room_2_trapdoor_transition(struct Camera *c) { if (set_camera_mode_fixed(c, 3502, 440, 1217) == 1) { transition_next_state(c, 20); } } -BAD_RETURN(s32) cam_bbh_room_9_attic(struct Camera *c) { +void cam_bbh_room_9_attic(struct Camera *c) { set_camera_mode_fixed(c, -670, 460, 372); } -BAD_RETURN(s32) cam_bbh_room_9_attic_transition(struct Camera *c) { +void cam_bbh_room_9_attic_transition(struct Camera *c) { if (set_camera_mode_fixed(c, -670, 460, 372) == 1) { transition_next_state(c, 20); } } -BAD_RETURN(s32) cam_bbh_room_9_mr_i_transition(struct Camera *c) { +void cam_bbh_room_9_mr_i_transition(struct Camera *c) { if (set_camera_mode_fixed(c, 131, 380, -263) == 1) { transition_next_state(c, 20); } } -BAD_RETURN(s32) cam_bbh_room_13_balcony(struct Camera *c) { +void cam_bbh_room_13_balcony(struct Camera *c) { set_camera_mode_fixed(c, 210, 420, 3109); } -BAD_RETURN(s32) cam_bbh_room_0(struct Camera *c) { +void cam_bbh_room_0(struct Camera *c) { c->doorStatus = DOOR_LEAVING_SPECIAL; set_camera_mode_fixed(c, -204, 807, 204); } -BAD_RETURN(s32) cam_ccm_enter_slide_shortcut(UNUSED struct Camera *c) { +void cam_ccm_enter_slide_shortcut(UNUSED struct Camera *c) { sStatusFlags |= CAM_FLAG_CCM_SLIDE_SHORTCUT; } -BAD_RETURN(s32) cam_ccm_leave_slide_shortcut(UNUSED struct Camera *c) { +void cam_ccm_leave_slide_shortcut(UNUSED struct Camera *c) { sStatusFlags &= ~CAM_FLAG_CCM_SLIDE_SHORTCUT; } @@ -7051,7 +7051,7 @@ static UNUSED void unused_cutscene_mario_dialog_looking_down(UNUSED struct Camer /** * Cause Mario to enter the normal dialog state. */ -static BAD_RETURN(s32) cutscene_mario_dialog(UNUSED struct Camera *c) { +static void cutscene_mario_dialog(UNUSED struct Camera *c) { gCutsceneTimer = cutscene_common_set_dialog_state(MARIO_DIALOG_LOOK_FRONT); } @@ -7063,7 +7063,7 @@ static UNUSED void unused_cutscene_mario_dialog_looking_up(UNUSED struct Camera /** * Lower the volume (US only) and start the peach letter background music */ -BAD_RETURN(s32) cutscene_intro_peach_start_letter_music(UNUSED struct Camera *c) { +void cutscene_intro_peach_start_letter_music(UNUSED struct Camera *c) { #if defined(VERSION_US) || defined(VERSION_SH) seq_player_lower_volume(SEQ_PLAYER_LEVEL, 60, 40); #endif @@ -7073,7 +7073,7 @@ BAD_RETURN(s32) cutscene_intro_peach_start_letter_music(UNUSED struct Camera *c) /** * Raise the volume (not in JP) and start the flying music. */ -BAD_RETURN(s32) cutscene_intro_peach_start_flying_music(UNUSED struct Camera *c) { +void cutscene_intro_peach_start_flying_music(UNUSED struct Camera *c) { #ifndef VERSION_JP seq_player_unlower_volume(SEQ_PLAYER_LEVEL, 60); #endif @@ -7085,7 +7085,7 @@ BAD_RETURN(s32) cutscene_intro_peach_start_flying_music(UNUSED struct Camera *c) * Lower the volume for the letter background music. In US, this happens on the same frame as the music * starts. */ -BAD_RETURN(s32) cutscene_intro_peach_eu_lower_volume(UNUSED struct Camera *c) { +void cutscene_intro_peach_eu_lower_volume(UNUSED struct Camera *c) { seq_player_lower_volume(SEQ_PLAYER_LEVEL, 60, 40); } #endif @@ -7207,7 +7207,7 @@ void pan_camera(struct Camera *c, s16 incPitch, s16 incYaw) { vec3f_set_dist_and_angle(c->pos, c->focus, distCamToFocus, pitch, yaw); } -BAD_RETURN(s32) cutscene_shake_explosion(UNUSED struct Camera *c) { +void cutscene_shake_explosion(UNUSED struct Camera *c) { set_environmental_camera_shake(SHAKE_ENV_EXPLOSION); cutscene_set_fov_shake_preset(1); } @@ -7249,16 +7249,16 @@ void cutscene_unsoften_music(UNUSED struct Camera *c) { UNUSED static void stub_camera_5(UNUSED struct Camera *c) { } -BAD_RETURN(s32) cutscene_unused_start(UNUSED struct Camera *c) { +void cutscene_unused_start(UNUSED struct Camera *c) { } -BAD_RETURN(s32) cutscene_unused_loop(UNUSED struct Camera *c) { +void cutscene_unused_loop(UNUSED struct Camera *c) { } /** * Set the camera position and focus for when Mario falls from the sky. */ -BAD_RETURN(s32) cutscene_ending_mario_fall_start(struct Camera *c) { +void cutscene_ending_mario_fall_start(struct Camera *c) { vec3f_set(c->focus, -26.f, 0.f, -137.f); vec3f_set(c->pos, 165.f, 4725.f, 324.f); } @@ -7266,7 +7266,7 @@ BAD_RETURN(s32) cutscene_ending_mario_fall_start(struct Camera *c) { /** * Focus on Mario when he's falling from the sky. */ -BAD_RETURN(s32) cutscene_ending_mario_fall_focus_mario(struct Camera *c) { +void cutscene_ending_mario_fall_focus_mario(struct Camera *c) { Vec3f offset; vec3f_set(offset, 0.f, 80.f, 0.f); @@ -7281,7 +7281,7 @@ BAD_RETURN(s32) cutscene_ending_mario_fall_focus_mario(struct Camera *c) { /** * Mario falls from the sky after the grand star cutscene. */ -BAD_RETURN(s32) cutscene_ending_mario_fall(struct Camera *c) { +void cutscene_ending_mario_fall(struct Camera *c) { cutscene_event(cutscene_ending_mario_fall_start, c, 0, 0); cutscene_event(cutscene_ending_mario_fall_focus_mario, c, 0, -1); player2_rotate_cam(c, -0x2000, 0x2000, -0x2000, 0x2000); @@ -7290,7 +7290,7 @@ BAD_RETURN(s32) cutscene_ending_mario_fall(struct Camera *c) { /** * Closeup of Mario as the wing cap fades and Mario looks up. */ -BAD_RETURN(s32) cutscene_ending_mario_land_closeup(struct Camera *c) { +void cutscene_ending_mario_land_closeup(struct Camera *c) { vec3f_set(c->focus, 85.f, 826.f, 250.f); vec3f_set(c->pos, -51.f, 988.f, -202.f); player2_rotate_cam(c, -0x2000, 0x2000, -0x2000, 0x2000); @@ -7299,7 +7299,7 @@ BAD_RETURN(s32) cutscene_ending_mario_land_closeup(struct Camera *c) { /** * Reset the spline progress and cvar9. */ -BAD_RETURN(s32) cutscene_ending_reset_spline(UNUSED struct Camera *c) { +void cutscene_ending_reset_spline(UNUSED struct Camera *c) { sCutsceneVars[9].point[0] = 0.f; cutscene_reset_spline(); } @@ -7307,7 +7307,7 @@ BAD_RETURN(s32) cutscene_ending_reset_spline(UNUSED struct Camera *c) { /** * Follow sEndingFlyToWindowPos/Focus up to the window. */ -BAD_RETURN(s32) cutscene_ending_fly_up_to_window(struct Camera *c) { +void cutscene_ending_fly_up_to_window(struct Camera *c) { move_point_along_spline(c->pos, sEndingFlyToWindowPos, &sCutsceneSplineSegment, &sCutsceneSplineSegmentProgress); move_point_along_spline(c->focus, sEndingFlyToWindowFocus, &sCutsceneSplineSegment, &sCutsceneSplineSegmentProgress); } @@ -7315,7 +7315,7 @@ BAD_RETURN(s32) cutscene_ending_fly_up_to_window(struct Camera *c) { /** * Move the camera up to the window as the star power frees peach. */ -BAD_RETURN(s32) cutscene_ending_stars_free_peach(struct Camera *c) { +void cutscene_ending_stars_free_peach(struct Camera *c) { cutscene_event(cutscene_ending_reset_spline, c, 0, 0); cutscene_event(cutscene_ending_fly_up_to_window, c, 0, -1); player2_rotate_cam(c, -0x2000, 0x2000, -0x2000, 0x2000); @@ -7324,7 +7324,7 @@ BAD_RETURN(s32) cutscene_ending_stars_free_peach(struct Camera *c) { /** * Move the camera to the ground as Mario lands. */ -BAD_RETURN(s32) cutscene_ending_mario_land(struct Camera *c) { +void cutscene_ending_mario_land(struct Camera *c) { vec3f_set(c->focus, sEndingFlyToWindowFocus[0].point[0], sEndingFlyToWindowFocus[0].point[1] + 80.f, sEndingFlyToWindowFocus[0].point[2]); vec3f_set(c->pos, sEndingFlyToWindowPos[0].point[0], sEndingFlyToWindowPos[0].point[1], sEndingFlyToWindowPos[0].point[2] + 150.f); player2_rotate_cam(c, -0x800, 0x2000, -0x2000, 0x2000); @@ -7333,7 +7333,7 @@ BAD_RETURN(s32) cutscene_ending_mario_land(struct Camera *c) { /** * Move the camera closer to peach appearing. */ -BAD_RETURN(s32) cutscene_ending_peach_appear_closeup(struct Camera *c) { +void cutscene_ending_peach_appear_closeup(struct Camera *c) { vec3f_set(c->pos, 179.f, 2463.f, -1216.f); c->pos[1] = gCutsceneFocus->oPosY + 35.f; vec3f_set(c->focus, gCutsceneFocus->oPosX, gCutsceneFocus->oPosY + 125.f, gCutsceneFocus->oPosZ); @@ -7342,7 +7342,7 @@ BAD_RETURN(s32) cutscene_ending_peach_appear_closeup(struct Camera *c) { /** * Peach fades in, the camera focuses on her. */ -BAD_RETURN(s32) cutscene_ending_peach_appears(struct Camera *c) { +void cutscene_ending_peach_appears(struct Camera *c) { cutscene_event(cutscene_ending_peach_appear_closeup, c, 0, 0); approach_f32_asymptotic_bool(&c->pos[1], gCutsceneFocus->oPosY + 35.f, 0.02f); approach_f32_asymptotic_bool(&c->focus[1], gCutsceneFocus->oPosY + 125.f, 0.15f); @@ -7352,7 +7352,7 @@ BAD_RETURN(s32) cutscene_ending_peach_appears(struct Camera *c) { /** * Reset spline progress, set cvar2 y offset. */ -BAD_RETURN(s32) cutscene_ending_peach_descends_start(UNUSED struct Camera *c) { +void cutscene_ending_peach_descends_start(UNUSED struct Camera *c) { cutscene_reset_spline(); sCutsceneVars[2].point[1] = 150.f; } @@ -7360,7 +7360,7 @@ BAD_RETURN(s32) cutscene_ending_peach_descends_start(UNUSED struct Camera *c) { /** * Follow the sEndingPeachDescentCamPos spline, which rotates around peach. */ -BAD_RETURN(s32) cutscene_ending_follow_peach_descent(struct Camera *c) { +void cutscene_ending_follow_peach_descent(struct Camera *c) { move_point_along_spline(c->pos, sEndingPeachDescentCamPos, &sCutsceneSplineSegment, &sCutsceneSplineSegmentProgress); c->pos[1] += gCutsceneFocus->oPosY + sCutsceneVars[3].point[1]; } @@ -7368,14 +7368,14 @@ BAD_RETURN(s32) cutscene_ending_follow_peach_descent(struct Camera *c) { /** * Decrease cvar2's y offset while the camera flies backwards to Mario. */ -BAD_RETURN(s32) cutscene_ending_peach_descent_lower_focus(UNUSED struct Camera *c) { +void cutscene_ending_peach_descent_lower_focus(UNUSED struct Camera *c) { camera_approach_f32_symmetric_bool(&(sCutsceneVars[2].point[1]), 90.f, 0.5f); } /** * Keep following the sEndingPeachDescentCamPos spline, which leads back to Mario. */ -BAD_RETURN(s32) cutscene_ending_peach_descent_back_to_mario(struct Camera *c) { +void cutscene_ending_peach_descent_back_to_mario(struct Camera *c) { Vec3f pos; move_point_along_spline(pos, sEndingPeachDescentCamPos, &sCutsceneSplineSegment, &sCutsceneSplineSegmentProgress); @@ -7388,7 +7388,7 @@ BAD_RETURN(s32) cutscene_ending_peach_descent_back_to_mario(struct Camera *c) { * Peach starts floating to the ground. Rotate the camera around her, then fly backwards to Mario when * she lands. */ -BAD_RETURN(s32) cutscene_ending_peach_descends(struct Camera *c) { +void cutscene_ending_peach_descends(struct Camera *c) { cutscene_event(cutscene_ending_peach_descends_start, c, 0, 0); cutscene_event(cutscene_ending_follow_peach_descent, c, 0, 299); cutscene_event(cutscene_ending_peach_descent_back_to_mario, c, 300, -1); @@ -7402,7 +7402,7 @@ BAD_RETURN(s32) cutscene_ending_peach_descends(struct Camera *c) { * Mario runs across the bridge to peach, and takes off his cap. * Follow the sEndingMarioToPeach* splines while Mario runs across. */ -BAD_RETURN(s32) cutscene_ending_mario_to_peach(struct Camera *c) { +void cutscene_ending_mario_to_peach(struct Camera *c) { cutscene_event(cutscene_ending_reset_spline, c, 0, 0); move_point_along_spline(c->pos, sEndingMarioToPeachPos, &sCutsceneSplineSegment, &sCutsceneSplineSegmentProgress); move_point_along_spline(c->focus, sEndingMarioToPeachFocus, &sCutsceneSplineSegment, &sCutsceneSplineSegmentProgress); @@ -7412,14 +7412,14 @@ BAD_RETURN(s32) cutscene_ending_mario_to_peach(struct Camera *c) { /** * Make the focus follow the sEndingLookUpAtCastle spline. */ -BAD_RETURN(s32) cutscene_ending_look_up_at_castle(UNUSED struct Camera *c) { +void cutscene_ending_look_up_at_castle(UNUSED struct Camera *c) { move_point_along_spline(c->focus, sEndingLookUpAtCastle, &sCutsceneSplineSegment, &sCutsceneSplineSegmentProgress); } /** * Peach opens her eyes and the camera looks at the castle window again. */ -BAD_RETURN(s32) cutscene_ending_peach_wakeup(struct Camera *c) { +void cutscene_ending_peach_wakeup(struct Camera *c) { cutscene_event(cutscene_ending_reset_spline, c, 0, 0); cutscene_event(cutscene_ending_look_up_at_castle, c, 0, 0); cutscene_event(cutscene_ending_look_up_at_castle, c, 250, -1); @@ -7432,7 +7432,7 @@ BAD_RETURN(s32) cutscene_ending_peach_wakeup(struct Camera *c) { /** * Side view of peach and Mario. Peach thanks Mario for saving her. */ -BAD_RETURN(s32) cutscene_ending_dialog(struct Camera *c) { +void cutscene_ending_dialog(struct Camera *c) { vec3f_set(c->focus, 11.f, 983.f, -1273.f); vec3f_set(c->pos, -473.f, 970.f, -1152.f); player2_rotate_cam(c, -0x800, 0x2000, -0x2000, 0x2000); @@ -7441,7 +7441,7 @@ BAD_RETURN(s32) cutscene_ending_dialog(struct Camera *c) { /** * Zoom in and move the camera close to Mario and peach. */ -BAD_RETURN(s32) cutscene_ending_kiss_closeup(struct Camera *c) { +void cutscene_ending_kiss_closeup(struct Camera *c) { set_fov_function(CAM_FOV_SET_29); vec3f_set(c->focus, 350.f, 1034.f, -1216.f); vec3f_set(c->pos, -149.f, 1021.f, -1216.f); @@ -7450,7 +7450,7 @@ BAD_RETURN(s32) cutscene_ending_kiss_closeup(struct Camera *c) { /** * Fly back and zoom out for Mario's spin after the kiss. */ -BAD_RETURN(s32) cutscene_ending_kiss_here_we_go(struct Camera *c) { +void cutscene_ending_kiss_here_we_go(struct Camera *c) { Vec3f pos, foc; set_fov_function(CAM_FOV_DEFAULT); @@ -7464,7 +7464,7 @@ BAD_RETURN(s32) cutscene_ending_kiss_here_we_go(struct Camera *c) { /** * Peach kisses Mario on the nose. */ -BAD_RETURN(s32) cutscene_ending_kiss(struct Camera *c) { +void cutscene_ending_kiss(struct Camera *c) { cutscene_event(cutscene_ending_kiss_closeup, c, 0, 0); cutscene_event(cutscene_ending_kiss_here_we_go, c, 155, -1); player2_rotate_cam(c, -0x800, 0x2000, -0x2000, 0x2000); @@ -7473,7 +7473,7 @@ BAD_RETURN(s32) cutscene_ending_kiss(struct Camera *c) { /** * Make the focus follow sEndingLookAtSkyFocus. */ -BAD_RETURN(s32) cutscene_ending_look_at_sky(struct Camera *c) { +void cutscene_ending_look_at_sky(struct Camera *c) { move_point_along_spline(c->focus, sEndingLookAtSkyFocus, &sCutsceneSplineSegment, &sCutsceneSplineSegmentProgress); vec3f_set(c->pos, 699.f, 1680.f, -703.f); } @@ -7482,14 +7482,14 @@ BAD_RETURN(s32) cutscene_ending_look_at_sky(struct Camera *c) { * Zoom in the fov. The fovFunc was just set to default, so it wants to approach 45. But while this is * called, it will stay at about 37.26f */ -BAD_RETURN(s32) cutscene_ending_zoom_fov(UNUSED struct Camera *c) { +void cutscene_ending_zoom_fov(UNUSED struct Camera *c) { sFOVState.fov = 37.f; } /** * Peach suggests baking a cake for Mario. Mario looks back at the camera before going inside the castle. */ -BAD_RETURN(s32) cutscene_ending_cake_for_mario(struct Camera *c) { +void cutscene_ending_cake_for_mario(struct Camera *c) { cutscene_event(cutscene_ending_reset_spline, c, 0, 0); cutscene_event(cutscene_ending_look_at_sky, c, 0, 0); cutscene_event(cutscene_ending_zoom_fov, c, 0, 499); @@ -7503,7 +7503,7 @@ BAD_RETURN(s32) cutscene_ending_cake_for_mario(struct Camera *c) { /** * Stop the ending cutscene, reset the fov. */ -BAD_RETURN(s32) cutscene_ending_stop(struct Camera *c) { +void cutscene_ending_stop(struct Camera *c) { set_fov_function(CAM_FOV_SET_45); c->cutscene = 0; gCutsceneTimer = CUTSCENE_STOP; @@ -7514,7 +7514,7 @@ BAD_RETURN(s32) cutscene_ending_stop(struct Camera *c) { * cvar0 is a relative offset from Mario. * cvar1 is the is the camera's goal position. */ -BAD_RETURN(s32) cutscene_grand_star_start(UNUSED struct Camera *c) { +void cutscene_grand_star_start(UNUSED struct Camera *c) { vec3f_set(sCutsceneVars[0].point, 0.f, 150.f, -600.f); offset_rotated(sCutsceneVars[1].point, sMarioCamState->pos, sCutsceneVars[0].point, sMarioCamState->faceAngle); sCutsceneVars[1].point[1] = 457.f; @@ -7523,7 +7523,7 @@ BAD_RETURN(s32) cutscene_grand_star_start(UNUSED struct Camera *c) { /** * Make the camera fly to the front of Mario. */ -BAD_RETURN(s32) cutscene_grand_star_front_of_mario(struct Camera *c) { +void cutscene_grand_star_front_of_mario(struct Camera *c) { f32 goalDist; s16 goalPitch, goalYaw; f32 dist; @@ -7540,7 +7540,7 @@ BAD_RETURN(s32) cutscene_grand_star_front_of_mario(struct Camera *c) { /** * Started shortly after Mario starts the triple jump. Stores Mario's face angle and zeros cvar2. */ -BAD_RETURN(s32) cutscene_grand_star_mario_jump(UNUSED struct Camera *c) { +void cutscene_grand_star_mario_jump(UNUSED struct Camera *c) { vec3s_set(sCutsceneVars[0].angle, 0, sMarioCamState->faceAngle[1], 0); vec3f_set(sCutsceneVars[2].point, 0.f, 0.f, 0.f); } @@ -7548,7 +7548,7 @@ BAD_RETURN(s32) cutscene_grand_star_mario_jump(UNUSED struct Camera *c) { /** * Accelerate cvar2 to point back and to the left (relative to the camera). */ -BAD_RETURN(s32) cutscene_grand_star_accel_cvar2(UNUSED struct Camera *c) { +void cutscene_grand_star_accel_cvar2(UNUSED struct Camera *c) { camera_approach_f32_symmetric_bool(&sCutsceneVars[2].point[2], -40.f, 2.0f); sCutsceneVars[2].point[0] = 5.0f; } @@ -7556,7 +7556,7 @@ BAD_RETURN(s32) cutscene_grand_star_accel_cvar2(UNUSED struct Camera *c) { /** * Decrease cvar2 offset, follow Mario by directly updating the camera's pos. */ -BAD_RETURN(s32) cutscene_grand_star_approach_mario(struct Camera *c) { +void cutscene_grand_star_approach_mario(struct Camera *c) { camera_approach_f32_symmetric_bool(&sCutsceneVars[2].point[2], 0.f, 2.f); sCutsceneVars[2].point[0] = 0.f; approach_f32_asymptotic_bool(&c->pos[0], sMarioCamState->pos[0], 0.01f); @@ -7567,11 +7567,11 @@ BAD_RETURN(s32) cutscene_grand_star_approach_mario(struct Camera *c) { * Offset the camera's position by cvar2. Before Mario triple jumps, this moves back and to the left. * After the triple jump, cvar2 decelerates to 0. */ -BAD_RETURN(s32) cutscene_grand_star_move_cvar2(struct Camera *c) { +void cutscene_grand_star_move_cvar2(struct Camera *c) { offset_rotated(c->pos, c->pos, sCutsceneVars[2].point, sCutsceneVars[0].angle); } -BAD_RETURN(s32) cutscene_grand_star_focus_mario(struct Camera *c) { +void cutscene_grand_star_focus_mario(struct Camera *c) { Vec3f foc; vec3f_set(foc, sMarioCamState->pos[0], (sMarioCamState->pos[1] - 307.f) * 0.5f + 407.f, sMarioCamState->pos[2]); @@ -7581,7 +7581,7 @@ BAD_RETURN(s32) cutscene_grand_star_focus_mario(struct Camera *c) { /** * The first part of the grand star cutscene, after Mario has collected the grand star. */ -BAD_RETURN(s32) cutscene_grand_star(struct Camera *c) { +void cutscene_grand_star(struct Camera *c) { sStatusFlags |= CAM_FLAG_SMOOTH_MOVEMENT; cutscene_event(cutscene_grand_star_start, c, 0, 0); cutscene_event(cutscene_grand_star_front_of_mario, c, 0, 109); @@ -7595,7 +7595,7 @@ BAD_RETURN(s32) cutscene_grand_star(struct Camera *c) { /** * Zero the cvars that are used when Mario is flying. */ -BAD_RETURN(s32) cutscene_grand_star_fly_start(struct Camera *c) { +void cutscene_grand_star_fly_start(struct Camera *c) { //! cvar7 is unused in grand star vec3f_set(sCutsceneVars[7].point, 0.5f, 0.5f, 0.5f); //! cvar6 is unused in grand star @@ -7609,7 +7609,7 @@ BAD_RETURN(s32) cutscene_grand_star_fly_start(struct Camera *c) { /** * Decrease the cvar offsets so that Lakitu flies closer to Mario. */ -BAD_RETURN(s32) cutscene_grand_star_fly_move_to_mario(UNUSED struct Camera *c) { +void cutscene_grand_star_fly_move_to_mario(UNUSED struct Camera *c) { Vec3f posOff; vec3f_set(posOff, -600.f, 0.f, -400.f); @@ -7625,7 +7625,7 @@ BAD_RETURN(s32) cutscene_grand_star_fly_move_to_mario(UNUSED struct Camera *c) { * cvar5 is the focus offset from Mario. * cvar8.point[0] is the approach velocity. */ -BAD_RETURN(s32) cutscene_grand_star_fly_mario_offscreen(UNUSED struct Camera *c) { +void cutscene_grand_star_fly_mario_offscreen(UNUSED struct Camera *c) { camera_approach_f32_symmetric_bool(&sCutsceneVars[8].point[0], 15.f, 0.1f); camera_approach_f32_symmetric_bool(&sCutsceneVars[4].point[0], -2000.f, sCutsceneVars[8].point[0]); @@ -7642,7 +7642,7 @@ BAD_RETURN(s32) cutscene_grand_star_fly_mario_offscreen(UNUSED struct Camera *c) * cvar4 is the position offset. * cvar5 is the focus offset. */ -BAD_RETURN(s32) cutscene_grand_star_fly_app_cvars(struct Camera *c) { +void cutscene_grand_star_fly_app_cvars(struct Camera *c) { Vec3f goalPos, goalFoc; f32 dist; s16 pitch, yaw; @@ -7669,7 +7669,7 @@ BAD_RETURN(s32) cutscene_grand_star_fly_app_cvars(struct Camera *c) { * * cvar8.point[2] is Lakitu's speed. */ -BAD_RETURN(s32) cutscene_grand_star_fly(struct Camera *c) { +void cutscene_grand_star_fly(struct Camera *c) { sStatusFlags |= CAM_FLAG_SMOOTH_MOVEMENT; cutscene_event(cutscene_grand_star_fly_start, c, 0, 0); cutscene_event(cutscene_grand_star_fly_move_to_mario, c, 0, 140); @@ -7697,7 +7697,7 @@ void focus_in_front_of_mario(struct Camera *c, f32 dist, f32 speed) { * Approach Mario and look up. Since Mario faces the camera when he collects the star, there's no need * to worry about the camera's yaw. */ -BAD_RETURN(s32) cutscene_dance_move_to_mario(struct Camera *c) { +void cutscene_dance_move_to_mario(struct Camera *c) { s16 pitch, yaw; f32 dist; @@ -7707,39 +7707,39 @@ BAD_RETURN(s32) cutscene_dance_move_to_mario(struct Camera *c) { vec3f_set_dist_and_angle(sMarioCamState->pos, c->pos, dist, pitch, yaw); } -BAD_RETURN(s32) cutscene_dance_rotate(struct Camera *c) { +void cutscene_dance_rotate(struct Camera *c) { rotate_and_move_vec3f(c->pos, sMarioCamState->pos, 0, 0, 0x200); } -BAD_RETURN(s32) cutscene_dance_rotate_move_back(struct Camera *c) { +void cutscene_dance_rotate_move_back(struct Camera *c) { rotate_and_move_vec3f(c->pos, sMarioCamState->pos, -15.f, 0, 0); } -BAD_RETURN(s32) cutscene_dance_rotate_move_towards_mario(struct Camera *c) { +void cutscene_dance_rotate_move_towards_mario(struct Camera *c) { rotate_and_move_vec3f(c->pos, sMarioCamState->pos, 20.f, 0, 0); } /** * Speculated to be dance-related due to its proximity to the other dance functions */ -UNUSED static BAD_RETURN(s32) cutscene_dance_unused(UNUSED struct Camera *c) { +UNUSED static void cutscene_dance_unused(UNUSED struct Camera *c) { } /** * Slowly turn to the point 100 units in front of Mario */ -BAD_RETURN(s32) cutscene_dance_default_focus_mario(struct Camera *c) { +void cutscene_dance_default_focus_mario(struct Camera *c) { focus_in_front_of_mario(c, -100.f, 0.2f); } /** * Focus twice as far away as default dance, and move faster. */ -BAD_RETURN(s32) cutscene_dance_rotate_focus_mario(struct Camera *c) { +void cutscene_dance_rotate_focus_mario(struct Camera *c) { focus_in_front_of_mario(c, -200.f, 0.03f); } -BAD_RETURN(s32) cutscene_dance_shake_fov(UNUSED struct Camera *c) { +void cutscene_dance_shake_fov(UNUSED struct Camera *c) { set_fov_shake(0x200, 0x28, 0x8000); } @@ -7748,7 +7748,7 @@ BAD_RETURN(s32) cutscene_dance_shake_fov(UNUSED struct Camera *c) { * In the default dance: the camera moves closer to Mario, then stays in place. * In the rotate dance: the camera moves closer and rotates clockwise around Mario. */ -BAD_RETURN(s32) cutscene_dance_default_rotate(struct Camera *c) { +void cutscene_dance_default_rotate(struct Camera *c) { sStatusFlags |= CAM_FLAG_SMOOTH_MOVEMENT; sYawSpeed = 0; set_fov_function(CAM_FOV_DEFAULT); @@ -7779,7 +7779,7 @@ BAD_RETURN(s32) cutscene_dance_default_rotate(struct Camera *c) { /** * If the camera's yaw is out of the range of `absYaw` +- `yawMax`, then set the yaw to `absYaw` */ -BAD_RETURN(s32) star_dance_bound_yaw(struct Camera *c, s16 absYaw, s16 yawMax) { +void star_dance_bound_yaw(struct Camera *c, s16 absYaw, s16 yawMax) { s16 dummyPitch, yaw; f32 distCamToMario; s16 yawFromAbs; @@ -7802,7 +7802,7 @@ BAD_RETURN(s32) star_dance_bound_yaw(struct Camera *c, s16 absYaw, s16 yawMax) { * Start the closeup dance cutscene by restricting the camera's yaw in certain areas. * Store the camera's focus in cvar9. */ -BAD_RETURN(s32) cutscene_dance_closeup_start(struct Camera *c) { +void cutscene_dance_closeup_start(struct Camera *c) { UNUSED s32 pad[2]; if ((gLastCompletedStarNum == 4) && (gCurrCourseNum == COURSE_JRB)) { @@ -7823,7 +7823,7 @@ BAD_RETURN(s32) cutscene_dance_closeup_start(struct Camera *c) { /** * Focus the camera on Mario eye height. */ -BAD_RETURN(s32) cutscene_dance_closeup_focus_mario(struct Camera *c) { +void cutscene_dance_closeup_focus_mario(struct Camera *c) { Vec3f marioPos; vec3f_set(marioPos, sMarioCamState->pos[0], sMarioCamState->pos[1] + 125.f, sMarioCamState->pos[2]); @@ -7834,7 +7834,7 @@ BAD_RETURN(s32) cutscene_dance_closeup_focus_mario(struct Camera *c) { /** * Fly above Mario, looking down. */ -BAD_RETURN(s32) cutscene_dance_closeup_fly_above(struct Camera *c) { +void cutscene_dance_closeup_fly_above(struct Camera *c) { s16 pitch, yaw; f32 dist; s16 goalPitch = 0x1800; @@ -7854,7 +7854,7 @@ BAD_RETURN(s32) cutscene_dance_closeup_fly_above(struct Camera *c) { /** * Fly closer right when Mario gives the peace sign. */ -BAD_RETURN(s32) cutscene_dance_closeup_fly_closer(struct Camera *c) { +void cutscene_dance_closeup_fly_closer(struct Camera *c) { s16 pitch, yaw; f32 dist; @@ -7868,21 +7868,21 @@ BAD_RETURN(s32) cutscene_dance_closeup_fly_closer(struct Camera *c) { /** * Zoom in by increasing fov to 80 degrees. Most dramatic zoom in the game. */ -BAD_RETURN(s32) cutscene_dance_closeup_zoom(UNUSED struct Camera *c) { +void cutscene_dance_closeup_zoom(UNUSED struct Camera *c) { set_fov_function(CAM_FOV_APP_80); } /** * Shake fov, starts on the first frame Mario has the peace sign up. */ -BAD_RETURN(s32) cutscene_dance_closeup_shake_fov(UNUSED struct Camera *c) { +void cutscene_dance_closeup_shake_fov(UNUSED struct Camera *c) { set_fov_shake(0x300, 0x30, 0x8000); } /** * The camera moves in for a closeup on Mario. Used for stars that are underwater or in tight places. */ -BAD_RETURN(s32) cutscene_dance_closeup(struct Camera *c) { +void cutscene_dance_closeup(struct Camera *c) { sStatusFlags |= CAM_FLAG_SMOOTH_MOVEMENT; if (sMarioCamState->action == ACT_STAR_DANCE_WATER) { @@ -7907,7 +7907,7 @@ BAD_RETURN(s32) cutscene_dance_closeup(struct Camera *c) { /** * cvar8.point[2] is the amount to increase distance from Mario */ -BAD_RETURN(s32) cutscene_dance_fly_away_start(struct Camera *c) { +void cutscene_dance_fly_away_start(struct Camera *c) { Vec3f areaCenter; vec3f_copy(sCutsceneVars[9].point, c->focus); @@ -7934,7 +7934,7 @@ BAD_RETURN(s32) cutscene_dance_fly_away_start(struct Camera *c) { } } -BAD_RETURN(s32) cutscene_dance_fly_away_approach_mario(struct Camera *c) { +void cutscene_dance_fly_away_approach_mario(struct Camera *c) { s16 pitch, yaw; f32 dist; @@ -7945,7 +7945,7 @@ BAD_RETURN(s32) cutscene_dance_fly_away_approach_mario(struct Camera *c) { vec3f_set_dist_and_angle(sMarioCamState->pos, c->pos, dist, pitch, yaw); } -BAD_RETURN(s32) cutscene_dance_fly_away_focus_mario(struct Camera *c) { +void cutscene_dance_fly_away_focus_mario(struct Camera *c) { Vec3f marioPos; vec3f_set(marioPos, sMarioCamState->pos[0], sMarioCamState->pos[1] + 125.f, sMarioCamState->pos[2]); @@ -7966,7 +7966,7 @@ void cutscene_pan_cvar9(struct Camera *c) { /** * Move backwards and rotate slowly around Mario. */ -BAD_RETURN(s32) cutscene_dance_fly_rotate_around_mario(struct Camera *c) { +void cutscene_dance_fly_rotate_around_mario(struct Camera *c) { cutscene_pan_cvar9(c); rotate_and_move_vec3f(c->pos, sMarioCamState->pos, sCutsceneVars[8].point[2], 0, 0); } @@ -7974,18 +7974,18 @@ BAD_RETURN(s32) cutscene_dance_fly_rotate_around_mario(struct Camera *c) { /** * Rotate quickly while Lakitu flies up. */ -BAD_RETURN(s32) cutscene_dance_fly_away_rotate_while_flying(struct Camera *c) { +void cutscene_dance_fly_away_rotate_while_flying(struct Camera *c) { rotate_and_move_vec3f(c->pos, sMarioCamState->pos, 0, 0, 0x80); } -BAD_RETURN(s32) cutscene_dance_fly_away_shake_fov(UNUSED struct Camera *c) { +void cutscene_dance_fly_away_shake_fov(UNUSED struct Camera *c) { set_fov_shake(0x400, 0x30, 0x8000); } /** * After collecting the star, Lakitu flies upwards out of the course. */ -BAD_RETURN(s32) cutscene_dance_fly_away(struct Camera *c) { +void cutscene_dance_fly_away(struct Camera *c) { sStatusFlags |= CAM_FLAG_SMOOTH_MOVEMENT; cutscene_event(cutscene_dance_fly_away_start, c, 0, 0); cutscene_event(cutscene_dance_fly_away_focus_mario, c, 0, 30); @@ -8001,7 +8001,7 @@ BAD_RETURN(s32) cutscene_dance_fly_away(struct Camera *c) { * Jump the camera pos and focus to cvar 8 and 7. * Called every frame, starting after 10, so when these cvars are updated, the camera will jump. */ -BAD_RETURN(s32) cutscene_key_dance_jump_cvar(struct Camera *c) { +void cutscene_key_dance_jump_cvar(struct Camera *c) { offset_rotated(c->pos, sMarioCamState->pos, sCutsceneVars[8].point, sMarioCamState->faceAngle); offset_rotated(c->focus, sMarioCamState->pos, sCutsceneVars[7].point, sMarioCamState->faceAngle); } @@ -8009,7 +8009,7 @@ BAD_RETURN(s32) cutscene_key_dance_jump_cvar(struct Camera *c) { /** * Jump to a closeup view of Mario and the key. */ -BAD_RETURN(s32) cutscene_key_dance_jump_closeup(UNUSED struct Camera *c) { +void cutscene_key_dance_jump_closeup(UNUSED struct Camera *c) { vec3f_set(sCutsceneVars[8].point, 38.f, 171.f, -248.f); vec3f_set(sCutsceneVars[7].point, -57.f, 51.f, 187.f); } @@ -8017,7 +8017,7 @@ BAD_RETURN(s32) cutscene_key_dance_jump_closeup(UNUSED struct Camera *c) { /** * Jump to a view from the lower left (Mario's right). */ -BAD_RETURN(s32) cutscene_key_dance_jump_lower_left(UNUSED struct Camera *c) { +void cutscene_key_dance_jump_lower_left(UNUSED struct Camera *c) { vec3f_set(sCutsceneVars[8].point, -178.f, 62.f, -132.f); vec3f_set(sCutsceneVars[7].point, 299.f, 91.f, 58.f); } @@ -8025,7 +8025,7 @@ BAD_RETURN(s32) cutscene_key_dance_jump_lower_left(UNUSED struct Camera *c) { /** * Jump to a rotated view from above. */ -BAD_RETURN(s32) cutscene_key_dance_jump_above(UNUSED struct Camera *c) { +void cutscene_key_dance_jump_above(UNUSED struct Camera *c) { gLakituState.keyDanceRoll = 0x2800; vec3f_set(sCutsceneVars[8].point, 89.f, 373.f, -304.f); vec3f_set(sCutsceneVars[7].point, 0.f, 127.f, 0.f); @@ -8034,21 +8034,21 @@ BAD_RETURN(s32) cutscene_key_dance_jump_above(UNUSED struct Camera *c) { /** * Finally, jump to a further view, slightly to Mario's left. */ -BAD_RETURN(s32) cutscene_key_dance_jump_last(UNUSED struct Camera *c) { +void cutscene_key_dance_jump_last(UNUSED struct Camera *c) { gLakituState.keyDanceRoll = 0; vec3f_set(sCutsceneVars[8].point, 135.f, 158.f, -673.f); vec3f_set(sCutsceneVars[7].point, -20.f, 135.f, -198.f); } -BAD_RETURN(s32) cutscene_key_dance_shake_fov(UNUSED struct Camera *c) { +void cutscene_key_dance_shake_fov(UNUSED struct Camera *c) { set_fov_shake(0x180, 0x30, 0x8000); } -BAD_RETURN(s32) cutscene_key_dance_handheld_shake(UNUSED struct Camera *c) { +void cutscene_key_dance_handheld_shake(UNUSED struct Camera *c) { set_handheld_shake(HAND_CAM_SHAKE_CUTSCENE); } -BAD_RETURN(s32) cutscene_key_dance_focus_mario(struct Camera *c) { +void cutscene_key_dance_focus_mario(struct Camera *c) { focus_in_front_of_mario(c, 0, 0.2f); } @@ -8056,7 +8056,7 @@ BAD_RETURN(s32) cutscene_key_dance_focus_mario(struct Camera *c) { * Cutscene that plays when Mario collects a key from bowser. It's basically a sequence of four jump * cuts. */ -BAD_RETURN(s32) cutscene_key_dance(struct Camera *c) { +void cutscene_key_dance(struct Camera *c) { cutscene_event(cutscene_dance_move_to_mario, c, 0, 10); cutscene_event(cutscene_key_dance_focus_mario, c, 0, 10); cutscene_event(cutscene_key_dance_jump_closeup, c, 0, 0); @@ -8068,14 +8068,14 @@ BAD_RETURN(s32) cutscene_key_dance(struct Camera *c) { cutscene_event(cutscene_key_dance_handheld_shake, c, 52, -1); } -BAD_RETURN(s32) cutscene_bowser_area_shake_fov(UNUSED struct Camera *c) { +void cutscene_bowser_area_shake_fov(UNUSED struct Camera *c) { cutscene_set_fov_shake_preset(2); } /** * Set oBowserCamAct to 1, which causes bowser to start walking. */ -BAD_RETURN(s32) cutscene_bowser_area_start_bowser_walking(UNUSED struct Camera *c) { +void cutscene_bowser_area_start_bowser_walking(UNUSED struct Camera *c) { gSecondCameraFocus->oBowserCamAct = BOWSER_CAM_ACT_WALK; } @@ -8084,7 +8084,7 @@ BAD_RETURN(s32) cutscene_bowser_area_start_bowser_walking(UNUSED struct Camera * * @bug cvar2.point is (0,0,0) on the first frame, but because of the warp transition, this behavior * isn't seen. After the first frame, cvar2.point is bowser's position. */ -BAD_RETURN(s32) cutscene_bowser_arena_set_pos(struct Camera *c) { +void cutscene_bowser_arena_set_pos(struct Camera *c) { vec3f_set_dist_and_angle(sCutsceneVars[2].point, c->pos, sCutsceneVars[3].point[2], sCutsceneVars[3].angle[0], sCutsceneVars[3].angle[1]); vec3f_set(sCutsceneVars[2].point, gSecondCameraFocus->oPosX, gSecondCameraFocus->oPosY, @@ -8095,7 +8095,7 @@ BAD_RETURN(s32) cutscene_bowser_arena_set_pos(struct Camera *c) { * Apply a sine wave to the focus's y coordinate. * The y offset starts at 120, then decreases to 0 before reaching ~240 on the last frame. */ -BAD_RETURN(s32) cutscene_bowser_arena_focus_sine(UNUSED struct Camera *c) { +void cutscene_bowser_arena_focus_sine(UNUSED struct Camera *c) { //! unused initialization f32 yOff = 150.0f; @@ -8108,7 +8108,7 @@ BAD_RETURN(s32) cutscene_bowser_arena_focus_sine(UNUSED struct Camera *c) { /** * Set the camera focus according to cvar0 and cvar2. */ -BAD_RETURN(s32) cutscene_bowser_arena_set_focus(struct Camera *c) { +void cutscene_bowser_arena_set_focus(struct Camera *c) { offset_rotated(c->focus, sCutsceneVars[2].point, sCutsceneVars[0].point, sCutsceneVars[2].angle); } @@ -8116,7 +8116,7 @@ BAD_RETURN(s32) cutscene_bowser_arena_set_focus(struct Camera *c) { * Adjust the cvar offsets, making the camera look up, move slightly further back, and focus a little * further in front of bowser. */ -BAD_RETURN(s32) cutscene_bowser_arena_adjust_offsets(UNUSED struct Camera *c) { +void cutscene_bowser_arena_adjust_offsets(UNUSED struct Camera *c) { approach_s16_asymptotic_bool(&sCutsceneVars[3].angle[0], 0x6C8, 30); approach_f32_asymptotic_bool(&sCutsceneVars[0].point[2], -200.f, 0.02f); approach_f32_asymptotic_bool(&sCutsceneVars[3].point[2], 550.f, 0.02f); @@ -8125,14 +8125,14 @@ BAD_RETURN(s32) cutscene_bowser_arena_adjust_offsets(UNUSED struct Camera *c) { /** * Decrease cvar0's z offset, making the camera focus pan left towards bowser. */ -BAD_RETURN(s32) cutscene_bowser_arena_pan_left(UNUSED struct Camera *c) { +void cutscene_bowser_arena_pan_left(UNUSED struct Camera *c) { approach_f32_asymptotic_bool(&sCutsceneVars[0].point[2], 0.f, 0.05f); } /** * Duplicate of cutscene_mario_dialog(). */ -BAD_RETURN(s32) cutscene_bowser_arena_mario_dialog(UNUSED struct Camera *c) { +void cutscene_bowser_arena_mario_dialog(UNUSED struct Camera *c) { cutscene_common_set_dialog_state(MARIO_DIALOG_LOOK_FRONT); } @@ -8147,7 +8147,7 @@ void cutscene_stop_dialog(UNUSED struct Camera *c) { * * cvar0 is the focus offset from bowser */ -BAD_RETURN(s32) cutscene_bowser_arena_start(struct Camera *c) { +void cutscene_bowser_arena_start(struct Camera *c) { sCutsceneVars[3].point[2] = 430.f; sCutsceneVars[3].angle[1] = gSecondCameraFocus->oMoveAngleYaw - DEGREES(45); sCutsceneVars[3].angle[0] = 0xD90; @@ -8168,7 +8168,7 @@ BAD_RETURN(s32) cutscene_bowser_arena_start(struct Camera *c) { /** * Create the dialog box depending on which bowser fight Mario is in. */ -BAD_RETURN(s32) bowser_fight_intro_dialog(UNUSED struct Camera *c) { +void bowser_fight_intro_dialog(UNUSED struct Camera *c) { s16 dialog; switch (gCurrLevelNum) { @@ -8188,7 +8188,7 @@ BAD_RETURN(s32) bowser_fight_intro_dialog(UNUSED struct Camera *c) { /** * Create the dialog box and wait until it's gone. */ -BAD_RETURN(s32) cutscene_bowser_arena_dialog(struct Camera *c) { +void cutscene_bowser_arena_dialog(struct Camera *c) { cutscene_event(bowser_fight_intro_dialog, c, 0, 0); if (get_dialog_id() == DIALOG_NONE) { @@ -8199,7 +8199,7 @@ BAD_RETURN(s32) cutscene_bowser_arena_dialog(struct Camera *c) { /** * End the bowser arena cutscene. */ -BAD_RETURN(s32) cutscene_bowser_arena_end(struct Camera *c) { +void cutscene_bowser_arena_end(struct Camera *c) { cutscene_stop_dialog(c); c->cutscene = 0; transition_next_state(c, 20); @@ -8211,7 +8211,7 @@ BAD_RETURN(s32) cutscene_bowser_arena_end(struct Camera *c) { /** * Cutscene that plays when Mario enters a bowser fight. */ -BAD_RETURN(s32) cutscene_bowser_arena(struct Camera *c) { +void cutscene_bowser_arena(struct Camera *c) { //! This does nothing, but may have been used in development cutscene_spawn_obj(2, 0); @@ -8232,14 +8232,14 @@ BAD_RETURN(s32) cutscene_bowser_arena(struct Camera *c) { } } -BAD_RETURN(s32) cutscene_star_spawn_store_info(struct Camera *c) { +void cutscene_star_spawn_store_info(struct Camera *c) { store_info_star(c); } /** * Focus on the top of the star. */ -BAD_RETURN(s32) cutscene_star_spawn_focus_star(struct Camera *c) { +void cutscene_star_spawn_focus_star(struct Camera *c) { UNUSED f32 hMul; Vec3f starPos; UNUSED f32 vMul; @@ -8254,7 +8254,7 @@ BAD_RETURN(s32) cutscene_star_spawn_focus_star(struct Camera *c) { /** * Use boss fight mode's update function to move the focus back. */ -BAD_RETURN(s32) cutscene_star_spawn_update_boss_fight(struct Camera *c) { +void cutscene_star_spawn_update_boss_fight(struct Camera *c) { Vec3f pos, focus; update_boss_fight_camera(c, focus, pos); @@ -8265,7 +8265,7 @@ BAD_RETURN(s32) cutscene_star_spawn_update_boss_fight(struct Camera *c) { /** * Fly back to the camera's previous pos and focus. */ -BAD_RETURN(s32) cutscene_star_spawn_fly_back(struct Camera *c) { +void cutscene_star_spawn_fly_back(struct Camera *c) { retrieve_info_star(c); transition_next_state(c, 15); } @@ -8273,7 +8273,7 @@ BAD_RETURN(s32) cutscene_star_spawn_fly_back(struct Camera *c) { /** * Plays when a star spawns (ie from a box). */ -BAD_RETURN(s32) cutscene_star_spawn(struct Camera *c) { +void cutscene_star_spawn(struct Camera *c) { cutscene_event(cutscene_star_spawn_store_info, c, 0, 0); cutscene_event(cutscene_star_spawn_focus_star, c, 0, -1); sStatusFlags |= CAM_FLAG_SMOOTH_MOVEMENT; @@ -8287,7 +8287,7 @@ BAD_RETURN(s32) cutscene_star_spawn(struct Camera *c) { /** * Move the camera back to Mario. */ -BAD_RETURN(s32) cutscene_star_spawn_back(struct Camera *c) { +void cutscene_star_spawn_back(struct Camera *c) { if ((c->mode == CAMERA_MODE_BOSS_FIGHT) && (set_cam_angle(0) == CAM_ANGLE_LAKITU)) { cutscene_event(cutscene_star_spawn_update_boss_fight, c, 0, -1); } else { @@ -8298,13 +8298,13 @@ BAD_RETURN(s32) cutscene_star_spawn_back(struct Camera *c) { sStatusFlags |= CAM_FLAG_UNUSED_CUTSCENE_ACTIVE; } -BAD_RETURN(s32) cutscene_star_spawn_end(struct Camera *c) { +void cutscene_star_spawn_end(struct Camera *c) { sStatusFlags |= CAM_FLAG_SMOOTH_MOVEMENT; gCutsceneTimer = CUTSCENE_STOP; c->cutscene = 0; } -BAD_RETURN(s32) cutscene_exit_waterfall_warp(struct Camera *c) { +void cutscene_exit_waterfall_warp(struct Camera *c) { //! hardcoded position vec3f_set(c->pos, -3899.f, 39.f, -5671.f); } @@ -8312,7 +8312,7 @@ BAD_RETURN(s32) cutscene_exit_waterfall_warp(struct Camera *c) { /** * Look at Mario, used by cutscenes that play when Mario exits a course to castle grounds. */ -BAD_RETURN(s32) cutscene_exit_to_castle_grounds_focus_mario(struct Camera *c) { +void cutscene_exit_to_castle_grounds_focus_mario(struct Camera *c) { vec3f_copy(c->focus, sMarioCamState->pos); c->focus[1] = c->pos[1] + (sMarioCamState->pos[1] + 125.f - c->pos[1]) * 0.5f; approach_vec3f_asymptotic(c->focus, sMarioCamState->pos, 0.05f, 0.4f, 0.05f); @@ -8321,7 +8321,7 @@ BAD_RETURN(s32) cutscene_exit_to_castle_grounds_focus_mario(struct Camera *c) { /** * Cutscene that plays when Mario leaves CotMC through the waterfall. */ -BAD_RETURN(s32) cutscene_exit_waterfall(struct Camera *c) { +void cutscene_exit_waterfall(struct Camera *c) { cutscene_event(cutscene_exit_waterfall_warp, c, 0, 0); cutscene_event(cutscene_exit_to_castle_grounds_focus_mario, c, 0, -1); update_camera_yaw(c); @@ -8330,14 +8330,14 @@ BAD_RETURN(s32) cutscene_exit_waterfall(struct Camera *c) { /** * End the cutscene, used by cutscenes that play when Mario exits a course to castle grounds. */ -BAD_RETURN(s32) cutscene_exit_to_castle_grounds_end(struct Camera *c) { +void cutscene_exit_to_castle_grounds_end(struct Camera *c) { sStatusFlags |= CAM_FLAG_SMOOTH_MOVEMENT; gCutsceneTimer = CUTSCENE_STOP; c->cutscene = 0; update_camera_yaw(c); } -BAD_RETURN(s32) cutscene_exit_fall_to_castle_grounds_warp(struct Camera *c) { +void cutscene_exit_fall_to_castle_grounds_warp(struct Camera *c) { //! hardcoded position vec3f_set(c->pos, 5830.f, 32.f, 3985.f); } @@ -8345,7 +8345,7 @@ BAD_RETURN(s32) cutscene_exit_fall_to_castle_grounds_warp(struct Camera *c) { /** * Cutscene that plays when Mario falls from WMOTR. */ -BAD_RETURN(s32) cutscene_exit_fall_to_castle_grounds(struct Camera *c) { +void cutscene_exit_fall_to_castle_grounds(struct Camera *c) { cutscene_event(cutscene_exit_fall_to_castle_grounds_warp, c, 0, 0); cutscene_event(cutscene_exit_to_castle_grounds_focus_mario, c, 0, -1); update_camera_yaw(c); @@ -8354,7 +8354,7 @@ BAD_RETURN(s32) cutscene_exit_fall_to_castle_grounds(struct Camera *c) { /** * Start the red coin star spawning cutscene. */ -BAD_RETURN(s32) cutscene_red_coin_star_start(struct Camera *c) { +void cutscene_red_coin_star_start(struct Camera *c) { object_pos_to_vec3f(sCutsceneVars[1].point, gCutsceneFocus); store_info_star(c); // Store the default fov for after the cutscene @@ -8364,7 +8364,7 @@ BAD_RETURN(s32) cutscene_red_coin_star_start(struct Camera *c) { /** * Look towards the star's x and z position */ -BAD_RETURN(s32) cutscene_red_coin_star_focus_xz(struct Camera *c) { +void cutscene_red_coin_star_focus_xz(struct Camera *c) { approach_f32_asymptotic_bool(&c->focus[0], gCutsceneFocus->oPosX, 0.15f); approach_f32_asymptotic_bool(&c->focus[2], gCutsceneFocus->oPosZ, 0.15f); } @@ -8372,21 +8372,21 @@ BAD_RETURN(s32) cutscene_red_coin_star_focus_xz(struct Camera *c) { /** * Look towards the star's y position. Only active before the camera warp. */ -BAD_RETURN(s32) cutscene_red_coin_star_focus_y(struct Camera *c) { +void cutscene_red_coin_star_focus_y(struct Camera *c) { approach_f32_asymptotic_bool(&c->focus[1], gCutsceneFocus->oPosY, 0.1f); } /** * Look 80% up towards the star. Only active after the camera warp. */ -BAD_RETURN(s32) cutscene_red_coin_star_look_up_at_star(struct Camera *c) { +void cutscene_red_coin_star_look_up_at_star(struct Camera *c) { c->focus[1] = sCutsceneVars[1].point[1] + (gCutsceneFocus->oPosY - sCutsceneVars[1].point[1]) * 0.8f; } /** * Warp the camera near the star's spawn point */ -BAD_RETURN(s32) cutscene_red_coin_star_warp(struct Camera *c) { +void cutscene_red_coin_star_warp(struct Camera *c) { f32 dist; s16 pitch, yaw, posYaw; struct Object *o = gCutsceneFocus; @@ -8409,11 +8409,11 @@ BAD_RETURN(s32) cutscene_red_coin_star_warp(struct Camera *c) { /** * Zoom out while looking at the star. */ -BAD_RETURN(s32) cutscene_red_coin_star_set_fov(UNUSED struct Camera *c) { +void cutscene_red_coin_star_set_fov(UNUSED struct Camera *c) { sFOVState.fov = 60.f; } -BAD_RETURN(s32) cutscene_red_coin_star(struct Camera *c) { +void cutscene_red_coin_star(struct Camera *c) { sStatusFlags |= CAM_FLAG_SMOOTH_MOVEMENT; cutscene_event(cutscene_red_coin_star_start, c, 0, 0); cutscene_event(cutscene_red_coin_star_warp, c, 30, 30); @@ -8431,7 +8431,7 @@ BAD_RETURN(s32) cutscene_red_coin_star(struct Camera *c) { /** * End the red coin star spawning cutscene */ -BAD_RETURN(s32) cutscene_red_coin_star_end(struct Camera *c) { +void cutscene_red_coin_star_end(struct Camera *c) { retrieve_info_star(c); gCutsceneTimer = CUTSCENE_STOP; c->cutscene = 0; @@ -8507,7 +8507,7 @@ void cutscene_goto_cvar_pos(struct Camera *c, f32 goalDist, s16 goalPitch, s16 r /** * Store the camera's pos and focus, and copy the cannon's position to cvars. */ -BAD_RETURN(s32) cutscene_prepare_cannon_start(struct Camera *c) { +void cutscene_prepare_cannon_start(struct Camera *c) { store_info_cannon(c); vec3f_copy(sCutsceneVars[0].point, c->focus); sCutsceneVars[2].point[0] = 30.f; @@ -8519,7 +8519,7 @@ BAD_RETURN(s32) cutscene_prepare_cannon_start(struct Camera *c) { /** * Fly towards the cannon door. */ -BAD_RETURN(s32) cutscene_prepare_cannon_fly_to_cannon(struct Camera *c) { +void cutscene_prepare_cannon_fly_to_cannon(struct Camera *c) { cutscene_goto_cvar_pos(c, 300.f, 0x2000, 0, sCutsceneVars[5].angle[1]); camera_approach_s16_symmetric_bool(&sCutsceneVars[5].angle[1], 0x400, 17); set_handheld_shake(HAND_CAM_SHAKE_CUTSCENE); @@ -8536,7 +8536,7 @@ void cannon_approach_prev(f32 *value, f32 target) { /** * Fly or warp back to the previous pos and focus, stored in sCameraStoreCutscene. */ -BAD_RETURN(s32) cutscene_prepare_cannon_fly_back(struct Camera *c) { +void cutscene_prepare_cannon_fly_back(struct Camera *c) { f32 distToPrevPos = calc_abs_dist(c->pos, sCameraStoreCutscene.pos); if (distToPrevPos < 8000.f) { @@ -8560,7 +8560,7 @@ BAD_RETURN(s32) cutscene_prepare_cannon_fly_back(struct Camera *c) { /** * Cutscene that plays when the cannon is opened. */ -BAD_RETURN(s32) cutscene_prepare_cannon(struct Camera *c) { +void cutscene_prepare_cannon(struct Camera *c) { sStatusFlags |= CAM_FLAG_SMOOTH_MOVEMENT; cutscene_event(cutscene_prepare_cannon_start, c, 0, 0); cutscene_event(cutscene_prepare_cannon_fly_to_cannon, c, 0, 140); @@ -8570,7 +8570,7 @@ BAD_RETURN(s32) cutscene_prepare_cannon(struct Camera *c) { /** * Stop the cannon opening cutscene. */ -BAD_RETURN(s32) cutscene_prepare_cannon_end(struct Camera *c) { +void cutscene_prepare_cannon_end(struct Camera *c) { gCutsceneTimer = CUTSCENE_STOP; c->cutscene = 0; retrieve_info_cannon(c); @@ -8598,7 +8598,7 @@ void death_goto_mario(struct Camera *c) { cutscene_goto_cvar_pos(c, 400.f, 0x1000, 0x300, 0); } -BAD_RETURN(s32) cutscene_death_standing_start(struct Camera *c) { +void cutscene_death_standing_start(struct Camera *c) { vec3f_copy(sCutsceneVars[0].point, c->focus); vec3f_copy(sCutsceneVars[3].point, sMarioCamState->pos); sCutsceneVars[3].point[1] += 70.f; @@ -8607,7 +8607,7 @@ BAD_RETURN(s32) cutscene_death_standing_start(struct Camera *c) { /** * Fly to Mario and turn on handheld shake. */ -BAD_RETURN(s32) cutscene_death_standing_goto_mario(struct Camera *c) { +void cutscene_death_standing_goto_mario(struct Camera *c) { death_goto_mario(c); set_handheld_shake(HAND_CAM_SHAKE_HIGH); } @@ -8615,20 +8615,20 @@ BAD_RETURN(s32) cutscene_death_standing_goto_mario(struct Camera *c) { /** * Cutscene that plays when Mario dies while standing. */ -BAD_RETURN(s32) cutscene_death_standing(struct Camera *c) { +void cutscene_death_standing(struct Camera *c) { cutscene_event(cutscene_death_standing_start, c, 0, 0); cutscene_event(cutscene_death_standing_goto_mario, c, 0, -1); sStatusFlags |= CAM_FLAG_SMOOTH_MOVEMENT; } -BAD_RETURN(s32) cutscene_death_stomach_start(struct Camera *c) { +void cutscene_death_stomach_start(struct Camera *c) { Vec3f offset = { 0, 40.f, -60.f }; offset_rotated(sCutsceneVars[3].point, sMarioCamState->pos, offset, sMarioCamState->faceAngle); vec3f_copy(sCutsceneVars[0].point, c->focus); } -BAD_RETURN(s32) cutscene_death_stomach_goto_mario(struct Camera *c) { +void cutscene_death_stomach_goto_mario(struct Camera *c) { cutscene_goto_cvar_pos(c, 400.f, 0x1800, 0, -0x400); } @@ -8642,28 +8642,28 @@ UNUSED static void unused_water_death_move_to_side_of_mario(struct Camera *c) { /** * Cutscene that plays when Mario dies on his stomach. */ -BAD_RETURN(s32) cutscene_death_stomach(struct Camera *c) { +void cutscene_death_stomach(struct Camera *c) { cutscene_event(cutscene_death_stomach_start, c, 0, 0); cutscene_event(cutscene_death_stomach_goto_mario, c, 0, -1); sStatusFlags |= CAM_FLAG_SMOOTH_MOVEMENT; set_handheld_shake(HAND_CAM_SHAKE_CUTSCENE); } -BAD_RETURN(s32) cutscene_bbh_death_start(struct Camera *c) { +void cutscene_bbh_death_start(struct Camera *c) { Vec3f dir = { 0, 40.f, 60.f }; offset_rotated(sCutsceneVars[3].point, sMarioCamState->pos, dir, sMarioCamState->faceAngle); vec3f_copy(sCutsceneVars[0].point, c->focus); } -BAD_RETURN(s32) cutscene_bbh_death_goto_mario(struct Camera *c) { +void cutscene_bbh_death_goto_mario(struct Camera *c) { cutscene_goto_cvar_pos(c, 400.f, 0x1800, 0, 0x400); } /** * Cutscene that plays when Mario dies in BBH. */ -BAD_RETURN(s32) cutscene_bbh_death(struct Camera *c) { +void cutscene_bbh_death(struct Camera *c) { cutscene_event(cutscene_bbh_death_start, c, 0, 0); cutscene_event(cutscene_bbh_death_goto_mario, c, 0, -1); sStatusFlags |= CAM_FLAG_SMOOTH_MOVEMENT; @@ -8673,14 +8673,14 @@ BAD_RETURN(s32) cutscene_bbh_death(struct Camera *c) { /** * Copy the camera's focus to cvar0 */ -BAD_RETURN(s32) cutscene_quicksand_death_start(struct Camera *c) { +void cutscene_quicksand_death_start(struct Camera *c) { vec3f_copy(sCutsceneVars[0].point, c->focus); } /** * Fly closer to Mario. In WATER_DEATH, move to Mario's side. */ -BAD_RETURN(s32) cutscene_quicksand_death_goto_mario(struct Camera *c) { +void cutscene_quicksand_death_goto_mario(struct Camera *c) { cutscene_goto_cvar_pos(c, 400.f, 0x2800, 0x200, 0); if (c->cutscene == CUTSCENE_WATER_DEATH) { @@ -8691,7 +8691,7 @@ BAD_RETURN(s32) cutscene_quicksand_death_goto_mario(struct Camera *c) { /** * Cutscene that plays when Mario dies in quicksand. */ -BAD_RETURN(s32) cutscene_quicksand_death(struct Camera *c) { +void cutscene_quicksand_death(struct Camera *c) { sCutsceneVars[3].point[0] = sMarioCamState->pos[0]; sCutsceneVars[3].point[1] = sMarioCamState->pos[1] + 20.f; sCutsceneVars[3].point[2] = sMarioCamState->pos[2]; @@ -8705,7 +8705,7 @@ BAD_RETURN(s32) cutscene_quicksand_death(struct Camera *c) { /** * Fly away from Mario near the end of the cutscene. */ -BAD_RETURN(s32) cutscene_suffocation_fly_away(UNUSED struct Camera *c) { +void cutscene_suffocation_fly_away(UNUSED struct Camera *c) { Vec3f target; Vec3f offset = { 0, 20.f, 120.f }; @@ -8716,7 +8716,7 @@ BAD_RETURN(s32) cutscene_suffocation_fly_away(UNUSED struct Camera *c) { /** * Keep Lakitu above the gas level. */ -BAD_RETURN(s32) cutscene_suffocation_stay_above_gas(struct Camera *c) { +void cutscene_suffocation_stay_above_gas(struct Camera *c) { UNUSED f32 unused1; f32 gasLevel; UNUSED f32 unused2; @@ -8734,7 +8734,7 @@ BAD_RETURN(s32) cutscene_suffocation_stay_above_gas(struct Camera *c) { /** * Quickly rotate around Mario. */ -BAD_RETURN(s32) cutscene_suffocation_rotate(struct Camera *c) { +void cutscene_suffocation_rotate(struct Camera *c) { f32 dist; s16 pitch, yaw; @@ -8746,7 +8746,7 @@ BAD_RETURN(s32) cutscene_suffocation_rotate(struct Camera *c) { /** * Cutscene that plays when Mario dies from suffocation (ie due to HMC gas). */ -BAD_RETURN(s32) cutscene_suffocation(struct Camera *c) { +void cutscene_suffocation(struct Camera *c) { cutscene_event(cutscene_death_stomach_start, c, 0, 0); cutscene_event(cutscene_suffocation_rotate, c, 0, -1); cutscene_event(cutscene_suffocation_stay_above_gas, c, 0, -1); @@ -8755,7 +8755,7 @@ BAD_RETURN(s32) cutscene_suffocation(struct Camera *c) { set_handheld_shake(HAND_CAM_SHAKE_HIGH); } -BAD_RETURN(s32) cutscene_enter_pool_start(struct Camera *c) { +void cutscene_enter_pool_start(struct Camera *c) { vec3f_copy(sCutsceneVars[3].point, sMarioCamState->pos); if (gCurrLevelNum == LEVEL_CASTLE) { // entering HMC @@ -8768,13 +8768,13 @@ BAD_RETURN(s32) cutscene_enter_pool_start(struct Camera *c) { vec3f_copy(sCutsceneVars[0].point, c->focus); } -BAD_RETURN(s32) cutscene_enter_pool_loop(struct Camera *c) { +void cutscene_enter_pool_loop(struct Camera *c) { UNUSED u32 pad[2]; cutscene_goto_cvar_pos(c, 1200.f, 0x2000, 0x200, 0); } -BAD_RETURN(s32) cutscene_enter_pool(struct Camera *c) { +void cutscene_enter_pool(struct Camera *c) { cutscene_event(cutscene_enter_pool_start, c, 0, 0); cutscene_event(cutscene_enter_pool_loop, c, 0, -1); sStatusFlags |= CAM_FLAG_SMOOTH_MOVEMENT; @@ -8784,7 +8784,7 @@ BAD_RETURN(s32) cutscene_enter_pool(struct Camera *c) { * Store the camera focus in cvar1. * Store the area's center position (which happens to be the pyramid, in SSL) in cvar3. */ -BAD_RETURN(s32) cutscene_pyramid_top_explode_start(struct Camera *c) { +void cutscene_pyramid_top_explode_start(struct Camera *c) { reset_pan_distance(c); store_info_cannon(c); @@ -8795,14 +8795,14 @@ BAD_RETURN(s32) cutscene_pyramid_top_explode_start(struct Camera *c) { /** * Zoom in on the pyramid. */ -BAD_RETURN(s32) cutscene_pyramid_top_explode_zoom_in(UNUSED struct Camera *c) { +void cutscene_pyramid_top_explode_zoom_in(UNUSED struct Camera *c) { set_fov_function(CAM_FOV_APP_30); } /** * Look at the pyramid top. */ -BAD_RETURN(s32) cutscene_pyramid_top_explode_focus(struct Camera *c) { +void cutscene_pyramid_top_explode_focus(struct Camera *c) { approach_vec3f_asymptotic(c->focus, sCutsceneVars[3].point, 0.02f, 0.02f, 0.02f); sStatusFlags |= CAM_FLAG_SMOOTH_MOVEMENT; } @@ -8810,7 +8810,7 @@ BAD_RETURN(s32) cutscene_pyramid_top_explode_focus(struct Camera *c) { /** * Store the old pos and focus, then warp to the pyramid top. */ -BAD_RETURN(s32) cutscene_pyramid_top_explode_warp(struct Camera *c) { +void cutscene_pyramid_top_explode_warp(struct Camera *c) { s16 pitch, yaw; f32 dist; @@ -8829,7 +8829,7 @@ BAD_RETURN(s32) cutscene_pyramid_top_explode_warp(struct Camera *c) { /** * Close up view of the spinning pyramid top as it rises. */ -BAD_RETURN(s32) cutscene_pyramid_top_explode_closeup(struct Camera *c) { +void cutscene_pyramid_top_explode_closeup(struct Camera *c) { s16 pitch, yaw; f32 dist; @@ -8846,14 +8846,14 @@ BAD_RETURN(s32) cutscene_pyramid_top_explode_closeup(struct Camera *c) { /** * Shake the camera during the closeup. */ -BAD_RETURN(s32) cutscene_pyramid_top_explode_cam_shake(UNUSED struct Camera *c) { +void cutscene_pyramid_top_explode_cam_shake(UNUSED struct Camera *c) { set_environmental_camera_shake(SHAKE_ENV_PYRAMID_EXPLODE); } /** * Warp back to the old position, and start a heavy camera shake. */ -BAD_RETURN(s32) cutscene_pyramid_top_explode_warp_back(struct Camera *c) { +void cutscene_pyramid_top_explode_warp_back(struct Camera *c) { UNUSED u32 pad[2]; vec3f_copy(c->pos, sCutsceneVars[4].point); @@ -8864,7 +8864,7 @@ BAD_RETURN(s32) cutscene_pyramid_top_explode_warp_back(struct Camera *c) { /** * An unused cutscene for when the pyramid explodes. */ -BAD_RETURN(s32) cutscene_pyramid_top_explode(struct Camera *c) { +void cutscene_pyramid_top_explode(struct Camera *c) { cutscene_event(cutscene_pyramid_top_explode_start, c, 0, 0); cutscene_event(cutscene_pyramid_top_explode_focus, c, 0, 30); cutscene_event(cutscene_pyramid_top_explode_warp, c, 31, 31); @@ -8877,7 +8877,7 @@ BAD_RETURN(s32) cutscene_pyramid_top_explode(struct Camera *c) { /** * End the pyramid top explosion cutscene. */ -BAD_RETURN(s32) cutscene_pyramid_top_explode_end(struct Camera *c) { +void cutscene_pyramid_top_explode_end(struct Camera *c) { cutscene_stop_dialog(c); stop_cutscene_and_retrieve_stored_info(c); // Move the camera back to Mario @@ -8887,7 +8887,7 @@ BAD_RETURN(s32) cutscene_pyramid_top_explode_end(struct Camera *c) { /** * Store the camera focus in cvar0, and store the top of the pyramid in cvar3. */ -BAD_RETURN(s32) cutscene_enter_pyramid_top_start(struct Camera *c) { +void cutscene_enter_pyramid_top_start(struct Camera *c) { vec3f_copy(sCutsceneVars[0].point, c->focus); vec3f_set(sCutsceneVars[3].point, c->areaCenX, 1280.f, c->areaCenZ); } @@ -8895,7 +8895,7 @@ BAD_RETURN(s32) cutscene_enter_pyramid_top_start(struct Camera *c) { /** * Cutscene that plays when Mario enters the top of the pyramid. */ -BAD_RETURN(s32) cutscene_enter_pyramid_top(struct Camera *c) { +void cutscene_enter_pyramid_top(struct Camera *c) { cutscene_event(cutscene_enter_pyramid_top_start, c, 0, 0); // Move to cvar3 cutscene_goto_cvar_pos(c, 200.f, 0x3000, 0, 0); @@ -8923,7 +8923,7 @@ UNUSED static void unused_cutscene_goto_cvar(struct Camera *c) { * cvar9.point is gCutsceneFocus's position * cvar9.angle[1] is the yaw between Mario and the gCutsceneFocus */ -BAD_RETURN(s32) cutscene_dialog_start(struct Camera *c) { +void cutscene_dialog_start(struct Camera *c) { UNUSED f32 unused1; UNUSED s16 unused2; s16 yaw; @@ -8965,7 +8965,7 @@ BAD_RETURN(s32) cutscene_dialog_start(struct Camera *c) { * Move closer to Mario and the object, adjusting to their difference in height. * The camera's generally ends up looking over Mario's shoulder. */ -BAD_RETURN(s32) cutscene_dialog_move_mario_shoulder(struct Camera *c) { +void cutscene_dialog_move_mario_shoulder(struct Camera *c) { f32 dist; s16 pitch, yaw; Vec3f focus, pos; @@ -8999,7 +8999,7 @@ BAD_RETURN(s32) cutscene_dialog_move_mario_shoulder(struct Camera *c) { /** * Create the dialog with sCutsceneDialogID */ -BAD_RETURN(s32) cutscene_dialog_create_dialog_box(struct Camera *c) { +void cutscene_dialog_create_dialog_box(struct Camera *c) { if (c->cutscene == CUTSCENE_RACE_DIALOG) { create_dialog_box_with_response(sCutsceneDialogID); } else { @@ -9013,7 +9013,7 @@ BAD_RETURN(s32) cutscene_dialog_create_dialog_box(struct Camera *c) { /** * Cutscene that plays when Mario talks to an object. */ -BAD_RETURN(s32) cutscene_dialog(struct Camera *c) { +void cutscene_dialog(struct Camera *c) { cutscene_event(cutscene_dialog_start, c, 0, 0); cutscene_event(cutscene_dialog_move_mario_shoulder, c, 0, -1); cutscene_event(cutscene_dialog_create_dialog_box, c, 10, 10); @@ -9039,14 +9039,14 @@ BAD_RETURN(s32) cutscene_dialog(struct Camera *c) { /** * Sets the CAM_FLAG_UNUSED_CUTSCENE_ACTIVE flag, which does nothing. */ -BAD_RETURN(s32) cutscene_dialog_set_flag(UNUSED struct Camera *c) { +void cutscene_dialog_set_flag(UNUSED struct Camera *c) { sStatusFlags |= CAM_FLAG_UNUSED_CUTSCENE_ACTIVE; } /** * Ends the dialog cutscene. */ -BAD_RETURN(s32) cutscene_dialog_end(struct Camera *c) { +void cutscene_dialog_end(struct Camera *c) { sStatusFlags |= CAM_FLAG_UNUSED_CUTSCENE_ACTIVE; c->cutscene = 0; clear_time_stop_flags(TIME_STOP_ENABLED | TIME_STOP_DIALOG); @@ -9057,7 +9057,7 @@ BAD_RETURN(s32) cutscene_dialog_end(struct Camera *c) { * * In this cutscene, cvar0.angle[0] is used as a state variable. */ -BAD_RETURN(s32) cutscene_read_message_start(struct Camera *c) { +void cutscene_read_message_start(struct Camera *c) { cutscene_soften_music(c); transition_next_state(c, 30); reset_pan_distance(c); @@ -9081,7 +9081,7 @@ UNUSED static void unused_cam_to_mario(struct Camera *c) { /** * Cutscene that plays when Mario is reading a message (a sign or message on the wall) */ -BAD_RETURN(s32) cutscene_read_message(struct Camera *c) { +void cutscene_read_message(struct Camera *c) { UNUSED u32 pad[2]; cutscene_event(cutscene_read_message_start, c, 0, 0); @@ -9120,14 +9120,14 @@ BAD_RETURN(s32) cutscene_read_message(struct Camera *c) { /** * Set CAM_FLAG_UNUSED_CUTSCENE_ACTIVE, which does nothing. */ -BAD_RETURN(s32) cutscene_read_message_set_flag(UNUSED struct Camera *c) { +void cutscene_read_message_set_flag(UNUSED struct Camera *c) { sStatusFlags |= CAM_FLAG_UNUSED_CUTSCENE_ACTIVE; } /** * End the message cutscene. */ -BAD_RETURN(s32) cutscene_read_message_end(struct Camera *c) { +void cutscene_read_message_end(struct Camera *c) { sStatusFlags |= CAM_FLAG_UNUSED_CUTSCENE_ACTIVE; c->cutscene = 0; } @@ -9138,7 +9138,7 @@ BAD_RETURN(s32) cutscene_read_message_end(struct Camera *c) { * cvar6 is the focus offset * cvar5 is the position offset */ -BAD_RETURN(s32) cutscene_exit_succ_start(UNUSED struct Camera *c) { +void cutscene_exit_succ_start(UNUSED struct Camera *c) { vec3f_copy(sCutsceneVars[7].point, sMarioCamState->pos); vec3s_copy(sCutsceneVars[7].angle, sMarioCamState->faceAngle); vec3f_set(sCutsceneVars[6].point, 6.f, 363.f, 543.f); @@ -9148,7 +9148,7 @@ BAD_RETURN(s32) cutscene_exit_succ_start(UNUSED struct Camera *c) { /** * Set the camera pos depending on which level Mario exited. */ -BAD_RETURN(s32) cutscene_non_painting_set_cam_pos(struct Camera *c) { +void cutscene_non_painting_set_cam_pos(struct Camera *c) { UNUSED u32 unused1; struct Surface *floor; UNUSED Vec3f unused2; @@ -9180,7 +9180,7 @@ BAD_RETURN(s32) cutscene_non_painting_set_cam_pos(struct Camera *c) { /** * Update the camera focus depending on which level Mario exited. */ -BAD_RETURN(s32) cutscene_non_painting_set_cam_focus(struct Camera *c) { +void cutscene_non_painting_set_cam_focus(struct Camera *c) { offset_rotated(c->focus, sCutsceneVars[7].point, sCutsceneVars[6].point, sCutsceneVars[7].angle); if ((gPrevLevel == LEVEL_COTMC) || (gPrevLevel == LEVEL_HMC) || (gPrevLevel == LEVEL_RR) @@ -9196,7 +9196,7 @@ BAD_RETURN(s32) cutscene_non_painting_set_cam_focus(struct Camera *c) { /** * Focus slightly left of Mario. Perhaps to keep the bowser painting in view? */ -BAD_RETURN(s32) cutscene_exit_bowser_succ_focus_left(UNUSED struct Camera *c) { +void cutscene_exit_bowser_succ_focus_left(UNUSED struct Camera *c) { approach_f32_asymptotic_bool(&sCutsceneVars[6].point[0], -24.f, 0.05f); } @@ -9204,7 +9204,7 @@ BAD_RETURN(s32) cutscene_exit_bowser_succ_focus_left(UNUSED struct Camera *c) { * Instead of focusing on the key, just start a pitch shake. Clever! * The shake lasts 32 frames. */ -BAD_RETURN(s32) cutscene_exit_bowser_key_toss_shake(struct Camera *c) { +void cutscene_exit_bowser_key_toss_shake(struct Camera *c) { //! Unnecessary check. if (c->cutscene == CUTSCENE_EXIT_BOWSER_SUCC) { set_camera_pitch_shake(0x800, 0x40, 0x800); @@ -9214,14 +9214,14 @@ BAD_RETURN(s32) cutscene_exit_bowser_key_toss_shake(struct Camera *c) { /** * Start a camera shake when Mario lands on the ground. */ -BAD_RETURN(s32) cutscene_exit_succ_shake_landing(UNUSED struct Camera *c) { +void cutscene_exit_succ_shake_landing(UNUSED struct Camera *c) { set_environmental_camera_shake(SHAKE_ENV_EXPLOSION); } /** * Cutscene that plays when Mario beats bowser and exits the level. */ -BAD_RETURN(s32) cutscene_exit_bowser_succ(struct Camera *c) { +void cutscene_exit_bowser_succ(struct Camera *c) { cutscene_event(cutscene_exit_succ_start, c, 0, 0); cutscene_event(cutscene_non_painting_set_cam_pos, c, 0, -1); cutscene_event(cutscene_exit_bowser_succ_focus_left, c, 18, -1); @@ -9233,7 +9233,7 @@ BAD_RETURN(s32) cutscene_exit_bowser_succ(struct Camera *c) { /** * End a non-painting exit cutscene. Used by BBH and bowser courses. */ -BAD_RETURN(s32) cutscene_non_painting_end(struct Camera *c) { +void cutscene_non_painting_end(struct Camera *c) { c->cutscene = 0; if (c->defMode == CAMERA_MODE_CLOSE) { @@ -9251,14 +9251,14 @@ BAD_RETURN(s32) cutscene_non_painting_end(struct Camera *c) { /** * Override the position offset. */ -BAD_RETURN(s32) cutscene_exit_non_painting_succ_override_cvar(UNUSED struct Camera *c) { +void cutscene_exit_non_painting_succ_override_cvar(UNUSED struct Camera *c) { vec3f_set(sCutsceneVars[5].point, 137.f, 246.f, 1115.f); } /** * Cutscene that plays when Mario collects a star and leaves a non-painting course, like HMC or BBH. */ -BAD_RETURN(s32) cutscene_exit_non_painting_succ(struct Camera *c) { +void cutscene_exit_non_painting_succ(struct Camera *c) { cutscene_event(cutscene_exit_succ_start, c, 0, 0); cutscene_event(cutscene_exit_non_painting_succ_override_cvar, c, 0, 0); cutscene_event(cutscene_non_painting_set_cam_pos, c, 0, -1); @@ -9273,7 +9273,7 @@ BAD_RETURN(s32) cutscene_exit_non_painting_succ(struct Camera *c) { * Set cvar6 to the focus offset from Mario. * set cvar5 to the pos offset from Mario. (This is always overwritten) */ -BAD_RETURN(s32) cutscene_non_painting_death_start(UNUSED struct Camera *c) { +void cutscene_non_painting_death_start(UNUSED struct Camera *c) { vec3f_copy(sCutsceneVars[7].point, sMarioCamState->pos); vec3s_copy(sCutsceneVars[7].angle, sMarioCamState->faceAngle); vec3f_set(sCutsceneVars[6].point, -42.f, 350.f, 727.f); @@ -9289,7 +9289,7 @@ BAD_RETURN(s32) cutscene_non_painting_death_start(UNUSED struct Camera *c) { * This cutscene is unused, dying in bowser's arena spawns Mario near the warp pipe, not back in the * hub. */ -BAD_RETURN(s32) cutscene_exit_bowser_death(struct Camera *c) { +void cutscene_exit_bowser_death(struct Camera *c) { cutscene_event(cutscene_non_painting_death_start, c, 0, 0); cutscene_event(cutscene_non_painting_set_cam_pos, c, 0, -1); cutscene_event(cutscene_non_painting_set_cam_focus, c, 0, -1); @@ -9299,7 +9299,7 @@ BAD_RETURN(s32) cutscene_exit_bowser_death(struct Camera *c) { * Set the offset from Mario depending on the course Mario exited. * This overrides cutscene_non_painting_death_start() */ -BAD_RETURN(s32) cutscene_non_painting_death_override_offset(UNUSED struct Camera *c) { +void cutscene_non_painting_death_override_offset(UNUSED struct Camera *c) { switch (gPrevLevel) { case LEVEL_HMC: vec3f_set(sCutsceneVars[5].point, 187.f, 369.f, -197.f); @@ -9316,7 +9316,7 @@ BAD_RETURN(s32) cutscene_non_painting_death_override_offset(UNUSED struct Camera /** * Cutscene played when Mario dies in a non-painting course, like HMC or BBH. */ -BAD_RETURN(s32) cutscene_non_painting_death(struct Camera *c) { +void cutscene_non_painting_death(struct Camera *c) { cutscene_event(cutscene_non_painting_death_start, c, 0, 0); cutscene_event(cutscene_non_painting_death_override_offset, c, 0, 0); cutscene_event(cutscene_non_painting_set_cam_pos, c, 0, -1); @@ -9332,7 +9332,7 @@ BAD_RETURN(s32) cutscene_non_painting_death(struct Camera *c) { * between that yaw and Mario's faceAngle plus 0x1200. The reason for taking the high byte is * because cvar1 rotates until is reaches 0, so it's important that it's a multiple of 0x100. */ -BAD_RETURN(s32) cutscene_cap_switch_press_start(struct Camera *c) { +void cutscene_cap_switch_press_start(struct Camera *c) { UNUSED s16 unused1; s16 yaw; UNUSED u32 pad[2]; @@ -9348,7 +9348,7 @@ BAD_RETURN(s32) cutscene_cap_switch_press_start(struct Camera *c) { * Rotate around Mario. As each cvar stops updating, the rotation slows until the camera ends up in * front of Mario. */ -BAD_RETURN(s32) cutscene_cap_switch_press_rotate_around_mario(struct Camera *c) { +void cutscene_cap_switch_press_rotate_around_mario(struct Camera *c) { f32 dist; s16 pitch, yaw; UNUSED s16 unusedYaw = sMarioCamState->faceAngle[1] + 0x1000; @@ -9374,14 +9374,14 @@ BAD_RETURN(s32) cutscene_cap_switch_press_rotate_around_mario(struct Camera *c) /** * Move the camera slightly downwards. */ -BAD_RETURN(s32) cutscene_cap_switch_press_lower_cam(struct Camera *c) { +void cutscene_cap_switch_press_lower_cam(struct Camera *c) { rotate_and_move_vec3f(c->pos, sMarioCamState->pos, 0, -0x20, 0); } /** * Move the camera closer to Mario. */ -BAD_RETURN(s32) cutscene_cap_switch_press_approach_mario(struct Camera *c) { +void cutscene_cap_switch_press_approach_mario(struct Camera *c) { s16 pitch, yaw; f32 dist; @@ -9398,7 +9398,7 @@ BAD_RETURN(s32) cutscene_cap_switch_press_approach_mario(struct Camera *c) { /** * Pan the camera left so that Mario is on the right side of the screen when the camera stops spinning. */ -BAD_RETURN(s32) cutscene_cap_switch_press_pan_left(struct Camera *c) { +void cutscene_cap_switch_press_pan_left(struct Camera *c) { vec3f_copy(c->focus, sMarioCamState->pos); c->focus[1] += 110.f; camera_approach_s16_symmetric_bool(&sCutsceneVars[0].angle[1], 0x800, 0x20); @@ -9408,11 +9408,11 @@ BAD_RETURN(s32) cutscene_cap_switch_press_pan_left(struct Camera *c) { /** * Create a dialog box with the cap switch's text. */ -BAD_RETURN(s32) cutscene_cap_switch_press_create_dialog(UNUSED struct Camera *c) { +void cutscene_cap_switch_press_create_dialog(UNUSED struct Camera *c) { create_dialog_box_with_response(gCutsceneFocus->oBehParams2ndByte + DIALOG_010); } -static UNUSED BAD_RETURN(s32) unused_cap_switch_retrieve_info(struct Camera *c) { +static UNUSED void unused_cap_switch_retrieve_info(struct Camera *c) { retrieve_info_star(c); transition_next_state(c, 30); } @@ -9420,7 +9420,7 @@ static UNUSED BAD_RETURN(s32) unused_cap_switch_retrieve_info(struct Camera *c) /** * Cutscene that plays when Mario presses a cap switch. */ -BAD_RETURN(s32) cutscene_cap_switch_press(struct Camera *c) { +void cutscene_cap_switch_press(struct Camera *c) { f32 dist; s16 pitch, yaw; @@ -9456,7 +9456,7 @@ BAD_RETURN(s32) cutscene_cap_switch_press(struct Camera *c) { * cvar2 is the goal position * cvar3 is the goal focus */ -BAD_RETURN(s32) cutscene_unlock_key_door_start(struct Camera *c) { +void cutscene_unlock_key_door_start(struct Camera *c) { Vec3f posOff, focusOff; vec3f_copy(sCutsceneVars[0].point, c->pos); @@ -9471,7 +9471,7 @@ BAD_RETURN(s32) cutscene_unlock_key_door_start(struct Camera *c) { * Move the camera to the cvars position and focus, closer to Mario. * Gives a better view of the key. */ -BAD_RETURN(s32) cutscene_unlock_key_door_approach_mario(struct Camera *c) { +void cutscene_unlock_key_door_approach_mario(struct Camera *c) { approach_vec3f_asymptotic(c->pos, sCutsceneVars[2].point, 0.1f, 0.1f, 0.1f); approach_vec3f_asymptotic(c->focus, sCutsceneVars[3].point, 0.1f, 0.1f, 0.1f); } @@ -9479,17 +9479,17 @@ BAD_RETURN(s32) cutscene_unlock_key_door_approach_mario(struct Camera *c) { /** * Move the camera focus up a bit, focusing on the key in the lock. */ -BAD_RETURN(s32) cutscene_unlock_key_door_focus_lock(UNUSED struct Camera *c) { +void cutscene_unlock_key_door_focus_lock(UNUSED struct Camera *c) { approach_f32_asymptotic_bool(&sCutsceneVars[3].point[1], sMarioCamState->pos[1] + 140.f, 0.07f); } -BAD_RETURN(s32) cutscene_unlock_key_door_stub(UNUSED struct Camera *c) { +void cutscene_unlock_key_door_stub(UNUSED struct Camera *c) { } /** * Move back to the previous pos and focus, stored in cvar0 and cvar1. */ -BAD_RETURN(s32) cutscene_unlock_key_door_fly_back(struct Camera *c) { +void cutscene_unlock_key_door_fly_back(struct Camera *c) { approach_vec3f_asymptotic(c->pos, sCutsceneVars[0].point, 0.1f, 0.1f, 0.1f); approach_vec3f_asymptotic(c->focus, sCutsceneVars[1].point, 0.1f, 0.1f, 0.1f); } @@ -9497,14 +9497,14 @@ BAD_RETURN(s32) cutscene_unlock_key_door_fly_back(struct Camera *c) { /** * Shake the camera's fov when the key is put in the lock. */ -BAD_RETURN(s32) cutscene_unlock_key_door_fov_shake(UNUSED struct Camera *c) { +void cutscene_unlock_key_door_fov_shake(UNUSED struct Camera *c) { cutscene_set_fov_shake_preset(1); } /** * Cutscene that plays when Mario unlocks a key door. */ -BAD_RETURN(s32) cutscene_unlock_key_door(UNUSED struct Camera *c) { +void cutscene_unlock_key_door(UNUSED struct Camera *c) { cutscene_event(cutscene_unlock_key_door_start, c, 0, 0); cutscene_event(cutscene_unlock_key_door_approach_mario, c, 0, 123); cutscene_event(cutscene_unlock_key_door_fly_back, c, 124, -1); @@ -9547,12 +9547,12 @@ s32 intro_peach_move_camera_start_to_pipe(struct Camera *c, struct CutsceneSplin /** * Create a dialog box with the letter text */ -BAD_RETURN(s32) peach_letter_text(UNUSED struct Camera *c) { +void peach_letter_text(UNUSED struct Camera *c) { create_dialog_box(DIALOG_020); } #ifndef VERSION_JP -BAD_RETURN(s32) play_sound_peach_reading_letter(UNUSED struct Camera *c) { +void play_sound_peach_reading_letter(UNUSED struct Camera *c) { play_sound(SOUND_PEACH_DEAR_MARIO, gGlobalSoundSource); } #endif @@ -9561,7 +9561,7 @@ BAD_RETURN(s32) play_sound_peach_reading_letter(UNUSED struct Camera *c) { * Move the camera from peach reading the letter all the way to Mario's warp pipe. Follow the * sIntroStartToPipe splines. */ -BAD_RETURN(s32) cutscene_intro_peach_start_to_pipe_spline(struct Camera *c) { +void cutscene_intro_peach_start_to_pipe_spline(struct Camera *c) { if (intro_peach_move_camera_start_to_pipe(c, sIntroStartToPipePosition, sIntroStartToPipeFocus) != 0) { gCameraMovementFlags &= ~CAM_MOVE_C_UP_MODE; gCutsceneTimer = CUTSCENE_LOOP; @@ -9571,7 +9571,7 @@ BAD_RETURN(s32) cutscene_intro_peach_start_to_pipe_spline(struct Camera *c) { /** * Loop the cutscene until Mario exits the dialog. */ -BAD_RETURN(s32) cutscene_intro_peach_dialog(struct Camera *c) { +void cutscene_intro_peach_dialog(struct Camera *c) { if (get_dialog_id() == DIALOG_NONE) { vec3f_copy(gLakituState.goalPos, c->pos); vec3f_copy(gLakituState.goalFocus, c->focus); @@ -9581,19 +9581,19 @@ BAD_RETURN(s32) cutscene_intro_peach_dialog(struct Camera *c) { } } -BAD_RETURN(s32) cutscene_intro_peach_follow_pipe_spline(struct Camera *c) { +void cutscene_intro_peach_follow_pipe_spline(struct Camera *c) { move_point_along_spline(c->pos, sIntroPipeToDialogPosition, &sCutsceneSplineSegment, &sCutsceneSplineSegmentProgress); move_point_along_spline(c->focus, sIntroPipeToDialogFocus, &sCutsceneSplineSegment, &sCutsceneSplineSegmentProgress); } -BAD_RETURN(s32) cutscene_intro_peach_clear_cutscene_status(UNUSED struct Camera *c) { +void cutscene_intro_peach_clear_cutscene_status(UNUSED struct Camera *c) { sMarioCamState->cameraEvent = 0; } /** * Set fov to 8 degrees, then zoom out to 30. */ -BAD_RETURN(s32) cutscene_intro_peach_zoom_fov(UNUSED struct Camera *c) { +void cutscene_intro_peach_zoom_fov(UNUSED struct Camera *c) { sFOVState.fov = 8.f; set_fov_function(CAM_FOV_ZOOM_30); } @@ -9601,7 +9601,7 @@ BAD_RETURN(s32) cutscene_intro_peach_zoom_fov(UNUSED struct Camera *c) { /** * Reset the spline progress, turn on handheld shake. */ -BAD_RETURN(s32) cutscene_intro_peach_reset_spline(UNUSED struct Camera *c) { +void cutscene_intro_peach_reset_spline(UNUSED struct Camera *c) { sCutsceneSplineSegment = 0; sCutsceneSplineSegmentProgress = 0.1f; //! @bug since this event is only called for one frame, this handheld shake is turned off on the @@ -9613,16 +9613,16 @@ BAD_RETURN(s32) cutscene_intro_peach_reset_spline(UNUSED struct Camera *c) { * Turn off handheld shake. This was likely written before handheld shake was changed to turn off every * frame, as it's the only instance of HAND_CAM_SHAKE_OFF. */ -BAD_RETURN(s32) cutscene_intro_peach_handheld_shake_off(UNUSED struct Camera *c) { +void cutscene_intro_peach_handheld_shake_off(UNUSED struct Camera *c) { set_handheld_shake(HAND_CAM_SHAKE_OFF); } -BAD_RETURN(s32) intro_pipe_exit_text(UNUSED struct Camera *c) { +void intro_pipe_exit_text(UNUSED struct Camera *c) { create_dialog_box(DIALOG_033); } #ifndef VERSION_JP -BAD_RETURN(s32) play_sound_intro_turn_on_hud(UNUSED struct Camera *c) { +void play_sound_intro_turn_on_hud(UNUSED struct Camera *c) { play_sound_rbutton_changed(); } #endif @@ -9630,7 +9630,7 @@ BAD_RETURN(s32) play_sound_intro_turn_on_hud(UNUSED struct Camera *c) { /** * Fly to the pipe. Near the end, the camera jumps to Lakitu's position and the hud turns on. */ -BAD_RETURN(s32) cutscene_intro_peach_fly_to_pipe(struct Camera *c) { +void cutscene_intro_peach_fly_to_pipe(struct Camera *c) { cutscene_event(play_sound_intro_turn_on_hud, c, 818, 818); cutscene_spawn_obj(6, 1); cutscene_event(cutscene_intro_peach_start_flying_music, c, 0, 0); @@ -9643,7 +9643,7 @@ BAD_RETURN(s32) cutscene_intro_peach_fly_to_pipe(struct Camera *c) { /** * Lakitu flies around the warp pipe, then Mario jumps out. */ -BAD_RETURN(s32) cutscene_intro_peach_mario_appears(struct Camera *c) { +void cutscene_intro_peach_mario_appears(struct Camera *c) { UNUSED u32 pad[2]; sMarioCamState->cameraEvent = 0; @@ -9666,14 +9666,14 @@ BAD_RETURN(s32) cutscene_intro_peach_mario_appears(struct Camera *c) { /** * Reset the fov. This gives the effect of peach zooming out as she fades. */ -BAD_RETURN(s32) cutscene_intro_peach_reset_fov(UNUSED struct Camera *c) { +void cutscene_intro_peach_reset_fov(UNUSED struct Camera *c) { set_fov_function(CAM_FOV_DEFAULT); } /** * Peach reads the letter to Mario. */ -BAD_RETURN(s32) cutscene_intro_peach_letter(struct Camera *c) { +void cutscene_intro_peach_letter(struct Camera *c) { cutscene_spawn_obj(5, 0); cutscene_event(cutscene_intro_peach_zoom_fov, c, 0, 0); cutscene_event(cutscene_intro_peach_start_letter_music, c, 65, 65); @@ -9694,7 +9694,7 @@ BAD_RETURN(s32) cutscene_intro_peach_letter(struct Camera *c) { /** * Reset the spline progress. */ -BAD_RETURN(s32) cutscene_end_waving_start(UNUSED struct Camera *c) { +void cutscene_end_waving_start(UNUSED struct Camera *c) { cutscene_reset_spline(); } @@ -9741,7 +9741,7 @@ struct CutsceneSplinePoint gEndWavingFocus[] = { { 0, 0, { -156, 1718, 5086 } }, { 0, 0, { -156, 1718, 5086 } }, { 0, 0, { -156, 1718, 5086 } } }; -BAD_RETURN(s32) cutscene_end_waving(struct Camera *c) { +void cutscene_end_waving(struct Camera *c) { cutscene_event(cutscene_end_waving_start, c, 0, 0); move_point_along_spline(c->pos, gEndWavingPos, &sCutsceneSplineSegment, &sCutsceneSplineSegmentProgress); move_point_along_spline(c->focus, gEndWavingFocus, &sCutsceneSplineSegment, &sCutsceneSplineSegmentProgress); @@ -9751,7 +9751,7 @@ BAD_RETURN(s32) cutscene_end_waving(struct Camera *c) { /** * Called on the first frame of the credits. Resets the spline progress. */ -BAD_RETURN(s32) cutscene_credits_reset_spline(UNUSED struct Camera *c) { +void cutscene_credits_reset_spline(UNUSED struct Camera *c) { cutscene_reset_spline(); } @@ -9799,7 +9799,7 @@ extern struct CutsceneSplinePoint sCcmOutsideCreditsSplineFocus[]; /** * Follow splines through the courses of the game. */ -BAD_RETURN(s32) cutscene_credits(struct Camera *c) { +void cutscene_credits(struct Camera *c) { struct CutsceneSplinePoint *focus, *pos; cutscene_event(cutscene_credits_reset_spline, c, 0, 0); @@ -9908,7 +9908,7 @@ BAD_RETURN(s32) cutscene_credits(struct Camera *c) { /** * Set the camera pos relative to Mario. */ -BAD_RETURN(s32) cutscene_sliding_doors_open_start(struct Camera *c) { +void cutscene_sliding_doors_open_start(struct Camera *c) { f32 dist; s16 pitch, yaw; @@ -9929,7 +9929,7 @@ BAD_RETURN(s32) cutscene_sliding_doors_open_start(struct Camera *c) { * cvar0.angle: Mario's angle * cvar0.point: offset from Mario */ -BAD_RETURN(s32) cutscene_sliding_doors_open_set_cvars(UNUSED struct Camera *c) { +void cutscene_sliding_doors_open_set_cvars(UNUSED struct Camera *c) { vec3f_copy(sCutsceneVars[1].point, sMarioCamState->pos); vec3s_copy(sCutsceneVars[0].angle, sMarioCamState->faceAngle); vec3f_set(sCutsceneVars[0].point, 80.f, 325.f, 200.f); @@ -9939,21 +9939,21 @@ BAD_RETURN(s32) cutscene_sliding_doors_open_set_cvars(UNUSED struct Camera *c) { * Decrease the cvar0 y offset to 75, which would simulate Lakitu flying under the doorway. * However, the initial y offset is too high for Lakitu to reach 75 in time. */ -BAD_RETURN(s32) cutscene_sliding_doors_go_under_doorway(UNUSED struct Camera *c) { +void cutscene_sliding_doors_go_under_doorway(UNUSED struct Camera *c) { camera_approach_f32_symmetric_bool(&sCutsceneVars[0].point[1], 75.f, 10.f); } /** * Approach a y offset of 125 again. */ -BAD_RETURN(s32) cutscene_sliding_doors_fly_back_up(UNUSED struct Camera *c) { +void cutscene_sliding_doors_fly_back_up(UNUSED struct Camera *c) { camera_approach_f32_symmetric_bool(&sCutsceneVars[0].point[1], 125.f, 10.f); } /** * Follow Mario through the door, by approaching cvar1.point. */ -BAD_RETURN(s32) cutscene_sliding_doors_follow_mario(struct Camera *c) { +void cutscene_sliding_doors_follow_mario(struct Camera *c) { Vec3f pos; UNUSED u32 pad[5]; @@ -9980,7 +9980,7 @@ BAD_RETURN(s32) cutscene_sliding_doors_follow_mario(struct Camera *c) { * Plays when Mario opens the sliding doors. * Note: the star door unlocking event is not a cutscene, it's handled by Mario separately. */ -BAD_RETURN(s32) cutscene_sliding_doors_open(struct Camera *c) { +void cutscene_sliding_doors_open(struct Camera *c) { UNUSED u32 pad[2]; reset_pan_distance(c); @@ -9994,20 +9994,20 @@ BAD_RETURN(s32) cutscene_sliding_doors_open(struct Camera *c) { /** * Ends the double door cutscene. */ -BAD_RETURN(s32) cutscene_double_doors_end(struct Camera *c) { +void cutscene_double_doors_end(struct Camera *c) { set_flag_post_door(c); c->cutscene = 0; sStatusFlags |= CAM_FLAG_SMOOTH_MOVEMENT; } -BAD_RETURN(s32) cutscene_enter_painting_stub(UNUSED struct Camera *c) { +void cutscene_enter_painting_stub(UNUSED struct Camera *c) { } /** * Plays when Mario enters a painting. The camera flies up to the painting's center, then it slowly * zooms in until the star select screen appears. */ -BAD_RETURN(s32) cutscene_enter_painting(struct Camera *c) { +void cutscene_enter_painting(struct Camera *c) { struct Surface *floor, *highFloor; Vec3f paintingPos, focus, focusOffset; Vec3s paintingAngle; @@ -10067,7 +10067,7 @@ BAD_RETURN(s32) cutscene_enter_painting(struct Camera *c) { * cvar1 is the camera's position relative to Mario * cvar2 is the camera's focus relative to Mario */ -BAD_RETURN(s32) cutscene_exit_painting_start(struct Camera *c) { +void cutscene_exit_painting_start(struct Camera *c) { struct Surface *floor; f32 floorHeight; @@ -10096,7 +10096,7 @@ BAD_RETURN(s32) cutscene_exit_painting_start(struct Camera *c) { /** * Decrease cvar2's x and z offset, moving closer to Mario. */ -BAD_RETURN(s32) cutscene_exit_painting_move_to_mario(struct Camera *c) { +void cutscene_exit_painting_move_to_mario(struct Camera *c) { Vec3f pos; //! Tricky math: Since offset_rotated() flips Z offsets, you'd expect a positive Z offset to move @@ -10115,7 +10115,7 @@ BAD_RETURN(s32) cutscene_exit_painting_move_to_mario(struct Camera *c) { /** * Move the camera down to the floor Mario lands on. */ -BAD_RETURN(s32) cutscene_exit_painting_move_to_floor(struct Camera *c) { +void cutscene_exit_painting_move_to_floor(struct Camera *c) { struct Surface *floor; Vec3f floorHeight; @@ -10135,7 +10135,7 @@ BAD_RETURN(s32) cutscene_exit_painting_move_to_floor(struct Camera *c) { /** * Cutscene played when Mario leaves a painting, either due to death or collecting a star. */ -BAD_RETURN(s32) cutscene_exit_painting(struct Camera *c) { +void cutscene_exit_painting(struct Camera *c) { cutscene_event(cutscene_exit_painting_start, c, 0, 0); cutscene_event(cutscene_exit_painting_move_to_mario, c, 5, -1); cutscene_event(cutscene_exit_painting_move_to_floor, c, 5, -1); @@ -10151,7 +10151,7 @@ BAD_RETURN(s32) cutscene_exit_painting(struct Camera *c) { /** * Unused. Warp the camera to Mario. */ -BAD_RETURN(s32) cutscene_unused_exit_start(struct Camera *c) { +void cutscene_unused_exit_start(struct Camera *c) { UNUSED Vec3f unused1; UNUSED Vec3s unused2; Vec3f offset; @@ -10166,7 +10166,7 @@ BAD_RETURN(s32) cutscene_unused_exit_start(struct Camera *c) { /** * Unused. Focus on Mario as he exits. */ -BAD_RETURN(s32) cutscene_unused_exit_focus_mario(struct Camera *c) { +void cutscene_unused_exit_focus_mario(struct Camera *c) { Vec3f focus; vec3f_set(focus, sMarioCamState->pos[0], sMarioCamState->pos[1] + 125.f, sMarioCamState->pos[2]); @@ -10178,7 +10178,7 @@ BAD_RETURN(s32) cutscene_unused_exit_focus_mario(struct Camera *c) { /** * Give control back to the player. */ -BAD_RETURN(s32) cutscene_exit_painting_end(struct Camera *c) { +void cutscene_exit_painting_end(struct Camera *c) { c->mode = CAMERA_MODE_CLOSE; c->cutscene = 0; gCutsceneTimer = CUTSCENE_STOP; @@ -10190,7 +10190,7 @@ BAD_RETURN(s32) cutscene_exit_painting_end(struct Camera *c) { /** * End the cutscene, starting cannon mode. */ -BAD_RETURN(s32) cutscene_enter_cannon_end(struct Camera *c) { +void cutscene_enter_cannon_end(struct Camera *c) { sStatusFlags &= ~CAM_FLAG_SMOOTH_MOVEMENT; sStatusFlags |= CAM_FLAG_BLOCK_SMOOTH_MOVEMENT; c->mode = CAMERA_MODE_INSIDE_CANNON; @@ -10201,7 +10201,7 @@ BAD_RETURN(s32) cutscene_enter_cannon_end(struct Camera *c) { /** * Rotate around the cannon as it rises out of the hole. */ -BAD_RETURN(s32) cutscene_enter_cannon_raise(struct Camera *c) { +void cutscene_enter_cannon_raise(struct Camera *c) { struct Object *o; UNUSED u32 pad[2]; f32 floorHeight; @@ -10246,7 +10246,7 @@ BAD_RETURN(s32) cutscene_enter_cannon_raise(struct Camera *c) { /** * Start the cannon entering cutscene */ -BAD_RETURN(s32) cutscene_enter_cannon_start(struct Camera *c) { +void cutscene_enter_cannon_start(struct Camera *c) { UNUSED u32 cvar3Start; UNUSED u32 cvar4Start; struct Object *o; @@ -10275,7 +10275,7 @@ BAD_RETURN(s32) cutscene_enter_cannon_start(struct Camera *c) { /** * Store the camera's pos and focus for the door cutscene */ -BAD_RETURN(s32) cutscene_door_start(struct Camera *c) { +void cutscene_door_start(struct Camera *c) { vec3f_copy(sCutsceneVars[0].point, c->pos); vec3f_copy(sCutsceneVars[1].point, c->focus); } @@ -10283,7 +10283,7 @@ BAD_RETURN(s32) cutscene_door_start(struct Camera *c) { /** * Fix the camera in place while the door opens. */ -BAD_RETURN(s32) cutscene_door_fix_cam(struct Camera *c) { +void cutscene_door_fix_cam(struct Camera *c) { vec3f_copy(c->pos, sCutsceneVars[0].point); vec3f_copy(c->focus, sCutsceneVars[1].point); } @@ -10291,7 +10291,7 @@ BAD_RETURN(s32) cutscene_door_fix_cam(struct Camera *c) { /** * Loop until Mario is no longer using the door. */ -BAD_RETURN(s32) cutscene_door_loop(struct Camera *c) { +void cutscene_door_loop(struct Camera *c) { //! bitwise AND instead of boolean if ((sMarioCamState->action != ACT_PULLING_DOOR) & (sMarioCamState->action != ACT_PUSHING_DOOR)) { gCutsceneTimer = CUTSCENE_STOP; @@ -10302,7 +10302,7 @@ BAD_RETURN(s32) cutscene_door_loop(struct Camera *c) { /** * Warp the camera behind Mario. */ -BAD_RETURN(s32) cutscene_door_move_behind_mario(struct Camera *c) { +void cutscene_door_move_behind_mario(struct Camera *c) { Vec3f camOffset; s16 doorRotation; @@ -10324,7 +10324,7 @@ BAD_RETURN(s32) cutscene_door_move_behind_mario(struct Camera *c) { /** * Follow Mario through the door. */ -BAD_RETURN(s32) cutscene_door_follow_mario(struct Camera *c) { +void cutscene_door_follow_mario(struct Camera *c) { s16 pitch, yaw; f32 dist; @@ -10338,7 +10338,7 @@ BAD_RETURN(s32) cutscene_door_follow_mario(struct Camera *c) { /** * Ends the door cutscene. Sets the camera mode to close mode unless the default is free roam. */ -BAD_RETURN(s32) cutscene_door_end(struct Camera *c) { +void cutscene_door_end(struct Camera *c) { if (c->defMode == CAMERA_MODE_FREE_ROAM) { c->mode = CAMERA_MODE_FREE_ROAM; } else { @@ -10356,7 +10356,7 @@ BAD_RETURN(s32) cutscene_door_end(struct Camera *c) { /** * Used for entering a room that uses a specific camera mode, like the castle lobby or BBH */ -BAD_RETURN(s32) cutscene_door_mode(struct Camera *c) { +void cutscene_door_mode(struct Camera *c) { UNUSED u32 pad[2]; reset_pan_distance(c); diff --git a/src/game/camera.h b/src/game/camera.h index aac94161f..4ce0da7ad 100644 --- a/src/game/camera.h +++ b/src/game/camera.h @@ -346,7 +346,7 @@ struct HandheldShakePoint * A function that is called by CameraTriggers and cutscene shots. * These are concurrent: multiple CameraEvents can occur on the same frame. */ -typedef BAD_RETURN(s32) (*CameraEvent)(struct Camera *c); +typedef void (*CameraEvent)(struct Camera *c); /** * The same type as a CameraEvent, but because these are generally longer, and happen in sequential * order, they're are called "shots," a term taken from cinematography. diff --git a/src/game/mario_actions_submerged.c b/src/game/mario_actions_submerged.c index 84c2df9a0..fd9cdea3a 100644 --- a/src/game/mario_actions_submerged.c +++ b/src/game/mario_actions_submerged.c @@ -196,7 +196,7 @@ static u32 perform_water_step(struct MarioState *m) { return stepResult; } -static BAD_RETURN(u32) update_water_pitch(struct MarioState *m) { +static void update_water_pitch(struct MarioState *m) { struct Object *marioObj = m->marioObj; if (marioObj->header.gfx.angle[0] > 0) { diff --git a/src/game/mario_step.h b/src/game/mario_step.h index c723c0484..5cfcb1a41 100644 --- a/src/game/mario_step.h +++ b/src/game/mario_step.h @@ -22,7 +22,7 @@ void stub_mario_step_2(void); void mario_bonk_reflection(struct MarioState *, u32); void transfer_bully_speed(struct BullyCollisionData *obj1, struct BullyCollisionData *obj2); -BAD_RETURN(s32) init_bully_collision_data(struct BullyCollisionData *data, f32 posX, f32 posZ, +void init_bully_collision_data(struct BullyCollisionData *data, f32 posX, f32 posZ, f32 forwardVel, s16 yaw, f32 conversionRatio, f32 radius); u32 mario_update_quicksand(struct MarioState *, f32); u32 mario_push_off_steep_floor(struct MarioState *, u32, u32); diff --git a/src/game/obj_behaviors_2.c b/src/game/obj_behaviors_2.c index d17a37905..747de21b1 100644 --- a/src/game/obj_behaviors_2.c +++ b/src/game/obj_behaviors_2.c @@ -126,7 +126,7 @@ static s32 obj_is_near_to_and_facing_mario(f32 maxDist, s16 maxAngleDiff) { //! Although having no return value, this function //! must be u32 to match other functions on -O2. -static BAD_RETURN(u32) obj_perform_position_op(s32 op) { +static void obj_perform_position_op(s32 op) { switch (op) { case POS_OP_SAVE_POSITION: sObjSavedPosX = o->oPosX; diff --git a/src/game/object_helpers.h b/src/game/object_helpers.h index ea4200ad1..5bb465679 100644 --- a/src/game/object_helpers.h +++ b/src/game/object_helpers.h @@ -135,8 +135,8 @@ s32 count_objects_with_behavior(const BehaviorScript *behavior); struct Object *cur_obj_find_nearby_held_actor(const BehaviorScript *behavior, f32 maxDist); void cur_obj_change_action(s32 action); void cur_obj_set_vel_from_mario_vel(f32 f12,f32 f14); -BAD_RETURN(s16) cur_obj_reverse_animation(void); -BAD_RETURN(s32) cur_obj_extend_animation_if_at_end(void); +void cur_obj_reverse_animation(void); +void cur_obj_extend_animation_if_at_end(void); s32 cur_obj_check_if_near_animation_end(void); s32 cur_obj_check_if_at_animation_end(void); s32 cur_obj_check_anim_frame(s32 frame); diff --git a/src/game/save_file.c b/src/game/save_file.c index 525682dec..dde6eedf6 100644 --- a/src/game/save_file.c +++ b/src/game/save_file.c @@ -337,7 +337,7 @@ void save_file_erase(s32 fileIndex) { } //! Needs to be s32 to match on -O2, despite no return value. -BAD_RETURN(s32) save_file_copy(s32 srcFileIndex, s32 destFileIndex) { +void save_file_copy(s32 srcFileIndex, s32 destFileIndex) { UNUSED s32 pad; touch_high_score_ages(destFileIndex); diff --git a/src/game/save_file.h b/src/game/save_file.h index 64cf0c639..46f3cc9d3 100644 --- a/src/game/save_file.h +++ b/src/game/save_file.h @@ -154,7 +154,7 @@ extern s8 gSaveFileModified; void save_file_do_save(s32 fileIndex); void save_file_erase(s32 fileIndex); -BAD_RETURN(s32) save_file_copy(s32 srcFileIndex, s32 destFileIndex); +void save_file_copy(s32 srcFileIndex, s32 destFileIndex); void save_file_load_all(void); void save_file_reload(void); void save_file_collect_star_or_key(s16 coinScore, s16 starIndex); From 5afa901fcfd40009f7a80197b242d2ec6267e8ee Mon Sep 17 00:00:00 2001 From: Arceveti <73617174+Arceveti@users.noreply.github.com> Date: Wed, 22 Sep 2021 11:35:17 -0700 Subject: [PATCH 09/26] Clean up AVOID_UB ifdefs --- enhancements/reonucam3.patch | 8 +++--- include/sm64.h | 12 +------- include/trig_tables.inc.c | 4 --- src/audio/heap.c | 4 --- src/audio/load_sh.c | 4 --- src/audio/seqplayer.c | 18 +----------- src/audio/synthesis.c | 4 --- src/engine/math_util.h | 4 --- src/game/behaviors/bowling_ball.inc.c | 10 ++----- src/game/behaviors/camera_lakitu.inc.c | 8 ++---- src/game/behaviors/manta_ray.inc.c | 5 +--- src/game/behaviors/mips.inc.c | 5 +--- src/game/behaviors/spawn_star.inc.c | 21 ++++---------- src/game/behaviors/wiggler.inc.c | 6 ---- src/game/camera.c | 21 +++----------- src/game/camera.h | 2 +- src/game/mario_actions_airborne.c | 10 ------- src/game/object_collision.c | 6 ---- src/game/object_helpers.c | 16 ----------- src/game/object_helpers.h | 5 ---- src/game/paintings.c | 6 ---- src/game/screen_transition.c | 2 -- src/game/shadow.c | 5 ---- src/goddard/bad_declarations.h | 40 -------------------------- src/goddard/debug_utils.c | 6 ---- src/goddard/draw_objects.c | 11 +------ src/goddard/dynlist_proc.c | 6 ---- src/goddard/objects.c | 9 ------ src/goddard/old_menu.h | 4 --- src/goddard/renderer.c | 12 -------- src/goddard/shape_helper.h | 4 --- src/menu/file_select.c | 3 -- src/menu/intro_geo.c | 8 ++---- src/menu/star_select.c | 8 ------ src/menu/star_select.h | 4 --- 35 files changed, 26 insertions(+), 275 deletions(-) delete mode 100644 src/goddard/bad_declarations.h diff --git a/enhancements/reonucam3.patch b/enhancements/reonucam3.patch index 169eab26b..2b9c912e3 100644 --- a/enhancements/reonucam3.patch +++ b/enhancements/reonucam3.patch @@ -132,7 +132,7 @@ index 25b27983..2ff11930 100644 + // Get the camera speed based on the user's setting + f32 cameraSpeed = set_camera_speed(); - radial_camera_input(c, 0.f); + radial_camera_input(c); - if (gPlayer1Controller->buttonPressed & R_CBUTTONS) { - s8DirModeYawOffset += DEGREES(45); @@ -270,7 +270,7 @@ index 25b27983..2ff11930 100644 } void play_sound_button_change_blocked(void) { -@@ -5013,7 +5074,7 @@ s32 radial_camera_input(struct Camera *c, UNUSED f32 unused) { +@@ -5013,7 +5074,7 @@ void radial_camera_input(struct Camera *c) { } // Zoom in / enter C-Up @@ -279,7 +279,7 @@ index 25b27983..2ff11930 100644 if (gCameraMovementFlags & CAM_MOVE_ZOOMED_OUT) { gCameraMovementFlags &= ~CAM_MOVE_ZOOMED_OUT; play_sound_cbutton_up(); -@@ -5023,7 +5084,7 @@ s32 radial_camera_input(struct Camera *c, UNUSED f32 unused) { +@@ -5023,7 +5084,7 @@ void radial_camera_input(struct Camera *c) { } // Zoom out @@ -288,7 +288,7 @@ index 25b27983..2ff11930 100644 if (gCameraMovementFlags & CAM_MOVE_ZOOMED_OUT) { gCameraMovementFlags |= CAM_MOVE_ALREADY_ZOOMED_OUT; #ifndef VERSION_JP -@@ -5035,6 +5096,12 @@ s32 radial_camera_input(struct Camera *c, UNUSED f32 unused) { +@@ -5035,6 +5096,12 @@ void radial_camera_input(struct Camera *c) { } } diff --git a/include/sm64.h b/include/sm64.h index 9953b1aa3..9d7bcdc2b 100644 --- a/include/sm64.h +++ b/include/sm64.h @@ -21,23 +21,13 @@ #define DEBUG_ASSERT(exp) #endif -// Pointer casting is technically UB, and avoiding it gets rid of endian issues -// as well as a nice side effect. -#ifdef AVOID_UB +// Pointer casting is technically UB, and avoiding it gets rid of endian issues as well as a nice side effect. #define GET_HIGH_U16_OF_32(var) ((u16)((var) >> 16)) #define GET_HIGH_S16_OF_32(var) ((s16)((var) >> 16)) #define GET_LOW_U16_OF_32(var) ((u16)((var) & 0xFFFF)) #define GET_LOW_S16_OF_32(var) ((s16)((var) & 0xFFFF)) #define SET_HIGH_U16_OF_32(var, x) ((var) = ((var) & 0xFFFF) | ((x) << 16)) #define SET_HIGH_S16_OF_32(var, x) ((var) = ((var) & 0xFFFF) | ((x) << 16)) -#else -#define GET_HIGH_U16_OF_32(var) (((u16 *)&(var))[0]) -#define GET_HIGH_S16_OF_32(var) (((s16 *)&(var))[0]) -#define GET_LOW_U16_OF_32(var) (((u16 *)&(var))[1]) -#define GET_LOW_S16_OF_32(var) (((s16 *)&(var))[1]) -#define SET_HIGH_U16_OF_32(var, x) ((((u16 *)&(var))[0]) = (x)) -#define SET_HIGH_S16_OF_32(var, x) ((((s16 *)&(var))[0]) = (x)) -#endif // Layers #if SILHOUETTE diff --git a/include/trig_tables.inc.c b/include/trig_tables.inc.c index b374ac1b7..350d1aa02 100644 --- a/include/trig_tables.inc.c +++ b/include/trig_tables.inc.c @@ -255,11 +255,7 @@ f32 gSineTable[] = { 0.999830604f, 0.999857664f, 0.999882340f, 0.999904692f, 0.999924719f, 0.999942362f, 0.999957621f, 0.999970615f, 0.999981165f, 0.999989390f, 0.999995291f, 0.999998808f, -#ifndef AVOID_UB -}; -f32 gCosineTable[0x1000] = { -#endif // cosine 1.000000000f, 0.999998808f, 0.999995291f, 0.999989390f, 0.999981165f, 0.999970615f, 0.999957621f, 0.999942362f, diff --git a/src/audio/heap.c b/src/audio/heap.c index ec8fbf4fd..77ccff79d 100644 --- a/src/audio/heap.c +++ b/src/audio/heap.c @@ -1539,11 +1539,7 @@ void *unk_pool1_alloc(s32 poolIndex, s32 arg1, u32 size) { gUnkPool1.entries[pos].id = arg1; gUnkPool1.entries[pos].size = size; -#ifdef AVOID_UB - //! @bug UB: missing return. "ret" is in v0 at this point, but doing an - // explicit return uses an additional register. return ret; -#endif } u8 *func_sh_802f1d40(u32 size, s32 bank, u8 *arg2, s8 medium) { diff --git a/src/audio/load_sh.c b/src/audio/load_sh.c index 28ff6c667..b005febcb 100644 --- a/src/audio/load_sh.c +++ b/src/audio/load_sh.c @@ -365,9 +365,7 @@ s32 func_sh_802f2f38(struct AudioBankSample *sample, s32 bankId) { sample->medium = 0; sample->sampleAddr = sp24; } -#ifdef AVOID_UB return 0; -#endif } s32 func_sh_802f3024(s32 bankId, s32 instId, s32 arg2) { @@ -395,9 +393,7 @@ s32 func_sh_802f3024(s32 bankId, s32 instId, s32 arg2) { func_sh_802f2f38(drum->sound.sample, bankId); return 0; } -#ifdef AVOID_UB return 0; -#endif } void func_sh_802f30f4(s32 arg0, s32 arg1, s32 arg2, OSMesgQueue *arg3) { diff --git a/src/audio/seqplayer.c b/src/audio/seqplayer.c index 454085651..2364fc897 100644 --- a/src/audio/seqplayer.c +++ b/src/audio/seqplayer.c @@ -2298,10 +2298,6 @@ void sequence_player_process_sequence(struct SequencePlayer *seqPlayer) { if (osRecvMesg(&seqPlayer->seqDmaMesgQueue, NULL, 0) == -1) { return; } -#ifndef AVOID_UB - if (temp) { - } -#endif #else if (seqPlayer->seqDmaMesg == NULL) { return; @@ -2351,10 +2347,6 @@ void sequence_player_process_sequence(struct SequencePlayer *seqPlayer) { state = &seqPlayer->scriptState; if (seqPlayer->delay > 1) { -#ifndef AVOID_UB - if (temp) { - } -#endif seqPlayer->delay--; } else { #if defined(VERSION_EU) || defined(VERSION_SH) @@ -2809,15 +2801,7 @@ void init_sequence_players(void) { for (i = 0; i < ARRAY_COUNT(gSequenceChannels); i++) { #endif - // @bug Size of wrong array. Zeroes out second half of gSequenceChannels[0], - // all of gSequenceChannels[1..31], and part of gSequenceLayers[0]. - // However, this is only called at startup, so it's harmless. -#ifdef AVOID_UB -#define LAYERS_SIZE LAYERS_MAX -#else -#define LAYERS_SIZE ARRAY_COUNT(gSequenceLayers) -#endif - for (j = 0; j < LAYERS_SIZE; j++) { + for (j = 0; j < LAYERS_MAX; j++) { gSequenceChannels[i].layers[j] = NULL; } } diff --git a/src/audio/synthesis.c b/src/audio/synthesis.c index 6393c48ed..df15bcd3a 100644 --- a/src/audio/synthesis.c +++ b/src/audio/synthesis.c @@ -1652,10 +1652,6 @@ u64 *note_apply_headset_pan_effects(u64 *cmd, struct Note *note, s32 bufLen, s32 pitch = (bufLen << 0xf) / (bufLen + panShift - prevPanShift); } -#if defined(VERSION_EU) && !defined(AVOID_UB) - if (unkDebug) { // UB - } -#endif aSetBuffer(cmd++, 0, DMEM_ADDR_NOTE_PAN_TEMP, DMEM_ADDR_TEMP, panShift + bufLen - prevPanShift); aResample(cmd++, 0, pitch, VIRTUAL_TO_PHYSICAL2(note->synthesisBuffers->panResampleState)); } diff --git a/src/engine/math_util.h b/src/engine/math_util.h index 507453c0e..e786101d1 100644 --- a/src/engine/math_util.h +++ b/src/engine/math_util.h @@ -22,11 +22,7 @@ * Thus, for non-IDO compilers we use the standard-compliant version. */ extern f32 gSineTable[]; -#ifdef AVOID_UB #define gCosineTable (gSineTable + 0x400) -#else -extern f32 gCosineTable[]; -#endif #define sins(x) gSineTable[(u16) (x) >> 4] #define coss(x) gCosineTable[(u16) (x) >> 4] diff --git a/src/game/behaviors/bowling_ball.inc.c b/src/game/behaviors/bowling_ball.inc.c index e93dcf8d1..14668ec14 100644 --- a/src/game/behaviors/bowling_ball.inc.c +++ b/src/game/behaviors/bowling_ball.inc.c @@ -78,10 +78,7 @@ void bowling_ball_set_waypoints(void) { void bhv_bowling_ball_roll_loop(void) { s16 collisionFlags; - s32 pathResult; -#ifdef AVOID_UB - pathResult = 0; -#endif + s32 pathResult = 0; bowling_ball_set_waypoints(); collisionFlags = object_step(); @@ -111,10 +108,7 @@ void bhv_bowling_ball_roll_loop(void) { } void bhv_bowling_ball_initializeLoop(void) { - s32 pathResult; -#ifdef AVOID_UB - pathResult = 0; -#endif + s32 pathResult = 0; bowling_ball_set_waypoints(); diff --git a/src/game/behaviors/camera_lakitu.inc.c b/src/game/behaviors/camera_lakitu.inc.c index d4ab5f329..0126d0637 100644 --- a/src/game/behaviors/camera_lakitu.inc.c +++ b/src/game/behaviors/camera_lakitu.inc.c @@ -61,12 +61,8 @@ static void camera_lakitu_intro_act_spawn_cloud(void) { * Circle down to mario, show the dialog, then fly away. */ static void camera_lakitu_intro_act_show_dialog(void) { - s16 targetMovePitch; - s16 targetMoveYaw; -#ifdef AVOID_UB - targetMovePitch = 0; - targetMoveYaw = 0; -#endif + s16 targetMovePitch = 0; + s16 targetMoveYaw = 0; cur_obj_play_sound_1(SOUND_AIR_LAKITU_FLY); diff --git a/src/game/behaviors/manta_ray.inc.c b/src/game/behaviors/manta_ray.inc.c index 5e1c27ff2..e7ee0d120 100644 --- a/src/game/behaviors/manta_ray.inc.c +++ b/src/game/behaviors/manta_ray.inc.c @@ -42,10 +42,7 @@ void bhv_manta_ray_init(void) { static void manta_ray_move(void) { s16 animFrame; - s32 pathStatus; -#ifdef AVOID_UB - pathStatus = 0; -#endif + s32 pathStatus = 0; animFrame = o->header.gfx.animInfo.animFrame; gCurrentObject->oPathedStartWaypoint = (struct Waypoint *) sMantaRayTraj; diff --git a/src/game/behaviors/mips.inc.c b/src/game/behaviors/mips.inc.c index adba63335..4a42ca80a 100644 --- a/src/game/behaviors/mips.inc.c +++ b/src/game/behaviors/mips.inc.c @@ -110,12 +110,9 @@ void bhv_mips_act_wait_for_nearby_mario(void) { */ void bhv_mips_act_follow_path(void) { s16 collisionFlags = 0; - s32 followStatus; + s32 followStatus = 0; struct Waypoint **pathBase; struct Waypoint *waypoint; -#ifdef AVOID_UB - followStatus = 0; -#endif // Retrieve current waypoint. pathBase = segmented_to_virtual(&inside_castle_seg7_trajectory_mips); diff --git a/src/game/behaviors/spawn_star.inc.c b/src/game/behaviors/spawn_star.inc.c index 5c7509b9a..89d7055e3 100644 --- a/src/game/behaviors/spawn_star.inc.c +++ b/src/game/behaviors/spawn_star.inc.c @@ -129,28 +129,19 @@ struct Object *spawn_star(struct Object *starObj, f32 x, f32 y, f32 z) { } void spawn_default_star(f32 x, f32 y, f32 z) { - struct Object *starObj; -#ifdef AVOID_UB - starObj = 0; -#endif + struct Object *starObj = NULL; starObj = spawn_star(starObj, x, y, z); starObj->oBehParams2ndByte = 0; } void spawn_red_coin_cutscene_star(f32 x, f32 y, f32 z) { - struct Object *starObj; -#ifdef AVOID_UB - starObj = 0; -#endif + struct Object *starObj = NULL; starObj = spawn_star(starObj, x, y, z); starObj->oBehParams2ndByte = 1; } void spawn_no_exit_star(f32 x, f32 y, f32 z) { - struct Object *starObj; -#ifdef AVOID_UB - starObj = 0; -#endif + struct Object *starObj = NULL; starObj = spawn_star(starObj, x, y, z); starObj->oBehParams2ndByte = 1; starObj->oInteractionSubtype |= INT_SUBTYPE_NO_EXIT; @@ -158,11 +149,11 @@ void spawn_no_exit_star(f32 x, f32 y, f32 z) { void bhv_hidden_red_coin_star_init(void) { s16 numRedCoinsRemaining; - struct Object *starObj; + struct Object *starObj = NULL; - if (gCurrCourseNum != COURSE_JRB) + if (gCurrCourseNum != COURSE_JRB) { spawn_object(o, MODEL_TRANSPARENT_STAR, bhvRedCoinStarMarker); - + } numRedCoinsRemaining = count_objects_with_behavior(bhvRedCoin); if (numRedCoinsRemaining == 0) { starObj = spawn_object_abs_with_rot(o, 0, MODEL_STAR, bhvStar, o->oPosX, o->oPosY, o->oPosZ, 0, 0, 0); diff --git a/src/game/behaviors/wiggler.inc.c b/src/game/behaviors/wiggler.inc.c index 9bdc0e1e7..44c52ba24 100644 --- a/src/game/behaviors/wiggler.inc.c +++ b/src/game/behaviors/wiggler.inc.c @@ -153,9 +153,7 @@ void wiggler_init_segments(void) { cur_obj_unhide(); } -#if defined(VERSION_EU) || defined(AVOID_UB) o->oHealth = 4; // This fixes Wiggler reading UB on his first frame of his acceleration, as his health is not set. -#endif } /** @@ -233,10 +231,6 @@ static void wiggler_act_walk(void) { o->oWigglerTextStatus = WIGGLER_TEXT_STATUS_COMPLETED_DIALOG; } } else { - //! Every object's health is initially 2048, and wiggler's doesn't change - // to 4 until after this runs the first time. It indexes out of bounds - // and uses the value 113762.3 for one frame on US. This is fixed up - // in wiggler_init_segments if AVOID_UB is defined. obj_forward_vel_approach(sWigglerSpeeds[o->oHealth - 1], 1.0f); if (o->oWigglerWalkAwayFromWallTimer != 0) { diff --git a/src/game/camera.c b/src/game/camera.c index 4ccd37047..c895009c9 100644 --- a/src/game/camera.c +++ b/src/game/camera.c @@ -1124,7 +1124,7 @@ void lakitu_zoom(f32 rangeDist, s16 rangePitch) { } void radial_camera_input_default(struct Camera *c) { - radial_camera_input(c, 0.f); + radial_camera_input(c); } /** @@ -1175,10 +1175,9 @@ void mode_radial_camera(struct Camera *c) { */ void mode_8_directions_camera(struct Camera *c) { Vec3f pos; - UNUSED u8 unused[8]; s16 oldAreaYaw = sAreaYaw; - radial_camera_input(c, 0.f); + radial_camera_input(c); if (gPlayer1Controller->buttonPressed & R_CBUTTONS) { s8DirModeYawOffset += DEGREES(45); @@ -1725,9 +1724,7 @@ struct ParallelTrackingPoint sBBHLibraryParTrackPath[] = { }; s32 unused_update_mode_5_camera(UNUSED struct Camera *c, UNUSED Vec3f focus, UNUSED Vec3f pos) { -#ifdef AVOID_UB return 0; -#endif } UNUSED static void stub_camera_1(UNUSED s32 unused) { @@ -1745,7 +1742,7 @@ void mode_boss_fight_camera(struct Camera *c) { void mode_parallel_tracking_camera(struct Camera *c) { s16 dummy; - radial_camera_input(c, 0.f); + radial_camera_input(c); set_fov_function(CAM_FOV_DEFAULT); c->nextYaw = update_parallel_tracking_camera(c, c->focus, c->pos); camera_approach_s16_symmetric_bool(&dummy, 0, 0x0400); @@ -2053,9 +2050,7 @@ void mode_behind_mario_camera(struct Camera *c) { } s32 nop_update_water_camera(UNUSED struct Camera *c, UNUSED Vec3f focus, UNUSED Vec3f pos) { -#ifdef AVOID_UB return 0; -#endif } /** @@ -4907,12 +4902,7 @@ void play_sound_if_cam_switched_to_lakitu_or_mario(void) { /** * Handles input for radial, outwards radial, parallel tracking, and 8 direction mode. */ -s32 radial_camera_input(struct Camera *c, UNUSED f32 unused) { - s16 dummy; -#ifdef AVOID_UB - dummy = 0; -#endif - +void radial_camera_input(struct Camera *c) { if ((gCameraMovementFlags & CAM_MOVE_ENTERED_ROTATE_SURFACE) || !(gCameraMovementFlags & CAM_MOVE_ROTATE)) { // If C-L or C-R are pressed, the camera is rotating @@ -5008,9 +4998,6 @@ s32 radial_camera_input(struct Camera *c, UNUSED f32 unused) { play_sound_cbutton_down(); } } - - //! returning uninitialized variable - return dummy; } /** diff --git a/src/game/camera.h b/src/game/camera.h index 4ce0da7ad..5ad8169f6 100644 --- a/src/game/camera.h +++ b/src/game/camera.h @@ -740,7 +740,7 @@ void play_sound_cbutton_side(void); void play_sound_button_change_blocked(void); void play_sound_rbutton_changed(void); void play_sound_if_cam_switched_to_lakitu_or_mario(void); -s32 radial_camera_input(struct Camera *c, UNUSED f32 unused); +void radial_camera_input(struct Camera *c); s32 trigger_cutscene_dialog(s32 trigger); void handle_c_button_movement(struct Camera *c); void start_cutscene(struct Camera *c, u8 cutscene); diff --git a/src/game/mario_actions_airborne.c b/src/game/mario_actions_airborne.c index 218f1cb89..c0c3f727c 100644 --- a/src/game/mario_actions_airborne.c +++ b/src/game/mario_actions_airborne.c @@ -1346,22 +1346,12 @@ s32 act_air_hit_wall(struct MarioState *m) { return set_mario_action(m, ACT_SOFT_BONK, 0); } -/*#ifdef AVOID_UB - return -#endif*/ #if FIRSTY_LAST_FRAME > 1 set_mario_animation(m, MARIO_ANIM_START_WALLKICK); m->marioObj->header.gfx.angle[1] = atan2s(m->wall->normal.z, m->wall->normal.x); #endif return FALSE; - - //! Missing return statement. The returned value is the result of the call - // to set_mario_animation. In practice, this value is nonzero. - // This results in this action "cancelling" into itself. It is supposed to - // execute on two frames, but instead it executes twice on the same frame. - // This results in firsties only being possible for a single frame, instead - // of two. } s32 act_forward_rollout(struct MarioState *m) { diff --git a/src/game/object_collision.c b/src/game/object_collision.c index 8c30859ac..c04211e82 100644 --- a/src/game/object_collision.c +++ b/src/game/object_collision.c @@ -54,10 +54,7 @@ s32 detect_object_hitbox_overlap(struct Object *a, struct Object *b) { return 1; } - //! no return value -#ifdef AVOID_UB return 0; -#endif } s32 detect_object_hurtbox_overlap(struct Object *a, struct Object *b) { @@ -88,10 +85,7 @@ s32 detect_object_hurtbox_overlap(struct Object *a, struct Object *b) { return 1; } - //! no return value -#ifdef AVOID_UB return 0; -#endif } void clear_object_collision(struct Object *a) { diff --git a/src/game/object_helpers.c b/src/game/object_helpers.c index a19843983..4cce7af30 100644 --- a/src/game/object_helpers.c +++ b/src/game/object_helpers.c @@ -124,18 +124,7 @@ Gfx *geo_update_layer_transparency(s32 callContext, struct GraphNode *node, UNUS return dlStart; } -/** - * @bug Every geo function declares the 3 parameters of callContext, node, and - * the matrix array. This one (see also geo_switch_area) doesn't. When executed, - * the node function executor passes the 3rd argument to a function that doesn't - * declare it. This is undefined behavior, but harmless in practice due to the - * o32 calling convention. - */ -#ifdef AVOID_UB Gfx *geo_switch_anim_state(s32 callContext, struct GraphNode *node, UNUSED void *context) { -#else -Gfx *geo_switch_anim_state(s32 callContext, struct GraphNode *node) { -#endif struct Object *obj; struct GraphNodeSwitchCase *switchCase; @@ -163,12 +152,7 @@ Gfx *geo_switch_anim_state(s32 callContext, struct GraphNode *node) { return NULL; } -//! @bug Same issue as geo_switch_anim_state. -#ifdef AVOID_UB Gfx *geo_switch_area(s32 callContext, struct GraphNode *node, UNUSED void *context) { -#else -Gfx *geo_switch_area(s32 callContext, struct GraphNode *node) { -#endif s16 roomCase; struct Surface *floor; UNUSED struct Object *obj = (struct Object *) gCurGraphNodeObject; // TODO: change global type to Object pointer diff --git a/src/game/object_helpers.h b/src/game/object_helpers.h index 5bb465679..f021d640c 100644 --- a/src/game/object_helpers.h +++ b/src/game/object_helpers.h @@ -60,13 +60,8 @@ struct SpawnParticlesInfo Gfx *geo_update_projectile_pos_from_parent(s32 callContext, UNUSED struct GraphNode *node, Mat4 mtx); Gfx *geo_update_layer_transparency(s32 callContext, struct GraphNode *node, UNUSED void *context); -#ifdef AVOID_UB Gfx *geo_switch_anim_state(s32 callContext, struct GraphNode *node, UNUSED void *context); Gfx *geo_switch_area(s32 callContext, struct GraphNode *node, UNUSED void *context); -#else -Gfx *geo_switch_anim_state(s32 callContext, struct GraphNode *node); -Gfx *geo_switch_area(s32 callContext, struct GraphNode *node); -#endif void obj_update_pos_from_parent_transformation(Mat4 mtx, struct Object *obj); void obj_apply_scale_to_matrix(struct Object *obj, Mat4 dst, Mat4 src); void create_transformation_from_matrices(Mat4 dst, Mat4 a1, Mat4 a2); diff --git a/src/game/paintings.c b/src/game/paintings.c index 006319915..641431633 100644 --- a/src/game/paintings.c +++ b/src/game/paintings.c @@ -254,9 +254,7 @@ f32 painting_ripple_y(struct Painting *painting, s8 ySource) { return painting->size / 2.0; // some concentric ripples don't care about Mario break; } -#ifdef AVOID_UB return 0.0f; -#endif } /** @@ -282,9 +280,7 @@ f32 painting_nearest_4th(struct Painting *painting) { } else if (painting->floorEntered & ENTER_RIGHT) { return thirdQuarter; } -#ifdef AVOID_UB return 0.0f; -#endif } /** @@ -316,9 +312,7 @@ f32 painting_ripple_x(struct Painting *painting, s8 xSource) { return painting->size / 2.0; break; } -#ifdef AVOID_UB return 0.0f; -#endif } /** diff --git a/src/game/screen_transition.c b/src/game/screen_transition.c index e04486b18..9ed66c328 100644 --- a/src/game/screen_transition.c +++ b/src/game/screen_transition.c @@ -239,9 +239,7 @@ s32 render_screen_transition(s8 fadeTimer, s8 transType, u8 transTime, struct Wa return render_textured_transition(fadeTimer, transTime, transData, TEX_TRANS_BOWSER, TRANS_TYPE_MIRROR); break; } -#ifdef AVOID_UB return 0; -#endif } Gfx *render_cannon_circle_base(void) { diff --git a/src/game/shadow.c b/src/game/shadow.c index 7cbd87fbe..de8b79754 100644 --- a/src/game/shadow.c +++ b/src/game/shadow.c @@ -187,11 +187,6 @@ f32 get_water_level_below_shadow(struct Shadow *s, struct Surface **waterFloor) return waterLevel; } return waterLevel; - //! @bug Missing return statement. This compiles to return `waterLevel` - //! incidentally. -#ifdef AVOID_UB - return waterLevel; -#endif } /** diff --git a/src/goddard/bad_declarations.h b/src/goddard/bad_declarations.h deleted file mode 100644 index e1b0539d8..000000000 --- a/src/goddard/bad_declarations.h +++ /dev/null @@ -1,40 +0,0 @@ -#ifndef GD_BAD_DECLARATIONS_H -#define GD_BAD_DECLARATIONS_H - -#include "gd_types.h" - -/** - * @file bad_declarations.h - * - * Match incorrect type promotion for two declared functions. - * - * There is an issue with the compiled code for these function calls in files - * outside of the files in which they were defined: instead of passing f32's, - * the caller passes f64's. - * - * The only possible reason I can come up with for this behavior is that - * goddard only declared (not prototyped) his functions in the headers, - * and didn't include the header in the function's defining .c file. - * (Even IDO 5.3 cares about illegal promotion of types!) This results in - * default argument promotion, which is incorrect in this case. - * - * Since that's an awful practice to emulate, include this file (first!) to prevent - * the proper prototypes of these functions from being seen by files with the - * the incorrectly compiled calls. -*/ - -#ifndef AVOID_UB - -#define GD_USE_BAD_DECLARATIONS - -/* shape_helper.h */ -extern struct ObjFace *make_face_with_colour(); -/* should be: make_face_with_colour(f32, f32, f32) */ - -/* old_menu.h */ -extern struct ObjLabel *make_label(); -/* should be: make_label(struct ObjValPtr *, char *, s32, f32, f32, f32) */ - -#endif /* !AVOID_UB */ - -#endif // GD_BAD_DECLARATIONS_H diff --git a/src/goddard/debug_utils.c b/src/goddard/debug_utils.c index 0d81d7290..ff7140596 100644 --- a/src/goddard/debug_utils.c +++ b/src/goddard/debug_utils.c @@ -153,9 +153,7 @@ void remove_all_memtrackers(void) { sMemTrackers[i].total = 0.0f; } -#ifdef AVOID_UB sNumActiveMemTrackers = 0; -#endif } /** @@ -459,11 +457,7 @@ void fatal_printf(const char *fmt, ...) { gd_printf("%s", va_arg(vl, char *)); break; case 'c': -#ifdef AVOID_UB gd_printf("%c", (char)va_arg(vl, int)); -#else - gd_printf("%c", va_arg(vl, char)); -#endif break; case 'x': gd_printf("%x", va_arg(vl, s32)); diff --git a/src/goddard/draw_objects.c b/src/goddard/draw_objects.c index ba1a402e0..d6fe652b3 100644 --- a/src/goddard/draw_objects.c +++ b/src/goddard/draw_objects.c @@ -1125,12 +1125,7 @@ void unref_8017AEDC(struct ObjGroup *grp) { * @bug Nothing is returned if the DL is created * @note Contains string literals that suggest a removed `printf` call */ -#ifdef AVOID_UB -void -#else -s32 -#endif -create_shape_gddl(struct ObjShape *s) { +void create_shape_gddl(struct ObjShape *s) { struct ObjShape *shape = s; // 24 s32 shapedl; // 20 UNUSED s32 enddl; // 1C @@ -1138,11 +1133,7 @@ create_shape_gddl(struct ObjShape *s) { create_shape_mtl_gddls(shape); shapedl = gd_startdisplist(7); if (shapedl == 0) { -#ifdef AVOID_UB return; -#else - return -1; -#endif } setup_lights(); diff --git a/src/goddard/dynlist_proc.c b/src/goddard/dynlist_proc.c index 4b9f21c4e..60f3b7908 100644 --- a/src/goddard/dynlist_proc.c +++ b/src/goddard/dynlist_proc.c @@ -1,7 +1,6 @@ #include #include -#include "bad_declarations.h" #include "debug_utils.h" #include "draw_objects.h" #include "dynlist_proc.h" @@ -627,12 +626,7 @@ struct GdObj *d_makeobj(enum DObjTypes type, DynObjName name) { case D_DATA_GRP: d_makeobj(D_GROUP, name); ((struct ObjGroup *) sDynListCurObj)->linkType = 1; -//! @bug Returns garbage when making `D_DATA_GRP` object -#ifdef AVOID_UB return NULL; -#else - return; -#endif case D_CAMERA: dobj = &make_camera(0, NULL)->header; break; diff --git a/src/goddard/objects.c b/src/goddard/objects.c index dcb5fd71d..5d2f0c1b0 100644 --- a/src/goddard/objects.c +++ b/src/goddard/objects.c @@ -347,10 +347,7 @@ struct ObjZone *make_zone(struct ObjGroup *a0, struct GdBoundingBox *bbox, struc newZone->unk2C = a2; newZone->unk30 = a0; -//! @bug Created `ObjZone` is not returned -#ifdef AVOID_UB return newZone; -#endif } /* @ 22AF70 for 0x60 */ @@ -923,14 +920,8 @@ s32 apply_to_obj_types_in_group(s32 types, applyproc_t func, struct ObjGroup *gr fnAppliedCount = 0; - //! @bug When `group` pointer is NULL, garbage is returned, not the - //! count of `fn` calls if (group == NULL) { -#ifdef AVOID_UB return fnAppliedCount; -#else - return; -#endif } if (group->linkType & 1) { // compressed data, not an Obj diff --git a/src/goddard/old_menu.h b/src/goddard/old_menu.h index 5d71b3426..bf6117f0f 100644 --- a/src/goddard/old_menu.h +++ b/src/goddard/old_menu.h @@ -10,10 +10,6 @@ void get_objvalue(union ObjVarVal *dst, enum ValPtrType type, void *base, size_t struct ObjGadget *make_gadget(UNUSED s32 a0, s32 a1); void reset_gadget(struct ObjGadget *gdgt); void reset_gadgets_in_grp(struct ObjGroup *grp); - -// see bad_declarations.h -#ifndef GD_USE_BAD_DECLARATIONS struct ObjLabel *make_label(struct ObjValPtr *ptr, char *str, s32 a2, f32 x, f32 y, f32 z); -#endif #endif // GD_OLD_MENU_H diff --git a/src/goddard/renderer.c b/src/goddard/renderer.c index 34c9a064e..d2d49600e 100644 --- a/src/goddard/renderer.c +++ b/src/goddard/renderer.c @@ -1456,12 +1456,7 @@ struct GdDisplayList *create_child_gdl(s32 id, struct GdDisplayList *srcDl) { newDl = alloc_displaylist(id); newDl->parent = srcDl; cpy_remaining_gddl(newDl, srcDl); -//! @bug No return statement, despite return value being used. -//! Goddard lucked out that `v0` return from alloc_displaylist() -//! is not overwriten, as that pointer is what should be returned -#ifdef AVOID_UB return newDl; -#endif } /* 24B7F8 -> 24BA48; orig name: func_8019D028 */ @@ -2719,14 +2714,7 @@ s32 setup_view_buffers(const char *name, struct ObjView *view, UNUSED s32 ulx, U view->parent = D_801A86E0; } -//! @bug No actual return, but the return value is used. -//! There is no obvious value to return. Since the function -//! doesn't use four of its parameters, this function may have -//! had a fair amount of its code commented out. In game, the -//! returned value is always 0, so the fix returns that value -#ifdef AVOID_UB return 0; -#endif } /* 252AF8 -> 252BAC; orig name: _InitControllers */ diff --git a/src/goddard/shape_helper.h b/src/goddard/shape_helper.h index bf55901ef..8f52dcd8f 100644 --- a/src/goddard/shape_helper.h +++ b/src/goddard/shape_helper.h @@ -24,10 +24,6 @@ void animate_mario_head_gameover(struct ObjAnimator *self); void animate_mario_head_normal(struct ObjAnimator *self); s32 load_mario_head(void (*aniFn)(struct ObjAnimator *)); void load_shapes2(void); - -// see bad_declarations.h -#ifndef GD_USE_BAD_DECLARATIONS struct ObjFace* make_face_with_colour(f32 r, f32 g, f32 b); -#endif #endif // GD_SHAPE_HELPER_H diff --git a/src/menu/file_select.c b/src/menu/file_select.c index ad2351038..b7f298708 100644 --- a/src/menu/file_select.c +++ b/src/menu/file_select.c @@ -2386,10 +2386,7 @@ s32 lvl_init_menu_values_and_cursor_pos(UNUSED s32 arg, UNUSED s32 unused) { sMainMenuTimer = 0; sEraseYesNoHoverState = MENU_ERASE_HOVER_NONE; sSoundMode = save_file_get_sound_mode(); - //! no return value -#ifdef AVOID_UB return 0; -#endif } /** diff --git a/src/menu/intro_geo.c b/src/menu/intro_geo.c index e3068ef36..0ab905774 100644 --- a/src/menu/intro_geo.c +++ b/src/menu/intro_geo.c @@ -436,13 +436,9 @@ Gfx *geo_intro_face_easter_egg(s32 state, struct GraphNode *node, UNUSED void *c Gfx *geo_intro_rumble_pak_graphic(s32 state, struct GraphNode *node, UNUSED void *context) { struct GraphNodeGenerated *genNode = (struct GraphNodeGenerated *)node; Gfx *dlIter; - Gfx *dl; + Gfx *dl = NULL; s32 introContext; - s8 backgroundTileSix; -#ifdef AVOID_UB - dl = NULL; - backgroundTileSix = 0; -#endif + s8 backgroundTileSix = 0; if (state != 1) { dl = NULL; diff --git a/src/menu/star_select.c b/src/menu/star_select.c index dfa46ea11..8a4054834 100644 --- a/src/menu/star_select.c +++ b/src/menu/star_select.c @@ -395,13 +395,8 @@ void print_act_selector_strings(void) { /** * Geo function that Print act selector strings. - *!@bug: This geo function is missing the third param. Harmless in practice due to o32 convention. */ -#ifdef AVOID_UB Gfx *geo_act_selector_strings(s16 callContext, UNUSED struct GraphNode *node, UNUSED void *context) { -#else -Gfx *geo_act_selector_strings(s16 callContext, UNUSED struct GraphNode *node) { -#endif if (callContext == GEO_CONTEXT_RENDER) { print_act_selector_strings(); } @@ -426,10 +421,7 @@ s32 lvl_init_act_selector_values_and_stars(UNUSED s32 arg, UNUSED s32 unused) { sObtainedStars--; } - //! no return value -#ifdef AVOID_UB return 0; -#endif } /** diff --git a/src/menu/star_select.h b/src/menu/star_select.h index 6388b3f69..1fa7f39a3 100644 --- a/src/menu/star_select.h +++ b/src/menu/star_select.h @@ -13,11 +13,7 @@ enum StarSelectorTypes STAR_SELECTOR_100_COINS }; -#ifdef AVOID_UB Gfx *geo_act_selector_strings(s16 callContext, UNUSED struct GraphNode *node, UNUSED void *context); -#else -Gfx *geo_act_selector_strings(s16 callContext, UNUSED struct GraphNode *node); -#endif s32 lvl_init_act_selector_values_and_stars(UNUSED s32 arg, UNUSED s32 unused); s32 lvl_update_obj_and_load_act_button_actions(UNUSED s32 arg, UNUSED s32 unused); From 49571ff93bffe149a38e592a829f0179bbfbe906 Mon Sep 17 00:00:00 2001 From: Arceveti <73617174+Arceveti@users.noreply.github.com> Date: Wed, 22 Sep 2021 12:04:35 -0700 Subject: [PATCH 10/26] Particles occlude silhouette --- actors/white_particle/geo.inc.c | 2 +- levels/scripts.c | 8 ++++---- src/game/level_geo.c | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/actors/white_particle/geo.inc.c b/actors/white_particle/geo.inc.c index 5a161ed55..6941685de 100644 --- a/actors/white_particle/geo.inc.c +++ b/actors/white_particle/geo.inc.c @@ -2,7 +2,7 @@ const GeoLayout white_particle_geo[] = { GEO_SHADOW(SHADOW_CIRCLE_4_VERTS, 0xB4, 50), GEO_OPEN_NODE(), - GEO_DISPLAY_LIST(LAYER_ALPHA, white_particle_dl), + GEO_DISPLAY_LIST(LAYER_OCCLUDE_SILHOUETTE_ALPHA, white_particle_dl), GEO_CLOSE_NODE(), GEO_END(), }; diff --git a/levels/scripts.c b/levels/scripts.c index 48c7c2e12..5d4c873a5 100644 --- a/levels/scripts.c +++ b/levels/scripts.c @@ -77,7 +77,7 @@ const LevelScript level_main_scripts_entry[] = { LOAD_MODEL_FROM_GEO(MODEL_STAR, star_geo), LOAD_MODEL_FROM_GEO(MODEL_TRANSPARENT_STAR, transparent_star_geo), LOAD_MODEL_FROM_GEO(MODEL_WOODEN_SIGNPOST, wooden_signpost_geo), - LOAD_MODEL_FROM_DL( MODEL_WHITE_PARTICLE_SMALL, white_particle_small_dl, LAYER_ALPHA), + LOAD_MODEL_FROM_DL( MODEL_WHITE_PARTICLE_SMALL, white_particle_small_dl, LAYER_OCCLUDE_SILHOUETTE_ALPHA), LOAD_MODEL_FROM_GEO(MODEL_RED_FLAME, red_flame_geo), LOAD_MODEL_FROM_GEO(MODEL_BLUE_FLAME, blue_flame_geo), LOAD_MODEL_FROM_GEO(MODEL_BURN_SMOKE, burn_smoke_geo), @@ -86,13 +86,13 @@ const LevelScript level_main_scripts_entry[] = { LOAD_MODEL_FROM_GEO(MODEL_FISH, fish_geo), LOAD_MODEL_FROM_GEO(MODEL_FISH_SHADOW, fish_shadow_geo), LOAD_MODEL_FROM_GEO(MODEL_SPARKLES_ANIMATION, sparkles_animation_geo), - LOAD_MODEL_FROM_DL( MODEL_SAND_DUST, sand_seg3_dl_0302BCD0, LAYER_ALPHA), + LOAD_MODEL_FROM_DL( MODEL_SAND_DUST, sand_seg3_dl_0302BCD0, LAYER_OCCLUDE_SILHOUETTE_ALPHA), LOAD_MODEL_FROM_GEO(MODEL_BUTTERFLY, butterfly_geo), LOAD_MODEL_FROM_GEO(MODEL_BURN_SMOKE_UNUSED, burn_smoke_geo), - LOAD_MODEL_FROM_DL( MODEL_PEBBLE, pebble_seg3_dl_0301CB00, LAYER_ALPHA), + LOAD_MODEL_FROM_DL( MODEL_PEBBLE, pebble_seg3_dl_0301CB00, LAYER_OCCLUDE_SILHOUETTE_ALPHA), LOAD_MODEL_FROM_GEO(MODEL_MIST, mist_geo), LOAD_MODEL_FROM_GEO(MODEL_WHITE_PUFF, white_puff_geo), - LOAD_MODEL_FROM_DL( MODEL_WHITE_PARTICLE_DL, white_particle_dl, LAYER_ALPHA), + LOAD_MODEL_FROM_DL( MODEL_WHITE_PARTICLE_DL, white_particle_dl, LAYER_OCCLUDE_SILHOUETTE_ALPHA), LOAD_MODEL_FROM_GEO(MODEL_WHITE_PARTICLE, white_particle_geo), LOAD_MODEL_FROM_GEO(MODEL_YELLOW_COIN_NO_SHADOW, yellow_coin_no_shadow_geo), LOAD_MODEL_FROM_GEO(MODEL_BLUE_COIN, blue_coin_geo), diff --git a/src/game/level_geo.c b/src/game/level_geo.c index a108e7a34..0751b1b6a 100644 --- a/src/game/level_geo.c +++ b/src/game/level_geo.c @@ -40,7 +40,7 @@ Gfx *geo_envfx_main(s32 callContext, struct GraphNode *node, Mat4 mtxf) { mtxf_to_mtx(mtx, mtxf); gSPMatrix(&gfx[0], VIRTUAL_TO_PHYSICAL(mtx), G_MTX_MODELVIEW | G_MTX_LOAD | G_MTX_NOPUSH); gSPBranchList(&gfx[1], VIRTUAL_TO_PHYSICAL(particleList)); - execNode->fnNode.node.flags = (execNode->fnNode.node.flags & GRAPH_NODE_TYPES_MASK) | (LAYER_ALPHA << 8); + execNode->fnNode.node.flags = (execNode->fnNode.node.flags & GRAPH_NODE_TYPES_MASK) | (LAYER_OCCLUDE_SILHOUETTE_ALPHA << 8); } SET_HIGH_U16_OF_32(*params, gAreaUpdateCounter); } From e7fb56dc50f1b8335523e9746eee4460dd500ec2 Mon Sep 17 00:00:00 2001 From: Arceveti <73617174+Arceveti@users.noreply.github.com> Date: Wed, 22 Sep 2021 16:58:21 -0700 Subject: [PATCH 11/26] Add ability to increase the amount of graph node flags --- enhancements/platform_displacement_2.diff | 4 ++-- include/types.h | 3 +++ src/engine/graph_node.c | 16 ++++++------- src/engine/graph_node.h | 28 +++++++++++++++-------- src/engine/math_util.h | 3 --- src/game/behaviors/bowser.inc.c | 4 ++-- src/game/geo_misc.c | 8 +++---- src/game/level_geo.c | 3 +-- src/game/mario_misc.c | 6 ++--- src/game/moving_texture.c | 16 ++++--------- src/game/obj_behaviors.c | 3 +-- src/game/object_helpers.c | 12 ++++------ src/game/paintings.c | 4 ++-- src/game/rendering_graph_node.c | 20 ++++++++-------- src/game/screen_transition.c | 2 +- src/menu/intro_geo.c | 14 ++++++------ 16 files changed, 71 insertions(+), 75 deletions(-) diff --git a/enhancements/platform_displacement_2.diff b/enhancements/platform_displacement_2.diff index 0e5aec8c8..ea57e5ef7 100644 --- a/enhancements/platform_displacement_2.diff +++ b/enhancements/platform_displacement_2.diff @@ -1595,9 +1595,9 @@ index 0000000..97cba2a + if (gCurGraphNodeHeldObject != 0) + sp24 = gCurGraphNodeHeldObject->objNode; + if (sp24->oOpacity == 0xFF) -+ sp20->fnNode.node.flags = (sp20->fnNode.node.flags & GRAPH_NODE_TYPES_MASK) | GRAPH_NODE_TYPE_FUNCTIONAL; ++ SET_GRAPH_NODE_LAYER(sp20->fnNode.node.flags, LAYER_OPAQUE); + else -+ sp20->fnNode.node.flags = (sp20->fnNode.node.flags & GRAPH_NODE_TYPES_MASK) | (GRAPH_NODE_TYPE_FUNCTIONAL | GRAPH_NODE_TYPE_400); ++ SET_GRAPH_NODE_LAYER(sp20->fnNode.node.flags, LAYER_TRANSPARENT); + sp28 = sp2C = alloc_display_list(2 * sizeof(Gfx)); + + if (sp24->oBowserUnk1B2 != 0) { diff --git a/include/types.h b/include/types.h index d39e629a9..dcce4d0bc 100644 --- a/include/types.h +++ b/include/types.h @@ -8,6 +8,9 @@ #include "macros.h" #include "config.h" +#define BIT(i) (1 << (i)) +#define BITMASK(size) ((BIT(size)) - 1) + struct Config { f32 audioFrequency; diff --git a/src/engine/graph_node.c b/src/engine/graph_node.c index c26ca2bb0..7c8bb45a8 100644 --- a/src/engine/graph_node.c +++ b/src/engine/graph_node.c @@ -226,7 +226,7 @@ init_graph_node_translation_rotation(struct AllocOnlyPool *pool, vec3s_copy(graphNode->translation, translation); vec3s_copy(graphNode->rotation, rotation); - graphNode->node.flags = (drawingLayer << 8) | (graphNode->node.flags & GRAPH_NODE_TYPES_MASK); + SET_GRAPH_NODE_LAYER(graphNode->node.flags, drawingLayer); graphNode->displayList = displayList; } @@ -248,7 +248,7 @@ struct GraphNodeTranslation *init_graph_node_translation(struct AllocOnlyPool *p init_scene_graph_node_links(&graphNode->node, GRAPH_NODE_TYPE_TRANSLATION); vec3s_copy(graphNode->translation, translation); - graphNode->node.flags = (drawingLayer << 8) | (graphNode->node.flags & GRAPH_NODE_TYPES_MASK); + SET_GRAPH_NODE_LAYER(graphNode->node.flags, drawingLayer); graphNode->displayList = displayList; } @@ -269,7 +269,7 @@ struct GraphNodeRotation *init_graph_node_rotation(struct AllocOnlyPool *pool, if (graphNode != NULL) { init_scene_graph_node_links(&graphNode->node, GRAPH_NODE_TYPE_ROTATION); vec3s_copy(graphNode->rotation, rotation); - graphNode->node.flags = (drawingLayer << 8) | (graphNode->node.flags & GRAPH_NODE_TYPES_MASK); + SET_GRAPH_NODE_LAYER(graphNode->node.flags, drawingLayer); graphNode->displayList = displayList; } @@ -288,7 +288,7 @@ struct GraphNodeScale *init_graph_node_scale(struct AllocOnlyPool *pool, if (graphNode != NULL) { init_scene_graph_node_links(&graphNode->node, GRAPH_NODE_TYPE_SCALE); - graphNode->node.flags = (drawingLayer << 8) | (graphNode->node.flags & GRAPH_NODE_TYPES_MASK); + SET_GRAPH_NODE_LAYER(graphNode->node.flags, drawingLayer); graphNode->scale = scale; graphNode->displayList = displayList; } @@ -358,7 +358,7 @@ struct GraphNodeAnimatedPart *init_graph_node_animated_part(struct AllocOnlyPool if (graphNode != NULL) { init_scene_graph_node_links(&graphNode->node, GRAPH_NODE_TYPE_ANIMATED_PART); vec3s_copy(graphNode->translation, translation); - graphNode->node.flags = (drawingLayer << 8) | (graphNode->node.flags & GRAPH_NODE_TYPES_MASK); + SET_GRAPH_NODE_LAYER(graphNode->node.flags, drawingLayer); graphNode->displayList = displayList; } @@ -380,7 +380,7 @@ struct GraphNodeBone *init_graph_node_bone(struct AllocOnlyPool *pool, init_scene_graph_node_links(&graphNode->node, GRAPH_NODE_TYPE_BONE); vec3s_copy(graphNode->translation, translation); vec3s_copy(graphNode->rotation, rotation); - graphNode->node.flags = (drawingLayer << 8) | (graphNode->node.flags & GRAPH_NODE_TYPES_MASK); + SET_GRAPH_NODE_LAYER(graphNode->node.flags, drawingLayer); graphNode->displayList = displayList; } @@ -401,7 +401,7 @@ struct GraphNodeBillboard *init_graph_node_billboard(struct AllocOnlyPool *pool, if (graphNode != NULL) { init_scene_graph_node_links(&graphNode->node, GRAPH_NODE_TYPE_BILLBOARD); vec3s_copy(graphNode->translation, translation); - graphNode->node.flags = (drawingLayer << 8) | (graphNode->node.flags & GRAPH_NODE_TYPES_MASK); + SET_GRAPH_NODE_LAYER(graphNode->node.flags, drawingLayer); graphNode->displayList = displayList; } @@ -420,7 +420,7 @@ struct GraphNodeDisplayList *init_graph_node_display_list(struct AllocOnlyPool * if (graphNode != NULL) { init_scene_graph_node_links(&graphNode->node, GRAPH_NODE_TYPE_DISPLAY_LIST); - graphNode->node.flags = (drawingLayer << 8) | (graphNode->node.flags & GRAPH_NODE_TYPES_MASK); + SET_GRAPH_NODE_LAYER(graphNode->node.flags, drawingLayer); graphNode->displayList = displayList; } diff --git a/src/engine/graph_node.h b/src/engine/graph_node.h index 61e4f687a..72a545114 100644 --- a/src/engine/graph_node.h +++ b/src/engine/graph_node.h @@ -9,14 +9,24 @@ #include "geo_commands.h" #include "game/memory.h" -#define GRAPH_RENDER_ACTIVE (1 << 0) -#define GRAPH_RENDER_CHILDREN_FIRST (1 << 1) -#define GRAPH_RENDER_BILLBOARD (1 << 2) -#define GRAPH_RENDER_Z_BUFFER (1 << 3) -#define GRAPH_RENDER_INVISIBLE (1 << 4) -#define GRAPH_RENDER_HAS_ANIMATION (1 << 5) -#define GRAPH_RENDER_UCODE_REJ (1 << 6) -#define GRAPH_RENDER_SILHOUETTE (1 << 7) +#define GRAPH_RENDER_ACTIVE (1 << 0) // 0x0001 +#define GRAPH_RENDER_CHILDREN_FIRST (1 << 1) // 0x0002 +#define GRAPH_RENDER_BILLBOARD (1 << 2) // 0x0004 +#define GRAPH_RENDER_Z_BUFFER (1 << 3) // 0x0008 +#define GRAPH_RENDER_INVISIBLE (1 << 4) // 0x0010 +#define GRAPH_RENDER_HAS_ANIMATION (1 << 5) // 0x0020 +#define GRAPH_RENDER_UCODE_REJ (1 << 6) // 0x0040 +#define GRAPH_RENDER_SILHOUETTE (1 << 7) // 0x0080 + +// The amount of bits to use for the above flags out of a s16 variable. +// The remaining bits to the left are used for the render layers. +// The vanilla value is 8, allowing for 8 flags and 255 layers. +#define GRAPH_RENDER_FLAGS_SIZE 8 + +#define GRAPH_RENDER_LAYERS_MASK (BITMASK(16 - GRAPH_RENDER_FLAGS_SIZE) << GRAPH_RENDER_FLAGS_SIZE) +#define GRAPH_RENDER_FLAGS_MASK BITMASK(GRAPH_RENDER_FLAGS_SIZE) +#define SET_GRAPH_NODE_LAYER(flags, layer) ((flags) = ((flags) & GRAPH_RENDER_FLAGS_MASK) | (((layer) << GRAPH_RENDER_FLAGS_SIZE) & GRAPH_RENDER_LAYERS_MASK)) +#define GET_GRAPH_NODE_LAYER(flags ) ((flags & GRAPH_RENDER_LAYERS_MASK) >> GRAPH_RENDER_FLAGS_SIZE) // Whether the node type has a function pointer of type GraphNodeFunc #define GRAPH_NODE_TYPE_FUNCTIONAL 0x100 @@ -46,7 +56,7 @@ #define GRAPH_NODE_TYPE_HELD_OBJ (0x02E | GRAPH_NODE_TYPE_FUNCTIONAL) #define GRAPH_NODE_TYPE_CULLING_RADIUS 0x02F -#define GRAPH_NODE_TYPES_MASK 0xFF +#define GRAPH_NODE_TYPES_MASK 0x0FF // The number of master lists. A master list determines the order and render // mode with which display lists are drawn. diff --git a/src/engine/math_util.h b/src/engine/math_util.h index e786101d1..e16c808eb 100644 --- a/src/engine/math_util.h +++ b/src/engine/math_util.h @@ -6,9 +6,6 @@ #include "types.h" -#define BIT(i) (1 << (i)) -#define BITMASK(size) ((BIT(size)) - 1) - /* * The sine and cosine tables overlap, but "#define gCosineTable (gSineTable + * 0x400)" doesn't give expected codegen; gSineTable and gCosineTable need to diff --git a/src/game/behaviors/bowser.inc.c b/src/game/behaviors/bowser.inc.c index 6c8f42416..61ef8d515 100644 --- a/src/game/behaviors/bowser.inc.c +++ b/src/game/behaviors/bowser.inc.c @@ -1912,9 +1912,9 @@ Gfx *geo_bits_bowser_coloring(s32 callContext, struct GraphNode *node, UNUSED s3 } // Set layers if object is transparent or not if (obj->oOpacity == 0xFF) { - graphNode->fnNode.node.flags = (graphNode->fnNode.node.flags & GRAPH_NODE_TYPES_MASK) | (LAYER_OPAQUE << 8); + SET_GRAPH_NODE_LAYER(graphNode->fnNode.node.flags, LAYER_OPAQUE); } else { - graphNode->fnNode.node.flags = (graphNode->fnNode.node.flags & GRAPH_NODE_TYPES_MASK) | (LAYER_TRANSPARENT << 8); + SET_GRAPH_NODE_LAYER(graphNode->fnNode.node.flags, LAYER_TRANSPARENT); } gfx = gfxHead = alloc_display_list(2 * sizeof(Gfx)); // If TRUE, clear lighting to give rainbow color diff --git a/src/game/geo_misc.c b/src/game/geo_misc.c index eef196739..851943298 100644 --- a/src/game/geo_misc.c +++ b/src/game/geo_misc.c @@ -96,7 +96,7 @@ Gfx *geo_exec_inside_castle_light(s32 callContext, struct GraphNode *node, UNUSE } generatedNode = (struct GraphNodeGenerated *) node; - generatedNode->fnNode.node.flags = (generatedNode->fnNode.node.flags & GRAPH_NODE_TYPES_MASK) | (LAYER_TRANSPARENT << 8); + SET_GRAPH_NODE_LAYER(generatedNode->fnNode.node.flags, LAYER_TRANSPARENT); gSPDisplayList(displayListHead++, dl_castle_lobby_wing_cap_light); gSPEndDisplayList(displayListHead); @@ -148,8 +148,7 @@ Gfx *geo_exec_flying_carpet_create(s32 callContext, struct GraphNode *node, UNUS if (verts == NULL || displayList == NULL) { return NULL; } - - generatedNode->fnNode.node.flags = (generatedNode->fnNode.node.flags & GRAPH_NODE_TYPES_MASK) | (LAYER_OPAQUE << 8); + SET_GRAPH_NODE_LAYER(generatedNode->fnNode.node.flags, LAYER_OPAQUE); for (n = 0; n <= 20; n++) { row = n / 3; @@ -201,8 +200,7 @@ Gfx *geo_exec_cake_end_screen(s32 callContext, struct GraphNode *node, UNUSED Ma if (callContext == GEO_CONTEXT_RENDER) { displayList = alloc_display_list(3 * sizeof(*displayList)); displayListHead = displayList; - - generatedNode->fnNode.node.flags = (generatedNode->fnNode.node.flags & GRAPH_NODE_TYPES_MASK) | (LAYER_OPAQUE << 8); + SET_GRAPH_NODE_LAYER(generatedNode->fnNode.node.flags, LAYER_OPAQUE); #ifdef VERSION_EU gSPDisplayList(displayListHead++, dl_cake_end_screen); #else diff --git a/src/game/level_geo.c b/src/game/level_geo.c index 0751b1b6a..7e29f8686 100644 --- a/src/game/level_geo.c +++ b/src/game/level_geo.c @@ -26,7 +26,6 @@ Gfx *geo_envfx_main(s32 callContext, struct GraphNode *node, Mat4 mtxf) { // casting to a local struct as necessary. if (GET_HIGH_U16_OF_32(*params) != gAreaUpdateCounter) { - UNUSED struct Camera *sp2C = gCurGraphNodeCamera->config.camera; s32 snowMode = GET_LOW_U16_OF_32(*params); vec3f_to_vec3s(camTo, gCurGraphNodeCamera->focus); @@ -40,7 +39,7 @@ Gfx *geo_envfx_main(s32 callContext, struct GraphNode *node, Mat4 mtxf) { mtxf_to_mtx(mtx, mtxf); gSPMatrix(&gfx[0], VIRTUAL_TO_PHYSICAL(mtx), G_MTX_MODELVIEW | G_MTX_LOAD | G_MTX_NOPUSH); gSPBranchList(&gfx[1], VIRTUAL_TO_PHYSICAL(particleList)); - execNode->fnNode.node.flags = (execNode->fnNode.node.flags & GRAPH_NODE_TYPES_MASK) | (LAYER_OCCLUDE_SILHOUETTE_ALPHA << 8); + SET_GRAPH_NODE_LAYER(execNode->fnNode.node.flags, LAYER_OCCLUDE_SILHOUETTE_ALPHA); } SET_HIGH_U16_OF_32(*params, gAreaUpdateCounter); } diff --git a/src/game/mario_misc.c b/src/game/mario_misc.c index 054f1ac8d..d394c5b1d 100644 --- a/src/game/mario_misc.c +++ b/src/game/mario_misc.c @@ -308,11 +308,11 @@ static Gfx *make_gfx_mario_alpha(struct GraphNodeGenerated *node, s16 alpha) { Gfx *gfxHead = NULL; if (alpha == 255) { - node->fnNode.node.flags = (node->fnNode.node.flags & GRAPH_NODE_TYPES_MASK) | (LAYER_OPAQUE << 8); + SET_GRAPH_NODE_LAYER(node->fnNode.node.flags, LAYER_OPAQUE); gfxHead = alloc_display_list(2 * sizeof(*gfxHead)); gfx = gfxHead; } else { - node->fnNode.node.flags = (node->fnNode.node.flags & GRAPH_NODE_TYPES_MASK) | (LAYER_TRANSPARENT << 8); + SET_GRAPH_NODE_LAYER(node->fnNode.node.flags, LAYER_TRANSPARENT); gfxHead = alloc_display_list(3 * sizeof(*gfxHead)); gfx = gfxHead; if (gMarioState->flags & MARIO_VANISH_CAP) { @@ -655,7 +655,7 @@ Gfx *geo_mirror_mario_backface_culling(s32 callContext, struct GraphNode *node, gSPSetGeometryMode(&gfx[1], G_CULL_BACK); gSPEndDisplayList(&gfx[2]); } - asGenerated->fnNode.node.flags = (asGenerated->fnNode.node.flags & GRAPH_NODE_TYPES_MASK) | (LAYER_OPAQUE << 8); + SET_GRAPH_NODE_LAYER(asGenerated->fnNode.node.flags, LAYER_OPAQUE); } return gfx; } diff --git a/src/game/moving_texture.c b/src/game/moving_texture.c index c0794c285..744e8e63a 100644 --- a/src/game/moving_texture.c +++ b/src/game/moving_texture.c @@ -659,9 +659,7 @@ Gfx *geo_movtex_draw_water_regions(s32 callContext, struct GraphNode *node, UNUS if (quadCollection == NULL) { return NULL; } - - asGenerated->fnNode.node.flags = - (asGenerated->fnNode.node.flags & GRAPH_NODE_TYPES_MASK) | (LAYER_TRANSPARENT_INTER << 8); + SET_GRAPH_NODE_LAYER(asGenerated->fnNode.node.flags, LAYER_TRANSPARENT_INTER); movtex_change_texture_format(asGenerated->parameter, &gfx); gMovetexLastTextureId = -1; @@ -840,8 +838,7 @@ Gfx *geo_movtex_draw_nocolor(s32 callContext, struct GraphNode *node, UNUSED Mat asGenerated = (struct GraphNodeGenerated *) node; while (gMovtexNonColored[i].movtexVerts != 0) { if (gMovtexNonColored[i].geoId == asGenerated->parameter) { - asGenerated->fnNode.node.flags = - (asGenerated->fnNode.node.flags & GRAPH_NODE_TYPES_MASK) | (gMovtexNonColored[i].layer << 8); + SET_GRAPH_NODE_LAYER(asGenerated->fnNode.node.flags, gMovtexNonColored[i].layer); movtexVerts = segmented_to_virtual(gMovtexNonColored[i].movtexVerts); update_moving_texture_offset(movtexVerts, MOVTEX_ATTR_NOCOLOR_S); gfx = movtex_gen_list(movtexVerts, &gMovtexNonColored[i], @@ -868,8 +865,7 @@ Gfx *geo_movtex_draw_colored(s32 callContext, struct GraphNode *node, UNUSED Mat asGenerated = (struct GraphNodeGenerated *) node; while (gMovtexColored[i].movtexVerts != 0) { if (gMovtexColored[i].geoId == asGenerated->parameter) { - asGenerated->fnNode.node.flags = - (asGenerated->fnNode.node.flags & GRAPH_NODE_TYPES_MASK) | (gMovtexColored[i].layer << 8); + SET_GRAPH_NODE_LAYER(asGenerated->fnNode.node.flags, gMovtexColored[i].layer); movtexVerts = segmented_to_virtual(gMovtexColored[i].movtexVerts); update_moving_texture_offset(movtexVerts, MOVTEX_ATTR_COLORED_S); gfx = movtex_gen_list(movtexVerts, &gMovtexColored[i], MOVTEX_LAYOUT_COLORED); @@ -899,8 +895,7 @@ Gfx *geo_movtex_draw_colored_no_update(s32 callContext, struct GraphNode *node, asGenerated = (struct GraphNodeGenerated *) node; while (gMovtexColored[i].movtexVerts != 0) { if (gMovtexColored[i].geoId == asGenerated->parameter) { - asGenerated->fnNode.node.flags = - (asGenerated->fnNode.node.flags & GRAPH_NODE_TYPES_MASK) | (gMovtexColored[i].layer << 8); + SET_GRAPH_NODE_LAYER(asGenerated->fnNode.node.flags, gMovtexColored[i].layer); movtexVerts = segmented_to_virtual(gMovtexColored[i].movtexVerts); gfx = movtex_gen_list(movtexVerts, &gMovtexColored[i], MOVTEX_LAYOUT_COLORED); break; @@ -926,8 +921,7 @@ Gfx *geo_movtex_draw_colored_2_no_update(s32 callContext, struct GraphNode *node asGenerated = (struct GraphNodeGenerated *) node; while (gMovtexColored2[i].movtexVerts != 0) { if (gMovtexColored2[i].geoId == asGenerated->parameter) { - asGenerated->fnNode.node.flags = - (asGenerated->fnNode.node.flags & GRAPH_NODE_TYPES_MASK) | (gMovtexColored2[i].layer << 8); + SET_GRAPH_NODE_LAYER(asGenerated->fnNode.node.flags, gMovtexColored2[i].layer); movtexVerts = segmented_to_virtual(gMovtexColored2[i].movtexVerts); gfx = movtex_gen_list(movtexVerts, &gMovtexColored2[i], MOVTEX_LAYOUT_COLORED); break; diff --git a/src/game/obj_behaviors.c b/src/game/obj_behaviors.c index d5b913243..1580c413b 100644 --- a/src/game/obj_behaviors.c +++ b/src/game/obj_behaviors.c @@ -107,8 +107,7 @@ Gfx UNUSED *geo_obj_transparency_something(s32 callContext, struct GraphNode *no gfxHead = alloc_display_list(3 * sizeof(Gfx)); gfx = gfxHead; - obj->header.gfx.node.flags = - (obj->header.gfx.node.flags & GRAPH_NODE_TYPES_MASK) | (LAYER_TRANSPARENT << 8); + SET_GRAPH_NODE_LAYER(obj->header.gfx.node.flags, LAYER_TRANSPARENT); gDPSetEnvColor(gfx++, 255, 255, 255, heldObject->oOpacity); diff --git a/src/game/object_helpers.c b/src/game/object_helpers.c index 4cce7af30..1a1691c91 100644 --- a/src/game/object_helpers.c +++ b/src/game/object_helpers.c @@ -73,21 +73,17 @@ Gfx *geo_update_layer_transparency(s32 callContext, struct GraphNode *node, UNUS if (objectOpacity == 0xFF) { if (currentGraphNode->parameter == 20) { - currentGraphNode->fnNode.node.flags = - (LAYER_TRANSPARENT_DECAL << 8) | (currentGraphNode->fnNode.node.flags & GRAPH_NODE_TYPES_MASK); + SET_GRAPH_NODE_LAYER(currentGraphNode->fnNode.node.flags, LAYER_TRANSPARENT_DECAL); } else { - currentGraphNode->fnNode.node.flags = - (LAYER_OPAQUE << 8) | (currentGraphNode->fnNode.node.flags & GRAPH_NODE_TYPES_MASK); + SET_GRAPH_NODE_LAYER(currentGraphNode->fnNode.node.flags, LAYER_OPAQUE); } objectGraphNode->oAnimState = 0; } else { if (currentGraphNode->parameter == 20) { - currentGraphNode->fnNode.node.flags = - (LAYER_TRANSPARENT_DECAL << 8) | (currentGraphNode->fnNode.node.flags & GRAPH_NODE_TYPES_MASK); + SET_GRAPH_NODE_LAYER(currentGraphNode->fnNode.node.flags, LAYER_TRANSPARENT_DECAL); } else { - currentGraphNode->fnNode.node.flags = - (LAYER_TRANSPARENT << 8) | (currentGraphNode->fnNode.node.flags & GRAPH_NODE_TYPES_MASK); + SET_GRAPH_NODE_LAYER(currentGraphNode->fnNode.node.flags, LAYER_TRANSPARENT); } objectGraphNode->oAnimState = 1; diff --git a/src/game/paintings.c b/src/game/paintings.c index 641431633..4431c307a 100644 --- a/src/game/paintings.c +++ b/src/game/paintings.c @@ -1138,10 +1138,10 @@ void move_ddd_painting(struct Painting *painting, f32 frontPos, f32 backPos, f32 void set_painting_layer(struct GraphNodeGenerated *gen, struct Painting *painting) { switch (painting->alpha) { case 0xFF: // Opaque - gen->fnNode.node.flags = (gen->fnNode.node.flags & GRAPH_NODE_TYPES_MASK) | (LAYER_OPAQUE << 8); + SET_GRAPH_NODE_LAYER(gen->fnNode.node.flags, LAYER_OPAQUE); break; default: - gen->fnNode.node.flags = (gen->fnNode.node.flags & GRAPH_NODE_TYPES_MASK) | (LAYER_TRANSPARENT << 8); + SET_GRAPH_NODE_LAYER(gen->fnNode.node.flags, LAYER_TRANSPARENT); break; } } diff --git a/src/game/rendering_graph_node.c b/src/game/rendering_graph_node.c index 5e707191b..42f6087bf 100644 --- a/src/game/rendering_graph_node.c +++ b/src/game/rendering_graph_node.c @@ -573,7 +573,7 @@ static void geo_process_translation_rotation(struct GraphNodeTranslationRotation mtxf_to_mtx(mtx, gMatStack[gMatStackIndex]); gMatStackFixed[gMatStackIndex] = mtx; if (node->displayList != NULL) { - geo_append_display_list(node->displayList, node->node.flags >> 8); + geo_append_display_list(node->displayList, GET_GRAPH_NODE_LAYER(node->node.flags)); } if (node->node.children != NULL) { geo_process_node_and_siblings(node->node.children); @@ -598,7 +598,7 @@ static void geo_process_translation(struct GraphNodeTranslation *node) { mtxf_to_mtx(mtx, gMatStack[gMatStackIndex]); gMatStackFixed[gMatStackIndex] = mtx; if (node->displayList != NULL) { - geo_append_display_list(node->displayList, node->node.flags >> 8); + geo_append_display_list(node->displayList, GET_GRAPH_NODE_LAYER(node->node.flags)); } if (node->node.children != NULL) { geo_process_node_and_siblings(node->node.children); @@ -621,7 +621,7 @@ static void geo_process_rotation(struct GraphNodeRotation *node) { mtxf_to_mtx(mtx, gMatStack[gMatStackIndex]); gMatStackFixed[gMatStackIndex] = mtx; if (node->displayList != NULL) { - geo_append_display_list(node->displayList, node->node.flags >> 8); + geo_append_display_list(node->displayList, GET_GRAPH_NODE_LAYER(node->node.flags)); } if (node->node.children != NULL) { geo_process_node_and_siblings(node->node.children); @@ -645,7 +645,7 @@ static void geo_process_scale(struct GraphNodeScale *node) { mtxf_to_mtx(mtx, gMatStack[gMatStackIndex]); gMatStackFixed[gMatStackIndex] = mtx; if (node->displayList != NULL) { - geo_append_display_list(node->displayList, node->node.flags >> 8); + geo_append_display_list(node->displayList, GET_GRAPH_NODE_LAYER(node->node.flags)); } if (node->node.children != NULL) { geo_process_node_and_siblings(node->node.children); @@ -678,7 +678,7 @@ static void geo_process_billboard(struct GraphNodeBillboard *node) { mtxf_to_mtx(mtx, gMatStack[gMatStackIndex]); gMatStackFixed[gMatStackIndex] = mtx; if (node->displayList != NULL) { - geo_append_display_list(node->displayList, node->node.flags >> 8); + geo_append_display_list(node->displayList, GET_GRAPH_NODE_LAYER(node->node.flags)); } if (node->node.children != NULL) { geo_process_node_and_siblings(node->node.children); @@ -693,7 +693,7 @@ static void geo_process_billboard(struct GraphNodeBillboard *node) { */ static void geo_process_display_list(struct GraphNodeDisplayList *node) { if (node->displayList != NULL) { - geo_append_display_list(node->displayList, node->node.flags >> 8); + geo_append_display_list(node->displayList, GET_GRAPH_NODE_LAYER(node->node.flags)); } if (node->node.children != NULL) { geo_process_node_and_siblings(node->node.children); @@ -710,7 +710,7 @@ static void geo_process_generated_list(struct GraphNodeGenerated *node) { (struct AllocOnlyPool *) gMatStack[gMatStackIndex]); if (list != NULL) { - geo_append_display_list((void *) VIRTUAL_TO_PHYSICAL(list), node->fnNode.node.flags >> 8); + geo_append_display_list((void *) VIRTUAL_TO_PHYSICAL(list), GET_GRAPH_NODE_LAYER(node->fnNode.node.flags)); } } if (node->fnNode.node.children != NULL) { @@ -731,7 +731,7 @@ static void geo_process_background(struct GraphNodeBackground *node) { (struct AllocOnlyPool *) gMatStack[gMatStackIndex]); } if (list != NULL) { - geo_append_display_list((void *) VIRTUAL_TO_PHYSICAL(list), node->fnNode.node.flags >> 8); + geo_append_display_list((void *) VIRTUAL_TO_PHYSICAL(list), GET_GRAPH_NODE_LAYER(node->fnNode.node.flags)); } else if (gCurGraphNodeMasterList != NULL) { #ifndef F3DEX_GBI_2E Gfx *gfxStart = alloc_display_list(sizeof(Gfx) * 7); @@ -812,7 +812,7 @@ static void geo_process_animated_part(struct GraphNodeAnimatedPart *node) { mtxf_to_mtx(matrixPtr, gMatStack[gMatStackIndex]); gMatStackFixed[gMatStackIndex] = matrixPtr; if (node->displayList != NULL) { - geo_append_display_list(node->displayList, node->node.flags >> 8); + geo_append_display_list(node->displayList, GET_GRAPH_NODE_LAYER(node->node.flags)); } if (node->node.children != NULL) { geo_process_node_and_siblings(node->node.children); @@ -876,7 +876,7 @@ static void geo_process_bone(struct GraphNodeBone *node) { mtxf_to_mtx(matrixPtr, gMatStack[gMatStackIndex]); gMatStackFixed[gMatStackIndex] = matrixPtr; if (node->displayList != NULL) { - geo_append_display_list(node->displayList, node->node.flags >> 8); + geo_append_display_list(node->displayList, GET_GRAPH_NODE_LAYER(node->node.flags)); } if (node->node.children != NULL) { geo_process_node_and_siblings(node->node.children); diff --git a/src/game/screen_transition.c b/src/game/screen_transition.c index 9ed66c328..495603035 100644 --- a/src/game/screen_transition.c +++ b/src/game/screen_transition.c @@ -295,7 +295,7 @@ Gfx *geo_cannon_circle_base(s32 callContext, struct GraphNode *node, UNUSED Mat4 if (callContext == GEO_CONTEXT_RENDER && gCurrentArea != NULL && gCurrentArea->camera->mode == CAMERA_MODE_INSIDE_CANNON) { - graphNode->fnNode.node.flags = (graphNode->fnNode.node.flags & GRAPH_NODE_TYPES_MASK) | (LAYER_TRANSPARENT << 8); + SET_GRAPH_NODE_LAYER(graphNode->fnNode.node.flags, LAYER_TRANSPARENT); #ifndef L3DEX2_ALONE dlist = render_cannon_circle_base(); #endif diff --git a/src/menu/intro_geo.c b/src/menu/intro_geo.c index 0ab905774..3058081d7 100644 --- a/src/menu/intro_geo.c +++ b/src/menu/intro_geo.c @@ -53,7 +53,7 @@ Gfx *geo_intro_super_mario_64_logo(s32 state, struct GraphNode *node, UNUSED voi if (state != 1) { sIntroFrameCounter = 0; } else if (state == 1) { - graphNode->flags = (graphNode->flags & GRAPH_NODE_TYPES_MASK) | (LAYER_OPAQUE << 8); + SET_GRAPH_NODE_LAYER(graphNode->flags, LAYER_OPAQUE); scaleMat = alloc_display_list(sizeof(*scaleMat)); dl = alloc_display_list(4 * sizeof(*dl)); dlIter = dl; @@ -109,11 +109,11 @@ Gfx *geo_intro_tm_copyright(s32 state, struct GraphNode *node, UNUSED void *cont gDPSetEnvColor(dlIter++, 255, 255, 255, sTmCopyrightAlpha); switch (sTmCopyrightAlpha) { case 255: // opaque - graphNode->flags = (graphNode->flags & GRAPH_NODE_TYPES_MASK) | (LAYER_OPAQUE << 8); + SET_GRAPH_NODE_LAYER(graphNode->flags, LAYER_OPAQUE); gDPSetRenderMode(dlIter++, G_RM_AA_OPA_SURF, G_RM_AA_OPA_SURF2); break; default: // blend - graphNode->flags = (graphNode->flags & GRAPH_NODE_TYPES_MASK) | (LAYER_TRANSPARENT << 8); + SET_GRAPH_NODE_LAYER(graphNode->flags, LAYER_TRANSPARENT); gDPSetRenderMode(dlIter++, G_RM_AA_XLU_SURF, G_RM_AA_XLU_SURF2); break; } @@ -202,7 +202,7 @@ Gfx *geo_intro_regular_backdrop(s32 state, struct GraphNode *node, UNUSED void * if (state == 1) { // draw dl = alloc_display_list(16 * sizeof(*dl)); dlIter = dl; - graphNode->node.flags = (graphNode->node.flags & GRAPH_NODE_TYPES_MASK) | (LAYER_OPAQUE << 8); + SET_GRAPH_NODE_LAYER(graphNode->node.flags, LAYER_OPAQUE); gSPDisplayList(dlIter++, &dl_proj_mtx_fullscreen); gSPDisplayList(dlIter++, &title_screen_bg_dl_0A000100); for (i = 0; i < 12; ++i) { @@ -258,7 +258,7 @@ Gfx *geo_intro_gameover_backdrop(s32 state, struct GraphNode *node, UNUSED void if (sGameOverTableIndex != 11) { sGameOverFrameCounter++; } - graphNode->flags = (graphNode->flags & GRAPH_NODE_TYPES_MASK) | (LAYER_OPAQUE << 8); + SET_GRAPH_NODE_LAYER(graphNode->flags, LAYER_OPAQUE); // draw all the tiles gSPDisplayList(dlIter++, &dl_proj_mtx_fullscreen); @@ -424,7 +424,7 @@ Gfx *geo_intro_face_easter_egg(s32 state, struct GraphNode *node, UNUSED void *c if (sFaceVisible[0] == 1 || sFaceVisible[17] == 1) { image = intro_sample_frame_buffer(40, 40, 2, 2); if (image != NULL) { - genNode->fnNode.node.flags = (genNode->fnNode.node.flags & GRAPH_NODE_TYPES_MASK) | (LAYER_OPAQUE << 8); + SET_GRAPH_NODE_LAYER(genNode->fnNode.node.flags, LAYER_OPAQUE); dl = intro_draw_face(image, 40, 40); } } @@ -443,7 +443,7 @@ Gfx *geo_intro_rumble_pak_graphic(s32 state, struct GraphNode *node, UNUSED void if (state != 1) { dl = NULL; } else if (state == 1) { - genNode->fnNode.node.flags = (genNode->fnNode.node.flags & GRAPH_NODE_TYPES_MASK) | (LAYER_OPAQUE << 8); + SET_GRAPH_NODE_LAYER(genNode->fnNode.node.flags, LAYER_OPAQUE); introContext = genNode->parameter & 0xFF; if (introContext == 0) { backgroundTileSix = introBackgroundIndexTable[6]; From a5588326c4cfb528a5c0e14e55bbdf0ab58ea542 Mon Sep 17 00:00:00 2001 From: Arceveti <73617174+Arceveti@users.noreply.github.com> Date: Wed, 22 Sep 2021 17:09:31 -0700 Subject: [PATCH 12/26] Name active flags --- include/object_constants.h | 133 +++++++++---------- src/game/behaviors/bouncing_fireball.inc.c | 2 +- src/game/behaviors/breakable_box_small.inc.c | 4 +- src/game/behaviors/spindrift.inc.c | 2 +- src/game/behaviors/tuxie.inc.c | 2 +- src/game/object_collision.c | 2 +- src/game/object_helpers.c | 2 +- src/game/spawn_object.c | 2 +- 8 files changed, 74 insertions(+), 75 deletions(-) diff --git a/include/object_constants.h b/include/object_constants.h index 94cbbb077..a157dd6ff 100644 --- a/include/object_constants.h +++ b/include/object_constants.h @@ -5,27 +5,26 @@ // field-specific and object-specific constants, e.g. actions. /* activeFlags */ -#define ACTIVE_FLAG_DEACTIVATED 0 // 0x0000 -#define ACTIVE_FLAG_ACTIVE (1 << 0) // 0x0001 -#define ACTIVE_FLAG_FAR_AWAY (1 << 1) // 0x0002 -#define ACTIVE_FLAG_UNK2 (1 << 2) // 0x0004 -#define ACTIVE_FLAG_IN_DIFFERENT_ROOM (1 << 3) // 0x0008 -#define ACTIVE_FLAG_UNIMPORTANT (1 << 4) // 0x0010 -#define ACTIVE_FLAG_INITIATED_TIME_STOP (1 << 5) // 0x0020 -#define ACTIVE_FLAG_MOVE_THROUGH_GRATE (1 << 6) // 0x0040 -#define ACTIVE_FLAG_DITHERED_ALPHA (1 << 7) // 0x0080 -#define ACTIVE_FLAG_UNK8 (1 << 8) // 0x0100 -#define ACTIVE_FLAG_UNK9 (1 << 9) // 0x0200 -#define ACTIVE_FLAG_UNK10 (1 << 10) // 0x0400 - +#define ACTIVE_FLAG_DEACTIVATED (0 << 0) // 0x0000 +#define ACTIVE_FLAG_ACTIVE (1 << 0) // 0x0001 +#define ACTIVE_FLAG_FAR_AWAY (1 << 1) // 0x0002 +#define ACTIVE_FLAG_UNUSED (1 << 2) // 0x0004 +#define ACTIVE_FLAG_IN_DIFFERENT_ROOM (1 << 3) // 0x0008 +#define ACTIVE_FLAG_UNIMPORTANT (1 << 4) // 0x0010 +#define ACTIVE_FLAG_INITIATED_TIME_STOP (1 << 5) // 0x0020 +#define ACTIVE_FLAG_MOVE_THROUGH_GRATE (1 << 6) // 0x0040 +#define ACTIVE_FLAG_DITHERED_ALPHA (1 << 7) // 0x0080 +#define ACTIVE_FLAG_ALLOCATED (1 << 8) // 0x0100 +#define ACTIVE_FLAG_DESTRUCTIVE_OBJ_DONT_DESTROY (1 << 9) // 0x0200 +#define ACTIVE_FLAG_IGNORE_ENV_BOXES (1 << 10) // 0x0400 /* respawnInfoType */ -#define RESPAWN_INFO_TYPE_NULL 0 -#define RESPAWN_INFO_TYPE_32 1 -#define RESPAWN_INFO_TYPE_16 2 +#define RESPAWN_INFO_TYPE_NULL 0x00 +#define RESPAWN_INFO_TYPE_32 0x01 +#define RESPAWN_INFO_TYPE_16 0x02 /* respawnInfo */ -#define RESPAWN_INFO_DONT_RESPAWN 0xFF +#define RESPAWN_INFO_DONT_RESPAWN 0xFF /* oFlags */ #define OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE (1 << 0) // 0x00000001 @@ -51,42 +50,42 @@ #define OBJ_FLAG_HITBOX_WAS_SET (1 << 30) // 0x40000000 /* oHeldState */ -#define HELD_FREE 0 -#define HELD_HELD 1 -#define HELD_THROWN 2 -#define HELD_DROPPED 3 +#define HELD_FREE 0x00 +#define HELD_HELD 0x01 +#define HELD_THROWN 0x02 +#define HELD_DROPPED 0x03 /* oDialogState */ -#define DIALOG_STATUS_ENABLE_TIME_STOP 0 -#define DIALOG_STATUS_INTERRUPT 1 -#define DIALOG_STATUS_START_DIALOG 2 -#define DIALOG_STATUS_STOP_DIALOG 3 -#define DIALOG_STATUS_DISABLE_TIME_STOP 4 +#define DIALOG_STATUS_ENABLE_TIME_STOP 0x00 +#define DIALOG_STATUS_INTERRUPT 0x01 +#define DIALOG_STATUS_START_DIALOG 0x02 +#define DIALOG_STATUS_STOP_DIALOG 0x03 +#define DIALOG_STATUS_DISABLE_TIME_STOP 0x04 -#define DIALOG_FLAG_NONE 0 -#define DIALOG_FLAG_TURN_TO_MARIO (1 << 0) // 0x01 // cutscene only -#define DIALOG_FLAG_TEXT_DEFAULT (1 << 1) // 0x02 -#define DIALOG_FLAG_TEXT_RESPONSE (1 << 2) // 0x04 // non-cutscene only -#define DIALOG_FLAG_UNK_CAPSWITCH (1 << 3) // 0x08 // not defined -#define DIALOG_FLAG_TIME_STOP_ENABLED (1 << 4) // 0x10 +#define DIALOG_FLAG_NONE (0 << 0) // 0x00 +#define DIALOG_FLAG_TURN_TO_MARIO (1 << 0) // 0x01 // cutscene only +#define DIALOG_FLAG_TEXT_DEFAULT (1 << 1) // 0x02 +#define DIALOG_FLAG_TEXT_RESPONSE (1 << 2) // 0x04 // non-cutscene only +#define DIALOG_FLAG_UNK_CAPSWITCH (1 << 3) // 0x08 // not defined +#define DIALOG_FLAG_TIME_STOP_ENABLED (1 << 4) // 0x10 /* oMoveFlags */ -#define OBJ_MOVE_LANDED (1 << 0) // 0x0001 -#define OBJ_MOVE_ON_GROUND (1 << 1) // 0x0002 // mutually exclusive to OBJ_MOVE_LANDED -#define OBJ_MOVE_LEFT_GROUND (1 << 2) // 0x0004 -#define OBJ_MOVE_ENTERED_WATER (1 << 3) // 0x0008 -#define OBJ_MOVE_AT_WATER_SURFACE (1 << 4) // 0x0010 -#define OBJ_MOVE_UNDERWATER_OFF_GROUND (1 << 5) // 0x0020 -#define OBJ_MOVE_UNDERWATER_ON_GROUND (1 << 6) // 0x0040 -#define OBJ_MOVE_IN_AIR (1 << 7) // 0x0080 -#define OBJ_MOVE_OUT_SCOPE (1 << 8) // 0x0100 -#define OBJ_MOVE_HIT_WALL (1 << 9) // 0x0200 -#define OBJ_MOVE_HIT_EDGE (1 << 10) // 0x0400 -#define OBJ_MOVE_ABOVE_LAVA (1 << 11) // 0x0800 -#define OBJ_MOVE_LEAVING_WATER (1 << 12) // 0x1000 -#define OBJ_MOVE_BOUNCE (1 << 13) // 0x2000 +#define OBJ_MOVE_LANDED (1 << 0) // 0x0001 +#define OBJ_MOVE_ON_GROUND (1 << 1) // 0x0002 // mutually exclusive to OBJ_MOVE_LANDED +#define OBJ_MOVE_LEFT_GROUND (1 << 2) // 0x0004 +#define OBJ_MOVE_ENTERED_WATER (1 << 3) // 0x0008 +#define OBJ_MOVE_AT_WATER_SURFACE (1 << 4) // 0x0010 +#define OBJ_MOVE_UNDERWATER_OFF_GROUND (1 << 5) // 0x0020 +#define OBJ_MOVE_UNDERWATER_ON_GROUND (1 << 6) // 0x0040 +#define OBJ_MOVE_IN_AIR (1 << 7) // 0x0080 +#define OBJ_MOVE_OUT_SCOPE (1 << 8) // 0x0100 +#define OBJ_MOVE_HIT_WALL (1 << 9) // 0x0200 +#define OBJ_MOVE_HIT_EDGE (1 << 10) // 0x0400 +#define OBJ_MOVE_ABOVE_LAVA (1 << 11) // 0x0800 +#define OBJ_MOVE_LEAVING_WATER (1 << 12) // 0x1000 +#define OBJ_MOVE_BOUNCE (1 << 13) // 0x2000 #ifndef VERSION_JP -#define OBJ_MOVE_ABOVE_DEATH_BARRIER (1 << 14) // 0x4000 +#define OBJ_MOVE_ABOVE_DEATH_BARRIER (1 << 14) // 0x4000 #endif #define OBJ_MOVE_MASK_ON_GROUND (OBJ_MOVE_LANDED | OBJ_MOVE_ON_GROUND) @@ -97,26 +96,26 @@ OBJ_MOVE_UNDERWATER_ON_GROUND) /* oActiveParticleFlags */ -#define ACTIVE_PARTICLE_DUST (1 << 0) // 0x00000001 -#define ACTIVE_PARTICLE_UNUSED_1 (1 << 1) // 0x00000002 -#define ACTIVE_PARTICLE_UNUSED_2 (1 << 2) // 0x00000004 -#define ACTIVE_PARTICLE_SPARKLES (1 << 3) // 0x00000008 -#define ACTIVE_PARTICLE_H_STAR (1 << 4) // 0x00000010 -#define ACTIVE_PARTICLE_BUBBLE (1 << 5) // 0x00000020 -#define ACTIVE_PARTICLE_WATER_SPLASH (1 << 6) // 0x00000040 -#define ACTIVE_PARTICLE_IDLE_WATER_WAVE (1 << 7) // 0x00000080 -#define ACTIVE_PARTICLE_SHALLOW_WATER_WAVE (1 << 8) // 0x00000100 -#define ACTIVE_PARTICLE_PLUNGE_BUBBLE (1 << 9) // 0x00000200 -#define ACTIVE_PARTICLE_WAVE_TRAIL (1 << 10) // 0x00000400 -#define ACTIVE_PARTICLE_FIRE (1 << 11) // 0x00000800 -#define ACTIVE_PARTICLE_SHALLOW_WATER_SPLASH (1 << 12) // 0x00001000 -#define ACTIVE_PARTICLE_LEAF (1 << 13) // 0x00002000 -#define ACTIVE_PARTICLE_DIRT (1 << 14) // 0x00004000 -#define ACTIVE_PARTICLE_MIST_CIRCLE (1 << 15) // 0x00008000 -#define ACTIVE_PARTICLE_SNOW (1 << 16) // 0x00010000 -#define ACTIVE_PARTICLE_BREATH (1 << 17) // 0x00020000 -#define ACTIVE_PARTICLE_V_STAR (1 << 18) // 0x00040000 -#define ACTIVE_PARTICLE_TRIANGLE (1 << 19) // 0x00080000 +#define ACTIVE_PARTICLE_DUST (1 << 0) // 0x00000001 +#define ACTIVE_PARTICLE_UNUSED_1 (1 << 1) // 0x00000002 +#define ACTIVE_PARTICLE_UNUSED_2 (1 << 2) // 0x00000004 +#define ACTIVE_PARTICLE_SPARKLES (1 << 3) // 0x00000008 +#define ACTIVE_PARTICLE_H_STAR (1 << 4) // 0x00000010 +#define ACTIVE_PARTICLE_BUBBLE (1 << 5) // 0x00000020 +#define ACTIVE_PARTICLE_WATER_SPLASH (1 << 6) // 0x00000040 +#define ACTIVE_PARTICLE_IDLE_WATER_WAVE (1 << 7) // 0x00000080 +#define ACTIVE_PARTICLE_SHALLOW_WATER_WAVE (1 << 8) // 0x00000100 +#define ACTIVE_PARTICLE_PLUNGE_BUBBLE (1 << 9) // 0x00000200 +#define ACTIVE_PARTICLE_WAVE_TRAIL (1 << 10) // 0x00000400 +#define ACTIVE_PARTICLE_FIRE (1 << 11) // 0x00000800 +#define ACTIVE_PARTICLE_SHALLOW_WATER_SPLASH (1 << 12) // 0x00001000 +#define ACTIVE_PARTICLE_LEAF (1 << 13) // 0x00002000 +#define ACTIVE_PARTICLE_DIRT (1 << 14) // 0x00004000 +#define ACTIVE_PARTICLE_MIST_CIRCLE (1 << 15) // 0x00008000 +#define ACTIVE_PARTICLE_SNOW (1 << 16) // 0x00010000 +#define ACTIVE_PARTICLE_BREATH (1 << 17) // 0x00020000 +#define ACTIVE_PARTICLE_V_STAR (1 << 18) // 0x00040000 +#define ACTIVE_PARTICLE_TRIANGLE (1 << 19) // 0x00080000 /* oAction */ #define OBJ_ACT_LAVA_DEATH 100 diff --git a/src/game/behaviors/bouncing_fireball.inc.c b/src/game/behaviors/bouncing_fireball.inc.c index 560c04065..59ded5c92 100644 --- a/src/game/behaviors/bouncing_fireball.inc.c +++ b/src/game/behaviors/bouncing_fireball.inc.c @@ -1,7 +1,7 @@ // bouncing_fireball.c.inc void bhv_bouncing_fireball_flame_loop(void) { - o->activeFlags |= ACTIVE_FLAG_UNK10; + o->activeFlags |= ACTIVE_FLAG_IGNORE_ENV_BOXES; cur_obj_update_floor_and_walls(); switch (o->oAction) { case 0: diff --git a/src/game/behaviors/breakable_box_small.inc.c b/src/game/behaviors/breakable_box_small.inc.c index 5c88f86d7..1b30d2a63 100644 --- a/src/game/behaviors/breakable_box_small.inc.c +++ b/src/game/behaviors/breakable_box_small.inc.c @@ -19,7 +19,7 @@ void bhv_breakable_box_small_init(void) { cur_obj_scale(0.4f); obj_set_hitbox(o, &sBreakableBoxSmallHitbox); o->oAnimState = 1; - o->activeFlags |= ACTIVE_FLAG_UNK9; + o->activeFlags |= ACTIVE_FLAG_DESTRUCTIVE_OBJ_DONT_DESTROY; } void small_breakable_box_spawn_dust(void) { @@ -111,7 +111,7 @@ void breakable_box_small_get_thrown(void) { o->oVelY = 20.0f; o->oBreakableBoxSmallReleased = 1; o->oBreakableBoxSmallFramesSinceReleased = 0; - o->activeFlags &= ~ACTIVE_FLAG_UNK9; + o->activeFlags &= ~ACTIVE_FLAG_DESTRUCTIVE_OBJ_DONT_DESTROY; } void bhv_breakable_box_small_loop(void) { diff --git a/src/game/behaviors/spindrift.inc.c b/src/game/behaviors/spindrift.inc.c index 4e904486f..b1bad6d68 100644 --- a/src/game/behaviors/spindrift.inc.c +++ b/src/game/behaviors/spindrift.inc.c @@ -13,7 +13,7 @@ struct ObjectHitbox sSpindriftHitbox = { }; void bhv_spindrift_loop(void) { - o->activeFlags |= ACTIVE_FLAG_UNK10; + o->activeFlags |= ACTIVE_FLAG_IGNORE_ENV_BOXES; if (cur_obj_set_hitbox_and_die_if_attacked(&sSpindriftHitbox, SOUND_OBJ_DYING_ENEMY1, 0)) cur_obj_change_action(1); cur_obj_update_floor_and_walls(); diff --git a/src/game/behaviors/tuxie.inc.c b/src/game/behaviors/tuxie.inc.c index 30515a9a7..a2c531930 100644 --- a/src/game/behaviors/tuxie.inc.c +++ b/src/game/behaviors/tuxie.inc.c @@ -133,7 +133,7 @@ void (*sTuxiesMotherActions[])(void) = { tuxies_mother_act_0, tuxies_mother_act_ tuxies_mother_act_2 }; void bhv_tuxies_mother_loop(void) { - o->activeFlags |= ACTIVE_FLAG_UNK10; + o->activeFlags |= ACTIVE_FLAG_IGNORE_ENV_BOXES; cur_obj_update_floor_and_walls(); cur_obj_call_action_function(sTuxiesMotherActions); cur_obj_move_standard(-78); diff --git a/src/game/object_collision.c b/src/game/object_collision.c index c04211e82..03be06110 100644 --- a/src/game/object_collision.c +++ b/src/game/object_collision.c @@ -151,7 +151,7 @@ void check_destructive_object_collision(void) { struct Object *nextObj = (struct Object *) destructiveObj->header.next; while (nextObj != destructiveObj) { - if (nextObj->oDistanceToMario < 2000.0f && !(nextObj->activeFlags & ACTIVE_FLAG_UNK9)) { + if (nextObj->oDistanceToMario < 2000.0f && !(nextObj->activeFlags & ACTIVE_FLAG_DESTRUCTIVE_OBJ_DONT_DESTROY)) { check_collision_in_list(nextObj, (struct Object *) nextObj->header.next, destructiveObj); check_collision_in_list(nextObj, (struct Object *) gObjectLists[OBJ_LIST_GENACTOR].next, (struct Object *) &gObjectLists[OBJ_LIST_GENACTOR]); diff --git a/src/game/object_helpers.c b/src/game/object_helpers.c index 1a1691c91..bea4b015b 100644 --- a/src/game/object_helpers.c +++ b/src/game/object_helpers.c @@ -1297,7 +1297,7 @@ static f32 cur_obj_move_y_and_get_water_level(f32 gravity, f32 buoyancy) { } o->oPosY += o->oVelY; - if (o->activeFlags & ACTIVE_FLAG_UNK10) { + if (o->activeFlags & ACTIVE_FLAG_IGNORE_ENV_BOXES) { waterLevel = FLOOR_LOWER_LIMIT; } else { waterLevel = find_water_level(o->oPosX, o->oPosZ); diff --git a/src/game/spawn_object.c b/src/game/spawn_object.c index a2dc06495..6c2f51469 100644 --- a/src/game/spawn_object.c +++ b/src/game/spawn_object.c @@ -237,7 +237,7 @@ struct Object *allocate_object(struct ObjectNode *objList) { // Initialize object fields - obj->activeFlags = ACTIVE_FLAG_ACTIVE | ACTIVE_FLAG_UNK8; + obj->activeFlags = ACTIVE_FLAG_ACTIVE | ACTIVE_FLAG_ALLOCATED; obj->parentObj = obj; obj->prevObj = NULL; obj->collidedObjInteractTypes = 0; From e1c0832a9d00fbabbf270277c28d9b03b51ff5a0 Mon Sep 17 00:00:00 2001 From: Arceveti <73617174+Arceveti@users.noreply.github.com> Date: Wed, 22 Sep 2021 17:16:49 -0700 Subject: [PATCH 13/26] Paintings occlude silhouette --- src/game/paintings.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/game/paintings.c b/src/game/paintings.c index 4431c307a..f5d6b8fae 100644 --- a/src/game/paintings.c +++ b/src/game/paintings.c @@ -1138,7 +1138,7 @@ void move_ddd_painting(struct Painting *painting, f32 frontPos, f32 backPos, f32 void set_painting_layer(struct GraphNodeGenerated *gen, struct Painting *painting) { switch (painting->alpha) { case 0xFF: // Opaque - SET_GRAPH_NODE_LAYER(gen->fnNode.node.flags, LAYER_OPAQUE); + SET_GRAPH_NODE_LAYER(gen->fnNode.node.flags, LAYER_OCCLUDE_SILHOUETTE_OPAQUE); break; default: SET_GRAPH_NODE_LAYER(gen->fnNode.node.flags, LAYER_TRANSPARENT); From d70c34f1d096a4235d99f3b4f959df6cde087843 Mon Sep 17 00:00:00 2001 From: Arceveti <73617174+Arceveti@users.noreply.github.com> Date: Wed, 22 Sep 2021 17:34:25 -0700 Subject: [PATCH 14/26] Fix some math_util functions returning the address of local variables --- src/engine/math_util.c | 167 ++++++++++++++++------------------------- src/engine/math_util.h | 28 +++---- 2 files changed, 77 insertions(+), 118 deletions(-) diff --git a/src/engine/math_util.c b/src/engine/math_util.c index 25db470fe..44db85b6b 100644 --- a/src/engine/math_util.c +++ b/src/engine/math_util.c @@ -20,108 +20,85 @@ Vec4s *gSplineKeyframe; float gSplineKeyframeFraction; int gSplineState; -// These functions have bogus return values. -// Disable the compiler warning. -#pragma GCC diagnostic push - -#ifdef __GNUC__ -#if defined(__clang__) - #pragma GCC diagnostic ignored "-Wreturn-stack-address" -#else - #pragma GCC diagnostic ignored "-Wreturn-local-addr" -#endif -#endif - /// Copy vector 'src' to 'dest' -void *vec3f_copy(Vec3f dest, Vec3f src) { +void vec3f_copy(Vec3f dest, Vec3f src) { dest[0] = src[0]; dest[1] = src[1]; dest[2] = src[2]; - return &dest; //! warning: function returns address of local variable } /// Set vector 'dest' to (x, y, z) -void *vec3f_set(Vec3f dest, f32 x, f32 y, f32 z) { +void vec3f_set(Vec3f dest, f32 x, f32 y, f32 z) { dest[0] = x; dest[1] = y; dest[2] = z; - return &dest; //! warning: function returns address of local variable } /// Add vector 'a' to 'dest' -void *vec3f_add(Vec3f dest, Vec3f a) { +void vec3f_add(Vec3f dest, Vec3f a) { dest[0] += a[0]; dest[1] += a[1]; dest[2] += a[2]; - return &dest; //! warning: function returns address of local variable } /// Make 'dest' the sum of vectors a and b. -void *vec3f_sum(Vec3f dest, Vec3f a, Vec3f b) { +void vec3f_sum(Vec3f dest, Vec3f a, Vec3f b) { dest[0] = a[0] + b[0]; dest[1] = a[1] + b[1]; dest[2] = a[2] + b[2]; - return &dest; //! warning: function returns address of local variable } /// Copy vector src to dest -void *vec3s_copy(Vec3s dest, Vec3s src) { +void vec3s_copy(Vec3s dest, Vec3s src) { dest[0] = src[0]; dest[1] = src[1]; dest[2] = src[2]; - return &dest; //! warning: function returns address of local variable } /// Set vector 'dest' to (x, y, z) -void *vec3s_set(Vec3s dest, s16 x, s16 y, s16 z) { +void vec3s_set(Vec3s dest, s16 x, s16 y, s16 z) { dest[0] = x; dest[1] = y; dest[2] = z; - return &dest; //! warning: function returns address of local variable } /// Add vector a to 'dest' -void *vec3s_add(Vec3s dest, Vec3s a) { +void vec3s_add(Vec3s dest, Vec3s a) { dest[0] += a[0]; dest[1] += a[1]; dest[2] += a[2]; - return &dest; //! warning: function returns address of local variable } /// Make 'dest' the sum of vectors a and b. -void *vec3s_sum(Vec3s dest, Vec3s a, Vec3s b) { +void vec3s_sum(Vec3s dest, Vec3s a, Vec3s b) { dest[0] = a[0] + b[0]; dest[1] = a[1] + b[1]; dest[2] = a[2] + b[2]; - return &dest; //! warning: function returns address of local variable } /// Subtract vector a from 'dest' -void *vec3s_sub(Vec3s dest, Vec3s a) { +void vec3s_sub(Vec3s dest, Vec3s a) { dest[0] -= a[0]; dest[1] -= a[1]; dest[2] -= a[2]; - return &dest; //! warning: function returns address of local variable } /// Convert short vector a to float vector 'dest' -void *vec3s_to_vec3f(Vec3f dest, Vec3s a) { +void vec3s_to_vec3f(Vec3f dest, Vec3s a) { dest[0] = a[0]; dest[1] = a[1]; dest[2] = a[2]; - return &dest; //! warning: function returns address of local variable } /** * Convert float vector a to a short vector 'dest' by rounding the components * to the nearest integer. */ -void *vec3f_to_vec3s(Vec3s dest, Vec3f a) { +void vec3f_to_vec3s(Vec3s dest, Vec3f a) { // add/subtract 0.5 in order to round to the nearest s32 instead of truncating dest[0] = a[0] + ((a[0] > 0) ? 0.5f : -0.5f); dest[1] = a[1] + ((a[1] > 0) ? 0.5f : -0.5f); dest[2] = a[2] + ((a[2] > 0) ? 0.5f : -0.5f); - return &dest; //! warning: function returns address of local variable } /** @@ -129,34 +106,29 @@ void *vec3f_to_vec3s(Vec3s dest, Vec3f a) { * It is similar to vec3f_cross, but it calculates the vectors (c-b) and (b-a) * at the same time. */ -void *find_vector_perpendicular_to_plane(Vec3f dest, Vec3f a, Vec3f b, Vec3f c) { +void find_vector_perpendicular_to_plane(Vec3f dest, Vec3f a, Vec3f b, Vec3f c) { dest[0] = (b[1] - a[1]) * (c[2] - b[2]) - (c[1] - b[1]) * (b[2] - a[2]); dest[1] = (b[2] - a[2]) * (c[0] - b[0]) - (c[2] - b[2]) * (b[0] - a[0]); dest[2] = (b[0] - a[0]) * (c[1] - b[1]) - (c[0] - b[0]) * (b[1] - a[1]); - return &dest; //! warning: function returns address of local variable } /// Make vector 'dest' the cross product of vectors a and b. -void *vec3f_cross(Vec3f dest, Vec3f a, Vec3f b) { +void vec3f_cross(Vec3f dest, Vec3f a, Vec3f b) { dest[0] = a[1] * b[2] - b[1] * a[2]; dest[1] = a[2] * b[0] - b[2] * a[0]; dest[2] = a[0] * b[1] - b[0] * a[1]; - return &dest; //! warning: function returns address of local variable } /// Scale vector 'dest' so it has length 1 -void *vec3f_normalize(Vec3f dest) { +void vec3f_normalize(Vec3f dest) { //! Possible division by zero - f32 invsqrt = 1.0f / sqrtf(dest[0] * dest[0] + dest[1] * dest[1] + dest[2] * dest[2]); + f32 invsqrt = 1.0f / sqrtf(sqr(dest[0]) + sqr(dest[1]) + sqr(dest[2])); dest[0] *= invsqrt; dest[1] *= invsqrt; dest[2] *= invsqrt; - return &dest; //! warning: function returns address of local variable } -#pragma GCC diagnostic pop - /// Copy matrix 'src' to 'dest' void mtxf_copy(Mat4 dest, Mat4 src) { register s32 i; @@ -216,7 +188,7 @@ void mtxf_lookat(Mat4 mtx, Vec3f from, Vec3f to, s16 roll) { dx = to[0] - from[0]; dz = to[2] - from[2]; - invLength = -1.0f / MAX(sqrtf(dx * dx + dz * dz), 0.00001f); + invLength = -1.0f / MAX(sqrtf(sqr(dx) + sqr(dz)), 0.00001f); dx *= invLength; dz *= invLength; @@ -228,7 +200,7 @@ void mtxf_lookat(Mat4 mtx, Vec3f from, Vec3f to, s16 roll) { yColZ = to[1] - from[1]; zColZ = to[2] - from[2]; - invLength = -1.0f / MAX(sqrtf(xColZ * xColZ + yColZ * yColZ + zColZ * zColZ), 0.00001f); + invLength = -1.0f / MAX(sqrtf(sqr(xColZ) + sqr(yColZ) + sqr(zColZ)), 0.00001f); xColZ *= invLength; yColZ *= invLength; zColZ *= invLength; @@ -237,7 +209,7 @@ void mtxf_lookat(Mat4 mtx, Vec3f from, Vec3f to, s16 roll) { yColX = zColY * xColZ - xColY * zColZ; zColX = xColY * yColZ - yColY * xColZ; - invLength = 1.0f / MAX(sqrtf(xColX * xColX + yColX * yColX + zColX * zColX), 0.00001f); + invLength = 1.0f / MAX(sqrtf(sqr(xColX) + sqr(yColX) + sqr(zColX)), 0.00001f); xColX *= invLength; yColX *= invLength; @@ -247,7 +219,7 @@ void mtxf_lookat(Mat4 mtx, Vec3f from, Vec3f to, s16 roll) { yColY = zColZ * xColX - xColZ * zColX; zColY = xColZ * yColX - yColZ * xColX; - invLength = 1.0f / MAX(sqrtf(xColY * xColY + yColY * yColY + zColY * zColY), 0.00001f); + invLength = 1.0f / MAX(sqrtf(sqr(xColY) + sqr(yColY) + sqr(zColY)), 0.00001f); xColY *= invLength; yColY *= invLength; zColY *= invLength; @@ -579,17 +551,17 @@ void mtxf_mul_vec3s(Mat4 mtx, Vec3s b) { * and no crashes occur. */ void mtxf_to_mtx(Mtx *dest, Mat4 src) { - Mat4 temp; - register s32 i, j; + Mat4 temp; + register s32 i, j; - for( i = 0; i < 4; i++ ) { - for( j = 0; j < 3; j++ ) { - temp[i][j] = src[i][j] / gWorldScale; - } - temp[i][3] = src[i][3]; - } + for( i = 0; i < 4; i++ ) { + for( j = 0; j < 3; j++ ) { + temp[i][j] = src[i][j] / gWorldScale; + } + temp[i][3] = src[i][3]; + } - guMtxF2L( temp, dest ); + guMtxF2L( temp, dest ); } /** @@ -637,8 +609,8 @@ void vec3f_get_dist_and_angle(Vec3f from, Vec3f to, f32 *dist, s16 *pitch, s16 * register f32 y = to[1] - from[1]; register f32 z = to[2] - from[2]; - *dist = sqrtf(x * x + y * y + z * z); - *pitch = atan2s(sqrtf(x * x + z * z), y); + *dist = sqrtf(sqr(x) + sqr(y) + sqr(z)); + *pitch = atan2s(sqrtf(sqr(x) + sqr(z)), y); *yaw = atan2s(z, x); } @@ -882,37 +854,31 @@ s32 anim_spline_poll(Vec3f result) { } /// Multiply vector 'dest' by a -void *vec3f_mul(Vec3f dest, f32 a) -{ +void vec3f_mul(Vec3f dest, f32 a) { dest[0] *= a; dest[1] *= a; dest[2] *= a; - return dest; //! warning: function returns address of local variable } /// Get length of vector 'a' -f32 vec3f_length(Vec3f a) -{ - return sqrtf(a[0] * a[0] + a[1] * a[1] + a[2] * a[2]); +f32 vec3f_length(Vec3f a) { + return sqrtf(sqr(a[0]) + sqr(a[1]) + sqr(a[2])); } /// Get dot product of vectors 'a' and 'b' -f32 vec3f_dot(Vec3f a, Vec3f b) -{ - return a[0] * b[0] + a[1] * b[1] + a[2] * b[2]; +f32 vec3f_dot(Vec3f a, Vec3f b) { + return a[0] * b[0] + a[1] * b[1] + a[2] * b[2]; } /// Make 'dest' the difference of vectors a and b. -void *vec3f_dif(Vec3f dest, Vec3f a, Vec3f b) { +void vec3f_dif(Vec3f dest, Vec3f a, Vec3f b) { dest[0] = a[0] - b[0]; dest[1] = a[1] - b[1]; dest[2] = a[2] - b[2]; - return dest; //! warning: function returns address of local variable } -//Raycasting -s32 ray_surface_intersect(Vec3f orig, Vec3f dir, f32 dir_length, struct Surface *surface, Vec3f hit_pos, f32 *length) -{ +// Raycasting +s32 ray_surface_intersect(Vec3f orig, Vec3f dir, f32 dir_length, struct Surface *surface, Vec3f hit_pos, f32 *length) { Vec3f v0, v1, v2, e1, e2, h, s, q; f32 a, f, u, v; Vec3f add_dir; @@ -971,8 +937,7 @@ s32 ray_surface_intersect(Vec3f orig, Vec3f dir, f32 dir_length, struct Surface return TRUE; } -void find_surface_on_ray_list(struct SurfaceNode *list, Vec3f orig, Vec3f dir, f32 dir_length, struct Surface **hit_surface, Vec3f hit_pos, f32 *max_length) -{ +void find_surface_on_ray_list(struct SurfaceNode *list, Vec3f orig, Vec3f dir, f32 dir_length, struct Surface **hit_surface, Vec3f hit_pos, f32 *max_length) { s32 hit; f32 length; Vec3f chk_hit_pos; @@ -982,29 +947,23 @@ void find_surface_on_ray_list(struct SurfaceNode *list, Vec3f orig, Vec3f dir, f #endif // Get upper and lower bounds of ray - if (dir[1] >= 0.0f) - { + if (dir[1] >= 0.0f) { top = orig[1] + dir[1] * dir_length; bottom = orig[1]; - } - else - { + } else { top = orig[1]; bottom = orig[1] + dir[1] * dir_length; } // Iterate through every surface of the list - for (; list != NULL; list = list->next) - { + for (; list != NULL; list = list->next) { // Reject surface if out of vertical bounds if (list->surface->lowerY > top || list->surface->upperY < bottom) continue; // Check intersection between the ray and this surface - if ((hit = ray_surface_intersect(orig, dir, dir_length, list->surface, chk_hit_pos, &length)) != 0) - { - if (length <= *max_length) - { + if ((hit = ray_surface_intersect(orig, dir, dir_length, list->surface, chk_hit_pos, &length)) != 0) { + if (length <= *max_length) { *hit_surface = list->surface; vec3f_copy(hit_pos, chk_hit_pos); *max_length = length; @@ -1018,21 +977,21 @@ void find_surface_on_ray_list(struct SurfaceNode *list, Vec3f orig, Vec3f dir, f void find_surface_on_ray_cell(s16 cellX, s16 cellZ, Vec3f orig, Vec3f normalized_dir, f32 dir_length, struct Surface **hit_surface, Vec3f hit_pos, f32 *max_length, s32 flags) { - // Skip if OOB - if (cellX >= 0 && cellX <= (NUM_CELLS - 1) && cellZ >= 0 && cellZ <= (NUM_CELLS - 1)) - { - // Iterate through each surface in this partition - if (normalized_dir[1] > -0.99999f && flags & RAYCAST_FIND_CEIL) - { - find_surface_on_ray_list(gStaticSurfacePartition[cellZ][cellX][SPATIAL_PARTITION_CEILS].next, orig, normalized_dir, dir_length, hit_surface, hit_pos, max_length); - find_surface_on_ray_list(gDynamicSurfacePartition[cellZ][cellX][SPATIAL_PARTITION_CEILS].next, orig, normalized_dir, dir_length, hit_surface, hit_pos, max_length); - } - if (normalized_dir[1] < 0.99999f && flags & RAYCAST_FIND_FLOOR) - { - find_surface_on_ray_list(gStaticSurfacePartition[cellZ][cellX][SPATIAL_PARTITION_FLOORS].next, orig, normalized_dir, dir_length, hit_surface, hit_pos, max_length); - find_surface_on_ray_list(gDynamicSurfacePartition[cellZ][cellX][SPATIAL_PARTITION_FLOORS].next, orig, normalized_dir, dir_length, hit_surface, hit_pos, max_length); - } - if (flags & RAYCAST_FIND_WALL) + // Skip if OOB + if (cellX >= 0 && cellX <= (NUM_CELLS - 1) && cellZ >= 0 && cellZ <= (NUM_CELLS - 1)) + { + // Iterate through each surface in this partition + if (normalized_dir[1] > -0.99999f && flags & RAYCAST_FIND_CEIL) + { + find_surface_on_ray_list(gStaticSurfacePartition[cellZ][cellX][SPATIAL_PARTITION_CEILS].next, orig, normalized_dir, dir_length, hit_surface, hit_pos, max_length); + find_surface_on_ray_list(gDynamicSurfacePartition[cellZ][cellX][SPATIAL_PARTITION_CEILS].next, orig, normalized_dir, dir_length, hit_surface, hit_pos, max_length); + } + if (normalized_dir[1] < 0.99999f && flags & RAYCAST_FIND_FLOOR) + { + find_surface_on_ray_list(gStaticSurfacePartition[cellZ][cellX][SPATIAL_PARTITION_FLOORS].next, orig, normalized_dir, dir_length, hit_surface, hit_pos, max_length); + find_surface_on_ray_list(gDynamicSurfacePartition[cellZ][cellX][SPATIAL_PARTITION_FLOORS].next, orig, normalized_dir, dir_length, hit_surface, hit_pos, max_length); + } + if (flags & RAYCAST_FIND_WALL) { find_surface_on_ray_list(gStaticSurfacePartition[cellZ][cellX][SPATIAL_PARTITION_WALLS].next, orig, normalized_dir, dir_length, hit_surface, hit_pos, max_length); find_surface_on_ray_list(gDynamicSurfacePartition[cellZ][cellX][SPATIAL_PARTITION_WALLS].next, orig, normalized_dir, dir_length, hit_surface, hit_pos, max_length); @@ -1042,7 +1001,7 @@ void find_surface_on_ray_cell(s16 cellX, s16 cellZ, Vec3f orig, Vec3f normalized find_surface_on_ray_list(gStaticSurfacePartition[cellZ][cellX][SPATIAL_PARTITION_WATER].next, orig, normalized_dir, dir_length, hit_surface, hit_pos, max_length); find_surface_on_ray_list(gDynamicSurfacePartition[cellZ][cellX][SPATIAL_PARTITION_WATER].next, orig, normalized_dir, dir_length, hit_surface, hit_pos, max_length); } - } + } } void find_surface_on_ray(Vec3f orig, Vec3f dir, struct Surface **hit_surface, Vec3f hit_pos, s32 flags) @@ -1076,9 +1035,9 @@ void find_surface_on_ray(Vec3f orig, Vec3f dir, struct Surface **hit_surface, Ve // Don't do DDA if straight down if (normalized_dir[1] >= 0.99999f || normalized_dir[1] <= -0.99999f) { - find_surface_on_ray_cell(cellX, cellZ, orig, normalized_dir, dir_length, hit_surface, hit_pos, &max_length, flags); - return; - } + find_surface_on_ray_cell(cellX, cellZ, orig, normalized_dir, dir_length, hit_surface, hit_pos, &max_length, flags); + return; + } // Get cells we cross using DDA if (ABS(dir[0]) >= ABS(dir[2])) diff --git a/src/engine/math_util.h b/src/engine/math_util.h index e16c808eb..60ecc52c9 100644 --- a/src/engine/math_util.h +++ b/src/engine/math_util.h @@ -340,20 +340,20 @@ extern f32 gSineTable[]; #define RAYCAST_FIND_WATER (0x8) #define RAYCAST_FIND_ALL (0xFFFFFFFF) -void *vec3f_copy(Vec3f dest, Vec3f src); -void *vec3f_set(Vec3f dest, f32 x, f32 y, f32 z); -void *vec3f_add(Vec3f dest, Vec3f a); -void *vec3f_sum(Vec3f dest, Vec3f a, Vec3f b); -void *vec3s_copy(Vec3s dest, Vec3s src); -void *vec3s_set(Vec3s dest, s16 x, s16 y, s16 z); -void *vec3s_add(Vec3s dest, Vec3s a); -void *vec3s_sum(Vec3s dest, Vec3s a, Vec3s b); -void *vec3s_sub(Vec3s dest, Vec3s a); -void *vec3s_to_vec3f(Vec3f dest, Vec3s a); -void *vec3f_to_vec3s(Vec3s dest, Vec3f a); -void *find_vector_perpendicular_to_plane(Vec3f dest, Vec3f a, Vec3f b, Vec3f c); -void *vec3f_cross(Vec3f dest, Vec3f a, Vec3f b); -void *vec3f_normalize(Vec3f dest); +void vec3f_copy(Vec3f dest, Vec3f src); +void vec3f_set(Vec3f dest, f32 x, f32 y, f32 z); +void vec3f_add(Vec3f dest, Vec3f a); +void vec3f_sum(Vec3f dest, Vec3f a, Vec3f b); +void vec3s_copy(Vec3s dest, Vec3s src); +void vec3s_set(Vec3s dest, s16 x, s16 y, s16 z); +void vec3s_add(Vec3s dest, Vec3s a); +void vec3s_sum(Vec3s dest, Vec3s a, Vec3s b); +void vec3s_sub(Vec3s dest, Vec3s a); +void vec3s_to_vec3f(Vec3f dest, Vec3s a); +void vec3f_to_vec3s(Vec3s dest, Vec3f a); +void find_vector_perpendicular_to_plane(Vec3f dest, Vec3f a, Vec3f b, Vec3f c); +void vec3f_cross(Vec3f dest, Vec3f a, Vec3f b); +void vec3f_normalize(Vec3f dest); void mtxf_copy(Mat4 dest, Mat4 src); void mtxf_identity(Mat4 mtx); void mtxf_translate(Mat4 dest, Vec3f b); From 3a5d392b921d449c4f377bf2b3c035d37b182b3a Mon Sep 17 00:00:00 2001 From: Arceveti <73617174+Arceveti@users.noreply.github.com> Date: Wed, 22 Sep 2021 17:39:05 -0700 Subject: [PATCH 15/26] Fix some geolayouts with too many open/close nodes --- actors/boo/geo.inc.c | 3 +- actors/boo_castle/geo.inc.c | 3 +- actors/bookend/geo.inc.c | 3 +- actors/bowser_key/geo.inc.c | 3 +- actors/chain_chomp/geo.inc.c | 3 +- actors/chair/geo.inc.c | 3 +- actors/door/geo.inc.c | 33 ++++++++-------------- actors/dorrie/geo.inc.c | 3 +- actors/hoot/geo.inc.c | 3 +- actors/king_bobomb/geo.inc.c | 3 +- actors/mad_piano/geo.inc.c | 3 +- actors/moneybag/geo.inc.c | 3 +- actors/snufit/geo.inc.c | 3 +- levels/castle_grounds/areas/1/11/geo.inc.c | 3 +- levels/ttm/areas/1/14/geo.inc.c | 5 ++-- src/game/mario_actions_airborne.c | 2 +- src/game/obj_behaviors.c | 6 ++-- 17 files changed, 30 insertions(+), 55 deletions(-) diff --git a/actors/boo/geo.inc.c b/actors/boo/geo.inc.c index 4fa9721bc..646b167c6 100644 --- a/actors/boo/geo.inc.c +++ b/actors/boo/geo.inc.c @@ -12,6 +12,5 @@ const GeoLayout boo_geo[] = { GEO_CLOSE_NODE(), GEO_CLOSE_NODE(), GEO_CLOSE_NODE(), -GEO_CLOSE_NODE(), //! more close than open nodes -GEO_END(), + GEO_END(), }; diff --git a/actors/boo_castle/geo.inc.c b/actors/boo_castle/geo.inc.c index 1b3ee4f3a..d6602e10d 100644 --- a/actors/boo_castle/geo.inc.c +++ b/actors/boo_castle/geo.inc.c @@ -12,6 +12,5 @@ const GeoLayout boo_castle_geo[] = { GEO_CLOSE_NODE(), GEO_CLOSE_NODE(), GEO_CLOSE_NODE(), -GEO_CLOSE_NODE(), //! more close than open nodes -GEO_END(), + GEO_END(), }; diff --git a/actors/bookend/geo.inc.c b/actors/bookend/geo.inc.c index b5629c8d5..0d857f149 100644 --- a/actors/bookend/geo.inc.c +++ b/actors/bookend/geo.inc.c @@ -24,6 +24,5 @@ const GeoLayout bookend_part_geo[] = { GEO_CLOSE_NODE(), GEO_CLOSE_NODE(), GEO_CLOSE_NODE(), -GEO_CLOSE_NODE(), //! more close than open nodes -GEO_END(), + GEO_END(), }; diff --git a/actors/bowser_key/geo.inc.c b/actors/bowser_key/geo.inc.c index 75fa63a95..8dc5cc446 100644 --- a/actors/bowser_key/geo.inc.c +++ b/actors/bowser_key/geo.inc.c @@ -26,6 +26,5 @@ const GeoLayout bowser_key_cutscene_geo[] = { GEO_CLOSE_NODE(), GEO_CLOSE_NODE(), GEO_CLOSE_NODE(), -GEO_CLOSE_NODE(), //! more close than open nodes -GEO_END(), + GEO_END(), }; diff --git a/actors/chain_chomp/geo.inc.c b/actors/chain_chomp/geo.inc.c index ad3367733..91a327819 100644 --- a/actors/chain_chomp/geo.inc.c +++ b/actors/chain_chomp/geo.inc.c @@ -17,6 +17,5 @@ const GeoLayout chain_chomp_geo[] = { GEO_CLOSE_NODE(), GEO_CLOSE_NODE(), GEO_CLOSE_NODE(), -GEO_CLOSE_NODE(), //! more close than open nodes -GEO_END(), + GEO_END(), }; diff --git a/actors/chair/geo.inc.c b/actors/chair/geo.inc.c index eb963a7e5..7a836ff6e 100644 --- a/actors/chair/geo.inc.c +++ b/actors/chair/geo.inc.c @@ -24,6 +24,5 @@ const GeoLayout haunted_chair_geo[] = { GEO_CLOSE_NODE(), GEO_CLOSE_NODE(), GEO_CLOSE_NODE(), -GEO_CLOSE_NODE(), //! more close than open nodes -GEO_END(), + GEO_END(), }; diff --git a/actors/door/geo.inc.c b/actors/door/geo.inc.c index 81c017d12..02ca7ac69 100644 --- a/actors/door/geo.inc.c +++ b/actors/door/geo.inc.c @@ -21,8 +21,7 @@ const GeoLayout castle_door_geo[] = { GEO_CLOSE_NODE(), GEO_CLOSE_NODE(), GEO_CLOSE_NODE(), -GEO_CLOSE_NODE(), //! more close than open nodes -GEO_END(), + GEO_END(), }; // 0x1600043C @@ -48,8 +47,7 @@ const GeoLayout cabin_door_geo[] = { GEO_CLOSE_NODE(), GEO_CLOSE_NODE(), GEO_CLOSE_NODE(), -GEO_CLOSE_NODE(), //! more close than open nodes -GEO_END(), + GEO_END(), }; // 0x160004D0 @@ -75,8 +73,7 @@ const GeoLayout wooden_door_geo[] = { GEO_CLOSE_NODE(), GEO_CLOSE_NODE(), GEO_CLOSE_NODE(), -GEO_CLOSE_NODE(), //! more close than open nodes -GEO_END(), + GEO_END(), }; // 0x16000564 @@ -102,8 +99,7 @@ const GeoLayout wooden_door2_geo[] = { GEO_CLOSE_NODE(), GEO_CLOSE_NODE(), GEO_CLOSE_NODE(), -GEO_CLOSE_NODE(), //! more close than open nodes -GEO_END(), + GEO_END(), }; // 0x160005F8 @@ -129,8 +125,7 @@ const GeoLayout metal_door_geo[] = { GEO_CLOSE_NODE(), GEO_CLOSE_NODE(), GEO_CLOSE_NODE(), -GEO_CLOSE_NODE(), //! more close than open nodes -GEO_END(), + GEO_END(), }; // 0x1600068C @@ -156,8 +151,7 @@ const GeoLayout hazy_maze_door_geo[] = { GEO_CLOSE_NODE(), GEO_CLOSE_NODE(), GEO_CLOSE_NODE(), -GEO_CLOSE_NODE(), //! more close than open nodes -GEO_END(), + GEO_END(), }; // 0x16000720 @@ -183,8 +177,7 @@ const GeoLayout haunted_door_geo[] = { GEO_CLOSE_NODE(), GEO_CLOSE_NODE(), GEO_CLOSE_NODE(), -GEO_CLOSE_NODE(), //! more close than open nodes -GEO_END(), + GEO_END(), }; // 0x160007B4 @@ -216,8 +209,7 @@ const GeoLayout castle_door_0_star_geo[] = { GEO_CLOSE_NODE(), GEO_CLOSE_NODE(), GEO_CLOSE_NODE(), -GEO_CLOSE_NODE(), //! more close than open nodes -GEO_END(), + GEO_END(), }; // 0x16000868 @@ -249,8 +241,7 @@ const GeoLayout castle_door_1_star_geo[] = { GEO_CLOSE_NODE(), GEO_CLOSE_NODE(), GEO_CLOSE_NODE(), -GEO_CLOSE_NODE(), //! more close than open nodes -GEO_END(), + GEO_END(), }; // 0x1600091C @@ -282,8 +273,7 @@ const GeoLayout castle_door_3_stars_geo[] = { GEO_CLOSE_NODE(), GEO_CLOSE_NODE(), GEO_CLOSE_NODE(), -GEO_CLOSE_NODE(), //! more close than open nodes -GEO_END(), + GEO_END(), }; // 0x160009D0 @@ -315,6 +305,5 @@ const GeoLayout key_door_geo[] = { GEO_CLOSE_NODE(), GEO_CLOSE_NODE(), GEO_CLOSE_NODE(), -GEO_CLOSE_NODE(), //! more close than open nodes -GEO_END(), + GEO_END(), }; diff --git a/actors/dorrie/geo.inc.c b/actors/dorrie/geo.inc.c index 23fd462c0..f46b17e9b 100644 --- a/actors/dorrie/geo.inc.c +++ b/actors/dorrie/geo.inc.c @@ -49,6 +49,5 @@ const GeoLayout dorrie_geo[] = { GEO_CLOSE_NODE(), GEO_CLOSE_NODE(), GEO_CLOSE_NODE(), -GEO_CLOSE_NODE(), //! more close than open nodes -GEO_END(), + GEO_END(), }; diff --git a/actors/hoot/geo.inc.c b/actors/hoot/geo.inc.c index f66e8cfd3..3e827e3c2 100644 --- a/actors/hoot/geo.inc.c +++ b/actors/hoot/geo.inc.c @@ -57,6 +57,5 @@ const GeoLayout hoot_geo[] = { GEO_CLOSE_NODE(), GEO_CLOSE_NODE(), GEO_CLOSE_NODE(), -GEO_CLOSE_NODE(), //! more close than open nodes -GEO_END(), + GEO_END(), }; diff --git a/actors/king_bobomb/geo.inc.c b/actors/king_bobomb/geo.inc.c index 5b7ced61b..7611eccb4 100644 --- a/actors/king_bobomb/geo.inc.c +++ b/actors/king_bobomb/geo.inc.c @@ -115,6 +115,5 @@ const GeoLayout king_bobomb_geo[] = { GEO_CLOSE_NODE(), GEO_CLOSE_NODE(), GEO_CLOSE_NODE(), -GEO_CLOSE_NODE(), //! more close than open nodes -GEO_END(), + GEO_END(), }; diff --git a/actors/mad_piano/geo.inc.c b/actors/mad_piano/geo.inc.c index 70dea53ed..b0be418c1 100644 --- a/actors/mad_piano/geo.inc.c +++ b/actors/mad_piano/geo.inc.c @@ -16,6 +16,5 @@ const GeoLayout mad_piano_geo[] = { GEO_CLOSE_NODE(), GEO_CLOSE_NODE(), GEO_CLOSE_NODE(), -GEO_CLOSE_NODE(), //! more close than open nodes -GEO_END(), + GEO_END(), }; diff --git a/actors/moneybag/geo.inc.c b/actors/moneybag/geo.inc.c index 2d1db035b..ab741d482 100644 --- a/actors/moneybag/geo.inc.c +++ b/actors/moneybag/geo.inc.c @@ -52,8 +52,7 @@ const GeoLayout moneybag_geo[] = { GEO_CLOSE_NODE(), GEO_CLOSE_NODE(), GEO_CLOSE_NODE(), -GEO_CLOSE_NODE(), //! more close than open nodes -GEO_END(), + GEO_END(), }; UNUSED static const u64 moneybag_unused_1 = 0; diff --git a/actors/snufit/geo.inc.c b/actors/snufit/geo.inc.c index a8aabeccf..4d4717522 100644 --- a/actors/snufit/geo.inc.c +++ b/actors/snufit/geo.inc.c @@ -22,6 +22,5 @@ const GeoLayout snufit_geo[] = { GEO_CLOSE_NODE(), GEO_CLOSE_NODE(), GEO_CLOSE_NODE(), -GEO_CLOSE_NODE(), //! more close than open nodes -GEO_END(), + GEO_END(), }; diff --git a/levels/castle_grounds/areas/1/11/geo.inc.c b/levels/castle_grounds/areas/1/11/geo.inc.c index e5127f1d0..e1b15a097 100644 --- a/levels/castle_grounds/areas/1/11/geo.inc.c +++ b/levels/castle_grounds/areas/1/11/geo.inc.c @@ -22,6 +22,5 @@ const GeoLayout castle_grounds_geo_000660[] = { GEO_CLOSE_NODE(), GEO_CLOSE_NODE(), GEO_CLOSE_NODE(), -GEO_CLOSE_NODE(), //! more close than open nodes -GEO_END(), + GEO_END(), }; diff --git a/levels/ttm/areas/1/14/geo.inc.c b/levels/ttm/areas/1/14/geo.inc.c index 98ee9baae..d0097be8a 100644 --- a/levels/ttm/areas/1/14/geo.inc.c +++ b/levels/ttm/areas/1/14/geo.inc.c @@ -7,6 +7,7 @@ const GeoLayout ttm_geo_000920[] = { GEO_DISPLAY_LIST(LAYER_OPAQUE, ttm_seg7_dl_0700DF78), GEO_OPEN_NODE(), GEO_CLOSE_NODE(), - //! Too many open nodes. Unfortunately not exploitable - GEO_END(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_END(), }; diff --git a/src/game/mario_actions_airborne.c b/src/game/mario_actions_airborne.c index c0c3f727c..e2088511a 100644 --- a/src/game/mario_actions_airborne.c +++ b/src/game/mario_actions_airborne.c @@ -173,7 +173,7 @@ s32 check_horizontal_wind(struct MarioState *m) { if (speed > 48.0f) { m->slideVelX = m->slideVelX * 48.0f / speed; m->slideVelZ = m->slideVelZ * 48.0f / speed; - speed = 32.0f; //! This was meant to be 48? + speed = 48.0f; } else if (speed > 32.0f) { speed = 32.0f; } diff --git a/src/game/obj_behaviors.c b/src/game/obj_behaviors.c index 1580c413b..81e9391e2 100644 --- a/src/game/obj_behaviors.c +++ b/src/game/obj_behaviors.c @@ -181,8 +181,7 @@ s8 turn_obj_away_from_steep_floor(struct Surface *objFloor, f32 floorY, f32 objV f32 floor_nX, floor_nY, floor_nZ, objVelXCopy, objVelZCopy, objYawX, objYawZ; if (objFloor == NULL) { - //! (OOB Object Crash) TRUNC overflow exception after 36 minutes - o->oMoveAngleYaw += 32767.999200000002; /* ¯\_(ツ)_/¯ */ + o->oMoveAngleYaw += 0x8000; return FALSE; } @@ -194,8 +193,7 @@ s8 turn_obj_away_from_steep_floor(struct Surface *objFloor, f32 floorY, f32 objV if (floor_nY < 0.5 && floorY > o->oPosY) { objVelXCopy = objVelX; objVelZCopy = objVelZ; - turn_obj_away_from_surface(objVelXCopy, objVelZCopy, floor_nX, floor_nY, floor_nZ, &objYawX, - &objYawZ); + turn_obj_away_from_surface(objVelXCopy, objVelZCopy, floor_nX, floor_nY, floor_nZ, &objYawX, &objYawZ); o->oMoveAngleYaw = atan2s(objYawZ, objYawX); return FALSE; } From d2c1564eed724c15fcb286c4f54f6ec5bf3f77b1 Mon Sep 17 00:00:00 2001 From: Arceveti <73617174+Arceveti@users.noreply.github.com> Date: Wed, 22 Sep 2021 17:40:55 -0700 Subject: [PATCH 16/26] Make burn smoke texture fix optional --- actors/burn_smoke/model.inc.c | 14 +++++++++++--- include/config.h | 2 ++ 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/actors/burn_smoke/model.inc.c b/actors/burn_smoke/model.inc.c index 8e87689e8..fe4f1c367 100644 --- a/actors/burn_smoke/model.inc.c +++ b/actors/burn_smoke/model.inc.c @@ -8,9 +8,9 @@ static const Vtx burn_smoke_seg4_vertex_040217C0[] = { {{{ -50, 50, 0}, 0, { 0, 0}, {0x14, 0x0a, 0x0a, 0xff}}}, }; -// //! Wrong texture format. Called as rgba16, which makes the burn smoke appear -// as a transparent black burn smoke. Probably meant to show up as white-ish -// burn smoke, but mistakened for being intended as black smoke. +// Wrong texture format. Called as rgba16, which makes the burn smoke appear +// as a transparent black burn smoke. Probably meant to show up as white-ish +// burn smoke, but mistakened for being intended as black smoke. // 0x04021800 ALIGNED8 static const Texture burn_smoke_seg4_texture_04021800[] = { #include "actors/burn_smoke/burn_smoke.ia16.inc.c" @@ -19,7 +19,11 @@ ALIGNED8 static const Texture burn_smoke_seg4_texture_04021800[] = { // 0x04022000 - 0x04022028 const Gfx burn_smoke_seg4_dl_04022000[] = { gsDPPipeSync(), +#ifdef BURN_SMOKE_FIX gsDPSetCombineMode(G_CC_MODULATEIA, G_CC_MODULATEIA), +#else + gsDPSetCombineMode(G_CC_MODULATERGBA, G_CC_MODULATERGBA), +#endif gsSPClearGeometryMode(G_LIGHTING | G_CULL_BACK), gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON), gsSPEndDisplayList(), @@ -44,7 +48,11 @@ const Gfx burn_smoke_seg4_dl_04022048[] = { // 0x04022070 - 0x040220C8 const Gfx burn_smoke_seg4_dl_04022070[] = { gsSPDisplayList(burn_smoke_seg4_dl_04022000), +#ifdef BURN_SMOKE_FIX gsDPLoadTextureBlock(burn_smoke_seg4_texture_04021800, G_IM_FMT_IA, G_IM_SIZ_16b, 32, 32, 0, G_TX_CLAMP, G_TX_CLAMP, 5, 5, G_TX_NOLOD, G_TX_NOLOD), +#else + gsDPLoadTextureBlock(burn_smoke_seg4_texture_04021800, G_IM_FMT_RGBA, G_IM_SIZ_16b, 32, 32, 0, G_TX_CLAMP, G_TX_CLAMP, 5, 5, G_TX_NOLOD, G_TX_NOLOD), +#endif gsSPDisplayList(burn_smoke_seg4_dl_04022028), gsSPDisplayList(burn_smoke_seg4_dl_04022048), gsSPEndDisplayList(), diff --git a/include/config.h b/include/config.h index 0809f6254..c7c464ebf 100644 --- a/include/config.h +++ b/include/config.h @@ -108,6 +108,8 @@ //#define PUPPYCAM // Allows Mario's shadow to be transparent on top of transparent surfaces, such as water, lava, and ice #define FIX_SHADOW_TRANSPARENCY +// Fixes the game reading the ia8 burn smoke texture as an rgba16 +#define BURN_SMOKE_FIX // Automatically calculate the optimal collision distance for an object based on its vertices. #define AUTO_COLLISION_DISTANCE From 5beba37d0e5927104505c8e41de0005b8f285664 Mon Sep 17 00:00:00 2001 From: Arceveti <73617174+Arceveti@users.noreply.github.com> Date: Wed, 22 Sep 2021 17:51:59 -0700 Subject: [PATCH 17/26] More model fixes --- actors/amp/model.inc.c | 349 --------------------------------------- actors/bully/model.inc.c | 21 --- actors/group2.h | 1 - actors/hoot/model.inc.c | 80 +-------- actors/koopa/model.inc.c | 16 +- actors/star/model.inc.c | 2 +- data/behavior_data.c | 1 - include/config.h | 2 + include/model_ids.h | 3 - levels/vcutm/script.c | 9 +- 10 files changed, 24 insertions(+), 460 deletions(-) diff --git a/actors/amp/model.inc.c b/actors/amp/model.inc.c index 67185c8f2..ddc70dc32 100644 --- a/actors/amp/model.inc.c +++ b/actors/amp/model.inc.c @@ -148,352 +148,3 @@ const Gfx dAmpBodyDl[] = { gsSPSetGeometryMode(G_LIGHTING), gsSPEndDisplayList(), }; - -/** - * Everything beyond this point is unused, and seems to be an attempt at a 3D modelled - * amp. The model and attempt are overall slightly buggy, with misread lights and a slightly - * broken model. - */ - -UNUSED static const Lights1 dAmpUnused3DLights = gdSPDefLights1( - 0x33, 0x3f, 0x00, - 0xcf, 0xff, 0x00, 0x28, 0x28, 0x28 -); - -UNUSED static const Vtx dAmpUnused3DVtx01[] = { - {{{ 280, 0, 35}, 0, { 0, 0}, {0x7b, 0xe2, 0x00, 0x00}}}, - {{{ 240, -160, 0}, 0, { 0, 0}, {0x7b, 0xe2, 0x00, 0x00}}}, - {{{ 280, 0, -35}, 0, { 0, 0}, {0x7b, 0xe2, 0x00, 0x00}}}, - {{{ 280, 0, -35}, 0, { 0, 0}, {0x7b, 0x1e, 0x00, 0xff}}}, - {{{ 240, 160, 0}, 0, { 0, 0}, {0x7b, 0x1e, 0x00, 0xff}}}, - {{{ 280, 0, 35}, 0, { 0, 0}, {0x7b, 0x1e, 0x00, 0xff}}}, -}; - -UNUSED static const Vtx dAmpUnused3DVtx02[] = { - {{{ 280, 0, 35}, 0, { 0, 0}, {0x7b, 0xe2, 0x00, 0x00}}}, - {{{ 240, -160, 0}, 0, { 0, 0}, {0x7b, 0xe2, 0x00, 0x00}}}, - {{{ 280, 0, -35}, 0, { 0, 0}, {0x7b, 0xe2, 0x00, 0x00}}}, - {{{ 280, 0, -35}, 0, { 0, 0}, {0x7b, 0x1e, 0x00, 0xff}}}, - {{{ 240, 160, 0}, 0, { 0, 0}, {0x7b, 0x1e, 0x00, 0xff}}}, - {{{ 280, 0, 35}, 0, { 0, 0}, {0x7b, 0x1e, 0x00, 0xff}}}, -}; - -UNUSED static const Vtx dAmpUnused3DVtx03[] = { - {{{ 280, 0, 35}, 0, { 0, 0}, {0x7b, 0xe2, 0x00, 0x00}}}, - {{{ 240, -160, 0}, 0, { 0, 0}, {0x7b, 0xe2, 0x00, 0x00}}}, - {{{ 280, 0, -35}, 0, { 0, 0}, {0x7b, 0xe2, 0x00, 0x00}}}, - {{{ 280, 0, -35}, 0, { 0, 0}, {0x7b, 0x1e, 0x00, 0xff}}}, - {{{ 240, 160, 0}, 0, { 0, 0}, {0x7b, 0x1e, 0x00, 0xff}}}, - {{{ 280, 0, 35}, 0, { 0, 0}, {0x7b, 0x1e, 0x00, 0xff}}}, -}; - -UNUSED static const Vtx dAmpUnused3DVtx04[] = { - {{{ 280, 0, -35}, 0, { 0, 0}, {0x7b, 0x1e, 0x00, 0x00}}}, - {{{ 240, 160, 0}, 0, { 0, 0}, {0x7b, 0x1e, 0x00, 0x00}}}, - {{{ 280, 0, 35}, 0, { 0, 0}, {0x7b, 0x1e, 0x00, 0x00}}}, - {{{ 280, 0, 35}, 0, { 0, 0}, {0x7b, 0xe2, 0x00, 0xff}}}, - {{{ 240, -160, 0}, 0, { 0, 0}, {0x7b, 0xe2, 0x00, 0xff}}}, - {{{ 280, 0, -35}, 0, { 0, 0}, {0x7b, 0xe2, 0x00, 0xff}}}, -}; - -UNUSED static const Vtx dAmpUnused3DVtx05[] = { - {{{ -184, -54, -54}, 0, { 0, 0}, {0x8b, 0xde, 0xde, 0x00}}}, - {{{ -184, -76, 0}, 0, { 0, 0}, {0x8b, 0xd0, 0x00, 0x00}}}, - {{{ -200, 0, 0}, 0, { 0, 0}, {0x81, 0x00, 0x00, 0x00}}}, - {{{ -141, -100, -100}, 0, { 0, 0}, {0xa6, 0xc1, 0xc1, 0xff}}}, - {{{ -141, -141, 0}, 0, { 0, 0}, {0xa6, 0xa7, 0x00, 0xff}}}, - {{{ -76, -130, -130}, 0, { 0, 0}, {0xd0, 0xae, 0xae, 0xff}}}, - {{{ -76, -184, 0}, 0, { 0, 0}, {0xd0, 0x8b, 0x00, 0xff}}}, - {{{ 0, -141, -141}, 0, { 0, 0}, {0x00, 0xa7, 0xa7, 0xff}}}, - {{{ 0, -200, 0}, 0, { 0, 0}, {0x00, 0x81, 0x00, 0xff}}}, - {{{ 76, -130, -130}, 0, { 0, 0}, {0x30, 0xae, 0xae, 0xff}}}, - {{{ 76, -184, 0}, 0, { 0, 0}, {0x30, 0x8b, 0x00, 0xff}}}, - {{{ 141, -100, -100}, 0, { 0, 0}, {0x5a, 0xc1, 0xc1, 0xff}}}, - {{{ 141, -141, 0}, 0, { 0, 0}, {0x5a, 0xa7, 0x00, 0xff}}}, - {{{ 184, -54, -54}, 0, { 0, 0}, {0x75, 0xde, 0xde, 0xff}}}, - {{{ 184, -76, 0}, 0, { 0, 0}, {0x75, 0xd0, 0x00, 0xff}}}, - {{{ 200, 0, 0}, 0, { 0, 0}, {0x7f, 0x00, 0x00, 0xff}}}, -}; - -UNUSED static const Vtx dAmpUnused3DVtx06[] = { - {{{ -184, 0, -76}, 0, { 0, 0}, {0x8b, 0x00, 0xd0, 0xff}}}, - {{{ -184, -54, -54}, 0, { 0, 0}, {0x8b, 0xde, 0xde, 0x00}}}, - {{{ -200, 0, 0}, 0, { 0, 0}, {0x81, 0x00, 0x00, 0x00}}}, - {{{ -141, 0, -141}, 0, { 0, 0}, {0xa6, 0x00, 0xa7, 0xff}}}, - {{{ -141, -100, -100}, 0, { 0, 0}, {0xa6, 0xc1, 0xc1, 0xff}}}, - {{{ -76, 0, -184}, 0, { 0, 0}, {0xd0, 0x00, 0x8b, 0xff}}}, - {{{ -76, -130, -130}, 0, { 0, 0}, {0xd0, 0xae, 0xae, 0xff}}}, - {{{ 0, 0, -200}, 0, { 0, 0}, {0x00, 0x00, 0x81, 0xff}}}, - {{{ 0, -141, -141}, 0, { 0, 0}, {0x00, 0xa7, 0xa7, 0xff}}}, - {{{ 76, 0, -184}, 0, { 0, 0}, {0x30, 0x00, 0x8b, 0xff}}}, - {{{ 76, -130, -130}, 0, { 0, 0}, {0x30, 0xae, 0xae, 0xff}}}, - {{{ 141, 0, -141}, 0, { 0, 0}, {0x5a, 0x00, 0xa7, 0xff}}}, - {{{ 141, -100, -100}, 0, { 0, 0}, {0x5a, 0xc1, 0xc1, 0xff}}}, - {{{ 184, 0, -76}, 0, { 0, 0}, {0x75, 0x00, 0xd0, 0xff}}}, - {{{ 184, -54, -54}, 0, { 0, 0}, {0x75, 0xde, 0xde, 0xff}}}, - {{{ 200, 0, 0}, 0, { 0, 0}, {0x7f, 0x00, 0x00, 0xff}}}, -}; - -UNUSED static const Vtx dAmpUnused3DVtx07[] = { - {{{ -184, 54, -54}, 0, { 0, 0}, {0x8b, 0x22, 0xde, 0xff}}}, - {{{ -184, 0, -76}, 0, { 0, 0}, {0x8b, 0x00, 0xd0, 0x00}}}, - {{{ -200, 0, 0}, 0, { 0, 0}, {0x81, 0x00, 0x00, 0x00}}}, - {{{ -141, 100, -100}, 0, { 0, 0}, {0xa6, 0x3f, 0xc1, 0xff}}}, - {{{ -141, 0, -141}, 0, { 0, 0}, {0xa6, 0x00, 0xa7, 0xff}}}, - {{{ -76, 130, -130}, 0, { 0, 0}, {0xd0, 0x52, 0xae, 0xff}}}, - {{{ -76, 0, -184}, 0, { 0, 0}, {0xd0, 0x00, 0x8b, 0xff}}}, - {{{ 0, 141, -141}, 0, { 0, 0}, {0x00, 0x59, 0xa7, 0xff}}}, - {{{ 0, 0, -200}, 0, { 0, 0}, {0x00, 0x00, 0x81, 0xff}}}, - {{{ 76, 130, -130}, 0, { 0, 0}, {0x30, 0x52, 0xae, 0xff}}}, - {{{ 76, 0, -184}, 0, { 0, 0}, {0x30, 0x00, 0x8b, 0xff}}}, - {{{ 141, 100, -100}, 0, { 0, 0}, {0x5a, 0x3f, 0xc1, 0xff}}}, - {{{ 141, 0, -141}, 0, { 0, 0}, {0x5a, 0x00, 0xa7, 0xff}}}, - {{{ 184, 54, -54}, 0, { 0, 0}, {0x75, 0x22, 0xde, 0xff}}}, - {{{ 184, 0, -76}, 0, { 0, 0}, {0x75, 0x00, 0xd0, 0xff}}}, - {{{ 200, 0, 0}, 0, { 0, 0}, {0x7f, 0x00, 0x00, 0xff}}}, -}; - -UNUSED static const Vtx dAmpUnused3DVtx08[] = { - {{{ -184, 76, 0}, 0, { 0, 0}, {0x8b, 0x30, 0x00, 0xff}}}, - {{{ -184, 54, -54}, 0, { 0, 0}, {0x8b, 0x22, 0xde, 0x00}}}, - {{{ -200, 0, 0}, 0, { 0, 0}, {0x81, 0x00, 0x00, 0x00}}}, - {{{ -141, 141, 0}, 0, { 0, 0}, {0xa6, 0x59, 0x00, 0xff}}}, - {{{ -141, 100, -100}, 0, { 0, 0}, {0xa6, 0x3f, 0xc1, 0xff}}}, - {{{ -76, 184, 0}, 0, { 0, 0}, {0xd0, 0x75, 0x00, 0xff}}}, - {{{ -76, 130, -130}, 0, { 0, 0}, {0xd0, 0x52, 0xae, 0xff}}}, - {{{ 0, 200, 0}, 0, { 0, 0}, {0x00, 0x7f, 0x00, 0xff}}}, - {{{ 0, 141, -141}, 0, { 0, 0}, {0x00, 0x59, 0xa7, 0xff}}}, - {{{ 76, 184, 0}, 0, { 0, 0}, {0x30, 0x75, 0x00, 0xff}}}, - {{{ 76, 130, -130}, 0, { 0, 0}, {0x30, 0x52, 0xae, 0xff}}}, - {{{ 141, 141, 0}, 0, { 0, 0}, {0x5a, 0x59, 0x00, 0xff}}}, - {{{ 141, 100, -100}, 0, { 0, 0}, {0x5a, 0x3f, 0xc1, 0xff}}}, - {{{ 184, 76, 0}, 0, { 0, 0}, {0x75, 0x30, 0x00, 0xff}}}, - {{{ 184, 54, -54}, 0, { 0, 0}, {0x75, 0x22, 0xde, 0xff}}}, - {{{ 200, 0, 0}, 0, { 0, 0}, {0x7f, 0x00, 0x00, 0xff}}}, -}; - -UNUSED static const Vtx dAmpUnused3DVtx09[] = { - {{{ -184, 54, 54}, 0, { 0, 0}, {0x8b, 0x22, 0x22, 0xff}}}, - {{{ -184, 76, 0}, 0, { 0, 0}, {0x8b, 0x30, 0x00, 0x00}}}, - {{{ -200, 0, 0}, 0, { 0, 0}, {0x81, 0x00, 0x00, 0x00}}}, - {{{ -141, 100, 100}, 0, { 0, 0}, {0xa6, 0x3f, 0x3f, 0xff}}}, - {{{ -141, 141, 0}, 0, { 0, 0}, {0xa6, 0x59, 0x00, 0xff}}}, - {{{ -76, 130, 130}, 0, { 0, 0}, {0xd0, 0x52, 0x52, 0xff}}}, - {{{ -76, 184, 0}, 0, { 0, 0}, {0xd0, 0x75, 0x00, 0xff}}}, - {{{ 0, 141, 141}, 0, { 0, 0}, {0x00, 0x59, 0x59, 0xff}}}, - {{{ 0, 200, 0}, 0, { 0, 0}, {0x00, 0x7f, 0x00, 0xff}}}, - {{{ 76, 130, 130}, 0, { 0, 0}, {0x30, 0x52, 0x52, 0xff}}}, - {{{ 76, 184, 0}, 0, { 0, 0}, {0x30, 0x75, 0x00, 0xff}}}, - {{{ 141, 100, 100}, 0, { 0, 0}, {0x5a, 0x3f, 0x3f, 0xff}}}, - {{{ 141, 141, 0}, 0, { 0, 0}, {0x5a, 0x59, 0x00, 0xff}}}, - {{{ 184, 54, 54}, 0, { 0, 0}, {0x75, 0x22, 0x22, 0xff}}}, - {{{ 184, 76, 0}, 0, { 0, 0}, {0x75, 0x30, 0x00, 0xff}}}, - {{{ 200, 0, 0}, 0, { 0, 0}, {0x7f, 0x00, 0x00, 0xff}}}, -}; - -UNUSED static const Vtx dAmpUnused3DVtx10[] = { - {{{ -184, 0, 76}, 0, { 0, 0}, {0x8b, 0x00, 0x30, 0xff}}}, - {{{ -184, 54, 54}, 0, { 0, 0}, {0x8b, 0x22, 0x22, 0x00}}}, - {{{ -200, 0, 0}, 0, { 0, 0}, {0x81, 0x00, 0x00, 0x00}}}, - {{{ -141, 0, 141}, 0, { 0, 0}, {0xa6, 0x00, 0x59, 0xff}}}, - {{{ -141, 100, 100}, 0, { 0, 0}, {0xa6, 0x3f, 0x3f, 0xff}}}, - {{{ -76, 0, 184}, 0, { 0, 0}, {0xd0, 0x00, 0x75, 0xff}}}, - {{{ -76, 130, 130}, 0, { 0, 0}, {0xd0, 0x52, 0x52, 0xff}}}, - {{{ 0, 0, 200}, 0, { 0, 0}, {0x00, 0x00, 0x7f, 0xff}}}, - {{{ 0, 141, 141}, 0, { 0, 0}, {0x00, 0x59, 0x59, 0xff}}}, - {{{ 76, 0, 184}, 0, { 0, 0}, {0x30, 0x00, 0x75, 0xff}}}, - {{{ 76, 130, 130}, 0, { 0, 0}, {0x30, 0x52, 0x52, 0xff}}}, - {{{ 141, 0, 141}, 0, { 0, 0}, {0x5a, 0x00, 0x59, 0xff}}}, - {{{ 141, 100, 100}, 0, { 0, 0}, {0x5a, 0x3f, 0x3f, 0xff}}}, - {{{ 184, 0, 76}, 0, { 0, 0}, {0x75, 0x00, 0x30, 0xff}}}, - {{{ 184, 54, 54}, 0, { 0, 0}, {0x75, 0x22, 0x22, 0xff}}}, - {{{ 200, 0, 0}, 0, { 0, 0}, {0x7f, 0x00, 0x00, 0xff}}}, -}; - -UNUSED static const Vtx dAmpUnused3DVtx11[] = { - {{{ -184, -54, 54}, 0, { 0, 0}, {0x8b, 0xde, 0x22, 0xff}}}, - {{{ -184, 0, 76}, 0, { 0, 0}, {0x8b, 0x00, 0x30, 0x00}}}, - {{{ -200, 0, 0}, 0, { 0, 0}, {0x81, 0x00, 0x00, 0x00}}}, - {{{ -141, -100, 100}, 0, { 0, 0}, {0xa6, 0xc1, 0x3f, 0xff}}}, - {{{ -141, 0, 141}, 0, { 0, 0}, {0xa6, 0x00, 0x59, 0xff}}}, - {{{ -76, -130, 130}, 0, { 0, 0}, {0xd0, 0xae, 0x52, 0xff}}}, - {{{ -76, 0, 184}, 0, { 0, 0}, {0xd0, 0x00, 0x75, 0xff}}}, - {{{ 0, -141, 141}, 0, { 0, 0}, {0x00, 0xa7, 0x59, 0xff}}}, - {{{ 0, 0, 200}, 0, { 0, 0}, {0x00, 0x00, 0x7f, 0xff}}}, - {{{ 76, -130, 130}, 0, { 0, 0}, {0x30, 0xae, 0x52, 0xff}}}, - {{{ 76, 0, 184}, 0, { 0, 0}, {0x30, 0x00, 0x75, 0xff}}}, - {{{ 141, -100, 100}, 0, { 0, 0}, {0x5a, 0xc1, 0x3f, 0xff}}}, - {{{ 141, 0, 141}, 0, { 0, 0}, {0x5a, 0x00, 0x59, 0xff}}}, - {{{ 184, -54, 54}, 0, { 0, 0}, {0x75, 0xde, 0x22, 0xff}}}, - {{{ 184, 0, 76}, 0, { 0, 0}, {0x75, 0x00, 0x30, 0xff}}}, - {{{ 200, 0, 0}, 0, { 0, 0}, {0x7f, 0x00, 0x00, 0xff}}}, -}; - -UNUSED static const Vtx dAmpUnused3DVtx12[] = { - {{{ -184, -76, 0}, 0, { 0, 0}, {0x8b, 0xd0, 0x00, 0xff}}}, - {{{ -184, -54, 54}, 0, { 0, 0}, {0x8b, 0xde, 0x22, 0x00}}}, - {{{ -200, 0, 0}, 0, { 0, 0}, {0x81, 0x00, 0x00, 0x00}}}, - {{{ -141, -141, 0}, 0, { 0, 0}, {0xa6, 0xa7, 0x00, 0xff}}}, - {{{ -141, -100, 100}, 0, { 0, 0}, {0xa6, 0xc1, 0x3f, 0xff}}}, - {{{ -76, -184, 0}, 0, { 0, 0}, {0xd0, 0x8b, 0x00, 0xff}}}, - {{{ -76, -130, 130}, 0, { 0, 0}, {0xd0, 0xae, 0x52, 0xff}}}, - {{{ 0, -200, 0}, 0, { 0, 0}, {0x00, 0x81, 0x00, 0xff}}}, - {{{ 0, -141, 141}, 0, { 0, 0}, {0x00, 0xa7, 0x59, 0xff}}}, - {{{ 76, -184, 0}, 0, { 0, 0}, {0x30, 0x8b, 0x00, 0xff}}}, - {{{ 76, -130, 130}, 0, { 0, 0}, {0x30, 0xae, 0x52, 0xff}}}, - {{{ 141, -141, 0}, 0, { 0, 0}, {0x5a, 0xa7, 0x00, 0xff}}}, - {{{ 141, -100, 100}, 0, { 0, 0}, {0x5a, 0xc1, 0x3f, 0xff}}}, - {{{ 184, -76, 0}, 0, { 0, 0}, {0x75, 0xd0, 0x00, 0xff}}}, - {{{ 184, -54, 54}, 0, { 0, 0}, {0x75, 0xde, 0x22, 0xff}}}, - {{{ 200, 0, 0}, 0, { 0, 0}, {0x7f, 0x00, 0x00, 0xff}}}, -}; - -UNUSED static const Vtx dAmpUnused3DVtx13[] = { - {{{ -37, 90, 205}, 0, { 0, 0}, {0xcc, 0x00, 0x73, 0x00}}}, - {{{ -129, 90, 163}, 0, { 0, 0}, {0xcc, 0x00, 0x73, 0x00}}}, - {{{ -129, -90, 163}, 0, { 0, 0}, {0xcc, 0x00, 0x73, 0x00}}}, - {{{ -37, -90, 205}, 0, { 0, 0}, {0xcc, 0x00, 0x73, 0xff}}}, -}; - -UNUSED static const Vtx dAmpUnused3DVtx14[] = { - {{{ 112, -7, 182}, 0, { 0, 0}, {0x4c, 0xd8, 0x5c, 0x00}}}, - {{{ 66, -139, 162}, 0, { 0, 0}, {0x4c, 0xd8, 0x5c, 0x00}}}, - {{{ 175, -77, 98}, 0, { 0, 0}, {0x4c, 0xd8, 0x5c, 0x00}}}, -}; - -UNUSED static const Vtx dAmpUnused3DVtx15[] = { - {{{ 63, 90, 198}, 0, { 0, 0}, {0x08, 0x00, 0x7e, 0x00}}}, - {{{ -35, 90, 205}, 0, { 0, 0}, {0x08, 0x00, 0x7e, 0x00}}}, - {{{ -35, -90, 205}, 0, { 0, 0}, {0x08, 0x00, 0x7e, 0x00}}}, - {{{ 63, -90, 198}, 0, { 0, 0}, {0x08, 0x00, 0x7e, 0xff}}}, -}; - -UNUSED const Gfx dAmpUnused3DElectricDl1[] = { - gsSPLight(&dAmpUnused3DLights.l, 1), - gsSPLight(&dAmpUnused3DLights.a, 2), - gsSPVertex(dAmpUnused3DVtx01, 6, 0), - gsSP2Triangles( 0, 1, 2, 0x0, 3, 4, 5, 0x0), - gsSPEndDisplayList(), -}; - -UNUSED const Gfx dAmpUnused3DElectricDl2[] = { - gsSPLight(&dAmpUnused3DLights.l, 1), - gsSPLight(&dAmpUnused3DLights.a, 2), - gsSPVertex(dAmpUnused3DVtx02, 6, 0), - gsSP2Triangles( 0, 1, 2, 0x0, 3, 4, 5, 0x0), - gsSPEndDisplayList(), -}; - -UNUSED const Gfx dAmpUnused3DElectricDl3[] = { - gsSPLight(&dAmpUnused3DLights.l, 1), - gsSPLight(&dAmpUnused3DLights.a, 2), - gsSPVertex(dAmpUnused3DVtx03, 6, 0), - gsSP2Triangles( 0, 1, 2, 0x0, 3, 4, 5, 0x0), - gsSPEndDisplayList(), -}; - -UNUSED const Gfx dAmpUnused3DElectricDl4[] = { - gsSPLight(&dAmpUnused3DLights.l, 1), - gsSPLight(&dAmpUnused3DLights.a, 2), - gsSPVertex(dAmpUnused3DVtx04, 6, 0), - gsSP2Triangles( 0, 1, 2, 0x0, 3, 4, 5, 0x0), - gsSPEndDisplayList(), -}; - -UNUSED const Gfx dAmpUnused3DModelDl[] = { - //! Vertex interpreted as light - gsSPLight((const u8*)dAmpUnused3DVtx01 + 0x8, 1), - gsSPLight((const u8*)dAmpUnused3DVtx01, 2), - gsSPVertex(dAmpUnused3DVtx05, 16, 0), - gsSP2Triangles( 0, 1, 2, 0x0, 1, 0, 3, 0x0), - gsSP2Triangles( 1, 3, 4, 0x0, 4, 3, 5, 0x0), - gsSP2Triangles( 4, 5, 6, 0x0, 6, 5, 7, 0x0), - gsSP2Triangles( 6, 7, 8, 0x0, 8, 7, 9, 0x0), - gsSP2Triangles( 8, 9, 10, 0x0, 10, 9, 11, 0x0), - gsSP2Triangles(10, 11, 12, 0x0, 12, 11, 13, 0x0), - gsSP2Triangles(12, 13, 14, 0x0, 14, 13, 15, 0x0), - gsSPVertex(dAmpUnused3DVtx06, 16, 0), - gsSP2Triangles( 0, 1, 2, 0x0, 1, 0, 3, 0x0), - gsSP2Triangles( 1, 3, 4, 0x0, 4, 3, 5, 0x0), - gsSP2Triangles( 4, 5, 6, 0x0, 6, 5, 7, 0x0), - gsSP2Triangles( 6, 7, 8, 0x0, 8, 7, 9, 0x0), - gsSP2Triangles( 8, 9, 10, 0x0, 10, 9, 11, 0x0), - gsSP2Triangles(10, 11, 12, 0x0, 12, 11, 13, 0x0), - gsSP2Triangles(12, 13, 14, 0x0, 14, 13, 15, 0x0), - gsSPVertex(dAmpUnused3DVtx07, 16, 0), - gsSP2Triangles( 0, 1, 2, 0x0, 1, 0, 3, 0x0), - gsSP2Triangles( 1, 3, 4, 0x0, 4, 3, 5, 0x0), - gsSP2Triangles( 4, 5, 6, 0x0, 6, 5, 7, 0x0), - gsSP2Triangles( 6, 7, 8, 0x0, 8, 7, 9, 0x0), - gsSP2Triangles( 8, 9, 10, 0x0, 10, 9, 11, 0x0), - gsSP2Triangles(10, 11, 12, 0x0, 12, 11, 13, 0x0), - gsSP2Triangles(12, 13, 14, 0x0, 14, 13, 15, 0x0), - gsSPVertex(dAmpUnused3DVtx08, 16, 0), - gsSP2Triangles( 0, 1, 2, 0x0, 1, 0, 3, 0x0), - gsSP2Triangles( 1, 3, 4, 0x0, 4, 3, 5, 0x0), - gsSP2Triangles( 4, 5, 6, 0x0, 6, 5, 7, 0x0), - gsSP2Triangles( 6, 7, 8, 0x0, 8, 7, 9, 0x0), - gsSP2Triangles( 8, 9, 10, 0x0, 10, 9, 11, 0x0), - gsSP2Triangles(10, 11, 12, 0x0, 12, 11, 13, 0x0), - gsSP2Triangles(12, 13, 14, 0x0, 14, 13, 15, 0x0), - gsSPVertex(dAmpUnused3DVtx09, 16, 0), - gsSP2Triangles( 0, 1, 2, 0x0, 1, 0, 3, 0x0), - gsSP2Triangles( 1, 3, 4, 0x0, 4, 3, 5, 0x0), - gsSP2Triangles( 4, 5, 6, 0x0, 6, 5, 7, 0x0), - gsSP2Triangles( 6, 7, 8, 0x0, 8, 7, 9, 0x0), - gsSP2Triangles( 8, 9, 10, 0x0, 10, 9, 11, 0x0), - gsSP2Triangles(10, 11, 12, 0x0, 12, 11, 13, 0x0), - gsSP2Triangles(12, 13, 14, 0x0, 14, 13, 15, 0x0), - gsSPVertex(dAmpUnused3DVtx10, 16, 0), - gsSP2Triangles( 0, 1, 2, 0x0, 1, 0, 3, 0x0), - gsSP2Triangles( 1, 3, 4, 0x0, 4, 3, 5, 0x0), - gsSP2Triangles( 4, 5, 6, 0x0, 6, 5, 7, 0x0), - gsSP2Triangles( 6, 7, 8, 0x0, 8, 7, 9, 0x0), - gsSP2Triangles( 8, 9, 10, 0x0, 10, 9, 11, 0x0), - gsSP2Triangles(10, 11, 12, 0x0, 12, 11, 13, 0x0), - gsSP2Triangles(12, 13, 14, 0x0, 14, 13, 15, 0x0), - gsSPVertex(dAmpUnused3DVtx11, 16, 0), - gsSP2Triangles( 0, 1, 2, 0x0, 1, 0, 3, 0x0), - gsSP2Triangles( 1, 3, 4, 0x0, 4, 3, 5, 0x0), - gsSP2Triangles( 4, 5, 6, 0x0, 6, 5, 7, 0x0), - gsSP2Triangles( 6, 7, 8, 0x0, 8, 7, 9, 0x0), - gsSP2Triangles( 8, 9, 10, 0x0, 10, 9, 11, 0x0), - gsSP2Triangles(10, 11, 12, 0x0, 12, 11, 13, 0x0), - gsSP2Triangles(12, 13, 14, 0x0, 14, 13, 15, 0x0), - gsSPVertex(dAmpUnused3DVtx12, 16, 0), - gsSP2Triangles( 0, 1, 2, 0x0, 1, 0, 3, 0x0), - gsSP2Triangles( 1, 3, 4, 0x0, 4, 3, 5, 0x0), - gsSP2Triangles( 4, 5, 6, 0x0, 6, 5, 7, 0x0), - gsSP2Triangles( 6, 7, 8, 0x0, 8, 7, 9, 0x0), - gsSP2Triangles( 8, 9, 10, 0x0, 10, 9, 11, 0x0), - gsSP2Triangles(10, 11, 12, 0x0, 12, 11, 13, 0x0), - gsSP2Triangles(12, 13, 14, 0x0, 14, 13, 15, 0x0), - gsSPEndDisplayList(), -}; - -UNUSED const Gfx dAmpUnused3DElectricDl5[] = { - //! Vertex interpreted as light - gsSPLight((const u8*)dAmpUnused3DVtx01 + 0x8, 1), - gsSPLight((const u8*)dAmpUnused3DVtx01, 2), - gsSPVertex(dAmpUnused3DVtx13, 4, 0), - gsSP2Triangles( 0, 1, 2, 0x0, 0, 2, 3, 0x0), - gsSPEndDisplayList(), -}; - -UNUSED const Gfx dAmpUnused3DElectricDl6[] = { - //! Vertex interpreted as light - gsSPLight((const u8*)dAmpUnused3DVtx01 + 0x8, 1), - gsSPLight((const u8*)dAmpUnused3DVtx01, 2), - gsSPVertex(dAmpUnused3DVtx14, 3, 0), - gsSP1Triangle( 0, 1, 2, 0x0), - gsSPEndDisplayList(), -}; - -UNUSED const Gfx dAmpUnused3DElectricDl7[] = { - //! Vertex interpreted as light - gsSPLight((const u8*)dAmpUnused3DVtx01 + 0x8, 1), - gsSPLight((const u8*)dAmpUnused3DVtx01, 2), - gsSPVertex(dAmpUnused3DVtx15, 4, 0), - gsSP2Triangles( 0, 1, 2, 0x0, 0, 2, 3, 0x0), - gsSPEndDisplayList(), -}; diff --git a/actors/bully/model.inc.c b/actors/bully/model.inc.c index 8eaf7e73d..b1593e59f 100644 --- a/actors/bully/model.inc.c +++ b/actors/bully/model.inc.c @@ -83,7 +83,6 @@ static const Lights1 bully_seg5_lights_05000450 = gdSPDefLights1( 0x00, 0x00, 0x00, 0x28, 0x28, 0x28 ); -// //! There's another malformed light entry here. // 0x05000468 ALIGNED8 static const Texture bully_seg5_texture_05000468[] = { #include "actors/bully/bully_left_side.rgba16.inc.c" @@ -151,16 +150,6 @@ static const Vtx bully_seg5_vertex_05002E68[] = { {{{ 90, 28, 0}, 0, { 0, 0}, {0xff, 0x7f, 0x00, 0xff}}}, }; -// 0x05002EA8 -static const Vtx bully_seg5_vertex_05002EA8[] = { - {{{ 60, 143, 0}, 0, { 0, 0}, {0x0c, 0x7e, 0x00, 0x00}}}, - {{{ 57, 127, -67}, 0, { 0, 0}, {0x0c, 0x7a, 0xe3, 0x00}}}, - {{{ -46, 137, -67}, 0, { 0, 0}, {0x0c, 0x7a, 0xe3, 0x00}}}, - {{{ -42, 153, 0}, 0, { 0, 0}, {0x0c, 0x7e, 0x00, 0xff}}}, - {{{ -46, 137, 67}, 0, { 0, 0}, {0x0c, 0x7a, 0x1d, 0xff}}}, - {{{ 57, 127, 67}, 0, { 0, 0}, {0x0c, 0x7a, 0x1d, 0xff}}}, -}; - // 0x05002F08 static const Vtx bully_seg5_vertex_05002F08[] = { {{{ -133, -40, 39}, 0, { 0, 0}, {0x8b, 0xdd, 0x22, 0x00}}}, @@ -353,16 +342,6 @@ const Gfx bully_seg5_dl_050037A0[] = { gsSPEndDisplayList(), }; -// 0x05003838 - 0x05003878 -const Gfx bully_seg5_dl_05003838[] = { - gsSPLight((u8*)bully_seg5_texture_05000468 + 0x8, 1), //! yet another malformed light... - gsSPLight(bully_seg5_texture_05000468, 2), - gsSPVertex(bully_seg5_vertex_05002EA8, 6, 0), - gsSP2Triangles( 0, 1, 2, 0x0, 0, 2, 3, 0x0), - gsSP2Triangles( 3, 4, 5, 0x0, 3, 5, 0, 0x0), - gsSPEndDisplayList(), -}; - // 0x05003878 - 0x05003C50 const Gfx bully_seg5_dl_05003878[] = { gsSPLight(&bully_seg5_lights_05000450.l, 1), diff --git a/actors/group2.h b/actors/group2.h index 45d1aad2f..d40c61fdf 100644 --- a/actors/group2.h +++ b/actors/group2.h @@ -17,7 +17,6 @@ extern const Gfx bully_seg5_dl_050002E0[]; extern const Gfx bully_seg5_dl_05000398[]; extern const Gfx bully_seg5_dl_05003708[]; extern const Gfx bully_seg5_dl_050037A0[]; -extern const Gfx bully_seg5_dl_05003838[]; extern const Gfx bully_seg5_dl_05003878[]; extern const Gfx bully_seg5_dl_05003CD0[]; extern const Gfx bully_seg5_dl_05003D08[]; diff --git a/actors/hoot/model.inc.c b/actors/hoot/model.inc.c index 02b814d46..9565fd0f5 100644 --- a/actors/hoot/model.inc.c +++ b/actors/hoot/model.inc.c @@ -360,7 +360,6 @@ ALIGNED8 static const Texture hoot_seg5_texture_05002650[] = { #include "actors/hoot/hoot_wing_tip.rgba16.inc.c" }; -// //! The vertex macro which calls this has too large of a size. // 0x05002E50 static const Vtx hoot_seg5_vertex_05002E50[] = { {{{ 126, 0, -62}, 0, { 1780, 228}, {0x00, 0x7f, 0x00, 0x00}}}, @@ -371,13 +370,6 @@ static const Vtx hoot_seg5_vertex_05002E50[] = { {{{ 168, 0, 125}, 0, { 2288, 2352}, {0x00, 0x7f, 0x00, 0x00}}}, }; -// vertex -752, 0, 1280, -2800, 0, 0x07, 0x00, 0x00, 0x00 -// vertex -6656, 0, 0, -3328, 0, 0x07, 0x3F, 0xF1, 0x00 -// vertex -2800, 4096, 0, -3584, 0, 0x00, 0x07, 0xC0, 0x7C -// vertex 902, 16, 1280, 904, 16, 0x05, 0x00, 0x1E, 0x38 -// vertex 1200, 192, 1280, -16640, 0, 0x00, 0x00, 0x0A, 0x14 -// vertex -16640, 0, 30, -18432, 0, 0x00, 0x00, 0x00, 0x00 - // 0x05002EB0 - 0x05002F10 const Gfx hoot_seg5_dl_05002EB0[] = { gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, hoot_seg5_texture_05002650), @@ -388,7 +380,7 @@ const Gfx hoot_seg5_dl_05002EB0[] = { gsDPSetTileSize(0, 0, 0, (32 - 1) << G_TEXTURE_IMAGE_FRAC, (32 - 1) << G_TEXTURE_IMAGE_FRAC), gsSPLight(&hoot_seg5_lights_05001E38.l, 1), gsSPLight(&hoot_seg5_lights_05001E38.a, 2), - gsSPVertex(hoot_seg5_vertex_05002E50, 12, 0), + gsSPVertex(hoot_seg5_vertex_05002E50, 6, 0), gsSP2Triangles( 0, 1, 2, 0x0, 3, 4, 5, 0x0), gsSPEndDisplayList(), }; @@ -413,7 +405,6 @@ static const Lights1 hoot_seg5_lights_05002F60 = gdSPDefLights1( 0xff, 0xff, 0xff, 0x28, 0x28, 0x28 ); -// //! The vertex macro which calls this has too large of a size. // 0x05002F78 static const Vtx hoot_seg5_vertex_05002F78[] = { {{{ 119, 0, -85}, 0, { 1972, 68}, {0x00, 0x7f, 0x00, 0x00}}}, @@ -424,13 +415,6 @@ static const Vtx hoot_seg5_vertex_05002F78[] = { {{{ 0, 0, 96}, 0, { 964, 2040}, {0x00, 0x7f, 0x00, 0x00}}}, }; -// vertex -752, 0, 1280, -2800, 0, 0x07, 0x00, 0x00, 0x00 -// vertex -6656, 0, 0, -3328, 0, 0x07, 0x3F, 0xF1, 0x00 -// vertex -2800, 4096, 0, -3584, 0, 0x00, 0x07, 0xC0, 0x7C -// vertex 902, 16, 1280, 904, 16, 0x05, 0x00, 0x2F, 0x60 -// vertex 1200, 192, 1280, -16640, 0, 0x00, 0x00, 0x0A, 0x14 -// vertex -16640, 0, 30, -18432, 0, 0x00, 0x00, 0x00, 0x00 - // 0x05002FD8 - 0x05003038 const Gfx hoot_seg5_dl_05002FD8[] = { gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, hoot_seg5_texture_05001E50), @@ -441,7 +425,7 @@ const Gfx hoot_seg5_dl_05002FD8[] = { gsDPSetTileSize(0, 0, 0, (32 - 1) << G_TEXTURE_IMAGE_FRAC, (32 - 1) << G_TEXTURE_IMAGE_FRAC), gsSPLight(&hoot_seg5_lights_05002F60.l, 1), gsSPLight(&hoot_seg5_lights_05002F60.a, 2), - gsSPVertex(hoot_seg5_vertex_05002F78, 12, 0), + gsSPVertex(hoot_seg5_vertex_05002F78, 6, 0), gsSP2Triangles( 0, 1, 2, 0x0, 3, 4, 5, 0x0), gsSPEndDisplayList(), }; @@ -466,7 +450,6 @@ static const Lights1 hoot_seg5_lights_05003088 = gdSPDefLights1( 0xff, 0xff, 0xff, 0x28, 0x28, 0x28 ); -// //! The vertex macro which calls this has too large of a size. // 0x050030A0 static const Vtx hoot_seg5_vertex_050030A0[] = { {{{ 89, 1, -46}, 0, { 928, 456}, {0x00, 0x7f, 0x00, 0x00}}}, @@ -477,13 +460,6 @@ static const Vtx hoot_seg5_vertex_050030A0[] = { {{{ 89, 1, 95}, 0, { 924, 2076}, {0x00, 0x7f, 0x00, 0x00}}}, }; -// vertex -752, 0, 1280, -2800, 0, 0x07, 0x00, 0x00, 0x00 -// vertex -6656, 0, 0, -3328, 0, 0x07, 0x3F, 0xF1, 0x00 -// vertex -2800, 4096, 0, -3584, 0, 0x00, 0x07, 0xC0, 0x7C -// vertex 902, 16, 1280, 904, 16, 0x05, 0x00, 0x30, 0x88 -// vertex 1200, 192, 1280, -16640, 0, 0x00, 0x00, 0x0A, 0x14 -// vertex -16640, 0, 30, -18432, 0, 0x00, 0x00, 0x00, 0x00 - // 0x05003100 - 0x05003160 const Gfx hoot_seg5_dl_05003100[] = { gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, hoot_seg5_texture_05001E50), @@ -494,7 +470,7 @@ const Gfx hoot_seg5_dl_05003100[] = { gsDPSetTileSize(0, 0, 0, (32 - 1) << G_TEXTURE_IMAGE_FRAC, (32 - 1) << G_TEXTURE_IMAGE_FRAC), gsSPLight(&hoot_seg5_lights_05003088.l, 1), gsSPLight(&hoot_seg5_lights_05003088.a, 2), - gsSPVertex(hoot_seg5_vertex_050030A0, 12, 0), + gsSPVertex(hoot_seg5_vertex_050030A0, 6, 0), gsSP2Triangles( 0, 1, 2, 0x0, 3, 4, 5, 0x0), gsSPEndDisplayList(), }; @@ -519,7 +495,6 @@ static const Lights1 hoot_seg5_lights_050031B0 = gdSPDefLights1( 0xff, 0xff, 0xff, 0x28, 0x28, 0x28 ); -// //! The vertex macro which calls this has too large of a size. // 0x050031C8 static const Vtx hoot_seg5_vertex_050031C8[] = { {{{ 37, 1, -66}, 0, { 380, 184}, {0x00, 0x7f, 0x00, 0x00}}}, @@ -530,13 +505,6 @@ static const Vtx hoot_seg5_vertex_050031C8[] = { {{{ 37, 1, 28}, 0, { 400, 1356}, {0x00, 0x7f, 0x00, 0x00}}}, }; -// vertex -752, 0, 1280, -2800, 0, 0x07, 0x00, 0x00, 0x00 -// vertex -6656, 0, 0, -3328, 0, 0x07, 0x3F, 0xF1, 0x00 -// vertex -2800, 4096, 0, -3584, 0, 0x00, 0x07, 0xC0, 0x7C -// vertex 902, 16, 1280, 904, 16, 0x05, 0x00, 0x31, 0xB0 -// vertex 1200, 192, 1280, -16640, 0, 0x00, 0x00, 0x0A, 0x14 -// vertex -16640, 0, 30, -18432, 0, 0x00, 0x00, 0x00, 0x00 - // 0x05003228 - 0x05003288 const Gfx hoot_seg5_dl_05003228[] = { gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, hoot_seg5_texture_05001E50), @@ -547,7 +515,7 @@ const Gfx hoot_seg5_dl_05003228[] = { gsDPSetTileSize(0, 0, 0, (32 - 1) << G_TEXTURE_IMAGE_FRAC, (32 - 1) << G_TEXTURE_IMAGE_FRAC), gsSPLight(&hoot_seg5_lights_050031B0.l, 1), gsSPLight(&hoot_seg5_lights_050031B0.a, 2), - gsSPVertex(hoot_seg5_vertex_050031C8, 12, 0), + gsSPVertex(hoot_seg5_vertex_050031C8, 6, 0), gsSP2Triangles( 0, 1, 2, 0x0, 3, 4, 5, 0x0), gsSPEndDisplayList(), }; @@ -572,7 +540,6 @@ static const Lights1 hoot_seg5_lights_050032D8 = gdSPDefLights1( 0xff, 0xff, 0xff, 0x28, 0x28, 0x28 ); -// //! The vertex macro which calls this has too large of a size. // 0x050032F0 static const Vtx hoot_seg5_vertex_050032F0[] = { {{{ 168, 0, -124}, 0, { 2340, 2408}, {0x00, 0x7f, 0x00, 0x00}}}, @@ -583,13 +550,6 @@ static const Vtx hoot_seg5_vertex_050032F0[] = { {{{ 0, 0, 88}, 0, { 424, -4}, {0x00, 0x7f, 0x00, 0x00}}}, }; -// vertex -752, 0, 1280, -2800, 0, 0x07, 0x00, 0x00, 0x00 -// vertex -6656, 0, 0, -3328, 0, 0x07, 0x3F, 0xF1, 0x00 -// vertex -2800, 4096, 0, -3584, 0, 0x00, 0x07, 0xC0, 0x7C -// vertex 902, 16, 1280, 904, 16, 0x05, 0x00, 0x32, 0xD8 -// vertex 1200, 192, 1280, -16640, 0, 0x00, 0x00, 0x0A, 0x14 -// vertex -16640, 0, 30, -18432, 0, 0x00, 0x00, 0x00, 0x00 - // 0x05003350 - 0x050033B0 const Gfx hoot_seg5_dl_05003350[] = { gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, hoot_seg5_texture_05002650), @@ -600,7 +560,7 @@ const Gfx hoot_seg5_dl_05003350[] = { gsDPSetTileSize(0, 0, 0, (32 - 1) << G_TEXTURE_IMAGE_FRAC, (32 - 1) << G_TEXTURE_IMAGE_FRAC), gsSPLight(&hoot_seg5_lights_050032D8.l, 1), gsSPLight(&hoot_seg5_lights_050032D8.a, 2), - gsSPVertex(hoot_seg5_vertex_050032F0, 12, 0), + gsSPVertex(hoot_seg5_vertex_050032F0, 6, 0), gsSP2Triangles( 0, 1, 2, 0x0, 3, 4, 5, 0x0), gsSPEndDisplayList(), }; @@ -625,7 +585,6 @@ static const Lights1 hoot_seg5_lights_05003400 = gdSPDefLights1( 0xff, 0xff, 0xff, 0x28, 0x28, 0x28 ); -// //! The vertex macro which calls this has too large of a size. // 0x05003418 static const Vtx hoot_seg5_vertex_05003418[] = { {{{ 119, 0, -76}, 0, { 1988, 1892}, {0x00, 0x7f, 0x00, 0x00}}}, @@ -636,13 +595,6 @@ static const Vtx hoot_seg5_vertex_05003418[] = { {{{ 119, 0, 86}, 0, { 1984, 36}, {0x00, 0x7f, 0x00, 0x00}}}, }; -// vertex -752, 0, 1280, -2800, 0, 0x07, 0x00, 0x00, 0x00 -// vertex -6656, 0, 0, -3328, 0, 0x07, 0x3F, 0xF1, 0x00 -// vertex -2800, 4096, 0, -3584, 0, 0x00, 0x07, 0xC0, 0x7C -// vertex 902, 16, 1280, 904, 16, 0x05, 0x00, 0x34, 0x00 -// vertex 1200, 192, 1280, -16640, 0, 0x00, 0x00, 0x0A, 0x14 -// vertex -16640, 0, 30, -18432, 0, 0x00, 0x00, 0x00, 0x00 - // 0x05003478 - 0x050034D8 const Gfx hoot_seg5_dl_05003478[] = { gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, hoot_seg5_texture_05001E50), @@ -653,7 +605,7 @@ const Gfx hoot_seg5_dl_05003478[] = { gsDPSetTileSize(0, 0, 0, (32 - 1) << G_TEXTURE_IMAGE_FRAC, (32 - 1) << G_TEXTURE_IMAGE_FRAC), gsSPLight(&hoot_seg5_lights_05003400.l, 1), gsSPLight(&hoot_seg5_lights_05003400.a, 2), - gsSPVertex(hoot_seg5_vertex_05003418, 12, 0), + gsSPVertex(hoot_seg5_vertex_05003418, 6, 0), gsSP2Triangles( 0, 1, 2, 0x0, 3, 4, 5, 0x0), gsSPEndDisplayList(), }; @@ -678,7 +630,6 @@ static const Lights1 hoot_seg5_lights_05003528 = gdSPDefLights1( 0xff, 0xff, 0xff, 0x28, 0x28, 0x28 ); -// //! The vertex macro which calls this has too large of a size. // 0x05003540 static const Vtx hoot_seg5_vertex_05003540[] = { {{{ 89, 1, -94}, 0, { 984, 2096}, {0x00, 0x7f, 0x00, 0x00}}}, @@ -689,13 +640,6 @@ static const Vtx hoot_seg5_vertex_05003540[] = { {{{ 37, 1, 67}, 0, { 368, 192}, {0x00, 0x7f, 0x00, 0x00}}}, }; -// vertex -752, 0, 1280, -2800, 0, 0x07, 0x00, 0x00, 0x00 -// vertex -6656, 0, 0, -3328, 0, 0x07, 0x3F, 0xF1, 0x00 -// vertex -2800, 4096, 0, -3584, 0, 0x00, 0x07, 0xC0, 0x7C -// vertex 902, 16, 1280, 904, 16, 0x05, 0x00, 0x35, 0x28 -// vertex 1200, 192, 1280, -16640, 0, 0x00, 0x00, 0x0A, 0x14 -// vertex -16640, 0, 30, -18432, 0, 0x00, 0x00, 0x00, 0x00 - // 0x050035A0 - 0x05003600 const Gfx hoot_seg5_dl_050035A0[] = { gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, hoot_seg5_texture_05001E50), @@ -706,7 +650,7 @@ const Gfx hoot_seg5_dl_050035A0[] = { gsDPSetTileSize(0, 0, 0, (32 - 1) << G_TEXTURE_IMAGE_FRAC, (32 - 1) << G_TEXTURE_IMAGE_FRAC), gsSPLight(&hoot_seg5_lights_05003528.l, 1), gsSPLight(&hoot_seg5_lights_05003528.a, 2), - gsSPVertex(hoot_seg5_vertex_05003540, 12, 0), + gsSPVertex(hoot_seg5_vertex_05003540, 6, 0), gsSP2Triangles( 0, 1, 2, 0x0, 3, 4, 5, 0x0), gsSPEndDisplayList(), }; @@ -731,7 +675,6 @@ static const Lights1 hoot_seg5_lights_05003650 = gdSPDefLights1( 0xff, 0xff, 0xff, 0x28, 0x28, 0x28 ); -// //! The vertex macro which calls this has too large of a size. // 0x05003668 static const Vtx hoot_seg5_vertex_05003668[] = { {{{ 37, 1, -27}, 0, { 428, 1324}, {0x00, 0x7f, 0x00, 0x00}}}, @@ -742,13 +685,6 @@ static const Vtx hoot_seg5_vertex_05003668[] = { {{{ 2, 1, 40}, 0, { -24, 512}, {0x00, 0x7f, 0x00, 0x00}}}, }; -// vertex -752, 0, 1280, -2800, 0, 0x07, 0x00, 0x00, 0x00 -// vertex -6656, 0, 0, -3328, 0, 0x07, 0x3F, 0xF1, 0x00 -// vertex -2800, 4096, 0, -3584, 0, 0x00, 0x07, 0xC0, 0x7C -// vertex 902, 16, 1280, 904, 16, 0x05, 0x00, 0x36, 0x50 -// vertex 1200, 192, 1280, -16640, 0, 0x00, 0x00, 0x0A, 0x14 -// vertex -16640, 0, 30, -18432, 0, 0x00, 0x00, 0x00, 0x00 - // 0x050036C8 - 0x05003728 const Gfx hoot_seg5_dl_050036C8[] = { gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, hoot_seg5_texture_05001E50), @@ -759,7 +695,7 @@ const Gfx hoot_seg5_dl_050036C8[] = { gsDPSetTileSize(0, 0, 0, (32 - 1) << G_TEXTURE_IMAGE_FRAC, (32 - 1) << G_TEXTURE_IMAGE_FRAC), gsSPLight(&hoot_seg5_lights_05003650.l, 1), gsSPLight(&hoot_seg5_lights_05003650.a, 2), - gsSPVertex(hoot_seg5_vertex_05003668, 12, 0), + gsSPVertex(hoot_seg5_vertex_05003668, 6, 0), gsSP2Triangles( 0, 1, 2, 0x0, 3, 4, 5, 0x0), gsSPEndDisplayList(), }; diff --git a/actors/koopa/model.inc.c b/actors/koopa/model.inc.c index 24c7728a0..0332069d6 100644 --- a/actors/koopa/model.inc.c +++ b/actors/koopa/model.inc.c @@ -49,11 +49,11 @@ static const Lights1 koopa_seg6_lights_06002630 = gdSPDefLights1( 0xff, 0xff, 0xff, 0x28, 0x28, 0x28 ); -// //! There is a malformed light entry here pointing to this texture + 0x18. -// It results in the koopa actor 'wearing' what appears to be pink shorts -// beneath its shell, despite the fact it was intended to be white like -// the rest of its body. This is evident because once the mistake is corrected -// it turns back to being white like the other polygons. +// There is a malformed light entry here pointing to this texture + 0x18. +// It results in the koopa actor 'wearing' what appears to be pink shorts +// beneath its shell, despite the fact it was intended to be white like +// the rest of its body. This is evident because once the mistake is corrected +// it turns back to being white like the other polygons. // 0x06002648 ALIGNED8 static const Texture koopa_seg6_texture_06002648[] = { #include "actors/koopa/koopa_shell_front.rgba16.inc.c" @@ -2077,8 +2077,10 @@ const Gfx koopa_seg6_dl_0600C498[] = { gsSPVertex(koopa_seg6_vertex_0600B560, 9, 0), gsSP2Triangles( 0, 1, 2, 0x0, 3, 4, 5, 0x0), gsSP1Triangle( 6, 7, 8, 0x0), - gsSPLight((u8*)koopa_seg6_texture_06002648 + 0x20, 1), //! this malformed light results in a - gsSPLight((u8*)koopa_seg6_texture_06002648 + 0x18, 2), //! koopa appearing to wear pink shorts. +#ifdef KOOPA_KEEP_PINK_SHORTS + gsSPLight((u8*)koopa_seg6_texture_06002648 + 0x20, 1), // this malformed light results in a + gsSPLight((u8*)koopa_seg6_texture_06002648 + 0x18, 2), // koopa appearing to wear pink shorts. +#endif gsSPVertex(koopa_seg6_vertex_0600B5F0, 15, 0), gsSP2Triangles( 0, 1, 2, 0x0, 3, 4, 5, 0x0), gsSP2Triangles( 6, 7, 0, 0x0, 8, 5, 9, 0x0), diff --git a/actors/star/model.inc.c b/actors/star/model.inc.c index b8a6ea9f9..c21dc6bab 100644 --- a/actors/star/model.inc.c +++ b/actors/star/model.inc.c @@ -56,7 +56,7 @@ const Gfx star_seg3_dl_0302B870[] = { gsSPSetGeometryMode(G_TEXTURE_GEN), gsDPSetEnvColor(255, 255, 255, 255), gsDPSetCombineMode(G_CC_DECALFADE, G_CC_DECALFADE), - gsDPLoadTextureBlock(star_seg3_texture_0302A6F0, G_IM_FMT_RGBA, G_IM_SIZ_16b, 32, 64, 0, G_TX_WRAP | G_TX_NOMIRROR, G_TX_WRAP | G_TX_NOMIRROR, 5, 6, G_TX_NOLOD, G_TX_NOLOD), //! Dimensions loaded as 32x64 despite this texture having only 32x32 dimensions, harmless due to environment mapping (G_TEXTURE_GEN & gsSPTexture values) + gsDPLoadTextureBlock(star_seg3_texture_0302A6F0, G_IM_FMT_RGBA, G_IM_SIZ_16b, 32, 32, 0, G_TX_WRAP | G_TX_NOMIRROR, G_TX_WRAP | G_TX_NOMIRROR, 5, 5, G_TX_NOLOD, G_TX_NOLOD), gsSPTexture(0x07C0, 0x07C0, 0, G_TX_RENDERTILE, G_ON), gsSPDisplayList(star_seg3_dl_0302B7B0), gsDPPipeSync(), diff --git a/data/behavior_data.c b/data/behavior_data.c index cb91fc2ea..4048f1dee 100644 --- a/data/behavior_data.c +++ b/data/behavior_data.c @@ -1524,7 +1524,6 @@ const BehaviorScript bhvBlackSmokeMario[] = { BEGIN(OBJ_LIST_UNIMPORTANT), OR_INT(oFlags, (OBJ_FLAG_SET_FACE_YAW_TO_MOVE_YAW | OBJ_FLAG_MOVE_XZ_USING_FVEL | OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE)), BILLBOARD(), - SET_INT(oAnimState, 4), //! burn_smoke_geo has no GEO_SWITCH_ANIM_STATE. SET_FLOAT(oGraphYOffset, 50), BEGIN_REPEAT(8), CALL_NATIVE(bhv_black_smoke_mario_loop), diff --git a/include/config.h b/include/config.h index c7c464ebf..d7e63a0ae 100644 --- a/include/config.h +++ b/include/config.h @@ -110,6 +110,8 @@ #define FIX_SHADOW_TRANSPARENCY // Fixes the game reading the ia8 burn smoke texture as an rgba16 #define BURN_SMOKE_FIX +// Disable the fix to Koopa's unshelled model +#define KOOPA_KEEP_PINK_SHORTS // Automatically calculate the optimal collision distance for an object based on its vertices. #define AUTO_COLLISION_DISTANCE diff --git a/include/model_ids.h b/include/model_ids.h index 3e7c88454..a8434c178 100644 --- a/include/model_ids.h +++ b/include/model_ids.h @@ -212,9 +212,6 @@ // vcutm #define MODEL_VCUTM_SEESAW_PLATFORM 0x36 // vcutm_geo_0001F0 -#define MODEL_VCUTM_CHECKERBOARD_PLATFORM_SPAWNER 0x37 //! @bug this object doesn't have a geo associated with it, yet is placed in vcutm. - // This causes a crash when the player quickly looks towards the - // checkerboard platforms after spawning but before it is unloaded. // bitfs #define MODEL_BITFS_PLATFORM_ON_TRACK 0x36 // bitfs_geo_000758 diff --git a/levels/vcutm/script.c b/levels/vcutm/script.c index 9122799d7..9f9cdc37b 100644 --- a/levels/vcutm/script.c +++ b/levels/vcutm/script.c @@ -19,11 +19,10 @@ static const LevelScript script_func_local_1[] = { OBJECT(/*model*/ MODEL_VCUTM_SEESAW_PLATFORM, /*pos*/ 154, -1919, -6256, /*angle*/ 0, 270, 0, /*behParam*/ 0x00070000, /*beh*/ bhvSeesawPlatform), OBJECT(/*model*/ MODEL_VCUTM_SEESAW_PLATFORM, /*pos*/ -2047, -3378, -2047, /*angle*/ 0, 0, 0, /*behParam*/ 0x00070000, /*beh*/ bhvSeesawPlatform), - //! @bug invalid model IDs - model ID 0x37 isn't loaded - OBJECT(/*model*/ MODEL_VCUTM_CHECKERBOARD_PLATFORM_SPAWNER, /*pos*/ 3251, -1082, -6256, /*angle*/ 0, 270, 0, /*behParam*/ 0x014B0000, /*beh*/ bhvCheckerboardElevatorGroup), - OBJECT(/*model*/ MODEL_VCUTM_CHECKERBOARD_PLATFORM_SPAWNER, /*pos*/ 2355, -1901, -6256, /*angle*/ 0, 270, 0, /*behParam*/ 0x014B0000, /*beh*/ bhvCheckerboardElevatorGroup), - OBJECT(/*model*/ MODEL_VCUTM_CHECKERBOARD_PLATFORM_SPAWNER, /*pos*/ 1459, -1594, -6256, /*angle*/ 0, 90, 0, /*behParam*/ 0x014B0000, /*beh*/ bhvCheckerboardElevatorGroup), - OBJECT(/*model*/ MODEL_VCUTM_CHECKERBOARD_PLATFORM_SPAWNER, /*pos*/ -1151, -2413, -6256, /*angle*/ 0, 270, 0, /*behParam*/ 0x014B0000, /*beh*/ bhvCheckerboardElevatorGroup), + OBJECT(/*model*/ MODEL_NONE, /*pos*/ 3251, -1082, -6256, /*angle*/ 0, 270, 0, /*behParam*/ 0x014B0000, /*beh*/ bhvCheckerboardElevatorGroup), + OBJECT(/*model*/ MODEL_NONE, /*pos*/ 2355, -1901, -6256, /*angle*/ 0, 270, 0, /*behParam*/ 0x014B0000, /*beh*/ bhvCheckerboardElevatorGroup), + OBJECT(/*model*/ MODEL_NONE, /*pos*/ 1459, -1594, -6256, /*angle*/ 0, 90, 0, /*behParam*/ 0x014B0000, /*beh*/ bhvCheckerboardElevatorGroup), + OBJECT(/*model*/ MODEL_NONE, /*pos*/ -1151, -2413, -6256, /*angle*/ 0, 270, 0, /*behParam*/ 0x014B0000, /*beh*/ bhvCheckerboardElevatorGroup), RETURN(), }; From fba9f665cdf316a46cd0d6de62302219593d467d Mon Sep 17 00:00:00 2001 From: Arceveti <73617174+Arceveti@users.noreply.github.com> Date: Wed, 22 Sep 2021 18:03:54 -0700 Subject: [PATCH 18/26] Some small fixes --- levels/ccm/areas/2/trajectory.inc.c | 2 +- src/engine/math_util.c | 13 ++++++++----- src/game/camera.c | 16 +--------------- src/game/mario_actions_cutscene.c | 5 ++--- src/game/object_list_processor.c | 6 ++---- src/game/paintings.c | 7 +++---- src/goddard/shape_helper.c | 2 -- 7 files changed, 17 insertions(+), 34 deletions(-) diff --git a/levels/ccm/areas/2/trajectory.inc.c b/levels/ccm/areas/2/trajectory.inc.c index 1bff30478..faba79986 100644 --- a/levels/ccm/areas/2/trajectory.inc.c +++ b/levels/ccm/areas/2/trajectory.inc.c @@ -27,7 +27,7 @@ const Trajectory ccm_seg7_trajectory_penguin_race[] = { TRAJECTORY_POS(24, /*pos*/ 1333, 761, -1733), TRAJECTORY_POS(25, /*pos*/ 2488, 562, -2944), TRAJECTORY_POS(26, /*pos*/ 2977, 361, -4988), - //! missing ID + TRAJECTORY_POS(27, /*pos*/ 3366, 345, -5339), TRAJECTORY_POS(28, /*pos*/ 3754, 329, -5689), TRAJECTORY_POS(29, /*pos*/ 5805, 86, -5980), TRAJECTORY_POS(30, /*pos*/ 6566, -449, -4133), diff --git a/src/engine/math_util.c b/src/engine/math_util.c index 44db85b6b..240bab86a 100644 --- a/src/engine/math_util.c +++ b/src/engine/math_util.c @@ -121,12 +121,15 @@ void vec3f_cross(Vec3f dest, Vec3f a, Vec3f b) { /// Scale vector 'dest' so it has length 1 void vec3f_normalize(Vec3f dest) { - //! Possible division by zero - f32 invsqrt = 1.0f / sqrtf(sqr(dest[0]) + sqr(dest[1]) + sqr(dest[2])); + f32 invsqrt = sqrtf(sqr(dest[0]) + sqr(dest[1]) + sqr(dest[2])); - dest[0] *= invsqrt; - dest[1] *= invsqrt; - dest[2] *= invsqrt; + if (invsqrt != 0.0f) { + invsqrt = 1.0f / invsqrt; + + dest[0] *= invsqrt; + dest[1] *= invsqrt; + dest[2] *= invsqrt; + } } /// Copy matrix 'src' to 'dest' diff --git a/src/game/camera.c b/src/game/camera.c index c895009c9..619b13d74 100644 --- a/src/game/camera.c +++ b/src/game/camera.c @@ -736,10 +736,6 @@ static UNUSED void set_pos_to_mario(Vec3f foc, Vec3f pos, f32 yOff, f32 focYOff, vec3f_set_dist_and_angle(marioPos, pos, dist, pitch + sLakituPitch, yaw); vec3f_get_dist_and_angle(pos, sMarioCamState->pos, &posDist, &posPitch, &posYaw); - //! Useless get and set - vec3f_get_dist_and_angle(pos, foc, &focDist, &focPitch, &focYaw); - vec3f_set_dist_and_angle(pos, foc, focDist, focPitch, focYaw); - foc[1] = sMarioCamState->pos[1] + focYOff; } @@ -751,8 +747,6 @@ void set_camera_height(struct Camera *c, f32 goalHeight) { f32 marioFloorHeight; f32 marioCeilHeight; f32 camFloorHeight; - UNUSED u8 filler[8]; - UNUSED s16 action = sMarioCamState->action; f32 baseOff = 125.f; f32 camCeilHeight = find_ceil(c->pos[0], gLakituState.goalPos[1] - 50.f, c->pos[2], &surface); @@ -10299,12 +10293,6 @@ void cutscene_door_move_behind_mario(struct Camera *c) { vec3s_set(sCutsceneVars[0].angle, 0, sMarioCamState->faceAngle[1] + doorRotation, 0); vec3f_set(camOffset, 0.f, 125.f, 250.f); - if (doorRotation == 0) { //! useless code - camOffset[0] = 0.f; - } else { - camOffset[0] = 0.f; - } - offset_rotated(c->pos, sMarioCamState->pos, camOffset, sCutsceneVars[0].angle); } @@ -11220,9 +11208,7 @@ void play_cutscene(struct Camera *c) { #undef CUTSCENE if ((cutsceneDuration != 0) && !(gCutsceneTimer & CUTSCENE_STOP)) { - //! @bug This should check for 0x7FFF (CUTSCENE_LOOP) - //! instead, cutscenes that last longer than 0x3FFF frames will never end on their own - if (gCutsceneTimer < 0x3FFF) { + if (gCutsceneTimer < CUTSCENE_LOOP) { gCutsceneTimer += 1; } //! Because gCutsceneTimer is often set to 0x7FFF (CUTSCENE_LOOP), this conditional can only diff --git a/src/game/mario_actions_cutscene.c b/src/game/mario_actions_cutscene.c index 76fb96f36..dc857fed6 100644 --- a/src/game/mario_actions_cutscene.c +++ b/src/game/mario_actions_cutscene.c @@ -1959,10 +1959,9 @@ void generate_yellow_sparkles(s16 x, s16 y, s16 z, f32 radius) { spawn_object_abs_with_rot(gCurrentObject, 0, MODEL_NONE, bhvSparkleSpawn, x + offsetX, y + offsetY, z + offsetZ, 0, 0, 0); - //! copy paste error offsetX = offsetX * 4 / 3; - offsetX = offsetY * 4 / 3; - offsetX = offsetZ * 4 / 3; + offsetY = offsetY * 4 / 3; + offsetZ = offsetZ * 4 / 3; spawn_object_abs_with_rot(gCurrentObject, 0, MODEL_NONE, bhvSparkleSpawn, x - offsetX, y - offsetY, z - offsetZ, 0, 0, 0); diff --git a/src/game/object_list_processor.c b/src/game/object_list_processor.c index c57d304f4..12948fb04 100644 --- a/src/game/object_list_processor.c +++ b/src/game/object_list_processor.c @@ -566,9 +566,8 @@ void clear_objects(void) { * Update spawner and surface objects. */ void update_terrain_objects(void) { - gObjectCounter = update_objects_in_list(&gObjectLists[OBJ_LIST_SPAWNER]); - //! This was meant to be += - gObjectCounter = update_objects_in_list(&gObjectLists[OBJ_LIST_SURFACE]); + gObjectCounter = update_objects_in_list(&gObjectLists[OBJ_LIST_SPAWNER]); + gObjectCounter += update_objects_in_list(&gObjectLists[OBJ_LIST_SURFACE]); } /** @@ -576,7 +575,6 @@ void update_terrain_objects(void) { * the order specified by sObjectListUpdateOrder. */ void update_non_terrain_objects(void) { - UNUSED s32 unused; s32 listIndex; s32 i = 2; diff --git a/src/game/paintings.c b/src/game/paintings.c index f5d6b8fae..5b7e39c82 100644 --- a/src/game/paintings.c +++ b/src/game/paintings.c @@ -212,12 +212,11 @@ void stop_other_paintings(s16 *idptr, struct Painting *paintingGroup[]) { * @return Mario's y position inside the painting (bounded). */ f32 painting_mario_y(struct Painting *painting) { - //! Unnecessary use of double constants // Add 50 to make the ripple closer to Mario's center of mass. - f32 relY = gPaintingMarioYPos - painting->posY + 50.0; + f32 relY = gPaintingMarioYPos - painting->posY + 50.0f; - if (relY < 0.0) { - relY = 0.0; + if (relY < 0.0f) { + relY = 0.0f; } else if (relY > painting->size) { relY = painting->size; } diff --git a/src/goddard/shape_helper.c b/src/goddard/shape_helper.c index 18d1e8663..36d4c17c1 100644 --- a/src/goddard/shape_helper.c +++ b/src/goddard/shape_helper.c @@ -358,7 +358,6 @@ s32 scan_to_next_non_whitespace(void) { if (curChar == '\x1a') { //'SUB' character: "soft EOF" in older systems return FALSE; - continue; // unreachable } if (is_line_end(curChar)) { @@ -383,7 +382,6 @@ s32 is_next_buf_word(char *a0) { for (curChar = get_and_advance_buf(); curChar != '\0'; curChar = get_and_advance_buf()) { if (is_white_space(curChar) || is_line_end(curChar)) { break; - continue; // unreachable + nonsensical } wordBuf[bufLength] = curChar; bufLength++; From c9373256c40fad2279f75d0af5d47c5c26cdf130 Mon Sep 17 00:00:00 2001 From: Arceveti <73617174+Arceveti@users.noreply.github.com> Date: Wed, 22 Sep 2021 18:14:19 -0700 Subject: [PATCH 19/26] Fix vec3f_normalize --- src/engine/math_util.c | 61 +++++++++++++++--------------------------- 1 file changed, 22 insertions(+), 39 deletions(-) diff --git a/src/engine/math_util.c b/src/engine/math_util.c index 240bab86a..37fb64f0d 100644 --- a/src/engine/math_util.c +++ b/src/engine/math_util.c @@ -123,13 +123,13 @@ void vec3f_cross(Vec3f dest, Vec3f a, Vec3f b) { void vec3f_normalize(Vec3f dest) { f32 invsqrt = sqrtf(sqr(dest[0]) + sqr(dest[1]) + sqr(dest[2])); - if (invsqrt != 0.0f) { - invsqrt = 1.0f / invsqrt; + if (invsqrt < 0.00001f) return; - dest[0] *= invsqrt; - dest[1] *= invsqrt; - dest[2] *= invsqrt; - } + invsqrt = 1.0f / invsqrt; + + dest[0] *= invsqrt; + dest[1] *= invsqrt; + dest[2] *= invsqrt; } /// Copy matrix 'src' to 'dest' @@ -176,17 +176,10 @@ void mtxf_translate(Mat4 dest, Vec3f b) { */ void mtxf_lookat(Mat4 mtx, Vec3f from, Vec3f to, s16 roll) { register f32 invLength; - f32 dx; - f32 dz; - f32 xColY; - f32 yColY; - f32 zColY; - f32 xColZ; - f32 yColZ; - f32 zColZ; - f32 xColX; - f32 yColX; - f32 zColX; + f32 dx, dz; + f32 xColX, xColY, xColZ; + f32 yColX, yColY, yColZ; + f32 zColX, zColY, zColZ; dx = to[0] - from[0]; dz = to[2] - from[2]; @@ -978,37 +971,30 @@ void find_surface_on_ray_list(struct SurfaceNode *list, Vec3f orig, Vec3f dir, f #endif } -void find_surface_on_ray_cell(s16 cellX, s16 cellZ, Vec3f orig, Vec3f normalized_dir, f32 dir_length, struct Surface **hit_surface, Vec3f hit_pos, f32 *max_length, s32 flags) -{ +void find_surface_on_ray_cell(s16 cellX, s16 cellZ, Vec3f orig, Vec3f normalized_dir, f32 dir_length, struct Surface **hit_surface, Vec3f hit_pos, f32 *max_length, s32 flags) { // Skip if OOB - if (cellX >= 0 && cellX <= (NUM_CELLS - 1) && cellZ >= 0 && cellZ <= (NUM_CELLS - 1)) - { + if (cellX >= 0 && cellX <= (NUM_CELLS - 1) && cellZ >= 0 && cellZ <= (NUM_CELLS - 1)) { // Iterate through each surface in this partition - if (normalized_dir[1] > -0.99999f && flags & RAYCAST_FIND_CEIL) - { + if (normalized_dir[1] > -0.99999f && flags & RAYCAST_FIND_CEIL) { find_surface_on_ray_list(gStaticSurfacePartition[cellZ][cellX][SPATIAL_PARTITION_CEILS].next, orig, normalized_dir, dir_length, hit_surface, hit_pos, max_length); find_surface_on_ray_list(gDynamicSurfacePartition[cellZ][cellX][SPATIAL_PARTITION_CEILS].next, orig, normalized_dir, dir_length, hit_surface, hit_pos, max_length); } - if (normalized_dir[1] < 0.99999f && flags & RAYCAST_FIND_FLOOR) - { + if (normalized_dir[1] < 0.99999f && flags & RAYCAST_FIND_FLOOR) { find_surface_on_ray_list(gStaticSurfacePartition[cellZ][cellX][SPATIAL_PARTITION_FLOORS].next, orig, normalized_dir, dir_length, hit_surface, hit_pos, max_length); find_surface_on_ray_list(gDynamicSurfacePartition[cellZ][cellX][SPATIAL_PARTITION_FLOORS].next, orig, normalized_dir, dir_length, hit_surface, hit_pos, max_length); } - if (flags & RAYCAST_FIND_WALL) - { + if (flags & RAYCAST_FIND_WALL) { find_surface_on_ray_list(gStaticSurfacePartition[cellZ][cellX][SPATIAL_PARTITION_WALLS].next, orig, normalized_dir, dir_length, hit_surface, hit_pos, max_length); find_surface_on_ray_list(gDynamicSurfacePartition[cellZ][cellX][SPATIAL_PARTITION_WALLS].next, orig, normalized_dir, dir_length, hit_surface, hit_pos, max_length); } - if (flags & RAYCAST_FIND_WATER) - { + if (flags & RAYCAST_FIND_WATER) { find_surface_on_ray_list(gStaticSurfacePartition[cellZ][cellX][SPATIAL_PARTITION_WATER].next, orig, normalized_dir, dir_length, hit_surface, hit_pos, max_length); find_surface_on_ray_list(gDynamicSurfacePartition[cellZ][cellX][SPATIAL_PARTITION_WATER].next, orig, normalized_dir, dir_length, hit_surface, hit_pos, max_length); } } } -void find_surface_on_ray(Vec3f orig, Vec3f dir, struct Surface **hit_surface, Vec3f hit_pos, s32 flags) -{ +void find_surface_on_ray(Vec3f orig, Vec3f dir, struct Surface **hit_surface, Vec3f hit_pos, s32 flags) { f32 max_length; s32 cellZ, cellX, cellPrevX, cellPrevZ; f32 fCellZ, fCellX; @@ -1036,23 +1022,21 @@ void find_surface_on_ray(Vec3f orig, Vec3f dir, struct Surface **hit_surface, Ve cellPrevZ = cellZ; // Don't do DDA if straight down - if (normalized_dir[1] >= 0.99999f || normalized_dir[1] <= -0.99999f) - { + if (normalized_dir[1] >= 0.99999f || normalized_dir[1] <= -0.99999f) { find_surface_on_ray_cell(cellX, cellZ, orig, normalized_dir, dir_length, hit_surface, hit_pos, &max_length, flags); return; } // Get cells we cross using DDA if (ABS(dir[0]) >= ABS(dir[2])) - step = RAY_STEPS*ABS(dir[0]) / CELL_SIZE; + step = RAY_STEPS * ABS(dir[0]) / CELL_SIZE; else - step = RAY_STEPS*ABS(dir[2]) / CELL_SIZE; + step = RAY_STEPS * ABS(dir[2]) / CELL_SIZE; dx = dir[0] / step / CELL_SIZE; dz = dir[2] / step / CELL_SIZE; - for (i = 0; i < step && *hit_surface == NULL; i++) - { + for (i = 0; i < step && *hit_surface == NULL; i++) { find_surface_on_ray_cell(cellX, cellZ, orig, normalized_dir, dir_length, hit_surface, hit_pos, &max_length, flags); // Move cell coordinate @@ -1063,8 +1047,7 @@ void find_surface_on_ray(Vec3f orig, Vec3f dir, struct Surface **hit_surface, Ve cellX = fCellX; cellZ = fCellZ; - if ((cellPrevX != cellX) && (cellPrevZ != cellZ)) - { + if ((cellPrevX != cellX) && (cellPrevZ != cellZ)) { find_surface_on_ray_cell(cellX, cellPrevZ, orig, normalized_dir, dir_length, hit_surface, hit_pos, &max_length, flags); find_surface_on_ray_cell(cellPrevX, cellZ, orig, normalized_dir, dir_length, hit_surface, hit_pos, &max_length, flags); } From 23f29e64fc19dfb67f64beb77abb6a069eb5b01e Mon Sep 17 00:00:00 2001 From: Arceveti <73617174+Arceveti@users.noreply.github.com> Date: Wed, 22 Sep 2021 18:16:37 -0700 Subject: [PATCH 20/26] Fix burn smoke clearing G_CULL_BACK and not resetting it --- actors/burn_smoke/model.inc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/actors/burn_smoke/model.inc.c b/actors/burn_smoke/model.inc.c index fe4f1c367..ebace0d67 100644 --- a/actors/burn_smoke/model.inc.c +++ b/actors/burn_smoke/model.inc.c @@ -24,7 +24,7 @@ const Gfx burn_smoke_seg4_dl_04022000[] = { #else gsDPSetCombineMode(G_CC_MODULATERGBA, G_CC_MODULATERGBA), #endif - gsSPClearGeometryMode(G_LIGHTING | G_CULL_BACK), + gsSPClearGeometryMode(G_LIGHTING), gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON), gsSPEndDisplayList(), }; From 426d8ebae3b070c6cb72f13b66463edb3a32eca6 Mon Sep 17 00:00:00 2001 From: Arceveti <73617174+Arceveti@users.noreply.github.com> Date: Wed, 22 Sep 2021 21:38:12 -0700 Subject: [PATCH 21/26] Fix side flip ground pound visual bug --- src/game/mario_actions_airborne.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/game/mario_actions_airborne.c b/src/game/mario_actions_airborne.c index e2088511a..12dd2c1ed 100644 --- a/src/game/mario_actions_airborne.c +++ b/src/game/mario_actions_airborne.c @@ -603,10 +603,12 @@ s32 act_hold_freefall(struct MarioState *m) { s32 act_side_flip(struct MarioState *m) { if (m->input & INPUT_B_PRESSED) { + m->marioObj->header.gfx.angle[1] += 0x8000; return set_mario_action(m, ACT_DIVE, 0); } if (m->input & INPUT_Z_PRESSED) { + m->marioObj->header.gfx.angle[1] += 0x8000; return set_mario_action(m, ACT_GROUND_POUND, 0); } From 8ad773a7ebbf1690697fea275b917e8ea15c607c Mon Sep 17 00:00:00 2001 From: Arceveti <73617174+Arceveti@users.noreply.github.com> Date: Thu, 23 Sep 2021 12:59:06 -0700 Subject: [PATCH 22/26] Sort surfaces by upperY instrad of the first vertex --- src/engine/surface_load.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/engine/surface_load.c b/src/engine/surface_load.c index eae8335b7..1c7eb441c 100644 --- a/src/engine/surface_load.c +++ b/src/engine/surface_load.c @@ -132,13 +132,7 @@ static void add_surface_to_cell(s32 dynamic, s32 cellX, s32 cellZ, struct Surfac sortDir = 0; // insertion order } - //! (Surface Cucking) Surfaces are sorted by the height of their first - // vertex. Since vertices aren't ordered by height, this causes many - // lower triangles to be sorted higher. This worsens surface cucking since - // many functions only use the first triangle in surface order that fits, - // missing higher surfaces. - // upperY would be a better sort method. - surfacePriority = surface->vertex1[1] * sortDir; + surfacePriority = surface->upperY * sortDir; newNode->surface = surface; @@ -150,7 +144,7 @@ static void add_surface_to_cell(s32 dynamic, s32 cellX, s32 cellZ, struct Surfac // Loop until we find the appropriate place for the surface in the list. while (list->next != NULL) { - priority = list->next->surface->vertex1[1] * sortDir; + priority = list->next->surface->upperY * sortDir; if (surfacePriority > priority) { break; From 9b59eb0256094992d94bd2e76972424621fd5264 Mon Sep 17 00:00:00 2001 From: Arceveti <73617174+Arceveti@users.noreply.github.com> Date: Thu, 23 Sep 2021 13:37:03 -0700 Subject: [PATCH 23/26] Code cleanup --- CHANGES | 38 +-- Makefile | 10 +- Makefile.split | 2 +- README.md | 18 +- actors/bowser/flames_data.inc.c | 184 ++++++------- actors/coin/model.inc.c | 2 +- assets/demo_data.json | 8 +- enhancements/README.md | 4 +- enhancements/crash.patch | 4 +- enhancements/debug_box.patch | 6 +- enhancements/fps.patch | 2 +- enhancements/instantinput.patch | 4 +- enhancements/ique_support.patch | 36 +-- enhancements/long-render-patch.diff | 20 +- enhancements/mem_error_screen.patch | 34 +-- enhancements/platform_displacement_2.diff | 82 +++--- enhancements/record_demo.patch | 6 +- enhancements/reonucam3.patch | 86 +++--- enhancements/wide.diff | 88 +++--- haveyourcake2.patch | 24 +- include/level_commands.h | 6 +- include/text_menu_strings.h.in | 2 +- levels/castle_inside/painting.inc.c | 2 +- levels/ending/leveldata.c | 2 +- levels/hmc/areas/1/painting.inc.c | 2 +- sm64.ld | 4 +- sound/sequences/00_sound_player.s | 4 +- src/audio/synthesis.c | 11 - src/boot/main.c | 26 +- src/boot/memory.c | 4 +- src/buffers/adpcmbuf.c | 10 +- src/buffers/hvqbuf.c | 10 +- src/buffers/hvqmwork.c | 8 +- src/engine/behavior_script.c | 6 +- src/engine/surface_load.c | 18 +- src/engine/surface_load.h | 3 - src/game/_Ldtob.c | 1 - src/game/behaviors/activated_bf_plat.inc.c | 2 - src/game/behaviors/bbh_tilting_trap.inc.c | 2 - .../behaviors/beta_fish_splash_spawner.inc.c | 3 +- src/game/behaviors/bird.inc.c | 1 - src/game/behaviors/blue_fish.inc.c | 34 +-- src/game/behaviors/boo_cage.inc.c | 2 - src/game/behaviors/bowser.inc.c | 18 +- .../behaviors/bowser_falling_platform.inc.c | 1 - src/game/behaviors/bowser_flame.inc.c | 5 +- src/game/behaviors/camera_lakitu.inc.c | 6 +- src/game/behaviors/cannon.inc.c | 2 - src/game/behaviors/capswitch.inc.c | 4 +- src/game/behaviors/castle_floor_trap.inc.c | 1 - src/game/behaviors/chain_chomp.inc.c | 2 +- src/game/behaviors/chuckya.inc.c | 6 - src/game/behaviors/collide_particles.inc.c | 2 - src/game/behaviors/door.inc.c | 2 +- src/game/behaviors/dorrie.inc.c | 4 +- src/game/behaviors/elevator.inc.c | 12 +- src/game/behaviors/exclamation_box.inc.c | 1 - src/game/behaviors/fish.inc.c | 10 +- src/game/behaviors/flamethrower.inc.c | 1 - src/game/behaviors/goomba.inc.c | 2 - src/game/behaviors/heave_ho.inc.c | 1 - src/game/behaviors/hoot.inc.c | 2 +- src/game/behaviors/intro_lakitu.inc.c | 3 - src/game/behaviors/king_bobomb.inc.c | 4 +- src/game/behaviors/klepto.inc.c | 2 - src/game/behaviors/koopa.inc.c | 4 +- src/game/behaviors/koopa_shell.inc.c | 1 - src/game/behaviors/lll_hexagonal_ring.inc.c | 1 - src/game/behaviors/lll_volcano_flames.inc.c | 2 +- src/game/behaviors/manta_ray.inc.c | 18 +- src/game/behaviors/metal_box.inc.c | 1 - src/game/behaviors/piranha_bubbles.inc.c | 1 - src/game/behaviors/purple_switch.inc.c | 1 - src/game/behaviors/racing_penguin.inc.c | 2 +- src/game/behaviors/scuttlebug.inc.c | 1 - src/game/behaviors/seesaw_platform.inc.c | 1 - src/game/behaviors/sl_snowman_wind.inc.c | 11 +- src/game/behaviors/sl_walking_penguin.inc.c | 30 +- src/game/behaviors/snufit.inc.c | 8 +- src/game/behaviors/star_door.inc.c | 1 - src/game/behaviors/strong_wind_particle.inc.c | 12 +- .../behaviors/tilting_inverted_pyramid.inc.c | 6 +- src/game/behaviors/tower_platform.inc.c | 1 - src/game/behaviors/tree_particles.inc.c | 2 - src/game/behaviors/tuxie.inc.c | 4 +- src/game/behaviors/tweester.inc.c | 8 +- src/game/behaviors/ukiki.inc.c | 6 +- .../behaviors/water_splashes_and_waves.inc.c | 1 - src/game/behaviors/whomp.inc.c | 4 +- src/game/behaviors/wiggler.inc.c | 2 +- src/game/camera.c | 202 +------------- src/game/debug.c | 43 +-- src/game/game_init.c | 3 - src/game/hud.c | 8 - src/game/ingame_menu.c | 8 +- src/game/interaction.c | 8 +- src/game/level_update.c | 6 - src/game/level_update.h | 2 - src/game/macro_special_objects.c | 4 - src/game/mario_actions_airborne.c | 2 - src/game/mario_actions_automatic.c | 10 +- src/game/mario_actions_cutscene.c | 1 - src/game/mario_actions_moving.c | 2 - src/game/mario_actions_submerged.c | 3 +- src/game/mario_misc.c | 2 - src/game/moving_texture.c | 1 - src/game/nupiinitsram.c | 8 +- src/game/nupireadwritesram.c | 2 +- src/game/obj_behaviors_2.c | 1 - src/game/object_helpers.c | 6 +- src/game/object_list_processor.c | 5 - src/game/object_list_processor.h | 1 - src/game/paintings.c | 1 - src/game/platform_displacement.c | 4 - src/game/print.c | 2 - src/game/rendering_graph_node.c | 1 - src/game/sram.h | 4 +- src/game/vc_check.h | 2 +- src/goddard/debug_utils.c | 2 - src/goddard/draw_objects.c | 43 +-- src/goddard/dynlist_proc.c | 6 +- src/goddard/dynlists/dynlist_macros.h | 4 +- src/goddard/dynlists/dynlist_mario_face.c | 4 +- src/goddard/dynlists/dynlist_mario_master.c | 2 +- src/goddard/gd_macros.h | 2 +- src/goddard/gd_math.c | 17 +- src/goddard/gd_math.h | 2 +- src/goddard/gd_types.h | 4 +- src/goddard/joints.c | 2 - src/goddard/particles.c | 8 - src/goddard/renderer.c | 3 - src/goddard/shape_helper.c | 2 +- src/goddard/skin.c | 2 - src/hvqm/cfbkeep.c | 8 +- src/hvqm/getrecord.c | 22 +- src/hvqm/hvqm.c | 56 ++-- src/hvqm/hvqm.h | 4 +- src/hvqm/system.c | 16 +- src/hvqm/timekeeper.c | 54 ++-- src/libz/gzip.c | 2 +- src/menu/file_select.c | 3 - src/s2d_engine/fonts/comicsans.c | 256 +++++++++--------- src/s2d_engine/fonts/delfino.c | 256 +++++++++--------- src/s2d_engine/fonts/impact.c | 256 +++++++++--------- src/s2d_engine/fonts/papyrus.c | 256 +++++++++--------- src/s2d_engine/fonts/timesnewroman.c | 256 +++++++++--------- src/s2d_engine/fonts/ubuntu.c | 256 +++++++++--------- src/s2d_engine/x86_testing_ground/atoi.c | 8 +- src/usb/debug.c | 254 ++++++++--------- src/usb/debug.h | 84 +++--- src/usb/usb.c | 192 ++++++------- src/usb/usb.h | 62 ++--- tools/clang-tidy.sh | 10 +- tools/create_patch.sh | 2 +- tools/demo_data_converter.py | 2 +- tools/extract_data_for_mio.c | 2 +- tools/n64graphics_ci_dir/README.md | 2 +- tools/patch_elf_32bit.c | 2 +- tools/skyconv.c | 6 +- tools/slienc.c | 30 +- tools/stb/stb_image.h | 144 +++++----- tools/stb/stb_image_write.h | 56 ++-- tools/util/audiofile_strip.patch | 14 +- 163 files changed, 1806 insertions(+), 2251 deletions(-) diff --git a/CHANGES b/CHANGES index 4713fe887..9c468cba9 100644 --- a/CHANGES +++ b/CHANGES @@ -264,12 +264,12 @@ Refresh #7 38.) Fix BBH texture (#908) Refresh #6 -1.) Make tools work on MinGW (#804) -2.) Document mario_misc (#628) -3.) add patch_libmalloc.py script to work around compiler crashes (#811) -4.) Label the coffins file. (#829) -5.) Convert enhancements into patches (#827) -6.) Document Tweester.inc.c (#840) +1.) Make tools work on MinGW (#804) +2.) Document mario_misc (#628) +3.) add patch_libmalloc.py script to work around compiler crashes (#811) +4.) Label the coffins file. (#829) +5.) Convert enhancements into patches (#827) +6.) Document Tweester.inc.c (#840) 7.) EU OK and cleanup EU (#782) Refresh #5 @@ -300,21 +300,21 @@ Refresh #4 10.) Very minor white space fixes in Mario.c (#752) 11.) Renamed GRAVITY to OBJ_PHYSICS (#755) 12.) Use defined macros instead of literal values for interactions in behavior_data.c (#754) -13.) iQue Player console detection + full support (#756) -14.) Fix Goddard Mario head for little endian etc. (#757) +13.) iQue Player console detection + full support (#756) +14.) Fix Goddard Mario head for little endian etc. (#757) 15.) Small bits of audio doc (#749) -16.) Update diff script (#750) -17.) Nicer format for course/dialog text, enum for dialog IDs (#753) +16.) Update diff script (#750) +17.) Nicer format for course/dialog text, enum for dialog IDs (#753) 18.) first-diff: store most recent mtime during check (#759) 19.) Use Lights1 struct for light values (#760) -20.) Detect mips64-elf in diff.py (#761) -21.) Name display lists in gd renderer.c (#764) -22.) Document a variety of PU type crashes. (#765) -23.) Label object_behaviors. (#716) -24.) Update swoop.inc.c (#767) -25.) Label tilting_pyramid.inc.c (#768) -26.) Label red_coin.inc.c (#770) -27.) Use more level defines (#758) +20.) Detect mips64-elf in diff.py (#761) +21.) Name display lists in gd renderer.c (#764) +22.) Document a variety of PU type crashes. (#765) +23.) Label object_behaviors. (#716) +24.) Update swoop.inc.c (#767) +25.) Label tilting_pyramid.inc.c (#768) +26.) Label red_coin.inc.c (#770) +27.) Use more level defines (#758) 28.) Named Mario actions 6, 7, and 8 and noted causes of hands-free holding glitch (#769) Refresh #3 @@ -360,7 +360,7 @@ Changes from Refresh #1: 6.) Merge ucode.bin and ucode_unk.bin 7.) 64-bit fixes 8.) [AUDIO] Match func_80316928 -9.) Documented bug in Tuxie's mother's code +9.) Documented bug in Tuxie's mother's code 10.) [AUDIO] Slightly closer matching for process_level_music_dynamics 11.) Name channel scripts in sequence 0 12.) Nicer error message when sha1sum doesn't match diff --git a/Makefile b/Makefile index 4a3447ffa..47259e2e0 100644 --- a/Makefile +++ b/Makefile @@ -192,7 +192,7 @@ endif # UNF - whether to use UNFLoader flashcart library # 1 - includes code in ROM -# 0 - does not +# 0 - does not UNF ?= 0 $(eval $(call validate-option,UNF,0 1)) ifeq ($(UNF),1) @@ -204,7 +204,7 @@ endif # ISVPRINT - whether to fake IS-Viewer presence, # allowing for usage of CEN64 (and possibly Project64) to print messages to terminal. # 1 - includes code in ROM -# 0 - does not +# 0 - does not ISVPRINT ?= 0 $(eval $(call validate-option,ISVPRINT,0 1)) ifeq ($(ISVPRINT),1) @@ -222,7 +222,7 @@ endif # HVQM - whether to use HVQM fmv library # 1 - includes code in ROM -# 0 - does not +# 0 - does not HVQM ?= 0 $(eval $(call validate-option,HVQM,0 1)) ifeq ($(HVQM),1) @@ -232,7 +232,7 @@ endif # GODDARD - whether to use libgoddard (Mario Head) # 1 - includes code in ROM -# 0 - does not +# 0 - does not GODDARD ?= 0 $(eval $(call validate-option,GODDARD,0 1)) ifeq ($(GODDARD),1) @@ -476,7 +476,7 @@ else endif ENDIAN_BITWIDTH := $(BUILD_DIR)/endian-and-bitwidth EMULATOR = ~/Downloads/mupen64plus/mupen64plus-gui -EMU_FLAGS = +EMU_FLAGS = LOADER = loader64 LOADER_FLAGS = -vwf SHA1SUM = sha1sum diff --git a/Makefile.split b/Makefile.split index 43c086552..02925feed 100644 --- a/Makefile.split +++ b/Makefile.split @@ -152,7 +152,7 @@ $(BUILD_DIR)/levels/%/leveldata.elf: SEGMENT_ADDRESS := 0x07000000 # TODO: Generate these rules from the level configs? -define level_rules = +define level_rules = $(1)_SEG7_FILES := $$(patsubst %.png,%.inc.c,$$(wildcard levels/$(1)/*.png)) $$(BUILD_DIR)/levels/$(1)/leveldata.o: $$(addprefix $$(BUILD_DIR)/,$$($(1)_SEG7_FILES)) $$(BUILD_DIR)/levels/$(1)/leveldata.elf: TEXTURE_BIN := $(2) diff --git a/README.md b/README.md index 0394a2361..de012fd2a 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ This repo needs BOTH an US ROM and a JP ROM in order to build. Place baserom.us. This repo needs gcc in order to be able to build it. To install it, run `sudo apt install gcc-mips-linux-gnu` -This is a fork of the ultrasm64 repo by CrashOveride which includes the following commonly used patches (patches marked with `*` are toggleable in `config.h`): +This is a fork of the ultrasm64 repo by CrashOveride which includes the following commonly used patches (patches marked with `*` are toggleable in `config.h`): **Lighting Engine by Wiseguy** - Lighting Engine is available on a separate branch `(lighting-engine)`. Instructions on how to use it are in the readme of that branch. @@ -18,9 +18,9 @@ This is a fork of the ultrasm64 repo by CrashOveride which includes the followin **Collision:** - Slope fix and exposed ceilings fix -- No false ledgegrabs fix * -- Jump kick fix * -- 46 degree wallkicks * +- No false ledgegrabs fix * +- Jump kick fix * +- 46 degree wallkicks * - Pole fix - Possibility of disabling BLJs * - Hanging fix (mario can grab hangable ceilings from any state, instead of only jump or double jump) * @@ -51,12 +51,12 @@ This is a fork of the ultrasm64 repo by CrashOveride which includes the followin - Automatic console/emulator detection. If emulator is detected, LODs are disabled. * - Ability to configure whether there's a 100 coin star at all and how many coins are required to spawn it * - Ability to easily change the warp that EXIT COURSE takes you to via config.h, or disable it entirely. * -- 16 bit model IDs by someone2639. This means you can have up to 65536 models (lol). You can set the maximum number of model IDs in `config.h`. +- 16 bit model IDs by someone2639. This means you can have up to 65536 models (lol). You can set the maximum number of model IDs in `config.h`. - Apply_patch.sh improved - Removed the ifdef hell in `file_select.c` and `ingame_menu.c` - Added Blake's custom function for object model stuff: `obj_set_model` and `obj_has_model` - Added function to get the model ID from an object: `obj_get_model_id` (by Arceveti) -- The "far" variable is now u16, allowing you to increase the farclip (the max distance at which geometry is rendered). However, when increasing the farclip, make sure to increase the nearclip by the same ratio, or rendering will break on console and LLE plugins. +- The "far" variable is now u16, allowing you to increase the farclip (the max distance at which geometry is rendered). However, when increasing the farclip, make sure to increase the nearclip by the same ratio, or rendering will break on console and LLE plugins. - Many general use defines for object struct members, meant for use in custom object behaviors. Check `object_fields.h` for more info on this. (By MrComit) - Included `actors/group0.c` in `behavior_data.c` - The internal ROM name is now set with a define in `config.h` to make it simpler @@ -91,7 +91,7 @@ This is a fork of the ultrasm64 repo by CrashOveride which includes the followin - You can set the black border size to different values for console and emulator. It's set to 0 by default for both. * - This repo supports much better implementation of reverb over vanilla's fake echo reverb. Great for caves or eerie levels, as well as just a better audio experience in general. See `audio/synthesis.c` for more configuration info. (By ArcticJaguar725) * - Fazana's "puppyprint" text engine. * - - Use `print_small_text` to print normal text. The two last params are aligment and how many characters to print (-1 means PRINT_ALL). + - Use `print_small_text` to print normal text. The two last params are aligment and how many characters to print (-1 means PRINT_ALL). - Use `render_multi_image` to draw large texture rectangles consisting of multiple images on the screen. - More info in `puppyprint.c` - Wiseguy's Farcall TLB mapping allows to store executable code inside uncompressed segments, that can be loaded and ran as needed, instead of it having to be loaded at all times. See `farcall.h` in the include folder for instructions and details. @@ -119,7 +119,7 @@ Requirements are the same as regular SM64, however a GCC MIPS cross compiler is BinPNG (the CI texture converter) requires some python3 dependencies. Use pip to install them. -``pip install pypng bitstring`` +``pip install pypng bitstring`` ## UNFLoader support @@ -142,7 +142,7 @@ To target iQue, run make with the ``CONSOLE=bb`` argument. ## Compression -The repo also supports RNC (Rob Northen Compression). RNC has two methods. +The repo also supports RNC (Rob Northen Compression). RNC has two methods. Method 1 is designed to compress as small as possible, while method 2 is designed so that decompression is as fast as possible. diff --git a/actors/bowser/flames_data.inc.c b/actors/bowser/flames_data.inc.c index 1ba334ab8..23e3a0754 100644 --- a/actors/bowser/flames_data.inc.c +++ b/actors/bowser/flames_data.inc.c @@ -2,97 +2,97 @@ const s16 dBowserFlamesOrientationValues[] = { // posX, posY, posZ, rotY, rotX - 0, 280, 80, 0x00E9, 0x1A96, - 0, 278, 83, 0x00EC, 0x1C7F, - 0, 273, 92, 0x00F9, 0x20BF, - 0, 268, 102, 0x010F, 0x2519, - 0, 263, 109, 0x011D, 0x2751, - 0, 263, 110, 0x011C, 0x2714, - 0, 265, 106, 0x0112, 0x2601, - 0, 268, 102, 0x0109, 0x24C0, - 0, 271, 96, 0x00FF, 0x2358, - 0, 274, 90, 0x00F7, 0x21CB, - 0, 277, 84, 0x00EE, 0x201C, - 0, 280, 78, 0x00E7, 0x1E4E, - 0, 284, 71, 0x00DF, 0x1C64, - 0, 288, 63, 0x00D9, 0x1A61, - 0, 291, 56, 0x00D3, 0x184B, - 0, 295, 48, 0x00CF, 0x1622, - 0, 298, 40, 0x00CA, 0x13E9, - 0, 301, 32, 0x00C7, 0x11A5, - 0, 304, 23, 0x00C4, 0x0F59, - 0, 308, 15, 0x00C1, 0x0D08, - 0, 311, 7, 0x00C0, 0x0AB5, - 0, 313, 0, 0x00C0, 0x0863, - 0, 315, -8, 0x00BF, 0x0615, - 0, 317, -15, 0x00CE, 0x03A3, - 0, 319, -22, 0x00F8, 0x00ED, - 0, 320, -29, 0x0131, 0xFFFF, - 0, 322, -36, 0x0172, 0xFFFF, - 0, 322, -40, 0x01B5, 0xFFFF, - 0, 323, -45, 0x01ED, 0xFFFF, - 0, 323, -48, 0x0213, 0xFFFF, - 0, 323, -51, 0x0219, 0xFFFF, - 0, 323, -52, 0x01F2, 0xFFFF, - 0, 323, -51, 0x018F, 0xFFFF, - 0, 323, -49, 0x00E5, 0xFFFF, - 0, 322, -45, 0xFFFF, 0xFFFF, - 0, 320, -35, 0xFFFF, 0xFFFF, - 0, 317, -23, 0xFFFF, 0xFFFF, - 0, 312, -7, 0xFFFF, 0xFFFF, - 0, 306, 11, 0xFFFF, 0xFFFF, - 0, 299, 31, 0xFFFF, 0xFFFF, - 0, 288, 51, 0xFFFF, 0xFFFF, - 0, 278, 70, 0xFFFF, 0xFFFF, - 0, 267, 89, 0xFFFF, 0xFFFF, - 0, 256, 106, 0xFFFF, 0x023A, - 0, 244, 120, 0xFFFF, 0x04AA, - 0, 236, 132, 0xFFFF, 0x069F, - 0, 229, 139, 0xFFFF, 0x0803, - 0, 224, 144, 0xFFFF, 0x08C0, - 0, 222, 147, 0xFFFF, 0x0928, - 0, 221, 148, 0xFFFF, 0x099D, - 0, 221, 149, 0xFFFF, 0x0A16, - 0, 221, 150, 0xFFFF, 0x0A8D, - 0, 221, 150, 0xFFFF, 0x0AF6, - 0, 222, 150, 0xFFFF, 0x0B4A, - 0, 222, 150, 0xFFFF, 0x0B84, - 0, 222, 149, 0x020A, 0x0BA0, - 0, 223, 149, 0x0524, 0x0B9E, - 0, 225, 148, 0x07EC, 0x0B84, - 0, 226, 147, 0x0A3F, 0x0B57, - 0, 227, 145, 0x0BFB, 0x0B1F, - 0, 228, 144, 0x0D00, 0x0AE5, - 0, 230, 142, 0x0D6F, 0x0AA0, - 0, 232, 140, 0x0D8B, 0x0A48, - 0, 233, 138, 0x0D5D, 0x09DE, - 0, 236, 136, 0x0CED, 0x096A, - 0, 238, 134, 0x0C49, 0x08EA, - 0, 239, 132, 0x0B76, 0x0863, - 0, 241, 130, 0x0A80, 0x07D9, - 0, 244, 128, 0x0970, 0x074E, - 0, 246, 125, 0x084E, 0x06C7, - 0, 248, 122, 0x0723, 0x0649, - 0, 251, 120, 0x05F8, 0x05D7, - 0, 253, 117, 0x04D6, 0x0579, - 0, 254, 114, 0x03C3, 0x0532, - 0, 256, 111, 0x02C9, 0x0509, - 0, 259, 108, 0x01F0, 0x0504, - 0, 261, 105, 0x0141, 0x0525, - 0, 262, 103, 0x00C3, 0x0572, - 0, 264, 100, 0x006E, 0x0619, - 0, 267, 97, 0x0032, 0x0734, - 0, 268, 95, 0x000C, 0x08AF, - 0, 269, 93, 0xFFFF, 0x0A74, - 0, 272, 90, 0xFFFF, 0x0C70, - 0, 273, 88, 0xFFFF, 0x0E8E, - 0, 274, 86, 0x0014, 0x10B6, - 0, 275, 84, 0x0032, 0x12DA, - 0, 277, 82, 0x0056, 0x14E1, - 0, 277, 82, 0x007E, 0x16B9, - 0, 278, 80, 0x00A4, 0x184B, - 0, 278, 80, 0x00C6, 0x1983, - 0, 279, 80, 0x00DF, 0x1A4D, - 0, 280, 80, 0x00E9, 0x1A96, + 0, 280, 80, 0x00E9, 0x1A96, + 0, 278, 83, 0x00EC, 0x1C7F, + 0, 273, 92, 0x00F9, 0x20BF, + 0, 268, 102, 0x010F, 0x2519, + 0, 263, 109, 0x011D, 0x2751, + 0, 263, 110, 0x011C, 0x2714, + 0, 265, 106, 0x0112, 0x2601, + 0, 268, 102, 0x0109, 0x24C0, + 0, 271, 96, 0x00FF, 0x2358, + 0, 274, 90, 0x00F7, 0x21CB, + 0, 277, 84, 0x00EE, 0x201C, + 0, 280, 78, 0x00E7, 0x1E4E, + 0, 284, 71, 0x00DF, 0x1C64, + 0, 288, 63, 0x00D9, 0x1A61, + 0, 291, 56, 0x00D3, 0x184B, + 0, 295, 48, 0x00CF, 0x1622, + 0, 298, 40, 0x00CA, 0x13E9, + 0, 301, 32, 0x00C7, 0x11A5, + 0, 304, 23, 0x00C4, 0x0F59, + 0, 308, 15, 0x00C1, 0x0D08, + 0, 311, 7, 0x00C0, 0x0AB5, + 0, 313, 0, 0x00C0, 0x0863, + 0, 315, -8, 0x00BF, 0x0615, + 0, 317, -15, 0x00CE, 0x03A3, + 0, 319, -22, 0x00F8, 0x00ED, + 0, 320, -29, 0x0131, 0xFFFF, + 0, 322, -36, 0x0172, 0xFFFF, + 0, 322, -40, 0x01B5, 0xFFFF, + 0, 323, -45, 0x01ED, 0xFFFF, + 0, 323, -48, 0x0213, 0xFFFF, + 0, 323, -51, 0x0219, 0xFFFF, + 0, 323, -52, 0x01F2, 0xFFFF, + 0, 323, -51, 0x018F, 0xFFFF, + 0, 323, -49, 0x00E5, 0xFFFF, + 0, 322, -45, 0xFFFF, 0xFFFF, + 0, 320, -35, 0xFFFF, 0xFFFF, + 0, 317, -23, 0xFFFF, 0xFFFF, + 0, 312, -7, 0xFFFF, 0xFFFF, + 0, 306, 11, 0xFFFF, 0xFFFF, + 0, 299, 31, 0xFFFF, 0xFFFF, + 0, 288, 51, 0xFFFF, 0xFFFF, + 0, 278, 70, 0xFFFF, 0xFFFF, + 0, 267, 89, 0xFFFF, 0xFFFF, + 0, 256, 106, 0xFFFF, 0x023A, + 0, 244, 120, 0xFFFF, 0x04AA, + 0, 236, 132, 0xFFFF, 0x069F, + 0, 229, 139, 0xFFFF, 0x0803, + 0, 224, 144, 0xFFFF, 0x08C0, + 0, 222, 147, 0xFFFF, 0x0928, + 0, 221, 148, 0xFFFF, 0x099D, + 0, 221, 149, 0xFFFF, 0x0A16, + 0, 221, 150, 0xFFFF, 0x0A8D, + 0, 221, 150, 0xFFFF, 0x0AF6, + 0, 222, 150, 0xFFFF, 0x0B4A, + 0, 222, 150, 0xFFFF, 0x0B84, + 0, 222, 149, 0x020A, 0x0BA0, + 0, 223, 149, 0x0524, 0x0B9E, + 0, 225, 148, 0x07EC, 0x0B84, + 0, 226, 147, 0x0A3F, 0x0B57, + 0, 227, 145, 0x0BFB, 0x0B1F, + 0, 228, 144, 0x0D00, 0x0AE5, + 0, 230, 142, 0x0D6F, 0x0AA0, + 0, 232, 140, 0x0D8B, 0x0A48, + 0, 233, 138, 0x0D5D, 0x09DE, + 0, 236, 136, 0x0CED, 0x096A, + 0, 238, 134, 0x0C49, 0x08EA, + 0, 239, 132, 0x0B76, 0x0863, + 0, 241, 130, 0x0A80, 0x07D9, + 0, 244, 128, 0x0970, 0x074E, + 0, 246, 125, 0x084E, 0x06C7, + 0, 248, 122, 0x0723, 0x0649, + 0, 251, 120, 0x05F8, 0x05D7, + 0, 253, 117, 0x04D6, 0x0579, + 0, 254, 114, 0x03C3, 0x0532, + 0, 256, 111, 0x02C9, 0x0509, + 0, 259, 108, 0x01F0, 0x0504, + 0, 261, 105, 0x0141, 0x0525, + 0, 262, 103, 0x00C3, 0x0572, + 0, 264, 100, 0x006E, 0x0619, + 0, 267, 97, 0x0032, 0x0734, + 0, 268, 95, 0x000C, 0x08AF, + 0, 269, 93, 0xFFFF, 0x0A74, + 0, 272, 90, 0xFFFF, 0x0C70, + 0, 273, 88, 0xFFFF, 0x0E8E, + 0, 274, 86, 0x0014, 0x10B6, + 0, 275, 84, 0x0032, 0x12DA, + 0, 277, 82, 0x0056, 0x14E1, + 0, 277, 82, 0x007E, 0x16B9, + 0, 278, 80, 0x00A4, 0x184B, + 0, 278, 80, 0x00C6, 0x1983, + 0, 279, 80, 0x00DF, 0x1A4D, + 0, 280, 80, 0x00E9, 0x1A96, 0, 0, 0, 0x0000, 0x0000, }; diff --git a/actors/coin/model.inc.c b/actors/coin/model.inc.c index 032e19c02..77fdc5f86 100644 --- a/actors/coin/model.inc.c +++ b/actors/coin/model.inc.c @@ -106,7 +106,7 @@ const Gfx coin_seg3_dl_03007780[] = { gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 32 * 32 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)), gsDPSetTile(G_IM_FMT_IA, 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), -#endif +#endif gsSPEndDisplayList(), }; diff --git a/assets/demo_data.json b/assets/demo_data.json index 3652b4907..a5153fdf7 100644 --- a/assets/demo_data.json +++ b/assets/demo_data.json @@ -20,11 +20,11 @@ { "table": [ {"demofile":"bitdw", "ifdef":["VERSION_US", "VERSION_SH"]}, - + /* Whomp's Fortress has the wrong size. The original entries probably manually input the sizes. */ {"demofile":"wf", "extraSize":368}, - + {"demofile":"ccm"}, {"demofile":"bbh"}, {"demofile":"jrb"}, @@ -38,12 +38,12 @@ {"name":"jrb"}, {"name":"wf"}, {"name":"pss"}, - + /* Might be an unused demo, but it doesn't define a header, so it can't be normally called. Speculation: "blooper" take for CCM. Mario runs into the sign and aligns himself as if it were a mistake. */ {"name":"unused"}, - + {"name":"bitdw", "ifdef":["VERSION_US", "VERSION_SH"]} ] } diff --git a/enhancements/README.md b/enhancements/README.md index 241d82f34..504057151 100644 --- a/enhancements/README.md +++ b/enhancements/README.md @@ -8,10 +8,10 @@ To apply a patch, run `tools/apply_patch.sh [patch]` where `[patch]` is the name to the source code. Likewise, to undo the changes from a patch you applied, run -`tools/revert_patch.sh` with the name of the .patch file you wish to undo. +`tools/revert_patch.sh` with the name of the .patch file you wish to undo. To create your own enhancement patch, switch to the `master` Git -branch, make your changes to the code (but do not commit), then run `tools/create_patch.sh`. Your changes will be stored in the .patch file you specify. +branch, make your changes to the code (but do not commit), then run `tools/create_patch.sh`. Your changes will be stored in the .patch file you specify. The following enhancements are included in this directory: diff --git a/enhancements/crash.patch b/enhancements/crash.patch index 87c5c8f9e..e3935d6bf 100644 --- a/enhancements/crash.patch +++ b/enhancements/crash.patch @@ -163,7 +163,7 @@ index c3b97993..c552a485 100644 +++ b/lib/asm/__osExceptionPreamble.s @@ -11,8 +11,8 @@ #endif - + glabel __osExceptionPreamble - lui $k0, %hi(__osException) - addiu $k0, %lo(__osException) @@ -171,7 +171,7 @@ index c3b97993..c552a485 100644 + addiu $k0, %lo(__crash_handler_entry) jr $k0 nop - + diff --git a/sm64.ld b/sm64.ld index 7d9b5b4a..c7bb81b9 100755 --- a/sm64.ld diff --git a/enhancements/debug_box.patch b/enhancements/debug_box.patch index 4dacd2be9..088c96b43 100644 --- a/enhancements/debug_box.patch +++ b/enhancements/debug_box.patch @@ -7,17 +7,17 @@ index af9d0156..c68a7f6e 100644 #include "level_table.h" #include "dialog_ids.h" +#include "debug_box.h" - + struct SpawnInfo gPlayerSpawnInfos[1]; struct GraphNode *gGraphNodePointers[0x100]; @@ -363,6 +364,8 @@ void render_game(void) { if (gCurrentArea != NULL && !gWarpTransition.pauseRendering) { geo_process_root(gCurrentArea->unk04, D_8032CE74, D_8032CE78, gFBSetColor); - + + render_debug_boxes(); + gSPViewport(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&D_8032CF00)); - + gDPSetScissor(gDisplayListHead++, G_SC_NON_INTERLACE, 0, BORDER_HEIGHT, SCREEN_WIDTH, diff --git a/src/game/debug_box.c b/src/game/debug_box.c new file mode 100644 diff --git a/enhancements/fps.patch b/enhancements/fps.patch index e5e1accad..d34dea29b 100644 --- a/enhancements/fps.patch +++ b/enhancements/fps.patch @@ -5,7 +5,7 @@ index b961ca52..531231cf 100644 @@ -82,6 +82,47 @@ struct DemoInput gRecordedDemoInput = { 0 }; // Display // ---------------------------------------------------------------------------------------------------- - + +// SDK states that 1 cycle takes about 21.33 nanoseconds +#define SECONDS_PER_CYCLE 0.00000002133f + diff --git a/enhancements/instantinput.patch b/enhancements/instantinput.patch index 9cc01b3f5..f0b161fd0 100644 --- a/enhancements/instantinput.patch +++ b/enhancements/instantinput.patch @@ -5,7 +5,7 @@ index b633468..da65e01 100644 @@ -300,7 +300,10 @@ void rendering_init(void) { end_master_display_list(); send_display_list(&gGfxPool->spTask); - + - frameBufferIndex++; + // Skip incrementing the initial framebuffer index on emulators so that they display immediately as the Gfx task finishes + if ((*(volatile u32 *)0xA4100010) != 0) { // Read RDP Clock Register, has a value of zero on emulators @@ -13,7 +13,7 @@ index b633468..da65e01 100644 + } gGlobalTimer++; } - + @@ -326,11 +329,14 @@ void display_and_vsync(void) { osViSwapBuffer((void *) PHYSICAL_TO_VIRTUAL(gPhysicalFrameBuffers[sCurrFBNum])); profiler_log_thread5_time(THREAD5_END); diff --git a/enhancements/ique_support.patch b/enhancements/ique_support.patch index 8487c48ef..b0192dedc 100644 --- a/enhancements/ique_support.patch +++ b/enhancements/ique_support.patch @@ -75,12 +75,12 @@ index d550b846..bbaf2bcc 100644 @@ -1,4 +1,5 @@ #include "libultra_internal.h" +#include - + // TODO: merge with osEepromWrite typedef struct { @@ -13,11 +14,23 @@ s32 osEepromProbe(OSMesgQueue *mq) { unkStruct sp18; - + __osSiGetAccess(); - status = __osEepStatus(mq, &sp18); - if (status == 0 && (sp18.unk00 & 0x8000) != 0) { @@ -114,9 +114,9 @@ index ea784b2c..116dae2d 100644 @@ -1,4 +1,5 @@ #include "libultra_internal.h" +#include - + extern u8 _osLastSentSiCmd; - + @@ -42,33 +43,44 @@ s32 osEepromRead(OSMesgQueue *mq, u8 address, u8 *buffer) { return -1; } @@ -126,7 +126,7 @@ index ea784b2c..116dae2d 100644 + if (gConsoleType == CONSOLE_N64) { + sp34 = __osEepStatus(mq, &sp28); + if (sp34 != 0 || sp28.unk00 != 0x8000) { - + - return 8; - } - while (sp28.unk02 & 0x80) { @@ -195,46 +195,46 @@ index 1a86477b..a94f8721 100644 #include "libultra_internal.h" #include "osContInternal.h" +#include - + #ifndef AVOID_UB ALIGNED8 u32 D_80365E00[15]; @@ -52,36 +53,47 @@ s32 osEepromWrite(OSMesgQueue *mq, u8 address, u8 *buffer) { } - + __osSiGetAccess(); - sp34 = __osEepStatus(mq, &sp1c); + if (gConsoleType == CONSOLE_N64) { + sp34 = __osEepStatus(mq, &sp1c); - + - if (sp34 != 0 || sp1c.unk00 != 0x8000) { - return 8; - } + if (sp34 != 0 || sp1c.unk00 != 0x8000) { + return 8; + } - + - while (sp1c.unk02 & 0x80) { - __osEepStatus(mq, &sp1c); - } + while (sp1c.unk02 & 0x80) { + __osEepStatus(mq, &sp1c); + } - + - __osPackEepWriteData(address, buffer); + __osPackEepWriteData(address, buffer); - + - sp34 = __osSiRawStartDma(OS_WRITE, &D_80365E00); - osRecvMesg(mq, NULL, OS_MESG_BLOCK); + sp34 = __osSiRawStartDma(OS_WRITE, &D_80365E00); + osRecvMesg(mq, NULL, OS_MESG_BLOCK); - + - for (sp30 = 0; sp30 < 0x10; sp30++) { - (D_80365E00)[sp30] = 255; - } + for (sp30 = 0; sp30 < 0x10; sp30++) { + (D_80365E00)[sp30] = 255; + } - + - D_80365E3C = 0; - sp34 = __osSiRawStartDma(OS_READ, D_80365E00); - _osLastSentSiCmd = 5; @@ -243,7 +243,7 @@ index 1a86477b..a94f8721 100644 + sp34 = __osSiRawStartDma(OS_READ, D_80365E00); + _osLastSentSiCmd = 5; + osRecvMesg(mq, NULL, OS_MESG_BLOCK); - + - for (sp30 = 0; sp30 < 4; sp30++) { - sp2c++; - } @@ -256,7 +256,7 @@ index 1a86477b..a94f8721 100644 + } else if (gConsoleType == CONSOLE_IQUE) { + u8 *__osBbEepromAddress = * (u8**) 0x8000035C; + s32 i; - + - sp20 = *(unkStruct2 *) sp2c; - sp34 = (sp20.unk01 & 0xc0) >> 4; + for (i = 0; i < 8; i++) { @@ -277,9 +277,9 @@ index ba73024b..6deaf407 100644 #include "hardware.h" #include +#include - + #define PIF_ADDR_START (void *) 0x1FC007FC - + @@ -51,6 +52,7 @@ void osInitialize(void) { UNUSED u32 eu_sp30; #endif @@ -309,4 +309,4 @@ index 7d9b5b4a..be853a3b 100755 + BUILD_DIR/libultra.a:skGetId.o(.text) BUILD_DIR/lib/rsp.o(.text); #endif - + diff --git a/enhancements/long-render-patch.diff b/enhancements/long-render-patch.diff index dd72a4ebf..bbb445f00 100644 --- a/enhancements/long-render-patch.diff +++ b/enhancements/long-render-patch.diff @@ -25,7 +25,7 @@ index e5d59d8b5..75cd43a09 100644 -#endif + Mat4 temp; + register s32 i, j; -+ ++ + for( i = 0; i < 4; i++ ) { + for( j = 0; j < 3; j++ ) { + temp[i][j] = src[i][j] / WORLD_SCALE; @@ -35,19 +35,19 @@ index e5d59d8b5..75cd43a09 100644 + + guMtxF2L( temp, dest ); } - + /** diff --git a/src/engine/math_util.h b/src/engine/math_util.h index cb37d52d1..0826a8407 100644 --- a/src/engine/math_util.h +++ b/src/engine/math_util.h @@ -5,6 +5,14 @@ - + #include "types.h" - + +/* Scales the world down by this factor, increasing how far you can render on + * console in exchange for a slight loss in precision. -+ * ++ * + * For double extended boundary hacks, a value of 1.5f or 2.0f is good. + * For quadruple extended bounds, use 3.f or 4.f + */ @@ -63,11 +63,11 @@ index 58238e83f..150cff68b 100644 @@ -249,7 +249,7 @@ static void geo_process_perspective(struct GraphNodePerspective *node) { f32 aspect = (f32) gCurGraphNodeRoot->width / (f32) gCurGraphNodeRoot->height; #endif - + - guPerspective(mtx, &perspNorm, node->fov, aspect, node->near, node->far, 1.0f); + guPerspective(mtx, &perspNorm, node->fov, aspect, node->near / WORLD_SCALE, node->far / WORLD_SCALE, 1.0f); gSPPerspNormalize(gDisplayListHead++, perspNorm); - + gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(mtx), G_MTX_PROJECTION | G_MTX_LOAD | G_MTX_NOPUSH); @@ -267,17 +267,8 @@ static void geo_process_perspective(struct GraphNodePerspective *node) { * range of this node. @@ -92,7 +92,7 @@ index 58238e83f..150cff68b 100644 @@ -304,6 +295,17 @@ static void geo_process_switch(struct GraphNodeSwitchCase *node) { } } - + +static void make_roll_matrix(Mtx *mtx, s16 angle) { + Mat4 temp; + @@ -113,6 +113,6 @@ index 58238e83f..150cff68b 100644 } - mtxf_rotate_xy(rollMtx, node->rollScreen); + make_roll_matrix(rollMtx, node->rollScreen); - + gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(rollMtx), G_MTX_PROJECTION | G_MTX_MUL | G_MTX_NOPUSH); - + diff --git a/enhancements/mem_error_screen.patch b/enhancements/mem_error_screen.patch index 5752b8c15..7530c2fc5 100644 --- a/enhancements/mem_error_screen.patch +++ b/enhancements/mem_error_screen.patch @@ -7,17 +7,17 @@ index f50b7622..124c7ec6 100644 $(BUILD_DIR)/src/menu/star_select.o: $(BUILD_DIR)/include/text_strings.h $(BUILD_DIR)/src/game/ingame_menu.o: $(BUILD_DIR)/include/text_strings.h +$(BUILD_DIR)/src/boot/mem_error_screen.o: $(BUILD_DIR)/include/text_strings.h - - + + #==============================================================================# diff --git a/include/segments.h b/include/segments.h index a97d6ee8..186c968e 100644 --- a/include/segments.h +++ b/include/segments.h @@ -3,6 +3,9 @@ - + #include "config.h" - + +/* Use expansion pack RAM */ +#define USE_EXT_RAM 1 + @@ -31,14 +31,14 @@ index 749179b1..2f6f7a3c 100644 @@ -25,6 +25,11 @@ #define TEXT_PAUSE _("PAUSE") // Pause text, Castle Courses #define TEXT_HUD_CONGRATULATIONS _("CONGRATULATIONS") // Course Complete Text, Bowser Courses - + +// Memory Expansion Error Screen +#define TEXT_CONSOLE_8MB _("If you're using an N64 console, then you will need to buy an\nExpansion Pak to play this ROM hack.") +#define TEXT_PJ64 _("If you are using PJ64 1.6, go to:\nOptions > Settings > Rom Settings Tab > Memory Size\nthen select 8 MB from the drop-down box.") +#define TEXT_PJ64_2 _("If you are using PJ64 2.X, go to:\nOptions > Settings > Config: > Memory Size, select 8 MB") + #if defined(VERSION_JP) || defined(VERSION_SH) - + /** diff --git a/levels/entry.c b/levels/entry.c index 17c773ed..677a5ae9 100644 @@ -62,9 +62,9 @@ index 30a87806..6bf7b79a 100644 --- a/levels/intro/geo.c +++ b/levels/intro/geo.c @@ -15,6 +15,24 @@ - + #include "levels/intro/header.h" - + +const GeoLayout intro_geo_error_screen[] = { + GEO_NODE_SCREEN_AREA(0, SCREEN_WIDTH/2, SCREEN_HEIGHT/2, SCREEN_WIDTH/2, SCREEN_HEIGHT/2), + GEO_OPEN_NODE(), @@ -93,7 +93,7 @@ index 99277e86..04797cd7 100644 @@ -26,4 +26,8 @@ extern const LevelScript script_intro_L3[]; extern const LevelScript script_intro_L4[]; extern const LevelScript script_intro_L5[]; - + +extern const GeoLayout intro_geo_error_screen[]; +extern const LevelScript level_intro_entry_error_screen[]; +extern Gfx *geo18_display_error_message(u32 run, UNUSED struct GraphNode *sp44, UNUSED u32 sp48); @@ -106,7 +106,7 @@ index 04b8fc4c..ca9058c4 100644 @@ -18,6 +18,21 @@ #include "make_const_nonconst.h" #include "levels/intro/header.h" - + +const LevelScript level_intro_entry_error_screen[] = { + INIT_LEVEL(), + FIXED_LOAD(/*loadAddr*/ _goddardSegmentStart, /*romStart*/ _goddardSegmentRomStart, /*romEnd*/ _goddardSegmentRomEnd), @@ -131,12 +131,12 @@ index d41a91c8..7d047236 100644 +++ b/src/engine/level_script.h @@ -6,6 +6,7 @@ struct LevelCommand; - + extern u8 level_script_entry[]; +extern u8 level_script_entry_error_screen[]; - + struct LevelCommand *level_script_execute(struct LevelCommand *cmd); - + diff --git a/src/boot/main.c b/src/boot/main.c index 1a9d9e7e..f4f7a9e5 100644 --- a/src/boot/main.c @@ -146,13 +146,13 @@ index 1a9d9e7e..f4f7a9e5 100644 #include "game/main.h" #include "game/rumble_init.h" +#include "mem_error_screen.h" - + // Message IDs #define MESG_SP_COMPLETE 100 @@ -131,6 +132,10 @@ void alloc_pool(void) { void *start = (void *) SEG_POOL_START; void *end = (void *) SEG_POOL_END; - + + // Detect memory size + if (does_pool_end_lie_out_of_bounds(end)) + end = (void *)SEG_POOL_END_4MB; @@ -163,14 +163,14 @@ index 1a9d9e7e..f4f7a9e5 100644 @@ -336,7 +341,10 @@ void thread3_main(UNUSED void *arg) { create_thread(&gSoundThread, 4, thread4_sound, NULL, gThread4Stack + 0x2000, 20); osStartThread(&gSoundThread); - + - create_thread(&gGameLoopThread, 5, thread5_game_loop, NULL, gThread5Stack + 0x2000, 10); + if (!gNotEnoughMemory) + create_thread(&gGameLoopThread, 5, thread5_game_loop, NULL, gThread5Stack + 0x2000, 10); + else + create_thread(&gGameLoopThread, 5, thread5_mem_error_message_loop, NULL, gThread5Stack + 0x2000, 10); osStartThread(&gGameLoopThread); - + while (TRUE) { diff --git a/src/boot/mem_error_screen.c b/src/boot/mem_error_screen.c new file mode 100644 diff --git a/enhancements/platform_displacement_2.diff b/enhancements/platform_displacement_2.diff index ea57e5ef7..835993209 100644 --- a/enhancements/platform_displacement_2.diff +++ b/enhancements/platform_displacement_2.diff @@ -11,7 +11,7 @@ index 0000000..6bf33a8 +@@ -972,6 +972,8 @@ s32 bowser_check_fallen_off_stage(void) // bowser off stage? + return 0; + } -+ ++ ++struct PlatformDisplacementInfo sBowserDisplacementInfo; ++ + void (*sBowserActions[])(void) = { bowser_act_default, bowser_act_thrown_dropped, bowser_act_jump_onto_stage, bowser_act_dance, @@ -37,7 +37,7 @@ index 0000000..6bf33a8 +- set_mario_pos(mx, my, mz); ++ //set_mario_pos(mx, my, mz); + } -+ ++ + o->header.gfx.throwMatrix = transform; +diff --git a/src/game/platform_displacement.c b/src/game/platform_displacement.c +index 29a741c..d1bb016 100644 @@ -48,13 +48,13 @@ index 0000000..6bf33a8 + #include "platform_displacement.h" + #include "types.h" ++#include "sm64.h" -+ ++ + u16 D_8032FEC0 = 0; -+ ++ +@@ -84,96 +85,139 @@ void set_mario_pos(f32 x, f32 y, f32 z) { + gMarioStates[0].pos[2] = z; + } -+ ++ +-/** +- * Apply one frame of platform rotation to Mario or an object using the given +- * platform. If isMario is 0, use gCurrentObject. @@ -92,13 +92,13 @@ index 0000000..6bf33a8 +- z += platform->oVelZ; ++static struct PlatformDisplacementInfo sMarioDisplacementInfo; ++static Vec3f sMarioAmountDisplaced; -+ ++ +- if (rotation[0] != 0 || rotation[1] != 0 || rotation[2] != 0) { +- unused1 = rotation[0]; +- unused2 = rotation[2]; +- unused3 = platform->oFaceAngleYaw; ++extern s32 gGlobalTimer; -+ ++ +- if (isMario) { +- gMarioStates[0].faceAngle[1] += rotation[1]; +- } @@ -131,7 +131,7 @@ index 0000000..6bf33a8 ++ dst[2] = src[2] * scale[2]; ++ } ++} -+ ++ +- rotation[0] = platform->oFaceAnglePitch; +- rotation[1] = platform->oFaceAngleYaw; +- rotation[2] = platform->oFaceAngleRoll; @@ -202,19 +202,19 @@ index 0000000..6bf33a8 ++ displaceInfo->prevPlatform = platform; ++ displaceInfo->prevTimer = gGlobalTimer; ++} -+ ++ +- mtxf_rotate_zxy_and_translate(displaceMatrix, currentObjectOffset, rotation); +- linear_mtxf_mul_vec3f(displaceMatrix, newObjectOffset, relativeOffset); ++// Doesn't change in the code, set this to FALSE if you don't want inertia ++u8 gDoInertia = TRUE; -+ ++ +- x = platformPosX + newObjectOffset[0]; +- y = platformPosY + newObjectOffset[1]; +- z = platformPosZ + newObjectOffset[2]; +- } ++static u8 sShouldApplyInertia = FALSE; ++static u8 sInertiaFirstFrame = FALSE; -+ ++ +- if (isMario) { +- set_mario_pos(x, y, z); +- } else { @@ -244,14 +244,14 @@ index 0000000..6bf33a8 ++ sShouldApplyInertia = FALSE; ++ } + } -+ ++ + /** +- * If Mario's platform is not null, apply platform displacement. ++ * Apply platform displacement or inertia if required. + */ + void apply_mario_platform_displacement(void) { + struct Object *platform; -+ ++ + platform = gMarioPlatform; +- if (!(gTimeStopState & TIME_STOP_ACTIVE) && gMarioObject != NULL && platform != NULL) { +- apply_platform_displacement(1, platform); @@ -266,15 +266,15 @@ index 0000000..6bf33a8 ++ } + } + } -+ ++ +diff --git a/src/game/platform_displacement.h b/src/game/platform_displacement.h +index 556192b..3609e2d 100644 +--- a/src/game/platform_displacement.h ++++ b/src/game/platform_displacement.h +@@ -5,10 +5,19 @@ -+ ++ + #include "types.h" -+ ++ ++struct PlatformDisplacementInfo { ++ Vec3f prevPos; ++ Vec3f prevTransformedPos; @@ -299,7 +299,7 @@ index 97cba2a..410e612 100644 @@ -972,6 +972,8 @@ s32 bowser_check_fallen_off_stage(void) // bowser off stage? return 0; } - + +struct PlatformDisplacementInfo sBowserDisplacementInfo; + void (*sBowserActions[])(void) = { bowser_act_default, bowser_act_thrown_dropped, bowser_act_jump_onto_stage, bowser_act_dance, @@ -1938,7 +1938,7 @@ index ebce64f..29136e9 100644 - set_mario_pos(mx, my, mz); + //set_mario_pos(mx, my, mz); } - + o->header.gfx.throwMatrix = transform; diff --git a/src/game/platform_displacement.c b/src/game/platform_displacement.c index 9153bc4..1e8cd86 100644 @@ -1949,13 +1949,13 @@ index 9153bc4..1e8cd86 100644 #include "platform_displacement.h" #include "types.h" +#include "sm64.h" - + u16 D_8032FEC0 = 0; - + @@ -84,98 +85,144 @@ void set_mario_pos(f32 x, f32 y, f32 z) { gMarioStates[0].pos[2] = z; } - + -/** - * Apply one frame of platform rotation to Mario or an object using the given - * platform. If isMario is false, use gCurrentObject. @@ -1998,12 +1998,12 @@ index 9153bc4..1e8cd86 100644 - unused3 = platform->oFaceAngleYaw; +static struct PlatformDisplacementInfo sMarioDisplacementInfo; +static Vec3f sMarioAmountDisplaced; - + - if (isMario) { - gMarioStates[0].faceAngle[1] += rotation[1]; - } +extern s32 gGlobalTimer; - + - platformPosX = platform->oPosX; - platformPosY = platform->oPosY; - platformPosZ = platform->oPosZ; @@ -2032,7 +2032,7 @@ index 9153bc4..1e8cd86 100644 + dst[2] = src[2] * scale[2]; + } +} - + - rotation[0] = platform->oFaceAnglePitch; - rotation[1] = platform->oFaceAngleYaw; - rotation[2] = platform->oFaceAngleRoll; @@ -2103,19 +2103,19 @@ index 9153bc4..1e8cd86 100644 + displaceInfo->prevPlatform = platform; + displaceInfo->prevTimer = gGlobalTimer; +} - + - mtxf_rotate_zxy_and_translate(displaceMatrix, currentObjectOffset, rotation); - linear_mtxf_mul_vec3f(displaceMatrix, newObjectOffset, relativeOffset); +// Doesn't change in the code, set this to FALSE if you don't want inertia +u8 gDoInertia = TRUE; - + - x = platformPosX + newObjectOffset[0]; - y = platformPosY + newObjectOffset[1]; - z = platformPosZ + newObjectOffset[2]; - } +static u8 sShouldApplyInertia = FALSE; +static u8 sInertiaFirstFrame = FALSE; - + - if (isMario) { - set_mario_pos(x, y, z); - } else { @@ -2145,7 +2145,7 @@ index 9153bc4..1e8cd86 100644 + sShouldApplyInertia = FALSE; + } } - + /** - * If Mario's platform is not null, apply platform displacement. + * Apply platform displacement or inertia if required. @@ -2169,7 +2169,7 @@ index 9153bc4..1e8cd86 100644 + } } } - + + + #ifndef VERSION_JP @@ -2378,7 +2378,7 @@ index 0000000..ff20eca +@@ -85,96 +86,139 @@ void set_mario_pos(f32 x, f32 y, f32 z) { + gMarioStates[0].pos[2] = z; + } -+ ++ +-/** +- * Apply one frame of platform rotation to Mario or an object using the given +- * platform. If isMario is 0, use gCurrentObject. @@ -2416,13 +2416,13 @@ index 0000000..ff20eca +- z += platform->oVelZ; ++static struct PlatformDisplacementInfo sMarioDisplacementInfo; ++static Vec3f sMarioAmountDisplaced; -+ ++ +- if (rotation[0] != 0 || rotation[1] != 0 || rotation[2] != 0) { +- unused1 = rotation[0]; +- unused2 = rotation[2]; +- unused3 = platform->oFaceAngleYaw; ++extern s32 gGlobalTimer; -+ ++ +- if (isMario) { +- gMarioStates[0].faceAngle[1] += rotation[1]; +- } @@ -2455,7 +2455,7 @@ index 0000000..ff20eca ++ dst[2] = src[2] * scale[2]; ++ } ++} -+ ++ +- rotation[0] = platform->oFaceAnglePitch; +- rotation[1] = platform->oFaceAngleYaw; +- rotation[2] = platform->oFaceAngleRoll; @@ -2526,19 +2526,19 @@ index 0000000..ff20eca ++ displaceInfo->prevPlatform = platform; ++ displaceInfo->prevTimer = gGlobalTimer; ++} -+ ++ +- mtxf_rotate_zxy_and_translate(displaceMatrix, currentObjectOffset, rotation); +- linear_mtxf_mul_vec3f(displaceMatrix, newObjectOffset, relativeOffset); ++// Doesn't change in the code, set this to FALSE if you don't want inertia ++u8 gDoInertia = TRUE; -+ ++ +- x = platformPosX + newObjectOffset[0]; +- y = platformPosY + newObjectOffset[1]; +- z = platformPosZ + newObjectOffset[2]; +- } ++static u8 sShouldApplyInertia = FALSE; ++static u8 sInertiaFirstFrame = FALSE; -+ ++ +- if (isMario) { +- set_mario_pos(x, y, z); +- } else { @@ -2568,14 +2568,14 @@ index 0000000..ff20eca ++ sShouldApplyInertia = FALSE; ++ } + } -+ ++ + /** +- * If Mario's platform is not null, apply platform displacement. ++ * Apply platform displacement or inertia if required. + */ + void apply_mario_platform_displacement(void) { + struct Object *platform; -+ ++ + platform = gMarioPlatform; +- if (!(gTimeStopState & TIME_STOP_ACTIVE) && gMarioObject != NULL && platform != NULL) { +- apply_platform_displacement(1, platform); @@ -2590,15 +2590,15 @@ index 0000000..ff20eca ++ } + } + } -+ ++ diff --git a/src/game/platform_displacement.h b/src/game/platform_displacement.h index 556192b..3609e2d 100644 --- a/src/game/platform_displacement.h +++ b/src/game/platform_displacement.h @@ -5,10 +5,19 @@ - + #include "types.h" - + +struct PlatformDisplacementInfo { + Vec3f prevPos; + Vec3f prevTransformedPos; diff --git a/enhancements/record_demo.patch b/enhancements/record_demo.patch index a02b9f179..59fc3481b 100644 --- a/enhancements/record_demo.patch +++ b/enhancements/record_demo.patch @@ -13,7 +13,7 @@ index b961ca52..adfde049 100644 @@ -386,6 +387,45 @@ void display_and_vsync(void) { // Controls // ---------------------------------------------------------------------------------------------------- - + +/* + * This enhancement allows you to record gameplay demos for the mario head screen. + * @@ -59,7 +59,7 @@ index b961ca52..adfde049 100644 @@ -420,6 +460,118 @@ UNUSED static void record_demo(void) { gRecordedDemoInput.timer++; } - + +void record_new_demo_input(void) { + if (gRecordedDemoInput.timer == 1 && gRecordedDemoInputCopy.timer > 0) { + gRecordedInputs[gNumOfRecordedInputs].timer = gRecordedDemoInputCopy.timer; @@ -181,5 +181,5 @@ index b961ca52..adfde049 100644 read_controller_inputs(); + recordingDemo(); addr = level_script_execute(addr); - + display_and_vsync(); diff --git a/enhancements/reonucam3.patch b/enhancements/reonucam3.patch index 2b9c912e3..efc6aec6d 100644 --- a/enhancements/reonucam3.patch +++ b/enhancements/reonucam3.patch @@ -5,7 +5,7 @@ index 711d4562..f1c83171 100644 @@ -93,6 +93,12 @@ #define TEXT_HUD_WIDE_INFO _("PLEASE CONFIGURE YOUR DISPLAY OR YOUR EMULATOR TO\nSTRETCH THE IMAGE TO 16:9") #endif - + +#define TEXT_CAM_INFO_SLOWEST _("CAM SPEED: SLOWEST") +#define TEXT_CAM_INFO_SLOW _("CAM SPEED: SLOW") +#define TEXT_CAM_INFO_MEDIUM _("CAM SPEED: MEDIUM") @@ -13,7 +13,7 @@ index 711d4562..f1c83171 100644 +#define TEXT_CAM_INFO_FASTEST _("CAM SPEED: FASTEST") + #if defined(VERSION_JP) || defined(VERSION_SH) - + /** diff --git a/src/game/camera.c b/src/game/camera.c index 25b27983..2ff11930 100644 @@ -30,7 +30,7 @@ index 25b27983..2ff11930 100644 @@ -107,6 +108,7 @@ s16 sCreditsPlayer2Yaw; */ u8 sFramesPaused; - + + extern struct CameraFOVStatus sFOVState; extern struct TransitionInfo sModeTransition; @@ -56,7 +56,7 @@ index 25b27983..2ff11930 100644 f32 baseOff = 125.f; f32 camCeilHeight = find_ceil(c->pos[0], gLakituState.goalPos[1] - 50.f, c->pos[2], &surface); + f32 approachRate = 20.0f; - + if (sMarioCamState->action & ACT_FLAG_HANGING) { marioCeilHeight = sMarioGeometry.currCeilHeight; @@ -790,7 +795,8 @@ void set_camera_height(struct Camera *c, f32 goalHeight) { @@ -76,7 +76,7 @@ index 25b27983..2ff11930 100644 - f32 yOff = 125.f; + f32 yOff; f32 baseDist = 1000.f; - + + if (gMarioState->action & ACT_FLAG_SWIMMING) { + yOff = -125.f; + } else { @@ -99,7 +99,7 @@ index 25b27983..2ff11930 100644 @@ -1170,6 +1192,28 @@ void mode_radial_camera(struct Camera *c) { pan_ahead_of_player(c); } - + +// Returns the camera speed based on the user's camera speed setting +f32 set_camera_speed(void) { + switch(gCameraSpeed) { @@ -131,9 +131,9 @@ index 25b27983..2ff11930 100644 s16 oldAreaYaw = sAreaYaw; + // Get the camera speed based on the user's setting + f32 cameraSpeed = set_camera_speed(); - + radial_camera_input(c); - + - if (gPlayer1Controller->buttonPressed & R_CBUTTONS) { - s8DirModeYawOffset += DEGREES(45); - play_sound_cbutton_side(); @@ -193,7 +193,7 @@ index 25b27983..2ff11930 100644 + s8DirModeBaseYaw = (s8DirModeBaseYaw + 0x1000) & 0xE000; // Lock the camera to the nearest 45deg axis } -#endif - + lakitu_zoom(400.f, 0x900); c->nextYaw = update_8_directions_camera(c, c->focus, pos); + set_camera_height(c, pos[1]); @@ -202,7 +202,7 @@ index 25b27983..2ff11930 100644 sAreaYawChange = sAreaYaw - oldAreaYaw; - set_camera_height(c, pos[1]); } - + + /** * Updates the camera in outward radial mode. @@ -212,14 +212,14 @@ index 25b27983..2ff11930 100644 gLakituState.goalPos[2], &ceil); s16 yawDir; - -+ ++ handle_c_button_movement(c); vec3f_get_dist_and_angle(sMarioCamState->pos, c->pos, &dist, &pitch, &yaw); - + @@ -3036,6 +3097,8 @@ void update_lakitu(struct Camera *c) { void update_camera(struct Camera *c) { UNUSED u8 unused[24]; - + + extern s16 s8DirModeBaseYaw; + gCamera = c; @@ -241,7 +241,7 @@ index 25b27983..2ff11930 100644 - play_sound_if_cam_switched_to_lakitu_or_mario(); + //play_sound_if_cam_switched_to_lakitu_or_mario(); } - + // Initialize the camera @@ -3356,7 +3418,6 @@ void init_camera(struct Camera *c) { struct Surface *floor = 0; @@ -253,26 +253,26 @@ index 25b27983..2ff11930 100644 gPrevLevel = gCurrLevelArea / 16; @@ -4901,15 +4962,15 @@ void play_camera_buzz_if_c_sideways(void) { } - + void play_sound_cbutton_up(void) { - play_sound(SOUND_MENU_CAMERA_ZOOM_IN, gGlobalSoundSource); -+ //play_sound(SOUND_MENU_CAMERA_ZOOM_OUT, gGlobalSoundSource); ++ //play_sound(SOUND_MENU_CAMERA_ZOOM_OUT, gGlobalSoundSource); } - + void play_sound_cbutton_down(void) { - play_sound(SOUND_MENU_CAMERA_ZOOM_OUT, gGlobalSoundSource); + //play_sound(SOUND_MENU_CAMERA_ZOOM_OUT, gGlobalSoundSource); } - + void play_sound_cbutton_side(void) { - play_sound(SOUND_MENU_CAMERA_TURN, gGlobalSoundSource); + //play_sound(SOUND_MENU_CAMERA_TURN, gGlobalSoundSource); } - + void play_sound_button_change_blocked(void) { @@ -5013,7 +5074,7 @@ void radial_camera_input(struct Camera *c) { } - + // Zoom in / enter C-Up - if (gPlayer1Controller->buttonPressed & U_CBUTTONS) { + if (((gPlayer1Controller->buttonPressed & U_CBUTTONS) || (gPlayer2Controller->rawStickY > 40)) && (stickReset) && !(gPlayer1Controller->buttonDown & R_TRIG)) { @@ -281,7 +281,7 @@ index 25b27983..2ff11930 100644 play_sound_cbutton_up(); @@ -5023,7 +5084,7 @@ void radial_camera_input(struct Camera *c) { } - + // Zoom out - if (gPlayer1Controller->buttonPressed & D_CBUTTONS) { + if ((gPlayer1Controller->buttonPressed & D_CBUTTONS) || (gPlayer2Controller->rawStickY < -40)) { @@ -291,7 +291,7 @@ index 25b27983..2ff11930 100644 @@ -5035,6 +5096,12 @@ void radial_camera_input(struct Camera *c) { } } - + + if ((gPlayer2Controller->rawStickY > 40) || (gPlayer2Controller->rawStickY < -40)) { + stickReset = 0; + } else { @@ -327,7 +327,7 @@ index 317e33bf..6687016d 100644 s8 gEepromProbe; #endif @@ -739,6 +744,7 @@ void thread5_game_loop(UNUSED void *arg) { - + play_music(SEQ_PLAYER_SFX, SEQUENCE_ARGS(0, SEQ_SOUND_PLAYER), 0); set_sound_mode(save_file_get_sound_mode()); + gCameraSpeed = (save_file_get_camera_speed()); @@ -356,7 +356,7 @@ index 6cbfd8e1..01dd4de8 100644 @@ -59,6 +59,12 @@ void *languageTable[][3] = #endif }; - + +u8 textCamInfoSlowest[] = { TEXT_CAM_INFO_SLOWEST }; +u8 textCamInfoSlow[] = { TEXT_CAM_INFO_SLOW }; +u8 textCamInfoMedium[] = { TEXT_CAM_INFO_MEDIUM }; @@ -365,11 +365,11 @@ index 6cbfd8e1..01dd4de8 100644 + extern u8 gLastCompletedCourseNum; extern u8 gLastCompletedStarNum; - + @@ -1504,6 +1510,45 @@ void reset_red_coins_collected(void) { gRedCoinsCollected = 0; } - + +void render_camera_speed_setting(void) { + gSPDisplayList(gDisplayListHead++, dl_ia_text_begin); + gDPSetEnvColor(gDisplayListHead++, 255, 255, 255, gDialogTextAlpha); @@ -391,7 +391,7 @@ index 6cbfd8e1..01dd4de8 100644 + break; + } + gSPDisplayList(gDisplayListHead++, dl_ia_text_end); -+ ++ + if (gPlayer1Controller->buttonPressed & R_JPAD) { + if (gCameraSpeed < 4) { + gCameraSpeed += 1; @@ -406,7 +406,7 @@ index 6cbfd8e1..01dd4de8 100644 + gCameraSpeed = 4; + } + save_file_set_camera_speed(gCameraSpeed); -+ } ++ } +} + void change_dialog_camera_angle(void) { @@ -445,7 +445,7 @@ index 31e97bce..29b5e9c4 100644 + if ((heightBelowWater > 800.0f) && (camPreset != CAMERA_MODE_BEHIND_MARIO)) { + set_camera_mode(m->area->camera, CAMERA_MODE_BEHIND_MARIO, 1); + } - + - if ((m->action & ACT_GROUP_MASK) == ACT_GROUP_SUBMERGED) { - heightBelowWater = (f32)(m->waterLevel - 80) - m->pos[1]; - camPreset = m->area->camera->mode; @@ -465,7 +465,7 @@ index 31e97bce..29b5e9c4 100644 + if ((heightBelowWater < 400.0f) && (camPreset != CAMERA_MODE_WATER_SURFACE)) { + set_camera_mode(m->area->camera, CAMERA_MODE_WATER_SURFACE, 1); + } - + - // As long as Mario isn't drowning or at the top - // of the water with his head out, spawn bubbles. - if (!(m->action & ACT_FLAG_INTANGIBLE)) { @@ -488,7 +488,7 @@ index 31e97bce..29b5e9c4 100644 + gWaterCamOverride ^= 1; } } - + diff --git a/src/game/mario_actions_airborne.c b/src/game/mario_actions_airborne.c index ce6467ef..c7e998c1 100644 --- a/src/game/mario_actions_airborne.c @@ -496,7 +496,7 @@ index ce6467ef..c7e998c1 100644 @@ -1736,6 +1736,10 @@ s32 act_shot_from_cannon(struct MarioState *m) { s32 act_flying(struct MarioState *m) { s16 startPitch = m->faceAngle[0]; - + + if (gPlayer1Controller->buttonPressed & R_TRIG) { + gFlyingCamOverride ^= 1; + } @@ -507,33 +507,33 @@ index ce6467ef..c7e998c1 100644 @@ -1750,8 +1754,10 @@ s32 act_flying(struct MarioState *m) { return set_mario_action(m, ACT_FREEFALL, 0); } - + - if (m->area->camera->mode != CAMERA_MODE_BEHIND_MARIO) { + if (!gFlyingCamOverride) { set_camera_mode(m->area->camera, CAMERA_MODE_BEHIND_MARIO, 1); + } else { + set_camera_mode(m->area->camera, CAMERA_MODE_8_DIRECTIONS, 1); } - + if (m->actionState == 0) { @@ -1933,7 +1939,7 @@ s32 act_flying_triple_jump(struct MarioState *m) { } - + if (m->vel[1] < 4.0f) { - if (m->area->camera->mode != CAMERA_MODE_BEHIND_MARIO) { + if ((m->area->camera->mode != CAMERA_MODE_BEHIND_MARIO) && (!gFlyingCamOverride)) { set_camera_mode(m->area->camera, CAMERA_MODE_BEHIND_MARIO, 1); } - + @@ -1944,7 +1950,7 @@ s32 act_flying_triple_jump(struct MarioState *m) { set_mario_action(m, ACT_FLYING, 1); } - + - if (m->actionTimer++ == 10 && m->area->camera->mode != CAMERA_MODE_BEHIND_MARIO) { + if (m->actionTimer++ == 10 && m->area->camera->mode != CAMERA_MODE_BEHIND_MARIO && (!gFlyingCamOverride)) { set_camera_mode(m->area->camera, CAMERA_MODE_BEHIND_MARIO, 1); } - + diff --git a/src/game/save_file.c b/src/game/save_file.c index bcdcdbaf..3f0b8ca1 100644 --- a/src/game/save_file.c @@ -541,7 +541,7 @@ index bcdcdbaf..3f0b8ca1 100644 @@ -673,6 +673,12 @@ u8 save_file_get_widescreen_mode(void) { return gSaveBuffer.menuData[0].wideMode; } - + +void save_file_set_camera_speed(u8 speed) { + gSaveBuffer.menuData[0].cameraSpeedSetting = speed; + gMainMenuDataModified = TRUE; @@ -550,11 +550,11 @@ index bcdcdbaf..3f0b8ca1 100644 + void save_file_set_widescreen_mode(u8 mode) { gSaveBuffer.menuData[0].wideMode = mode; - + @@ -685,6 +691,10 @@ u16 save_file_get_sound_mode(void) { return gSaveBuffer.menuData[0].soundMode; } - + +u8 save_file_get_camera_speed(void) { + return gSaveBuffer.menuData[0].cameraSpeedSetting; +} @@ -571,7 +571,7 @@ index 64cf0c63..085ec1d9 100644 u8 wideMode: 1; #endif + u8 cameraSpeedSetting: 3; - + #ifdef VERSION_EU u8 language: 2; @@ -178,6 +179,8 @@ u16 save_file_get_sound_mode(void); @@ -581,5 +581,5 @@ index 64cf0c63..085ec1d9 100644 +u8 save_file_get_camera_speed(void); +void save_file_set_camera_speed(u8 speed); void save_file_move_cap_to_default_location(void); - + void disable_warp_checkpoint(void); diff --git a/enhancements/wide.diff b/enhancements/wide.diff index 2fba1ec2b..a6ea11247 100644 --- a/enhancements/wide.diff +++ b/enhancements/wide.diff @@ -17,9 +17,9 @@ index 0000000..d7f27ad ++#define TEXT_HUD_CURRENT_RATIO_169 _("CURRENT ASPECT RATIO: 16:9. PRESS L TO SWITCH TO 4:3") ++#define TEXT_HUD_WIDE_INFO _("PLEASE CONFIGURE YOUR DISPLAY OR YOUR EMULATOR TO") ++#define TEXT_HUD_WIDE_INFO2 _("STRETCH THE IMAGE TO 16:9") -+ ++ + #if defined(VERSION_JP) || defined(VERSION_SH) -+ ++ +diff --git a/src/game/ingame_menu.c b/src/game/ingame_menu.c +index 8190f88..deb69f5 100644 +--- a/src/game/ingame_menu.c @@ -33,7 +33,7 @@ index 0000000..d7f27ad ++u8 textWideInfo[] = { TEXT_HUD_WIDE_INFO }; ++u8 textWideInfo2[] = { TEXT_HUD_WIDE_INFO2 }; ++extern u8 widescreen = 0; -+ ++ + extern u8 gLastCompletedCourseNum; + extern u8 gLastCompletedStarNum; +@@ -2266,6 +2271,14 @@ void render_pause_my_score_coins(void) { @@ -49,7 +49,7 @@ index 0000000..d7f27ad ++ print_generic_string(10, 180, textWideInfo2); ++ } + #endif -+ ++ + actName = segmented_to_virtual(actNameTbl[(gCurrCourseNum - 1) * 6 + gDialogCourseActNum - 1]); +@@ -2557,10 +2570,25 @@ void render_pause_castle_main_strings(s16 x, s16 y) { + } @@ -63,7 +63,7 @@ index 0000000..d7f27ad ++ widescreen = 0; ++ } ++ } -+ ++ + gSPDisplayList(gDisplayListHead++, dl_ia_text_begin); + gDPSetEnvColor(gDisplayListHead++, 255, 255, 255, gDialogTextAlpha); +- @@ -90,7 +90,7 @@ index 0000000..d7f27ad ++ widescreen = 0; ++ } ++ } -+ ++ + if (gMarioStates[0].action & ACT_FLAG_PAUSE_EXIT) { + render_pause_course_options(99, 93, &gDialogLineNum, 15); +diff --git a/src/game/rendering_graph_node.c b/src/game/rendering_graph_node.c @@ -102,7 +102,7 @@ index 0000000..d7f27ad + #include "shadow.h" + #include "sm64.h" ++#define WIDESCREEN -+ ++ + /** + * This file contains the code that processes the scene graph for rendering. +@@ -235,6 +236,7 @@ static void geo_process_ortho_projection(struct GraphNodeOrthoProjection *node) @@ -126,7 +126,7 @@ index 0000000..d7f27ad ++ aspect = 1.33333f; ++ } + #endif -+ ++ + guPerspective(mtx, &perspNorm, node->fov, aspect, node->near, node->far, 1.0f); +diff --git a/src/menu/file_select.c b/src/menu/file_select.c +index c894797..dc759f7 100644 @@ -150,7 +150,7 @@ index 0000000..d7f27ad +--- a/src/menu/star_select.c ++++ b/src/menu/star_select.c +@@ -52,7 +52,7 @@ static s8 sSelectableStarIndex = 0; -+ ++ + // Act Selector menu timer that keeps counting until you choose an act. + static s32 sActSelectorMenuTimer = 0; +- @@ -178,7 +178,7 @@ index 0000000..d7f27ad + } +@@ -147,11 +154,21 @@ void bhv_act_selector_init(void) { + } -+ ++ + // Render star selector objects +- for (i = 0; i < sVisibleStars; i++) { +- sStarSelectorModels[i] = @@ -201,7 +201,7 @@ index 0000000..d7f27ad ++ sStarSelectorModels[i]->oStarSelectorSize = 1.0f; ++ } + } -+ ++ + render_100_coin_star(stars); diff --git a/enhancements/widescreenv2_ultrasm64.patch b/enhancements/widescreenv2_ultrasm64.patch new file mode 100644 @@ -221,9 +221,9 @@ index 0000000..667e6e2 ++#define TEXT_HUD_CURRENT_RATIO_169 _("CURRENT ASPECT RATIO: 16:9. PRESS L TO SWITCH TO 4:3") ++#define TEXT_HUD_WIDE_INFO _("PLEASE CONFIGURE YOUR DISPLAY OR YOUR EMULATOR TO") ++#define TEXT_HUD_WIDE_INFO2 _("STRETCH THE IMAGE TO 16:9") -+ ++ + #if defined(VERSION_JP) || defined(VERSION_SH) -+ ++ +diff --git a/src/game/ingame_menu.c b/src/game/ingame_menu.c +index 9344738..37bc1d1 100644 +--- a/src/game/ingame_menu.c @@ -237,13 +237,13 @@ index 0000000..667e6e2 ++u8 textWideInfo[] = { TEXT_HUD_WIDE_INFO }; ++u8 textWideInfo2[] = { TEXT_HUD_WIDE_INFO2 }; ++extern s32 widescreen = 0; -+ ++ + extern u8 gLastCompletedCourseNum; + extern u8 gLastCompletedStarNum; +@@ -1672,6 +1677,7 @@ s8 gDialogCourseActNum = 1; + #define DIAG_VAL2 240 // JP & US + #endif -+ ++ ++ + void render_dialog_entries(void) { + #ifdef VERSION_EU @@ -256,7 +256,7 @@ index 0000000..667e6e2 ++ //play_dialog_sound(gDialogID); + play_sound(SOUND_MENU_MESSAGE_APPEAR, gGlobalSoundSource); + } -+ ++ +@@ -2199,6 +2205,7 @@ void render_pause_my_score_coins(void) { + #else + u8 textCourse[] = { TEXT_COURSE }; @@ -277,12 +277,12 @@ index 0000000..667e6e2 ++ print_generic_string(10, 200, textWideInfo); ++ print_generic_string(10, 180, textWideInfo2); ++ } -++ +++ + #endif -+ ++ ++ + actName = segmented_to_virtual(actNameTbl[(gCurrCourseNum - 1) * 6 + gDialogCourseActNum - 1]); -+ ++ + if (starFlags & (1 << (gDialogCourseActNum - 1))) { +@@ -2557,10 +2574,25 @@ void render_pause_castle_main_strings(s16 x, s16 y) { + } @@ -299,7 +299,7 @@ index 0000000..667e6e2 ++ } + gSPDisplayList(gDisplayListHead++, dl_ia_text_begin); + gDPSetEnvColor(gDisplayListHead++, 255, 255, 255, gDialogTextAlpha); -+ ++ ++ if (widescreen == 0) { ++ print_generic_string(10, 20, textCurrRatio43); ++ } @@ -336,7 +336,7 @@ index 0000000..667e6e2 + #include "shadow.h" + #include "sm64.h" ++#define WIDESCREEN -+ ++ + /** + * This file contains the code that processes the scene graph for rendering. +@@ -235,6 +236,8 @@ static void geo_process_ortho_projection(struct GraphNodeOrthoProjection *node) @@ -361,7 +361,7 @@ index 0000000..667e6e2 ++ aspect = 1.33333f; ++ } + #endif -+ ++ + guPerspective(mtx, &perspNorm, node->fov, aspect, node->near, node->far, 1.0f); +diff --git a/src/menu/file_select.c b/src/menu/file_select.c +index 9437dcc..6ba1845 100644 @@ -385,11 +385,11 @@ index 0000000..667e6e2 +--- a/src/menu/star_select.c ++++ b/src/menu/star_select.c +@@ -52,6 +52,7 @@ static s8 sSelectableStarIndex = 0; -+ ++ + // Act Selector menu timer that keeps counting until you choose an act. + static s32 sActSelectorMenuTimer = 0; ++extern s32 widescreen; -+ ++ + /** + * Act Selector Star Type Loop Action +@@ -92,8 +93,14 @@ void bhv_act_selector_star_type_loop(void) { @@ -411,7 +411,7 @@ index 0000000..667e6e2 + } +@@ -147,11 +154,21 @@ void bhv_act_selector_init(void) { + } -+ ++ + // Render star selector objects +- for (i = 0; i < sVisibleStars; i++) { +- sStarSelectorModels[i] = @@ -434,7 +434,7 @@ index 0000000..667e6e2 ++ sStarSelectorModels[i]->oStarSelectorSize = 1.0f; ++ } + } -+ ++ + render_100_coin_star(stars); diff --git a/include/config.h b/include/config.h index 211a086..d1eb721 100644 @@ -464,9 +464,9 @@ index 749179b..3b23b41 100644 +#define TEXT_HUD_CURRENT_RATIO_169 _("CURRENT ASPECT RATIO: 16:9. PRESS L TO SWITCH TO 4:3") +#define TEXT_HUD_WIDE_INFO _("PLEASE CONFIGURE YOUR DISPLAY OR YOUR EMULATOR TO") +#define TEXT_HUD_WIDE_INFO2 _("STRETCH THE IMAGE TO 16:9") - + #if defined(VERSION_JP) || defined(VERSION_SH) - + diff --git a/levels/castle_grounds/script.c b/levels/castle_grounds/script.c index 626bece..b8191ea 100644 --- a/levels/castle_grounds/script.c @@ -492,7 +492,7 @@ index 8190f88..e4d0f32 100644 +u8 textWideInfo[] = { TEXT_HUD_WIDE_INFO }; +u8 textWideInfo2[] = { TEXT_HUD_WIDE_INFO2 }; +u8 widescreen = 1; - + extern u8 gLastCompletedCourseNum; extern u8 gLastCompletedStarNum; @@ -2266,6 +2271,24 @@ void render_pause_my_score_coins(void) { @@ -505,7 +505,7 @@ index 8190f88..e4d0f32 100644 + } else { + print_generic_string(10, 20, textCurrRatio43); + } -+ ++ + } + else { + if (COURSE_IS_MAIN_COURSE(gCurrCourseNum)) { @@ -513,12 +513,12 @@ index 8190f88..e4d0f32 100644 + } else { + print_generic_string(10, 20, textCurrRatio169); + } -+ ++ + print_generic_string(10, 200, textWideInfo); + print_generic_string(10, 180, textWideInfo2); + } #endif - + actName = segmented_to_virtual(actNameTbl[(gCurrCourseNum - 1) * 6 + gDialogCourseActNum - 1]); @@ -2557,10 +2580,25 @@ void render_pause_castle_main_strings(s16 x, s16 y) { } @@ -532,7 +532,7 @@ index 8190f88..e4d0f32 100644 + widescreen = 0; + } + } - + gSPDisplayList(gDisplayListHead++, dl_ia_text_begin); gDPSetEnvColor(gDisplayListHead++, 255, 255, 255, gDialogTextAlpha); - @@ -559,7 +559,7 @@ index 8190f88..e4d0f32 100644 + widescreen = 0; + } + } - + if (gMarioStates[0].action & ACT_FLAG_PAUSE_EXIT) { render_pause_course_options(99, 93, &gDialogLineNum, 15); diff --git a/src/game/level_update.c b/src/game/level_update.c @@ -567,14 +567,14 @@ index 4ecb902..b2d6e53 100644 --- a/src/game/level_update.c +++ b/src/game/level_update.c @@ -1247,6 +1247,10 @@ s32 lvl_init_or_update(s16 initOrUpdate, UNUSED s32 unused) { - + return result; } +extern u8 widescreen; +void lvl_set_widescreen(void) { + widescreen = 1; +} - + s32 lvl_init_from_save_file(UNUSED s16 arg0, s32 levelNum) { #ifdef VERSION_EU diff --git a/src/game/level_update.h b/src/game/level_update.h @@ -586,7 +586,7 @@ index 521b4ef..58d4e75 100644 s32 lvl_play_the_end_screen_sound(UNUSED s16 arg0, UNUSED s32 arg1); void basic_update(UNUSED s16 *arg); +void lvl_set_widescreen(void); - + #endif // LEVEL_UPDATE_H diff --git a/src/game/rendering_graph_node.c b/src/game/rendering_graph_node.c index 58238e8..09a6c87 100644 @@ -597,7 +597,7 @@ index 58238e8..09a6c87 100644 #include "shadow.h" #include "sm64.h" +#define WIDESCREEN - + /** * This file contains the code that processes the scene graph for rendering. @@ -39,6 +40,7 @@ @@ -605,7 +605,7 @@ index 58238e8..09a6c87 100644 Mat4 gMatStack[32]; Mtx *gMatStackFixed[32]; +f32 aspect; - + /** * Animation nodes have state in global variables, so this struct captures @@ -235,6 +237,7 @@ static void geo_process_ortho_projection(struct GraphNodeOrthoProjection *node) @@ -628,7 +628,7 @@ index 58238e8..09a6c87 100644 + aspect = 1.33333f; + } #endif - + guPerspective(mtx, &perspNorm, node->fov, aspect, node->near, node->far, 1.0f); @@ -755,7 +763,7 @@ static s32 obj_is_in_view(struct GraphNodeObject *node, Mat4 matrix) { // ! @bug The aspect ratio is not accounted for. When the fov value is 45, @@ -636,7 +636,7 @@ index 58238e8..09a6c87 100644 // visibly pop in or out at the edge of the screen. - halfFov = (gCurGraphNodeCamFrustum->fov / 2.0f + 1.0f) * 32768.0f / 180.0f + 0.5f; + halfFov = ((gCurGraphNodeCamFrustum->fov*aspect) / 2.0f + 1.0f) * 32768.0f / 180.0f + 0.5f; - + hScreenEdge = -matrix[3][2] * sins(halfFov) / coss(halfFov); // -matrix[3][2] is the depth, which gets multiplied by tan(halfFov) to get diff --git a/src/menu/file_select.c b/src/menu/file_select.c @@ -661,7 +661,7 @@ index 025dbf2..4840898 100644 --- a/src/menu/star_select.c +++ b/src/menu/star_select.c @@ -52,7 +52,7 @@ static s8 sSelectableStarIndex = 0; - + // Act Selector menu timer that keeps counting until you choose an act. static s32 sActSelectorMenuTimer = 0; - @@ -689,7 +689,7 @@ index 025dbf2..4840898 100644 } @@ -147,11 +154,21 @@ void bhv_act_selector_init(void) { } - + // Render star selector objects - for (i = 0; i < sVisibleStars; i++) { - sStarSelectorModels[i] = @@ -712,5 +712,5 @@ index 025dbf2..4840898 100644 + sStarSelectorModels[i]->oStarSelectorSize = 1.0f; + } } - + render_100_coin_star(stars); diff --git a/haveyourcake2.patch b/haveyourcake2.patch index c09681355..bf211006c 100644 --- a/haveyourcake2.patch +++ b/haveyourcake2.patch @@ -17,9 +17,9 @@ index 0ea6be6..bba0a94 100644 --- a/levels/ending/leveldata.c +++ b/levels/ending/leveldata.c @@ -250,389 +250,63 @@ const Gfx dl_cake_end_screen_eu_070297D8[] = { - + #include "levels/ending/cake.inc.c" - + -// 0x07025800 - 0x07025840 -static const Vtx cake_end_vertex_07025800[] = { - {{{ 0, 220, -1}, 0, { 0, 608}, {0xff, 0xff, 0xff, 0xff}}}, @@ -460,7 +460,7 @@ index 0ea6be6..bba0a94 100644 + CAKE_RECT((row) * NUM_CAKE_TEXTURES_X + 2),\ + CAKE_RECT((row) * NUM_CAKE_TEXTURES_X + 3),\ + CAKE_RECT((row) * NUM_CAKE_TEXTURES_X + 4) - + // 0x07026400 - 0x07027350 const Gfx dl_cake_end_screen[] = { @@ -640,198 +314,27 @@ const Gfx dl_cake_end_screen[] = { @@ -659,7 +659,7 @@ index 0ea6be6..bba0a94 100644 - gsDPLoadTextureBlock(cake_end_texture_47, G_IM_FMT_RGBA, G_IM_SIZ_16b, 80, 20, 0, G_TX_CLAMP, G_TX_CLAMP, 7, 6, G_TX_NOLOD, G_TX_NOLOD), - gsSPVertex(cake_end_vertex_070263C0, 4, 0), - gsSP2Triangles( 0, 1, 2, 0x0, 0, 2, 3, 0x0), -+ ++ + gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b_LOAD_BLOCK, 0, 0, + G_TX_LOADTILE, 0, + G_TX_CLAMP, G_TX_NOMASK, G_TX_NOLOD, @@ -680,7 +680,7 @@ index 0ea6be6..bba0a94 100644 + CAKE_ROW(5), + CAKE_ROW(6), + CAKE_ROW(7), - + gsDPPipeSync(), gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF), diff --git a/tools/skyconv.c b/tools/skyconv.c @@ -699,23 +699,23 @@ index b515373..1fdf027 100644 [CakeEU] = { {320, 224, 64, 32, 5, 7, false, false}, @@ -62,7 +62,7 @@ typedef struct { - + static const TableDimension TABLE_DIMENSIONS[ImageType_MAX] = { [Skybox] = {8, 10}, - [Cake] = {4, 12}, + [Cake] = {5, 8}, [CakeEU] = {5, 7}, }; - + @@ -104,15 +104,26 @@ static void split_tile(int col, int row, rgba *image, bool expanded) { int tileWidth = props.tileWidth; int tileHeight = props.tileHeight; int imageWidth = props.imageWidth; + int imageHeight = props.imageHeight; int numCols = props.numCols; - + int expandedWidth = IMAGE_PROPERTIES[type][true].tileWidth; - + + rgba black = {0, 0, 0, 0}; + for (int y = 0; y < tileHeight; y++) { @@ -731,13 +731,13 @@ index b515373..1fdf027 100644 + { + tiles[row * numCols + col].px[y * expandedWidth + x] = black; + } -+ ++ } } } @@ -339,11 +350,12 @@ static void write_cake_c() { } - + int numTiles = TABLE_DIMENSIONS[type].cols * TABLE_DIMENSIONS[type].rows; + fprintf(cFile, "ALIGNED8 static const u8 cake_end_texture_%sdata[] = {\n", euSuffx); for (int i = 0; i < numTiles; ++i) { @@ -749,4 +749,4 @@ index b515373..1fdf027 100644 + fputs("};\n\n", cFile); fclose(cFile); } - + diff --git a/include/level_commands.h b/include/level_commands.h index 07328e0e3..630e46e67 100644 --- a/include/level_commands.h +++ b/include/level_commands.h @@ -223,9 +223,9 @@ #define CHANGE_AREA_SKYBOX(area, segStart, segEnd) \ CMD_BBH(0x3E, 0x0C, area), \ CMD_PTR(segStart), \ - CMD_PTR(segEnd) - - + CMD_PTR(segEnd) + + #define INIT_LEVEL() \ CMD_BBH(0x1B, 0x04, 0x0000) diff --git a/include/text_menu_strings.h.in b/include/text_menu_strings.h.in index c9f93af3b..3ac477eb8 100644 --- a/include/text_menu_strings.h.in +++ b/include/text_menu_strings.h.in @@ -2,7 +2,7 @@ #define TEXT_MENU_STRINGS_H // These strings use a different table defined in menu_hud_lut -// Unlike text_strings.h.in, the charmap is different and +// Unlike text_strings.h.in, the charmap is different and // uses char values from charmap_menu.txt /** diff --git a/levels/castle_inside/painting.inc.c b/levels/castle_inside/painting.inc.c index d668820f1..096d2ebd6 100644 --- a/levels/castle_inside/painting.inc.c +++ b/levels/castle_inside/painting.inc.c @@ -574,7 +574,7 @@ static const Lights1 inside_castle_seg7_lights_07022528 = gdSPDefLights1( // No gdSPDefLights1 macro defined because of odd different light value (0xff and 0xfa) static const Lights1 inside_castle_seg7_lights_07022540 = { {{ {0x40, 0x40, 0x80}, 0, {0x40, 0x40, 0x80}, 0} }, - {{{ {0x64, 0x64, 0xff}, 0, {0x64, 0x64, 0xfa}, 0, {0x28, 0x28, 0x28},0} }} + {{{ {0x64, 0x64, 0xff}, 0, {0x64, 0x64, 0xfa}, 0, {0x28, 0x28, 0x28},0} }} }; // 0x07022558 - 0x07022598 diff --git a/levels/ending/leveldata.c b/levels/ending/leveldata.c index 84b953f4d..88eab4ed9 100644 --- a/levels/ending/leveldata.c +++ b/levels/ending/leveldata.c @@ -319,7 +319,7 @@ const Gfx dl_cake_end_screen[] = { gsDPSetCombineMode(G_CC_DECALRGB, G_CC_DECALRGB), gsDPSetRenderMode(G_RM_AA_OPA_SURF, G_RM_AA_OPA_SURF2), gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON), - + gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b_LOAD_BLOCK, 0, 0, G_TX_LOADTILE, 0, G_TX_CLAMP, G_TX_NOMASK, G_TX_NOLOD, diff --git a/levels/hmc/areas/1/painting.inc.c b/levels/hmc/areas/1/painting.inc.c index 86e688a17..a0c559617 100644 --- a/levels/hmc/areas/1/painting.inc.c +++ b/levels/hmc/areas/1/painting.inc.c @@ -10,7 +10,7 @@ static const Lights1 hmc_seg7_lights_070241B8 = gdSPDefLights1( // No gdSPDefLights1 macro defined because of odd different light value (0xff and 0xfa) static const Lights1 hmc_seg7_lights_070241D0 = { {{ {0x40, 0x40, 0x80}, 0, {0x40, 0x40, 0x80}, 0} }, - {{{ {0x64, 0x64, 0xff}, 0, {0x64, 0x64, 0xfa}, 0, {0x28, 0x28, 0x28},0} }} + {{{ {0x64, 0x64, 0xff}, 0, {0x64, 0x64, 0xfa}, 0, {0x28, 0x28, 0x28},0} }} }; // Appears to lock 4 of the sides when shimmering and in use. Unused. diff --git a/sm64.ld b/sm64.ld index 16b794161..28f16fb0b 100755 --- a/sm64.ld +++ b/sm64.ld @@ -174,7 +174,7 @@ SECTIONS */libgcc.a:*.o(.text); */libz.a:*.o(.text); */libhvqm2.a:*.o(.text); - BUILD_DIR/lib/rsp.o(.text); + BUILD_DIR/lib/rsp.o(.text); lib/PR/hvqm/hvqm2sp1.o(.text); _mainSegmentTextEnd = .; @@ -500,7 +500,7 @@ SECTIONS KEEP(BUILD_DIR/sound/sound_data.o(.data)); } END_SEG(assets) -#ifdef HVQM +#ifdef HVQM BEGIN_SEG(capcom, __romPos) SUBALIGN(2) { KEEP(BUILD_DIR/data/capcom.o(.data)); diff --git a/sound/sequences/00_sound_player.s b/sound/sequences/00_sound_player.s index 4bbc9d6e5..713af2c31 100644 --- a/sound/sequences/00_sound_player.s +++ b/sound/sequences/00_sound_player.s @@ -89,7 +89,7 @@ chan_dyncall .poll_023589: chan_delay1 chan_ioreadval 0 -chan_bltz .skip_023589 // if we have a signal: +chan_bltz .skip_023589 // if we have a signal: chan_beqz .force_stop_023589 // told to stop chan_jump .start_playing_023589 // told to play something else .skip_023589: @@ -2696,7 +2696,7 @@ layer_jump .layer_C4E chan_setinstr 0 chan_setlayer 0, .layer_FA2_eu chan_end - + .layer_FA2_eu: layer_delay 0x5 layer_end diff --git a/src/audio/synthesis.c b/src/audio/synthesis.c index df15bcd3a..2499690bb 100644 --- a/src/audio/synthesis.c +++ b/src/audio/synthesis.c @@ -780,13 +780,9 @@ u64 *synthesis_do_one_audio_update(s16 *aiBuf, s32 bufLen, u64 *cmd, s32 updateI } #else u64 *synthesis_do_one_audio_update(s16 *aiBuf, s32 bufLen, u64 *cmd, s32 updateIndex) { - UNUSED s32 pad1[1]; s16 ra; s16 t4; - UNUSED s32 pad[2]; struct ReverbRingBufferItem *v1; - UNUSED s32 pad2[1]; - s16 temp; v1 = &gSynthesisReverb.items[gSynthesisReverb.curFrame][updateIndex]; @@ -800,7 +796,6 @@ u64 *synthesis_do_one_audio_update(s16 *aiBuf, s32 bufLen, u64 *cmd, s32 updateI if (v1->lengthB != 0) { // Ring buffer wrapped aSetLoadBufferPair(cmd++, v1->lengthA, 0); - temp = 0; } // Use the reverb sound as initial sound for this audio update @@ -814,18 +809,12 @@ u64 *synthesis_do_one_audio_update(s16 *aiBuf, s32 bufLen, u64 *cmd, s32 updateI /*out*/ DMEM_ADDR_WET_LEFT_CH); } else { // Same as above but upsample the previously downsampled samples used for reverb first - temp = 0; //! jesus christ t4 = (v1->startPos & 7) * 2; ra = AUDIO_ALIGN(v1->lengthA + t4, 4); aSetLoadBufferPair(cmd++, 0, v1->startPos - t4 / 2); if (v1->lengthB != 0) { // Ring buffer wrapped aSetLoadBufferPair(cmd++, ra, 0); - //! We need an empty statement (even an empty ';') here to make the function match (because IDO). - //! However, copt removes extraneous statements and dead code. So we need to trick copt - //! into thinking 'temp' could be undefined, and luckily the compiler optimizes out the - //! useless assignment. - ra = ra + temp; } aSetBuffer(cmd++, 0, t4 + DMEM_ADDR_WET_LEFT_CH, DMEM_ADDR_LEFT_CH, bufLen << 1); aResample(cmd++, gSynthesisReverb.resampleFlags, (u16) gSynthesisReverb.resampleRate, VIRTUAL_TO_PHYSICAL2(gSynthesisReverb.resampleStateLeft)); diff --git a/src/boot/main.c b/src/boot/main.c index 02c0ecd60..9ad044634 100644 --- a/src/boot/main.c +++ b/src/boot/main.c @@ -496,27 +496,27 @@ void get_audio_frequency(void) void thread1_idle(UNUSED void *arg) { osCreateViManager(OS_PRIORITY_VIMGR); - switch ( osTvType ) { - case OS_TV_NTSC: - // NTSC + switch ( osTvType ) { + case OS_TV_NTSC: + // NTSC //osViSetMode(&osViModeTable[OS_VI_NTSC_LAN1]); VI = osViModeTable[OS_VI_NTSC_LAN1]; gConfig.tvType = MODE_NTSC; - break; - case OS_TV_MPAL: - // MPAL + break; + case OS_TV_MPAL: + // MPAL //osViSetMode(&osViModeTable[OS_VI_MPAL_LAN1]); VI = osViModeTable[OS_VI_NTSC_LAN1]; gConfig.tvType = MODE_MPAL; - break; - case OS_TV_PAL: - // PAL - //osViSetMode(&osViModeTable[OS_VI_PAL_LAN1]); + break; + case OS_TV_PAL: + // PAL + //osViSetMode(&osViModeTable[OS_VI_PAL_LAN1]); VI = osViModeTable[OS_VI_NTSC_LAN1]; gConfig.tvType = MODE_PAL; - break; - } - get_audio_frequency(); + break; + } + get_audio_frequency(); change_vi(&VI, SCREEN_WIDTH, SCREEN_HEIGHT); osViSetMode(&VI); osViBlack(TRUE); diff --git a/src/boot/memory.c b/src/boot/memory.c index 8dc7d7a43..b5703c69e 100644 --- a/src/boot/memory.c +++ b/src/boot/memory.c @@ -416,7 +416,7 @@ void *load_segment_decompress(s32 segment, u8 *srcStart, u8 *srcEnd) { dest = main_pool_alloc(*size, MEMORY_POOL_LEFT); #endif if (dest != NULL) { - osSyncPrintf("start decompress\n"); + osSyncPrintf("start decompress\n"); #ifdef GZIP expand_gzip(compressed, dest, compSize, (u32)size); #elif RNC1 @@ -428,7 +428,7 @@ void *load_segment_decompress(s32 segment, u8 *srcStart, u8 *srcEnd) { #elif MIO0 decompress(compressed, dest); #endif - osSyncPrintf("end decompress\n"); + osSyncPrintf("end decompress\n"); set_segment_base_addr(segment, dest); main_pool_free(compressed); } else { diff --git a/src/buffers/adpcmbuf.c b/src/buffers/adpcmbuf.c index fda80c087..f6ffc3386 100644 --- a/src/buffers/adpcmbuf.c +++ b/src/buffers/adpcmbuf.c @@ -1,10 +1,10 @@ -/* +/* * N64-HVQM2 library Sample program - * + * * FILE : adpcmbuf.c - * + * * Copyright (C) 1998,1999 NINTENDO Co.,Ltd. - * + * */ /* 1999-02-22 */ @@ -16,7 +16,7 @@ /* * Buffer for audio records (ADPCM data) read from the HVQM2 data. - * (Note) Please locate at a 16byte aligned address with the spec file. + * (Note) Please locate at a 16byte aligned address with the spec file. */ ALIGNED16 u8 adpcmbuf[AUDIO_RECORD_SIZE_MAX]; diff --git a/src/buffers/hvqbuf.c b/src/buffers/hvqbuf.c index 351fb040b..01990f059 100644 --- a/src/buffers/hvqbuf.c +++ b/src/buffers/hvqbuf.c @@ -1,10 +1,10 @@ -/* +/* * N64-HVQM2 library Sample program - * + * * FILE : hvqbuf.c - * + * * Copyright (C) 1998,1999 NINTENDO Co.,Ltd. - * + * */ /* 1999-02-22 */ @@ -15,7 +15,7 @@ #include /* - * Buffer for video records (HVQM2 compressed data) read from + * Buffer for video records (HVQM2 compressed data) read from * the HVQM2 data. * (Note) Please locate at a 16byte aligned address with the spec file. */ diff --git a/src/buffers/hvqmwork.c b/src/buffers/hvqmwork.c index c214983cf..094d15c83 100644 --- a/src/buffers/hvqmwork.c +++ b/src/buffers/hvqmwork.c @@ -1,10 +1,10 @@ -/* +/* * N64-HVQM2 library Sample program - * + * * FILE : hvqmwork.c - * + * * Copyright (C) 1998,1999 NINTENDO Co.,Ltd. - * + * */ /* 1999-02-12 */ diff --git a/src/engine/behavior_script.c b/src/engine/behavior_script.c index b523e1483..62dca63dc 100644 --- a/src/engine/behavior_script.c +++ b/src/engine/behavior_script.c @@ -784,8 +784,6 @@ static s32 bhv_cmd_scale(void) { // Command 0x30: Sets various parameters that the object uses for calculating physics. // Usage: SET_OBJ_PHYSICS(wallHitboxRadius, gravity, bounciness, dragStrength, friction, buoyancy, unused1, unused2) static s32 bhv_cmd_set_obj_physics(void) { - UNUSED f32 unused1, unused2; - gCurrentObject->oWallHitboxRadius = BHV_CMD_GET_1ST_S16(1); gCurrentObject->oGravity = BHV_CMD_GET_2ND_S16(1) / 100.0f; gCurrentObject->oBounciness = BHV_CMD_GET_1ST_S16(2) / 100.0f; @@ -793,8 +791,8 @@ static s32 bhv_cmd_set_obj_physics(void) { gCurrentObject->oFriction = BHV_CMD_GET_1ST_S16(3) / 100.0f; gCurrentObject->oBuoyancy = BHV_CMD_GET_2ND_S16(3) / 100.0f; - unused1 = BHV_CMD_GET_1ST_S16(4) / 100.0f; - unused2 = BHV_CMD_GET_2ND_S16(4) / 100.0f; + UNUSED f32 unused1 = BHV_CMD_GET_1ST_S16(4) / 100.0f; + UNUSED f32 unused2 = BHV_CMD_GET_2ND_S16(4) / 100.0f; gCurBhvCommand += 5; return BHV_PROC_CONTINUE; diff --git a/src/engine/surface_load.c b/src/engine/surface_load.c index 1c7eb441c..0c38b3c0a 100644 --- a/src/engine/surface_load.c +++ b/src/engine/surface_load.c @@ -498,23 +498,9 @@ static void load_environmental_regions(TerrainData **data) { gEnvironmentRegions = *data; numRegions = *(*data)++; - if (numRegions > 20) { - } - for (i = 0; i < numRegions; i++) { - UNUSED TerrainData val, loX, loZ, hiX, hiZ; - TerrainData height; - - val = *(*data)++; - - loX = *(*data)++; - hiX = *(*data)++; - loZ = *(*data)++; - hiZ = *(*data)++; - - height = *(*data)++; - - gEnvironmentLevels[i] = height; + *data += 5; + gEnvironmentLevels[i] = *(*data)++; } } diff --git a/src/engine/surface_load.h b/src/engine/surface_load.h index dea40ce43..0f8fea57d 100644 --- a/src/engine/surface_load.h +++ b/src/engine/surface_load.h @@ -27,9 +27,6 @@ enum typedef struct SurfaceNode SpatialPartitionCell[4]; -// Needed for bs bss reordering memes. -extern s32 unused8038BE90; - extern SpatialPartitionCell gStaticSurfacePartition[NUM_CELLS][NUM_CELLS]; extern SpatialPartitionCell gDynamicSurfacePartition[NUM_CELLS][NUM_CELLS]; extern struct SurfaceNode *sSurfaceNodePool; diff --git a/src/game/_Ldtob.c b/src/game/_Ldtob.c index 182a5e7bd..e3e39b483 100644 --- a/src/game/_Ldtob.c +++ b/src/game/_Ldtob.c @@ -63,7 +63,6 @@ void _Ldtob(printf_struct *args, u8 type) { u8 drop; s32 n2; /* */ - UNUSED u8 unused[0x4]; ptr = buff; val = args->value.f64; if (args->precision < 0) { diff --git a/src/game/behaviors/activated_bf_plat.inc.c b/src/game/behaviors/activated_bf_plat.inc.c index bb553c517..e58205fd0 100644 --- a/src/game/behaviors/activated_bf_plat.inc.c +++ b/src/game/behaviors/activated_bf_plat.inc.c @@ -61,8 +61,6 @@ void bhv_activated_back_and_forth_platform_init(void) { * Activated back-and-forth platform update function. */ void bhv_activated_back_and_forth_platform_update(void) { - UNUSED s32 unused[3]; - // oVelY is used for vertical platforms' movement and also for // horizontal platforms' dipping up/down when Mario gets on/off them if (gMarioObject->platform == o) { diff --git a/src/game/behaviors/bbh_tilting_trap.inc.c b/src/game/behaviors/bbh_tilting_trap.inc.c index d18f33dfd..953957512 100644 --- a/src/game/behaviors/bbh_tilting_trap.inc.c +++ b/src/game/behaviors/bbh_tilting_trap.inc.c @@ -8,8 +8,6 @@ * Update function for bhvBbhTiltingTrapPlatform. */ void bhv_bbh_tilting_trap_platform_loop(void) { - UNUSED s32 unused; - // US (and probably later) versions use oAction for the // if statement, while immediately setting it over here. // This was done so that Mario leaving or getting on the platform diff --git a/src/game/behaviors/beta_fish_splash_spawner.inc.c b/src/game/behaviors/beta_fish_splash_spawner.inc.c index 6daab4c6e..c007d0209 100644 --- a/src/game/behaviors/beta_fish_splash_spawner.inc.c +++ b/src/game/behaviors/beta_fish_splash_spawner.inc.c @@ -12,6 +12,5 @@ * Update function for bhvBetaFishSplashSpawner. */ void bhv_beta_fish_splash_spawner_loop(void) { - UNUSED u8 pad[12]; - UNUSED f32 water_level = find_water_level(o->oPosX, o->oPosZ); + // UNUSED f32 water_level = find_water_level(o->oPosX, o->oPosZ); } diff --git a/src/game/behaviors/bird.inc.c b/src/game/behaviors/bird.inc.c index e6d081a48..91670a673 100644 --- a/src/game/behaviors/bird.inc.c +++ b/src/game/behaviors/bird.inc.c @@ -52,7 +52,6 @@ static void bird_act_inactive(void) { * and the parent spawner bird if it's a spawned bird. */ static void bird_act_fly(void) { - UNUSED s32 unused; f32 distance; // Compute forward velocity and vertical velocity from oBirdSpeed and pitch diff --git a/src/game/behaviors/blue_fish.inc.c b/src/game/behaviors/blue_fish.inc.c index dcaa35b3a..939d8b3eb 100644 --- a/src/game/behaviors/blue_fish.inc.c +++ b/src/game/behaviors/blue_fish.inc.c @@ -12,13 +12,13 @@ void bhv_blue_fish_movement_loop(void) { // Initial dive phase after spawning case BLUE_FISH_ACT_DIVE: cur_obj_init_animation_with_accel_and_sound(0, 1.0f); - + // Assigns random values to variables that help determine natural motion. if (o->oTimer == 0) { o->oBlueFishRandomAngle = random_sign() << 11; o->oBlueFishRandomVel = random_float() * 2; o->oBlueFishRandomTime = (s32)(random_float() * 30) & 0xFE; - + // Adjusts pitch velocity or sets to zero dependant on outcome of randomSwitch. randomSwitch = random_float() * 5; if (randomSwitch < 2.0f) { @@ -27,20 +27,20 @@ void bhv_blue_fish_movement_loop(void) { o->oAngleVelPitch = 0; } } - + // Set forward velocity and progress oAction to BLUE_FISH_ACT_TURN. o->oForwardVel = o->oBlueFishRandomVel + 3.0f; if (o->oTimer >= o->oBlueFishRandomTime + 60) { o->oAction++; } - + // Set pitch velocity if (o->oTimer < (o->oBlueFishRandomTime + 60) / 2) { o->oFaceAnglePitch += o->oAngleVelPitch; } else { o->oFaceAnglePitch -= o->oAngleVelPitch; } - + // Calculate new Y velocity o->oVelY = -sins(o->oFaceAnglePitch) * o->oForwardVel; break; @@ -51,39 +51,39 @@ void bhv_blue_fish_movement_loop(void) { if (o->oTimer == 15) { o->oAction++; } - break; + break; // Animates and adjusts pitch to an upward direction. case BLUE_FISH_ACT_ASCEND: cur_obj_init_animation_with_accel_and_sound(0, 1.0f); - - // Progresses oAction to BLUE_FISH_ACT_TURN_BACK after elapsed time. + + // Progresses oAction to BLUE_FISH_ACT_TURN_BACK after elapsed time. if (o->oTimer >= o->oBlueFishRandomTime + 60) { o->oAction++; } - + // Adjusts pitch angle. Direction relies on time not passed. if (o->oTimer < (o->oBlueFishRandomTime + 60) / 2) { o->oFaceAnglePitch -= o->oAngleVelPitch; } else { o->oFaceAnglePitch += o->oAngleVelPitch; } - break; + break; // Animates and turns fish around case BLUE_FISH_ACT_TURN_BACK: cur_obj_init_animation_with_accel_and_sound(0, 2.0f); o->oMoveAngleYaw = (s32)(o->oBlueFishRandomAngle + o->oMoveAngleYaw); - + // Sets the fish back to the BLUE_FISH_ACT_DIVE phase. if (o->oTimer == 15) { o->oAction = BLUE_FISH_ACT_DIVE; } break; } - + // Calculates Y velocity and calls physics engine. o->oVelY = -sins(o->oFaceAnglePitch) * o->oForwardVel; cur_obj_move_using_fvel_and_gravity(); - + // Deletes object if the parent has oAction set to BLUE_FISH_ACT_DUPLICATE. if (o->parentObj->oAction == BLUE_FISH_ACT_DUPLICATE) { obj_mark_for_deletion(o); @@ -100,25 +100,25 @@ void bhv_tank_fish_group_loop(void) { switch (o->oAction) { case BLUE_FISH_ACT_SPAWN: if (gMarioCurrentRoom == 15 || gMarioCurrentRoom == 7) { - + // spawns fifteen fish and moves them within 200.0f for (i = 0; i < 15; i++) { fish = spawn_object_relative(0, 300, 0, -200, o, MODEL_FISH, bhvBlueFish); obj_translate_xyz_random(fish, 200.0f); } - + // Proceed to BLUE_FISH_ACT_ROOM phase. o->oAction++; } break; - + // Sets next oAction phase if Mario is not in rooms fifteen and seven. case BLUE_FISH_ACT_ROOM: if (gMarioCurrentRoom != 15 && gMarioCurrentRoom != 7) { o->oAction++; } break; - + // Sets oAction to the BLUE_FISH_ACT_SPAWN phase. case BLUE_FISH_ACT_DUPLICATE: o->oAction = BLUE_FISH_ACT_SPAWN; diff --git a/src/game/behaviors/boo_cage.inc.c b/src/game/behaviors/boo_cage.inc.c index 24e4e0622..0626ee20a 100644 --- a/src/game/behaviors/boo_cage.inc.c +++ b/src/game/behaviors/boo_cage.inc.c @@ -25,8 +25,6 @@ static struct ObjectHitbox sBooCageHitbox = { * Update function for bhvBooCage. */ void bhv_boo_cage_loop(void) { - UNUSED s32 unused; - obj_set_hitbox(o, &sBooCageHitbox); switch (o->oAction) { diff --git a/src/game/behaviors/bowser.inc.c b/src/game/behaviors/bowser.inc.c index 61ef8d515..164e769bd 100644 --- a/src/game/behaviors/bowser.inc.c +++ b/src/game/behaviors/bowser.inc.c @@ -428,7 +428,7 @@ void bowser_set_act_big_jump(void) { void bowser_bits_actions(void) { switch (o->oBowserIsReacting) { case FALSE: - // oBowserBitsJustJump never changes value, + // oBowserBitsJustJump never changes value, // so its always FALSE, maybe a debug define if (o->oBowserBitsJustJump == FALSE) { bowser_bits_action_list(); @@ -726,7 +726,6 @@ void bowser_short_second_hop(void) { * Makes Bowser do a big jump */ void bowser_act_big_jump(void) { - UNUSED s32 unused; if (o->oSubAction == 0) { // Set jump animation if (bowser_set_anim_jump()) { @@ -982,7 +981,6 @@ s32 bowser_check_hit_mine(void) { * Bowser's thrown act that gets called after Mario releases him */ void bowser_act_thrown(void) { - UNUSED s32 unused; // Keep Bowser's timer at 0 unless he lands if (o->oTimer < 2) o->oBowserTimer = 0; @@ -1026,7 +1024,6 @@ void bowser_set_goal_invisible(void) { */ void bowser_act_jump_onto_stage(void) { s32 onDynamicFloor; - UNUSED s32 unused; struct Surface *floor = o->oFloor; // Set dynamic floor check (Object platforms) @@ -1286,7 +1283,6 @@ s32 bowser_dead_default_stage_ending(void) { * Returns TRUE once done */ s32 bowser_dead_final_stage_ending(void) { - UNUSED s32 unused; s32 ret = FALSE; s32 dialogID; if (o->oBowserTimer < 2) { @@ -1383,11 +1379,11 @@ struct BowserTiltPlatformInfo { // 0 = Don't move // 1 = Move angle behind Bowser // -1 = Move angle in front of Bowser - s16 flag; + s16 flag; // Sets platform's tilt angle speed (pattern: positive then negative) - s16 angSpeed; + s16 angSpeed; // Sets how much time the platform can tilt, increases each move - s16 time; + s16 time; }; /** @@ -1414,9 +1410,7 @@ struct BowserTiltPlatformInfo sBowsertiltPlatformData[] = { void bowser_act_tilt_lava_platform(void) { // Set platform object struct Object *platform = cur_obj_nearest_object_with_behavior(bhvTiltingBowserLavaPlatform); - UNUSED s16 angle = o->oBowserAngleToCentre + 0x8000; s16 angSpeed; - UNUSED s32 unused; s32 i; s32 isNotTilting; // If there's not platform, return to default action @@ -1875,14 +1869,12 @@ void bowser_open_eye_switch(struct Object *obj, struct GraphNodeSwitchCase *swit * direction otherwise. */ Gfx *geo_switch_bowser_eyes(s32 callContext, struct GraphNode *node, UNUSED Mat4 *mtx) { - UNUSED s16 eyeShut; - UNUSED s32 unused; struct Object *obj = (struct Object *) gCurGraphNodeObject; struct GraphNodeSwitchCase *switchCase = (struct GraphNodeSwitchCase *) node; if (callContext == GEO_CONTEXT_RENDER) { if (gCurGraphNodeHeldObject != NULL) obj = gCurGraphNodeHeldObject->objNode; - switch (eyeShut = obj->oBowserEyesShut) { + switch (obj->oBowserEyesShut) { case FALSE: // eyes open, handle eye looking direction bowser_open_eye_switch(obj, switchCase); break; diff --git a/src/game/behaviors/bowser_falling_platform.inc.c b/src/game/behaviors/bowser_falling_platform.inc.c index 0d1e0e439..f6b66e7cf 100644 --- a/src/game/behaviors/bowser_falling_platform.inc.c +++ b/src/game/behaviors/bowser_falling_platform.inc.c @@ -27,7 +27,6 @@ void falling_bowser_plat_act_start(void) { } void falling_bowser_plat_act_check(void) { - UNUSED s32 unused; struct Object *bowser = o->oBitsPlatformBowser; if (bowser->platform == o) { if (bowser->oAction == BOWSER_ACT_BIG_JUMP && bowser->oBowserStatus & BOWSER_STATUS_BIG_JUMP) { diff --git a/src/game/behaviors/bowser_flame.inc.c b/src/game/behaviors/bowser_flame.inc.c index 4501d9779..9927390f4 100644 --- a/src/game/behaviors/bowser_flame.inc.c +++ b/src/game/behaviors/bowser_flame.inc.c @@ -116,8 +116,6 @@ void bhv_flame_moving_forward_growing_init(void) { } void bhv_flame_moving_forward_growing_loop(void) { - UNUSED s32 unused; - UNUSED struct Object *flame; obj_set_hitbox(o, &sGrowingBowserFlameHitbox); o->oFlameScale = o->oFlameScale + 0.5; cur_obj_scale(o->oFlameScale); @@ -131,7 +129,7 @@ void bhv_flame_moving_forward_growing_loop(void) { } if (o->oPosY < o->oFloorHeight) { o->oPosY = o->oFloorHeight; - flame = spawn_object(o, MODEL_RED_FLAME, bhvFlameBowser); + spawn_object(o, MODEL_RED_FLAME, bhvFlameBowser); obj_mark_for_deletion(o); } } @@ -152,7 +150,6 @@ void bhv_flame_floating_landing_init(void) { f32 sFlameFloatingYLimit[] = { -8.0f, -6.0f, -3.0f }; void bhv_flame_floating_landing_loop(void) { - UNUSED s32 unused; cur_obj_update_floor_and_walls(); cur_obj_move_standard(78); bowser_flame_move(); diff --git a/src/game/behaviors/camera_lakitu.inc.c b/src/game/behaviors/camera_lakitu.inc.c index 0126d0637..3d2ed7028 100644 --- a/src/game/behaviors/camera_lakitu.inc.c +++ b/src/game/behaviors/camera_lakitu.inc.c @@ -29,9 +29,7 @@ static void camera_lakitu_intro_act_trigger_cutscene(void) { //! These bounds are slightly smaller than the actual bridge bounds, allowing // the RTA speedrunning method of lakitu skip if (gMarioObject->oPosX > -544.0f && gMarioObject->oPosX < 545.0f && gMarioObject->oPosY > 800.0f - && gMarioObject->oPosZ > -2000.0f && gMarioObject->oPosZ < -177.0f - && gMarioObject->oPosZ < -177.0f) // always double check your conditions - { + && gMarioObject->oPosZ > -2000.0f && gMarioObject->oPosZ < -177.0f) { if (set_mario_npc_dialog(MARIO_DIALOG_LOOK_UP) == MARIO_DIALOG_STATUS_START) { o->oAction = CAMERA_LAKITU_INTRO_ACT_SPAWN_CLOUD; } @@ -115,7 +113,7 @@ static void camera_lakitu_intro_act_show_dialog(void) { } } } - } else if (cur_obj_update_dialog_with_cutscene(MARIO_DIALOG_LOOK_UP, + } else if (cur_obj_update_dialog_with_cutscene(MARIO_DIALOG_LOOK_UP, DIALOG_FLAG_TURN_TO_MARIO, CUTSCENE_DIALOG, DIALOG_034)) { o->oCameraLakituFinishedDialog = TRUE; } diff --git a/src/game/behaviors/cannon.inc.c b/src/game/behaviors/cannon.inc.c index 242b964d9..277d06825 100644 --- a/src/game/behaviors/cannon.inc.c +++ b/src/game/behaviors/cannon.inc.c @@ -86,7 +86,6 @@ void opened_cannon_act_5(void) { } void opened_cannon_act_1(void) { - UNUSED s32 unused; cur_obj_become_intangible(); cur_obj_disable_rendering(); o->oCannonIsActive = 0; @@ -98,7 +97,6 @@ void opened_cannon_act_2(void) { } void opened_cannon_act_3(void) { - UNUSED s32 unused; if (o->oTimer > 3) o->oAction = 0; } diff --git a/src/game/behaviors/capswitch.inc.c b/src/game/behaviors/capswitch.inc.c index 9f2c0fae4..3b400292e 100644 --- a/src/game/behaviors/capswitch.inc.c +++ b/src/game/behaviors/capswitch.inc.c @@ -39,9 +39,9 @@ void cap_switch_act_2(void) { } } else { //! Neither of these flags are defined in this function so they do nothing. - // On an extra note, there's a specific check for this cutscene and + // On an extra note, there's a specific check for this cutscene and // there's no dialog defined since the cutscene itself calls the dialog. - response = cur_obj_update_dialog_with_cutscene(MARIO_DIALOG_LOOK_FRONT, + response = cur_obj_update_dialog_with_cutscene(MARIO_DIALOG_LOOK_FRONT, (DIALOG_FLAG_TEXT_RESPONSE | DIALOG_FLAG_UNK_CAPSWITCH), CUTSCENE_CAP_SWITCH_PRESS, 0); if (response) o->oAction = 3; diff --git a/src/game/behaviors/castle_floor_trap.inc.c b/src/game/behaviors/castle_floor_trap.inc.c index 5f19bccc8..38e675bda 100644 --- a/src/game/behaviors/castle_floor_trap.inc.c +++ b/src/game/behaviors/castle_floor_trap.inc.c @@ -54,7 +54,6 @@ void bhv_castle_floor_trap_rotate(void) { } void bhv_castle_floor_trap_loop(void) { - UNUSED s32 unused[3]; switch (o->oAction) { case 0: bhv_castle_floor_trap_open_detect(); diff --git a/src/game/behaviors/chain_chomp.inc.c b/src/game/behaviors/chain_chomp.inc.c index 6af473e1c..74543a3c1 100644 --- a/src/game/behaviors/chain_chomp.inc.c +++ b/src/game/behaviors/chain_chomp.inc.c @@ -256,7 +256,7 @@ static void chain_chomp_released_trigger_cutscene(void) { //! Can delay this if we get into a cutscene-unfriendly action after the // last post ground pound and before this - if (set_mario_npc_dialog(MARIO_DIALOG_LOOK_UP) == MARIO_DIALOG_STATUS_SPEAK + if (set_mario_npc_dialog(MARIO_DIALOG_LOOK_UP) == MARIO_DIALOG_STATUS_SPEAK && (o->oMoveFlags & OBJ_MOVE_MASK_ON_GROUND) && cutscene_object(CUTSCENE_STAR_SPAWN, o) == 1) { o->oChainChompReleaseStatus = CHAIN_CHOMP_RELEASED_LUNGE_AROUND; o->oTimer = 0; diff --git a/src/game/behaviors/chuckya.inc.c b/src/game/behaviors/chuckya.inc.c index 8e70e957b..942e41246 100644 --- a/src/game/behaviors/chuckya.inc.c +++ b/src/game/behaviors/chuckya.inc.c @@ -6,12 +6,6 @@ struct UnusedChuckyaData { f32 unk8; }; -struct UnusedChuckyaData sUnusedChuckyaData[] = { { 2, 0.f, 1.f }, - { 2, 10.f, 1.f }, - { 2, 20.f, 1.f }, - { 2, 20.f, 1.f }, - { 8, 10.f, 1.f }}; - void common_anchor_mario_behavior(f32 forwardVel, f32 yVel, s32 flag) { switch (o->parentObj->oCommonAnchorAction) { case 0: diff --git a/src/game/behaviors/collide_particles.inc.c b/src/game/behaviors/collide_particles.inc.c index 67ca9566c..9a46ea50e 100644 --- a/src/game/behaviors/collide_particles.inc.c +++ b/src/game/behaviors/collide_particles.inc.c @@ -24,7 +24,6 @@ void bhv_punch_tiny_triangle_loop(void) { void bhv_punch_tiny_triangle_init(void) { s32 i; - UNUSED s32 unused; struct Object *triangle; for (i = 0; i < 6; i++) { triangle = spawn_object(o, MODEL_DIRT_ANIMATION, bhvPunchTinyTriangle); @@ -50,7 +49,6 @@ void bhv_wall_tiny_star_particle_loop(void) { void bhv_tiny_star_particles_init(void) { s32 i; - UNUSED s32 unused; struct Object *particle; for (i = 0; i < 7; i++) { particle = spawn_object(o, MODEL_CARTOON_STAR, bhvWallTinyStarParticle); diff --git a/src/game/behaviors/door.inc.c b/src/game/behaviors/door.inc.c index 0a68204f5..8685fdcbf 100644 --- a/src/game/behaviors/door.inc.c +++ b/src/game/behaviors/door.inc.c @@ -45,7 +45,7 @@ void play_warp_door_open_noise(void) { void bhv_door_loop(void) { s32 index = 0; - + while (sDoorActions[index].flag != (u32)~0) { if (cur_obj_clear_interact_status_flag(sDoorActions[index].flag)) { set_door_camera_event(); diff --git a/src/game/behaviors/dorrie.inc.c b/src/game/behaviors/dorrie.inc.c index d6d3c8c2a..c4ff79be7 100644 --- a/src/game/behaviors/dorrie.inc.c +++ b/src/game/behaviors/dorrie.inc.c @@ -68,7 +68,7 @@ void dorrie_act_lower_head(void) { if (o->oTimer > 150) { dorrie_begin_head_raise(FALSE); } else if (gMarioObject->platform == o) { - if (o->oDorrieForwardDistToMario > 830.0f + if (o->oDorrieForwardDistToMario > 830.0f && set_mario_npc_dialog(MARIO_DIALOG_LOOK_UP) == MARIO_DIALOG_STATUS_START) { dorrie_begin_head_raise(TRUE); } else if (o->oDorrieForwardDistToMario > 320.0f) { @@ -112,8 +112,6 @@ void dorrie_act_raise_head(void) { void bhv_dorrie_update(void) { f32 boundsShift; - UNUSED s32 unused1; - UNUSED s32 unused2; f32 maxOffsetY; if (!(o->activeFlags & ACTIVE_FLAG_IN_DIFFERENT_ROOM)) { diff --git a/src/game/behaviors/elevator.inc.c b/src/game/behaviors/elevator.inc.c index b143bef67..bd75c0d89 100644 --- a/src/game/behaviors/elevator.inc.c +++ b/src/game/behaviors/elevator.inc.c @@ -1,11 +1,11 @@ // elevator.c.inc -static s16 sElevatorHeights[] = { -51, 0, 0, - -461, 0, 0, - -512, 0, 0, - -2611, 0, 0, - -2360, 0, 0, - 214, 0, 0, +static s16 sElevatorHeights[] = { -51, 0, 0, + -461, 0, 0, + -512, 0, 0, + -2611, 0, 0, + -2360, 0, 0, + 214, 0, 0, -50, 1945, 1 }; void elevator_starting_shake(void) { diff --git a/src/game/behaviors/exclamation_box.inc.c b/src/game/behaviors/exclamation_box.inc.c index a05ff0407..ab2e41840 100644 --- a/src/game/behaviors/exclamation_box.inc.c +++ b/src/game/behaviors/exclamation_box.inc.c @@ -86,7 +86,6 @@ void exclamation_box_act_2(void) { } void exclamation_box_act_3(void) { - UNUSED s32 unused; cur_obj_move_using_fvel_and_gravity(); if (o->oVelY < 0.0f) { o->oVelY = 0.0f; diff --git a/src/game/behaviors/fish.inc.c b/src/game/behaviors/fish.inc.c index 9590b096e..a6ce5499e 100644 --- a/src/game/behaviors/fish.inc.c +++ b/src/game/behaviors/fish.inc.c @@ -84,7 +84,7 @@ void bhv_fish_spawner_loop(void) { static void fish_vertical_roam(s32 speed) { f32 parentY = o->parentObj->oPosY; - // If the stage is Secret Aquarium, the fish can + // If the stage is Secret Aquarium, the fish can // travel as far vertically as they wish. if (gCurrLevelNum == LEVEL_SA) { if (500.0f < absf(o->oPosY - o->oFishGoalY)) { @@ -125,7 +125,7 @@ static void fish_act_roam(void) { } o->oFishGoalY = gMarioObject->oPosY + o->oFishHeightOffset; - + // Rotate the fish towards Mario. cur_obj_rotate_yaw_toward(o->oAngleToMario, 0x400); @@ -201,7 +201,7 @@ static void fish_act_flee(void) { } else { fish_vertical_roam(4); } - + // Don't let the fish leave the water vertically. } else { o->oPosY = o->oFishWaterLevel - 50.0f; @@ -234,9 +234,7 @@ static void (*sFishActions[])(void) = { /** * Main loop for fish */ -void bhv_fish_loop(void) -{ - UNUSED s32 unused[4]; +void bhv_fish_loop(void) { cur_obj_scale(1.0f); // oFishWaterLevel tracks if a fish has roamed out of water. diff --git a/src/game/behaviors/flamethrower.inc.c b/src/game/behaviors/flamethrower.inc.c index 4d1bb9093..adcb23b85 100644 --- a/src/game/behaviors/flamethrower.inc.c +++ b/src/game/behaviors/flamethrower.inc.c @@ -38,7 +38,6 @@ void bhv_flamethrower_loop(void) { f32 flameVel; s32 flameTimeRemaining; s32 model; - UNUSED u8 pad[8]; if (o->oAction == 0) { if (gCurrLevelNum != LEVEL_BBH || gMarioOnMerryGoRound == TRUE) if (o->oDistanceToMario < 2000.0f) diff --git a/src/game/behaviors/goomba.inc.c b/src/game/behaviors/goomba.inc.c index 2dab2fec4..c1155eca0 100644 --- a/src/game/behaviors/goomba.inc.c +++ b/src/game/behaviors/goomba.inc.c @@ -67,9 +67,7 @@ static u8 sGoombaAttackHandlers[][6] = { * Update function for goomba triplet spawner. */ void bhv_goomba_triplet_spawner_update(void) { - UNUSED s32 unused1; s16 goombaFlag; - UNUSED s16 unused2; s32 angle; s32 dAngle; s16 dx; diff --git a/src/game/behaviors/heave_ho.inc.c b/src/game/behaviors/heave_ho.inc.c index a69c68f70..a7eb869ac 100644 --- a/src/game/behaviors/heave_ho.inc.c +++ b/src/game/behaviors/heave_ho.inc.c @@ -41,7 +41,6 @@ void heave_ho_act_1(void) { } void heave_ho_act_2(void) { - UNUSED s32 unused; s16 angleVel; if (1000.0f < cur_obj_lateral_dist_from_mario_to_home()) o->oAngleToMario = cur_obj_angle_to_home(); diff --git a/src/game/behaviors/hoot.inc.c b/src/game/behaviors/hoot.inc.c index 8f857eae5..83dd55cb2 100644 --- a/src/game/behaviors/hoot.inc.c +++ b/src/game/behaviors/hoot.inc.c @@ -232,7 +232,7 @@ void bhv_hoot_loop(void) { case HOOT_AVAIL_WANTS_TO_TALK: hoot_awake_loop(); - if (set_mario_npc_dialog(MARIO_DIALOG_LOOK_UP) == MARIO_DIALOG_STATUS_SPEAK + if (set_mario_npc_dialog(MARIO_DIALOG_LOOK_UP) == MARIO_DIALOG_STATUS_SPEAK && cutscene_object_with_dialog(CUTSCENE_DIALOG, o, DIALOG_044)) { set_mario_npc_dialog(MARIO_DIALOG_STOP); diff --git a/src/game/behaviors/intro_lakitu.inc.c b/src/game/behaviors/intro_lakitu.inc.c index 275baffd8..6fdf20b73 100644 --- a/src/game/behaviors/intro_lakitu.inc.c +++ b/src/game/behaviors/intro_lakitu.inc.c @@ -24,11 +24,9 @@ void intro_lakitu_set_offset_from_camera(struct Object *o, Vec3f offset) { } void intro_lakitu_set_focus(struct Object *o, Vec3f newFocus) { - UNUSED Vec3f unusedVec3f; Vec3f origin; f32 dist; s16 pitch, yaw; - UNUSED u32 unused; // newFocus is an offset from lakitu's origin, not a point in the world. vec3f_set(origin, 0.f, 0.f, 0.f); @@ -59,7 +57,6 @@ s32 intro_lakitu_set_pos_and_focus(struct Object *o, struct CutsceneSplinePoint void bhv_intro_lakitu_loop(void) { Vec3f offset, fromPoint, toPoint; - UNUSED u32 pad[4]; switch (gCurrentObject->oAction) { case 0: diff --git a/src/game/behaviors/king_bobomb.inc.c b/src/game/behaviors/king_bobomb.inc.c index beb404620..6920522b3 100644 --- a/src/game/behaviors/king_bobomb.inc.c +++ b/src/game/behaviors/king_bobomb.inc.c @@ -171,7 +171,7 @@ void king_bobomb_act_6(void) { void king_bobomb_act_7(void) { cur_obj_init_animation_with_sound(2); - if (cur_obj_update_dialog_with_cutscene(MARIO_DIALOG_LOOK_UP, + if (cur_obj_update_dialog_with_cutscene(MARIO_DIALOG_LOOK_UP, DIALOG_FLAG_TEXT_DEFAULT, CUTSCENE_DIALOG, DIALOG_116)) { create_sound_spawner(SOUND_OBJ_KING_WHOMP_DEATH); cur_obj_hide(); @@ -264,7 +264,7 @@ void king_bobomb_act_5(void) { // bobomb returns home o->oSubAction++; break; case 4: - if (cur_obj_update_dialog_with_cutscene(MARIO_DIALOG_LOOK_UP, + if (cur_obj_update_dialog_with_cutscene(MARIO_DIALOG_LOOK_UP, DIALOG_FLAG_TURN_TO_MARIO, CUTSCENE_DIALOG, DIALOG_128)) o->oAction = 2; break; diff --git a/src/game/behaviors/klepto.inc.c b/src/game/behaviors/klepto.inc.c index e0ff9830d..97e816baf 100644 --- a/src/game/behaviors/klepto.inc.c +++ b/src/game/behaviors/klepto.inc.c @@ -319,8 +319,6 @@ void obj_set_speed_to_zero(void) { } void bhv_klepto_update(void) { - UNUSED s32 unused; - cur_obj_update_floor_and_walls(); o->oKleptoDistanceToTarget = cur_obj_lateral_dist_to_home(); diff --git a/src/game/behaviors/koopa.inc.c b/src/game/behaviors/koopa.inc.c index 8e3e8779a..9440dfda9 100644 --- a/src/game/behaviors/koopa.inc.c +++ b/src/game/behaviors/koopa.inc.c @@ -519,8 +519,6 @@ static void koopa_the_quick_act_show_init_text(void) { sKoopaTheQuickProperties[o->oKoopaTheQuickRaceIndex].initText); if (response == DIALOG_RESPONSE_YES) { - UNUSED s32 unused; - gMarioShotFromCannon = FALSE; o->oAction = KOOPA_THE_QUICK_ACT_RACE; o->oForwardVel = 0.0f; @@ -731,7 +729,7 @@ static void koopa_the_quick_act_after_race(void) { o->oFlags &= ~OBJ_FLAG_ACTIVE_FROM_AFAR; } } else if (o->parentObj->oKoopaRaceEndpointDialog > 0) { - s32 dialogResponse = cur_obj_update_dialog_with_cutscene(MARIO_DIALOG_LOOK_UP, + s32 dialogResponse = cur_obj_update_dialog_with_cutscene(MARIO_DIALOG_LOOK_UP, DIALOG_FLAG_TURN_TO_MARIO, CUTSCENE_DIALOG, o->parentObj->oKoopaRaceEndpointDialog); if (dialogResponse != 0) { o->parentObj->oKoopaRaceEndpointDialog = DIALOG_NONE; diff --git a/src/game/behaviors/koopa_shell.inc.c b/src/game/behaviors/koopa_shell.inc.c index 4a790de95..446cff4ef 100644 --- a/src/game/behaviors/koopa_shell.inc.c +++ b/src/game/behaviors/koopa_shell.inc.c @@ -13,7 +13,6 @@ struct ObjectHitbox sKoopaShellHitbox = { }; void koopa_shell_spawn_water_drop(void) { - UNUSED s32 unused; struct Object *drop; spawn_object(o, MODEL_WAVE_TRAIL, bhvObjectWaveTrail); if (gMarioStates[0].forwardVel > 10.0f) { diff --git a/src/game/behaviors/lll_hexagonal_ring.inc.c b/src/game/behaviors/lll_hexagonal_ring.inc.c index 25d94c38c..014da42bc 100644 --- a/src/game/behaviors/lll_hexagonal_ring.inc.c +++ b/src/game/behaviors/lll_hexagonal_ring.inc.c @@ -15,7 +15,6 @@ void hexagonal_ring_spawn_flames(void) { } void bhv_lll_rotating_hexagonal_ring_loop(void) { - UNUSED s32 unused; o->oCollisionDistance = 4000.0f; o->oDrawingDistance = 8000.0f; switch (o->oAction) { diff --git a/src/game/behaviors/lll_volcano_flames.inc.c b/src/game/behaviors/lll_volcano_flames.inc.c index aa2fbc6fe..f0cc47887 100644 --- a/src/game/behaviors/lll_volcano_flames.inc.c +++ b/src/game/behaviors/lll_volcano_flames.inc.c @@ -7,7 +7,7 @@ void bhv_volcano_flames_loop(void) { o->oPosZ += o->oVelZ; cur_obj_move_y(-4.0f, -0.7f, 2.0f); - if (o->oMoveFlags & (OBJ_MOVE_MASK_ON_GROUND | OBJ_MOVE_AT_WATER_SURFACE + if (o->oMoveFlags & (OBJ_MOVE_MASK_ON_GROUND | OBJ_MOVE_AT_WATER_SURFACE | OBJ_MOVE_UNDERWATER_OFF_GROUND)) obj_mark_for_deletion(o); } diff --git a/src/game/behaviors/manta_ray.inc.c b/src/game/behaviors/manta_ray.inc.c index e7ee0d120..d8d1a677e 100644 --- a/src/game/behaviors/manta_ray.inc.c +++ b/src/game/behaviors/manta_ray.inc.c @@ -5,15 +5,15 @@ * These rings contain a significant bug that is documented in water_ring.inc.c */ -static Trajectory sMantaRayTraj[] = { - TRAJECTORY_POS(0, /*pos*/ -4500, -1380, -40), - TRAJECTORY_POS(1, /*pos*/ -4120, -2240, 740), - TRAJECTORY_POS(2, /*pos*/ -3280, -3080, 1040), - TRAJECTORY_POS(3, /*pos*/ -2240, -3320, 720), - TRAJECTORY_POS(4, /*pos*/ -1840, -3140, -280), - TRAJECTORY_POS(5, /*pos*/ -2320, -2480, -1100), - TRAJECTORY_POS(6, /*pos*/ -3220, -1600, -1360), - TRAJECTORY_POS(7, /*pos*/ -4180, -1020, -1040), +static Trajectory sMantaRayTraj[] = { + TRAJECTORY_POS(0, /*pos*/ -4500, -1380, -40), + TRAJECTORY_POS(1, /*pos*/ -4120, -2240, 740), + TRAJECTORY_POS(2, /*pos*/ -3280, -3080, 1040), + TRAJECTORY_POS(3, /*pos*/ -2240, -3320, 720), + TRAJECTORY_POS(4, /*pos*/ -1840, -3140, -280), + TRAJECTORY_POS(5, /*pos*/ -2320, -2480, -1100), + TRAJECTORY_POS(6, /*pos*/ -3220, -1600, -1360), + TRAJECTORY_POS(7, /*pos*/ -4180, -1020, -1040), TRAJECTORY_END(), }; diff --git a/src/game/behaviors/metal_box.inc.c b/src/game/behaviors/metal_box.inc.c index fc9731a14..5ff822bcd 100644 --- a/src/game/behaviors/metal_box.inc.c +++ b/src/game/behaviors/metal_box.inc.c @@ -24,7 +24,6 @@ s32 check_if_moving_over_floor(f32 maxDist, f32 offset) { } void bhv_pushable_loop(void) { - UNUSED s16 unused; s16 angleToMario; obj_set_hitbox(o, &sMetalBoxHitbox); o->oForwardVel = 0.0f; diff --git a/src/game/behaviors/piranha_bubbles.inc.c b/src/game/behaviors/piranha_bubbles.inc.c index 447c27511..a6d54d44c 100644 --- a/src/game/behaviors/piranha_bubbles.inc.c +++ b/src/game/behaviors/piranha_bubbles.inc.c @@ -33,7 +33,6 @@ void bhv_piranha_plant_bubble_loop(void) { s32 frame = parent->header.gfx.animInfo.animFrame; // TODO: rename lastFrame if it is inaccurate s32 lastFrame = parent->header.gfx.animInfo.curAnim->loopEnd - 2; - s32 UNUSED unused; f32 doneShrinkingFrame; // the first frame after shrinking is done f32 beginGrowingFrame; // the frame just before growing begins diff --git a/src/game/behaviors/purple_switch.inc.c b/src/game/behaviors/purple_switch.inc.c index 0a548b878..e6606b4ac 100644 --- a/src/game/behaviors/purple_switch.inc.c +++ b/src/game/behaviors/purple_switch.inc.c @@ -7,7 +7,6 @@ */ void bhv_purple_switch_loop(void) { - UNUSED s32 unused; switch (o->oAction) { /** * Set the switch's model and scale. If Mario is standing near the diff --git a/src/game/behaviors/racing_penguin.inc.c b/src/game/behaviors/racing_penguin.inc.c index a287229d4..74a86cc72 100644 --- a/src/game/behaviors/racing_penguin.inc.c +++ b/src/game/behaviors/racing_penguin.inc.c @@ -143,7 +143,7 @@ static void racing_penguin_act_show_final_text(void) { o->oForwardVel = 4.0f; } } else if (o->oRacingPenguinFinalTextbox > 0) { - if ((textResult = cur_obj_update_dialog_with_cutscene(MARIO_DIALOG_LOOK_UP, + if ((textResult = cur_obj_update_dialog_with_cutscene(MARIO_DIALOG_LOOK_UP, DIALOG_FLAG_TURN_TO_MARIO, CUTSCENE_DIALOG, o->oRacingPenguinFinalTextbox))) { o->oRacingPenguinFinalTextbox = -1; o->oTimer = 0; diff --git a/src/game/behaviors/scuttlebug.inc.c b/src/game/behaviors/scuttlebug.inc.c index c7631cd6f..fffe6b597 100644 --- a/src/game/behaviors/scuttlebug.inc.c +++ b/src/game/behaviors/scuttlebug.inc.c @@ -24,7 +24,6 @@ s32 update_angle_from_move_flags(s32 *angle) { } void bhv_scuttlebug_loop(void) { - UNUSED s32 unused; f32 animSpeed; cur_obj_update_floor_and_walls(); if (o->oSubAction != 0 diff --git a/src/game/behaviors/seesaw_platform.inc.c b/src/game/behaviors/seesaw_platform.inc.c index 81a47e761..8c9e3b656 100644 --- a/src/game/behaviors/seesaw_platform.inc.c +++ b/src/game/behaviors/seesaw_platform.inc.c @@ -39,7 +39,6 @@ void bhv_seesaw_platform_update(void) { if (gMarioObject->platform == o) { // Rotate toward mario f32 rotation = o->oDistanceToMario * coss(o->oAngleToMario - o->oMoveAngleYaw); - UNUSED s32 unused; // Deceleration is faster than acceleration if (o->oSeesawPlatformPitchVel * rotation < 0) { diff --git a/src/game/behaviors/sl_snowman_wind.inc.c b/src/game/behaviors/sl_snowman_wind.inc.c index 508615abe..7d118b55c 100644 --- a/src/game/behaviors/sl_snowman_wind.inc.c +++ b/src/game/behaviors/sl_snowman_wind.inc.c @@ -1,29 +1,28 @@ // sl_snowman_wind.c.inc void bhv_sl_snowman_wind_loop(void) { - UNUSED s32 unusedVar = 0; s16 marioAngleFromWindSource; Vec3f tempPos; - + if (o->oTimer == 0) o->oSLSnowmanWindOriginalYaw = o->oMoveAngleYaw; - + // Waiting for Mario to approach. if (o->oSubAction == SL_SNOWMAN_WIND_ACT_IDLE) { o->oDistanceToMario = 0; - + // Check if Mario is within 1000 units of the center of the bridge, and ready to speak. vec3f_copy_2(tempPos, &o->oPosX); obj_set_pos(o, 1100, 3328, 1164); // Position is in the middle of the ice bridge if (cur_obj_can_mario_activate_textbox(1000.0f, 30.0f, 0x7FFF)) o->oSubAction++; vec3f_copy_2(&o->oPosX, tempPos); - + // Mario has come close, begin dialog. } else if (o->oSubAction == SL_SNOWMAN_WIND_ACT_TALKING) { if (cur_obj_update_dialog(MARIO_DIALOG_LOOK_UP, DIALOG_FLAG_TEXT_DEFAULT, DIALOG_153, 0)) o->oSubAction++; - + // Blowing, spawn wind particles (SL_SNOWMAN_WIND_ACT_BLOWING) } else if (o->oDistanceToMario < 1500.0f && absf(gMarioObject->oPosY - o->oHomeY) < 500.0f) { // Point towards Mario, but only within 0x1500 angle units of the original angle. diff --git a/src/game/behaviors/sl_walking_penguin.inc.c b/src/game/behaviors/sl_walking_penguin.inc.c index f5b60a8a9..acd2ef167 100644 --- a/src/game/behaviors/sl_walking_penguin.inc.c +++ b/src/game/behaviors/sl_walking_penguin.inc.c @@ -22,11 +22,11 @@ static s32 sl_walking_penguin_turn(void) { // Stay still and use walking animation for the turn. o->oForwardVel = 0.0f; cur_obj_init_animation_with_accel_and_sound(PENGUIN_ANIM_WALK, 1.0f); - + // Turn around. o->oAngleVelYaw = 0x400; o->oMoveAngleYaw += o->oAngleVelYaw; - + if (o->oTimer == 31) return TRUE; // Finished turning else @@ -36,10 +36,10 @@ static s32 sl_walking_penguin_turn(void) { void bhv_sl_walking_penguin_loop(void) { f32 adjustedXPos, adjustedZPos; f32 perpendicularOffset = 100.0f; - + o->oAngleVelYaw = 0; cur_obj_update_floor_and_walls(); - + switch (o->oAction) { // Walk erratically across the ice bridge using preset steps. case SL_WALKING_PENGUIN_ACT_MOVING_FORWARDS: @@ -48,7 +48,7 @@ void bhv_sl_walking_penguin_loop(void) { o->oSLWalkingPenguinCurStep = 0; o->oSLWalkingPenguinCurStepTimer = 0; } - + if (o->oSLWalkingPenguinCurStepTimer < sSLWalkingPenguinErraticSteps[o->oSLWalkingPenguinCurStep].stepLength) o->oSLWalkingPenguinCurStepTimer++; else { @@ -59,57 +59,57 @@ void bhv_sl_walking_penguin_loop(void) { // Reached the end of the list, go back to the start o->oSLWalkingPenguinCurStep = 0; } - + if (o->oPosX < 300.0f) o->oAction++; // If reached the end of the bridge, turn around and head back. else { // Move and animate the penguin o->oForwardVel = sSLWalkingPenguinErraticSteps[o->oSLWalkingPenguinCurStep].speed; - + cur_obj_init_animation_with_accel_and_sound( sSLWalkingPenguinErraticSteps[o->oSLWalkingPenguinCurStep].anim, sSLWalkingPenguinErraticSteps[o->oSLWalkingPenguinCurStep].animSpeed ); } break; - + // At the end, turn around and prepare to head back across the bridge. case SL_WALKING_PENGUIN_ACT_TURNING_BACK: if (sl_walking_penguin_turn()) o->oAction++; // Finished turning break; - + // Walk back across the bridge at a constant speed. case SL_WALKING_PENGUIN_ACT_RETURNING: // Move and animate the penguin o->oForwardVel = 12.0f; cur_obj_init_animation_with_accel_and_sound(PENGUIN_ANIM_WALK, 2.0f); - + if (o->oPosX > 1700.0f) o->oAction++; // If reached the start of the bridge, turn around. break; - + // At the start, turn around and prepare to walk erratically across the bridge. case SL_WALKING_PENGUIN_ACT_TURNING_FORWARDS: if (sl_walking_penguin_turn()) o->oAction = SL_WALKING_PENGUIN_ACT_MOVING_FORWARDS; // Finished turning break; } - + cur_obj_move_standard(-78); if (!cur_obj_hide_if_mario_far_away_y(1000.0f)) play_penguin_walking_sound(PENGUIN_WALK_BIG); - + // Adjust the position to get a point better lined up with the visual model, for stopping the wind. // The new point is 60 units behind the penguin and 100 units perpedicularly, away from the snowman. - + adjustedXPos = o->oPosX + sins(0xDBB0) * 60.0f; // 0xDBB0 = -51 degrees, the angle the penguin is facing adjustedZPos = o->oPosZ + coss(0xDBB0) * 60.0f; adjustedXPos += perpendicularOffset * sins(0x1BB0); // 0x1BB0 = 39 degrees, perpendicular to the penguin adjustedZPos += perpendicularOffset * coss(0x1BB0); o->oSLWalkingPenguinWindCollisionXPos = adjustedXPos; o->oSLWalkingPenguinWindCollisionZPos = adjustedZPos; - + print_debug_bottom_up("x %d", o->oPosX); print_debug_bottom_up("z %d", o->oPosZ); } diff --git a/src/game/behaviors/snufit.inc.c b/src/game/behaviors/snufit.inc.c index f3a0c9ef7..128527f21 100644 --- a/src/game/behaviors/snufit.inc.c +++ b/src/game/behaviors/snufit.inc.c @@ -30,7 +30,7 @@ struct ObjectHitbox sSnufitBulletHitbox = { }; /** - * This geo function shifts snufit's mask when it shrinks down, + * This geo function shifts snufit's mask when it shrinks down, * since the parts move independently. */ Gfx *geo_snufit_move_mask(s32 callContext, struct GraphNode *node, UNUSED Mat4 *c) { @@ -77,7 +77,7 @@ void snufit_act_idle(void) { // if the game would not have already crashed. marioDist = (s32)(o->oDistanceToMario / 10.0f); if (o->oTimer > marioDist && o->oDistanceToMario < 800.0f) { - + // Controls an alternating scaling factor in a cos. o->oSnufitBodyScalePeriod = approach_s16_symmetric(o->oSnufitBodyScalePeriod, 0, 1500); @@ -121,7 +121,7 @@ void bhv_snufit_loop(void) { // Only update if Mario is in the current room. if (!(o->activeFlags & ACTIVE_FLAG_IN_DIFFERENT_ROOM)) { o->oDeathSound = SOUND_OBJ_SNUFIT_SKEETER_DEATH; - + // Face Mario if he is within range. if (o->oDistanceToMario < 800.0f) { obj_turn_pitch_toward_mario(120.0f, 2000); @@ -198,7 +198,7 @@ void bhv_snufit_balls_loop(void) { o->oGravity = -4.0f; cur_obj_become_intangible(); - } else if (o->oAction == 1 + } else if (o->oAction == 1 || (o->oMoveFlags & (OBJ_MOVE_MASK_ON_GROUND | OBJ_MOVE_HIT_WALL))) { // The Snufit shot Mario and has fulfilled its lonely existance. //! The above check could theoretically be avoided by finding a geometric diff --git a/src/game/behaviors/star_door.inc.c b/src/game/behaviors/star_door.inc.c index c5b499b9b..4a9f23070 100644 --- a/src/game/behaviors/star_door.inc.c +++ b/src/game/behaviors/star_door.inc.c @@ -8,7 +8,6 @@ void star_door_update_pos(void) { } void bhv_star_door_loop(void) { - UNUSED u8 pad[4]; struct Object *doorObj; doorObj = cur_obj_nearest_object_with_behavior(bhvStarDoor); switch (o->oAction) { diff --git a/src/game/behaviors/strong_wind_particle.inc.c b/src/game/behaviors/strong_wind_particle.inc.c index 50cd04bef..03ee75004 100644 --- a/src/game/behaviors/strong_wind_particle.inc.c +++ b/src/game/behaviors/strong_wind_particle.inc.c @@ -16,24 +16,24 @@ void bhv_strong_wind_particle_loop(void) { struct Object *penguinObj; f32 distanceFromPenguin; f32 penguinXDist, penguinZDist; - + obj_set_hitbox(o, &sStrongWindParticleHitbox); - + if (o->oTimer == 0) { o->oStrongWindParticlePenguinObj = cur_obj_nearest_object_with_behavior(bhvSLWalkingPenguin); obj_translate_xyz_random(o, 100.0f); - + o->oForwardVel = coss(o->oMoveAnglePitch) * 100.0f; o->oVelY = sins(o->oMoveAnglePitch) * -100.0f; - + o->oMoveAngleYaw += random_f32_around_zero(o->oBehParams2ndByte * 500); // Wind spread o->oOpacity = 100; } - + cur_obj_move_using_fvel_and_gravity(); if (o->oTimer > 15) // Deactivate after 15 frames obj_mark_for_deletion(o); - + // If collided with the SL walking penguin, deactivate. penguinObj = o->oStrongWindParticlePenguinObj; if (penguinObj != NULL) { diff --git a/src/game/behaviors/tilting_inverted_pyramid.inc.c b/src/game/behaviors/tilting_inverted_pyramid.inc.c index 32bdf4a17..1e56addce 100644 --- a/src/game/behaviors/tilting_inverted_pyramid.inc.c +++ b/src/game/behaviors/tilting_inverted_pyramid.inc.c @@ -79,9 +79,7 @@ void bhv_tilting_inverted_pyramid_loop(void) { f32 mz; s32 marioOnPlatform = FALSE; - UNUSED s32 unused; Mat4 *transform = &o->transform; - UNUSED s32 unused2[7]; if (gMarioObject->platform == o) { get_mario_pos(&mx, &my, &mz); @@ -95,7 +93,7 @@ void bhv_tilting_inverted_pyramid_loop(void) { dy = 500.0f; dz = gMarioObject->oPosZ - o->oPosZ; d = sqrtf(dx * dx + dy * dy + dz * dz); - + //! Always true since dy = 500, making d >= 500. if (d != 0.0f) { // Normalizing @@ -120,7 +118,7 @@ void bhv_tilting_inverted_pyramid_loop(void) { o->oTiltingPyramidMarioOnPlatform = FALSE; } - // Approach the normals by 0.01f towards the new goal, then create a transform matrix and orient the object. + // Approach the normals by 0.01f towards the new goal, then create a transform matrix and orient the object. // Outside of the other conditionals since it needs to tilt regardless of whether Mario is on. o->oTiltingPyramidNormalX = approach_by_increment(dx, o->oTiltingPyramidNormalX, 0.01f); o->oTiltingPyramidNormalY = approach_by_increment(dy, o->oTiltingPyramidNormalY, 0.01f); diff --git a/src/game/behaviors/tower_platform.inc.c b/src/game/behaviors/tower_platform.inc.c index 2bf4ce347..86ad99e89 100644 --- a/src/game/behaviors/tower_platform.inc.c +++ b/src/game/behaviors/tower_platform.inc.c @@ -69,7 +69,6 @@ void spawn_and_init_wf_platforms(s16 a, const BehaviorScript *bhv) { } void spawn_wf_platform_group(void) { - UNUSED s32 unused = 8; o->oPlatformSpawnerWFTowerPlatformNum = 0; o->oPlatformSpawnerWFTowerYawOffset = 0; o->oPlatformSpawnerWFTowerDYaw = 0x2000; diff --git a/src/game/behaviors/tree_particles.inc.c b/src/game/behaviors/tree_particles.inc.c index 34c2e02c2..a01c4ffa8 100644 --- a/src/game/behaviors/tree_particles.inc.c +++ b/src/game/behaviors/tree_particles.inc.c @@ -37,10 +37,8 @@ void bhv_snow_leaf_particle_spawn_init(void) { #ifdef TREE_PARTICLE_FIX struct Object *nearestTree = NULL; #endif - UNUSED s32 unused; s32 isSnow; f32 scale; - UNUSED s32 unused2; gMarioObject->oActiveParticleFlags &= ~0x2000; #ifdef TREE_PARTICLE_FIX nearestTree = cur_obj_nearest_object_with_behavior(bhvTree); diff --git a/src/game/behaviors/tuxie.inc.c b/src/game/behaviors/tuxie.inc.c index a2c531930..57fdf9e19 100644 --- a/src/game/behaviors/tuxie.inc.c +++ b/src/game/behaviors/tuxie.inc.c @@ -52,7 +52,7 @@ void tuxies_mother_act_1(void) { dialogID = DIALOG_058; else dialogID = DIALOG_059; - if (cur_obj_update_dialog_with_cutscene(MARIO_DIALOG_LOOK_UP, + if (cur_obj_update_dialog_with_cutscene(MARIO_DIALOG_LOOK_UP, DIALOG_FLAG_TURN_TO_MARIO, CUTSCENE_DIALOG, dialogID)) { if (dialogID == DIALOG_058) o->oSubAction = 1; @@ -115,7 +115,7 @@ void tuxies_mother_act_0(void) { o->oSubAction++; break; case 1: - if (cur_obj_update_dialog_with_cutscene(MARIO_DIALOG_LOOK_UP, + if (cur_obj_update_dialog_with_cutscene(MARIO_DIALOG_LOOK_UP, DIALOG_FLAG_TURN_TO_MARIO, CUTSCENE_DIALOG, DIALOG_057)) o->oSubAction++; break; diff --git a/src/game/behaviors/tweester.inc.c b/src/game/behaviors/tweester.inc.c index 67ad5f2da..7abcbb7c8 100644 --- a/src/game/behaviors/tweester.inc.c +++ b/src/game/behaviors/tweester.inc.c @@ -25,11 +25,11 @@ void tweester_scale_and_move(f32 preScale) { s16 dYaw = 0x2C00; f32 scale = preScale * 0.4; - o->header.gfx.scale[0] + o->header.gfx.scale[0] = (( coss(o->oTweesterScaleTimer) + 1.0) * 0.5 * 0.3 + 1.0) * scale; - o->header.gfx.scale[1] + o->header.gfx.scale[1] = ((-coss(o->oTweesterScaleTimer) + 1.0) * 0.5 * 0.5 + 0.5) * scale; - o->header.gfx.scale[2] + o->header.gfx.scale[2] = (( coss(o->oTweesterScaleTimer) + 1.0) * 0.5 * 0.3 + 1.0) * scale; o->oTweesterScaleTimer += 0x200; @@ -125,7 +125,7 @@ void tweester_act_hide(void) { void (*sTweesterActions[])(void) = { tweester_act_idle, tweester_act_chase, tweester_act_hide }; /** - * Loop behavior for Tweester. + * Loop behavior for Tweester. * Loads the hitbox and calls its relevant action. */ void bhv_tweester_loop(void) { diff --git a/src/game/behaviors/ukiki.inc.c b/src/game/behaviors/ukiki.inc.c index 45854449a..0e94daddf 100644 --- a/src/game/behaviors/ukiki.inc.c +++ b/src/game/behaviors/ukiki.inc.c @@ -174,8 +174,6 @@ void ukiki_act_idle(void) { * Only used for the cap ukiki. */ void ukiki_act_return_home(void) { - UNUSED s32 unused; - cur_obj_init_animation_with_sound(UKIKI_ANIM_RUN); o->oMoveAngleYaw = cur_obj_angle_to_home(); o->oForwardVel = 10.0f; @@ -383,7 +381,7 @@ void ukiki_act_go_to_cage(void) { case UKIKI_SUB_ACT_CAGE_TALK_TO_MARIO: cur_obj_init_animation_with_sound(UKIKI_ANIM_HANDSTAND); - if (cur_obj_update_dialog_with_cutscene(MARIO_DIALOG_LOOK_DOWN, + if (cur_obj_update_dialog_with_cutscene(MARIO_DIALOG_LOOK_DOWN, DIALOG_FLAG_TURN_TO_MARIO, CUTSCENE_DIALOG, DIALOG_080)) { o->oSubAction++; } @@ -578,7 +576,7 @@ void cap_ukiki_held_loop(void) { break; case UKIKI_TEXT_HAS_CAP: - if (cur_obj_update_dialog(MARIO_DIALOG_LOOK_UP, + if (cur_obj_update_dialog(MARIO_DIALOG_LOOK_UP, (DIALOG_FLAG_TEXT_DEFAULT | DIALOG_FLAG_TIME_STOP_ENABLED), DIALOG_101, 0)) { mario_retrieve_cap(); set_mario_npc_dialog(MARIO_DIALOG_STOP); diff --git a/src/game/behaviors/water_splashes_and_waves.inc.c b/src/game/behaviors/water_splashes_and_waves.inc.c index 8c328772e..da54d5954 100644 --- a/src/game/behaviors/water_splashes_and_waves.inc.c +++ b/src/game/behaviors/water_splashes_and_waves.inc.c @@ -57,7 +57,6 @@ void bhv_water_splash_spawn_droplets(void) { } void bhv_water_droplet_loop(void) { - UNUSED u32 unusedVar; f32 waterLevel = find_water_level(o->oPosX, o->oPosZ); if (o->oTimer == 0) { diff --git a/src/game/behaviors/whomp.inc.c b/src/game/behaviors/whomp.inc.c index b8ab613a4..faa60853d 100644 --- a/src/game/behaviors/whomp.inc.c +++ b/src/game/behaviors/whomp.inc.c @@ -28,7 +28,7 @@ void whomp_init(void) { cur_obj_set_pos_to_home(); o->oHealth = 3; } - } else if (cur_obj_update_dialog_with_cutscene(MARIO_DIALOG_LOOK_UP, + } else if (cur_obj_update_dialog_with_cutscene(MARIO_DIALOG_LOOK_UP, DIALOG_FLAG_TURN_TO_MARIO, CUTSCENE_DIALOG, DIALOG_114)) o->oAction = 2; } else if (o->oDistanceToMario < 500.0f) @@ -216,7 +216,7 @@ void whomp_on_ground_general(void) { void whomp_die(void) { if (o->oBehParams2ndByte != 0) { - if (cur_obj_update_dialog_with_cutscene(MARIO_DIALOG_LOOK_UP, + if (cur_obj_update_dialog_with_cutscene(MARIO_DIALOG_LOOK_UP, DIALOG_FLAG_TEXT_DEFAULT, CUTSCENE_DIALOG, DIALOG_115)) { obj_set_angle(o, 0, 0, 0); cur_obj_hide(); diff --git a/src/game/behaviors/wiggler.inc.c b/src/game/behaviors/wiggler.inc.c index 44c52ba24..785daca47 100644 --- a/src/game/behaviors/wiggler.inc.c +++ b/src/game/behaviors/wiggler.inc.c @@ -299,7 +299,7 @@ static void wiggler_act_jumped_on(void) { // defeated) or go back to walking if (o->header.gfx.scale[1] >= 4.0f) { if (o->oTimer > 30) { - if (cur_obj_update_dialog_with_cutscene(MARIO_DIALOG_LOOK_UP, + if (cur_obj_update_dialog_with_cutscene(MARIO_DIALOG_LOOK_UP, DIALOG_FLAG_NONE, CUTSCENE_DIALOG, attackText[o->oHealth - 2])) { // Because we don't want the wiggler to disappear after being // defeated, we leave its health at 1 diff --git a/src/game/camera.c b/src/game/camera.c index 619b13d74..260aea67f 100644 --- a/src/game/camera.c +++ b/src/game/camera.c @@ -122,17 +122,12 @@ extern f32 sHandheldShakeInc; extern s16 sHandheldShakePitch; extern s16 sHandheldShakeYaw; extern s16 sHandheldShakeRoll; -extern u32 unused8033B30C; -extern u32 unused8033B310; extern s16 sSelectionFlags; -extern s16 unused8033B316; extern s16 s2ndRotateFlags; -extern s16 unused8033B31A; extern s16 sCameraSoundFlags; extern u16 sCButtonsPressed; extern s16 sCutsceneDialogID; extern struct LakituState gLakituState; -extern s16 unused8033B3E8; extern s16 sAreaYaw; extern s16 sAreaYawChange; extern s16 sLakituDist; @@ -161,7 +156,6 @@ extern struct CutsceneSplinePoint sCurCreditsSplinePos[32]; extern struct CutsceneSplinePoint sCurCreditsSplineFocus[32]; extern s16 sCutsceneSplineSegment; extern f32 sCutsceneSplineSegmentProgress; -extern s16 unused8033B6E8; extern s16 sCutsceneShot; extern s16 gCutsceneTimer; extern struct CutsceneVariable sCutsceneVars[10]; @@ -204,7 +198,6 @@ f32 sCutsceneSplineSegmentProgress; * The current segment of the CutsceneSplinePoint[] being used. */ s16 sCutsceneSplineSegment; -s16 unused8033B6E8; // Shaky Hand-held Camera effect variables struct HandheldShakePoint sHandheldShakeSpline[4]; @@ -225,9 +218,6 @@ u32 gCutsceneObjSpawn; */ s32 gObjCutsceneDone; -u32 unused8033B30C; -u32 unused8033B310; - /** * Determines which R-Trigger mode is selected in the pause menu. */ @@ -237,7 +227,6 @@ s16 sSelectionFlags; * Flags that determine what movements the camera should start / do this frame. */ s16 gCameraMovementFlags; -s16 unused8033B316; /** * Flags that change how modes operate and how Lakitu moves. @@ -250,7 +239,6 @@ s16 sStatusFlags; * determine whether to rotate all the way, or just to 60 degrees. */ s16 s2ndRotateFlags; -s16 unused8033B31A; /** * Flags that control buzzes and sounds that play, mostly for C-button input. */ @@ -271,10 +259,7 @@ s16 sCutsceneShot; * The current frame of the cutscene shot. */ s16 gCutsceneTimer; -s16 unused8033B3E8; -#if defined(VERSION_EU) || defined(VERSION_SH) -s16 unused8033B3E82; -#endif + /** * The angle of the direction vector from the area's center to Mario's position. */ @@ -389,12 +374,8 @@ struct CameraStoredInfo sCameraStoreCUp; struct CameraStoredInfo sCameraStoreCutscene; // first iteration of data -u32 unused8032CFC0 = 0; struct Object *gCutsceneFocus = NULL; -u32 unused8032CFC8 = 0; -u32 unused8032CFCC = 0; - /** * The information of a second focus camera used by some objects */ @@ -407,9 +388,6 @@ s16 sYawSpeed = 0x400; s32 gCurrLevelArea = 0; u32 gPrevLevel = 0; -f32 unused8032CFE0 = 1000.0f; -f32 unused8032CFE4 = 800.0f; -u32 unused8032CFE8 = 0; f32 gCameraZoomDist = 800.0f; /** @@ -439,7 +417,6 @@ u8 sFramesSinceCutsceneEnded = 0; u8 sCutsceneDialogResponse = DIALOG_RESPONSE_NONE; struct PlayerCameraState *sMarioCamState = &gPlayerCameraState[0]; struct PlayerCameraState *sLuigiCamState = &gPlayerCameraState[1]; -u32 unused8032D008 = 0; Vec3f sFixedModeBasePosition = { 646.0f, 143.0f, -1513.0f }; Vec3f sUnusedModeBasePosition_2 = { 646.0f, 143.0f, -1513.0f }; Vec3f sUnusedModeBasePosition_3 = { 646.0f, 143.0f, -1513.0f }; @@ -723,12 +700,8 @@ void focus_on_mario(Vec3f focus, Vec3f pos, f32 posYOff, f32 focYOff, f32 dist, static UNUSED void set_pos_to_mario(Vec3f foc, Vec3f pos, f32 yOff, f32 focYOff, f32 dist, s16 pitch, s16 yaw) { Vec3f marioPos; f32 posDist; - f32 focDist; - s16 posPitch; s16 posYaw; - s16 focPitch; - s16 focYaw; vec3f_copy(marioPos, sMarioCamState->pos); marioPos[1] += yOff; @@ -899,11 +872,8 @@ s32 update_radial_camera(struct Camera *c, Vec3f focus, Vec3f pos) { f32 cenDistZ = sMarioCamState->pos[2] - c->areaCenZ; s16 camYaw = atan2s(cenDistZ, cenDistX) + sModeOffsetYaw; s16 pitch = look_down_slopes(camYaw); - UNUSED f32 unused1; f32 posY; f32 focusY; - UNUSED f32 unused2; - UNUSED f32 unused3; f32 yOff = 125.f; f32 baseDist = 1000.f; @@ -919,15 +889,10 @@ s32 update_radial_camera(struct Camera *c, Vec3f focus, Vec3f pos) { * Update the camera during 8 directional mode */ s32 update_8_directions_camera(struct Camera *c, Vec3f focus, Vec3f pos) { - UNUSED f32 cenDistX = sMarioCamState->pos[0] - c->areaCenX; - UNUSED f32 cenDistZ = sMarioCamState->pos[2] - c->areaCenZ; s16 camYaw = s8DirModeBaseYaw + s8DirModeYawOffset; s16 pitch = look_down_slopes(camYaw); f32 posY; f32 focusY; - UNUSED f32 unused1; - UNUSED f32 unused2; - UNUSED f32 unused3; f32 yOff = 125.f; f32 baseDist = 1000.f; @@ -953,11 +918,8 @@ void radial_camera_move(struct Camera *c) { s16 rotateSpeed = 0x1000; s16 avoidYaw; s32 avoidStatus; - UNUSED s16 unused1 = 0; - UNUSED s32 unused2 = 0; f32 areaDistX = sMarioCamState->pos[0] - c->areaCenX; f32 areaDistZ = sMarioCamState->pos[2] - c->areaCenZ; - UNUSED s32 filler; // How much the camera's yaw changed s16 yawOffset = calculate_yaw(sMarioCamState->pos, c->pos) - atan2s(areaDistZ, areaDistX); @@ -1139,9 +1101,7 @@ void update_yaw_and_dist_from_c_up(UNUSED struct Camera *c) { */ void mode_radial_camera(struct Camera *c) { Vec3f pos; - UNUSED u8 unused1[8]; s16 oldAreaYaw = sAreaYaw; - UNUSED u8 unused2[4]; if (gCameraMovementFlags & CAM_MOVING_INTO_MODE) { update_yaw_and_dist_from_c_up(c); @@ -1270,34 +1230,21 @@ s32 update_parallel_tracking_camera(struct Camera *c, Vec3f focus, Vec3f pos) { Vec3f focOffset; s16 pathPitch; s16 pathYaw; - UNUSED u8 filler[4]; f32 distThresh; f32 zoom; f32 camParDist; - UNUSED u8 filler2[8]; f32 pathLength; - UNUSED u8 filler3[8]; - UNUSED f32 unusedScale = 0.5f; f32 parScale = 0.5f; f32 marioFloorDist; Vec3f marioPos; - UNUSED u8 filler4[12]; - UNUSED Vec3f unused4; Vec3s pathAngle; // Variables for changing to the next/prev path in the list Vec3f oldPos; Vec3f prevPathPos; Vec3f nextPathPos; - f32 distToNext; - f32 distToPrev; - s16 prevPitch; - s16 nextPitch; - s16 prevYaw; - s16 nextYaw; - - unused4[0] = 0.f; - unused4[1] = 0.f; - unused4[2] = 0.f; + f32 distToNext, distToPrev; + s16 prevPitch, nextPitch; + s16 prevYaw, nextYaw; // Store camera pos, for changing between paths vec3f_copy(oldPos, pos); @@ -1456,14 +1403,12 @@ s32 update_fixed_camera(struct Camera *c, Vec3f focus, UNUSED Vec3f pos) { f32 ceilHeight; f32 heightOffset; f32 distCamToFocus; - UNUSED u8 filler2[8]; f32 scaleToMario = 0.5f; s16 pitch; s16 yaw; Vec3s faceAngle; struct Surface *ceiling; Vec3f basePos; - UNUSED u8 filler[12]; play_camera_buzz_if_c_sideways(); @@ -1543,21 +1488,16 @@ s32 update_fixed_camera(struct Camera *c, Vec3f focus, UNUSED Vec3f pos) { */ s32 update_boss_fight_camera(struct Camera *c, Vec3f focus, Vec3f pos) { struct Object *o; - UNUSED u8 filler2[12]; f32 focusDistance; - UNUSED u8 filler3[4]; // Floor normal values f32 nx; f32 ny; f32 nz; /// Floor originOffset f32 oo; - UNUSED u8 filler4[4]; - UNUSED s16 unused; s16 yaw; s16 heldState; struct Surface *floor; - UNUSED u8 filler[20]; Vec3f secondFocus; Vec3f holdFocOffset = { 0.f, -150.f, -125.f }; @@ -1668,10 +1608,6 @@ s32 update_boss_fight_camera(struct Camera *c, Vec3f focus, Vec3f pos) { return yaw; } -// 2nd iteration of data -s16 unused8032D0A8[] = { 14, 1, 2, 4 }; -s16 unused8032D0B0[] = { 16, 9, 17, 0 }; - /** * Maps cutscene to numbers in [0,4]. Used in determine_dance_cutscene() with sDanceCutsceneIndexTable. * @@ -1746,8 +1682,6 @@ void mode_parallel_tracking_camera(struct Camera *c) { * Fixed camera mode, the camera rotates around a point and looks and zooms toward Mario. */ void mode_fixed_camera(struct Camera *c) { - UNUSED u8 unused[8]; - if (gCurrLevelNum == LEVEL_BBH) { set_fov_function(CAM_FOV_BBH); } else { @@ -1765,9 +1699,7 @@ void mode_fixed_camera(struct Camera *c) { * The C-Buttons rotate the camera 90 degrees left/right and 67.5 degrees up/down. */ s32 update_behind_mario_camera(struct Camera *c, Vec3f focus, Vec3f pos) { - UNUSED u8 unused2[12]; f32 dist; - UNUSED u8 unused3[4]; s16 absPitch; s16 pitch; s16 yaw; @@ -1776,7 +1708,6 @@ s32 update_behind_mario_camera(struct Camera *c, Vec3f focus, Vec3f pos) { s16 goalYawOff = 0; s16 yawSpeed; s16 pitchInc = 32; - UNUSED u8 unused[12]; f32 maxDist = 800.f; f32 focYOff = 125.f; @@ -1792,10 +1723,6 @@ s32 update_behind_mario_camera(struct Camera *c, Vec3f focus, Vec3f pos) { // Focus on Mario vec3f_copy(focus, sMarioCamState->pos); c->focus[1] += focYOff; - //! @bug unnecessary - dist = calc_abs_dist(focus, pos); - //! @bug unnecessary - pitch = calculate_pitch(focus, pos); vec3f_get_dist_and_angle(focus, pos, &dist, &pitch, &yaw); if (dist > maxDist) { dist = maxDist; @@ -1915,7 +1842,7 @@ s32 mode_behind_mario(struct Camera *c) { struct Surface *floor; Vec3f newPos; //! @bug oldPos is unused, see resolve_geometry_collisions - Vec3f oldPos; + UNUSED Vec3f oldPos; f32 waterHeight; f32 floorHeight; f32 distCamToFocus; @@ -1972,7 +1899,6 @@ s16 update_slide_camera(struct Camera *c) { f32 pitchScale; s16 camPitch; s16 camYaw; - UNUSED struct MarioState *marioState = &gMarioStates[0]; s16 goalPitch = 0x1555; s16 goalYaw = sMarioCamState->faceAngle[1] + DEGREES(180); @@ -2072,7 +1998,6 @@ s32 update_mario_camera(UNUSED struct Camera *c, Vec3f focus, Vec3f pos) { s16 update_default_camera(struct Camera *c) { Vec3f tempPos; Vec3f cPos; - UNUSED u8 unused1[12]; struct Surface *marioFloor; struct Surface *cFloor; struct Surface *tempFloor; @@ -2080,11 +2005,9 @@ s16 update_default_camera(struct Camera *c) { f32 camFloorHeight; f32 tempFloorHeight; f32 marioFloorHeight; - UNUSED u8 unused2[4]; f32 dist; f32 zoomDist; - f32 waterHeight; - f32 gasHeight; + f32 waterHeight, gasHeight; s16 avoidYaw; s16 pitch; s16 yaw; @@ -2092,10 +2015,8 @@ s16 update_default_camera(struct Camera *c) { f32 posHeight; f32 focHeight; f32 distFromWater; - s16 tempPitch; - s16 tempYaw; + s16 tempPitch, tempYaw; f32 xzDist; - UNUSED u8 unused4[4]; s16 nextYawVel; s16 yawVel = 0; f32 scale; @@ -2422,7 +2343,6 @@ void mode_mario_camera(struct Camera *c) { * Rotates the camera around the spiral staircase. */ s32 update_spiral_stairs_camera(struct Camera *c, Vec3f focus, Vec3f pos) { - UNUSED s16 unused1; /// The returned yaw s16 camYaw; // unused @@ -2433,7 +2353,6 @@ s32 update_spiral_stairs_camera(struct Camera *c, Vec3f focus, Vec3f pos) { s16 posPitch; /// The camera's yaw around the stairs s16 posYaw; - UNUSED s32 unused2; Vec3f cPos; Vec3f checkPos; struct Surface *floor; @@ -2738,8 +2657,6 @@ void move_into_c_up(struct Camera *c) { * The main update function for C-Up mode */ s32 mode_c_up_camera(struct Camera *c) { - UNUSED u8 unused[12]; - // Play a sound when entering C-Up mode if (!(sCameraSoundFlags & CAM_SOUND_C_UP_PLAYED)) { play_sound_cbutton_up(); @@ -2796,8 +2713,6 @@ s32 update_in_cannon(UNUSED struct Camera *c, Vec3f focus, Vec3f pos) { * sCannonYOffset is used to make the camera rotate down when Mario has just entered the cannon */ void mode_cannon_camera(struct Camera *c) { - UNUSED u8 unused[24]; - sLakituPitch = 0; gCameraMovementFlags &= ~CAM_MOVING_INTO_MODE; c->nextYaw = update_in_cannon(c, c->focus, c->pos); @@ -2921,10 +2836,8 @@ void update_lakitu(struct Camera *c) { struct Surface *floor = NULL; Vec3f newPos; Vec3f newFoc; - UNUSED Vec3f unusedVec3f; f32 distToFloor; s16 newYaw; - UNUSED u8 unused1[8]; if (gCameraMovementFlags & CAM_MOVE_PAUSE_SCREEN) { } else { @@ -3023,8 +2936,6 @@ void update_lakitu(struct Camera *c) { * Gets controller input, checks for cutscenes, handles mode changes, and moves the camera */ void update_camera(struct Camera *c) { - UNUSED u8 unused[24]; - gCamera = c; update_camera_hud_status(c); if (c->cutscene == 0 && @@ -3269,11 +3180,6 @@ void update_camera(struct Camera *c) { * Reset all the camera variables to their arcane defaults */ void reset_camera(struct Camera *c) { - UNUSED s32 unused = 0; - UNUSED u8 unused1[16]; - UNUSED struct LinearTransitionPoint *start = &sModeInfo.transitionStart; - UNUSED struct LinearTransitionPoint *end = &sModeInfo.transitionEnd; - gCamera = c; gCameraMovementFlags = 0; s2ndRotateFlags = 0; @@ -3283,19 +3189,13 @@ void reset_camera(struct Camera *c) { gCutsceneObjSpawn = 0; gObjCutsceneDone = FALSE; gCutsceneFocus = NULL; - unused8032CFC8 = 0; - unused8032CFCC = 0; gSecondCameraFocus = NULL; sCButtonsPressed = 0; vec3f_copy(sModeTransition.marioPos, sMarioCamState->pos); sModeTransition.framesLeft = 0; - unused8032CFCC = -1; - unused8032CFC8 = -1; gCameraMovementFlags = 0; gCameraMovementFlags |= CAM_MOVE_INIT_CAMERA; - unused8033B316 = 0; sStatusFlags = 0; - unused8033B31A = 0; sCameraSoundFlags = 0; sCUpCameraPitch = 0; sModeOffsetYaw = 0; @@ -3337,8 +3237,6 @@ void reset_camera(struct Camera *c) { sFOVState.shakePhase = 0; sObjectCutscene = 0; gRecentCutscene = 0; - unused8033B30C = 0; - unused8033B310 = 0; } void init_camera(struct Camera *c) { @@ -3377,7 +3275,6 @@ void init_camera(struct Camera *c) { } sCutsceneSplineSegment = 0; sCutsceneSplineSegmentProgress = 0.f; - unused8033B6E8 = 0; sHandheldShakeInc = 0.f; sHandheldShakeTimer = 0.f; sHandheldShakeMag = 0; @@ -3521,11 +3418,9 @@ void init_camera(struct Camera *c) { * modulo-4's the result, because each 8-bit mask only has 4 area bits for each level */ void zoom_out_if_paused_and_outside(struct GraphNodeCamera *camera) { - UNUSED u8 unused1[8]; UNUSED f32 dist; UNUSED s16 pitch; s16 yaw; - UNUSED u8 unused2[4]; s32 areaMaskIndex = gCurrLevelArea / 32; s32 areaBit = 1 << (((gCurrLevelArea & 0x10) / 4) + (((gCurrLevelArea & 0xF) - 1) & 3)); @@ -3582,9 +3477,6 @@ void create_camera(struct GraphNodeCamera *gc, struct AllocOnlyPool *pool) { * Copy Lakitu's pos and foc into `gc` */ void update_graph_node_camera(struct GraphNodeCamera *gc) { - UNUSED u8 unused[8]; - UNUSED struct Camera *c = gc->config.camera; - gc->rollScreen = gLakituState.roll; vec3f_copy(gc->pos, gLakituState.pos); vec3f_copy(gc->focus, gLakituState.focus); @@ -3593,8 +3485,6 @@ void update_graph_node_camera(struct GraphNodeCamera *gc) { Gfx *geo_camera_main(s32 callContext, struct GraphNode *g, void *context) { struct GraphNodeCamera *gc = (struct GraphNodeCamera *) g; - UNUSED Mat4 *unusedMat = context; - switch (callContext) { case GEO_CONTEXT_CREATE: create_camera(gc, context); @@ -3845,7 +3735,6 @@ void shake_camera_handheld(Vec3f pos, Vec3f focus) { f32 dist; s16 pitch; s16 yaw; - UNUSED u8 unused[8]; if (sHandheldShakeMag == 0) { vec3f_set(shakeOffset, 0.f, 0.f, 0.f); @@ -4282,7 +4171,6 @@ f32 camera_approach_f32_symmetric(f32 current, f32 target, f32 increment) { */ void random_vec3s(Vec3s dst, s16 xRange, s16 yRange, s16 zRange) { f32 randomFloat; - UNUSED u8 unused[4]; f32 tempXRange; f32 tempYRange; f32 tempZRange; @@ -4377,12 +4265,7 @@ s32 clamp_positions_and_find_yaw(Vec3f pos, Vec3f origin, f32 xMax, f32 xMin, f3 * developers just add 180 degrees to the result. */ s32 calc_avoid_yaw(s16 yawFromMario, s16 wallYaw) { - s16 yawDiff; - UNUSED u8 unused[34]; // Debug print buffer? ;) - UNUSED s32 unused1 = 0; - UNUSED s32 unused2 = 0; - - yawDiff = wallYaw - yawFromMario + DEGREES(90); + s16 yawDiff = wallYaw - yawFromMario + DEGREES(90); if (yawDiff < 0) { // Deflect to the right @@ -4416,7 +4299,6 @@ s32 is_surf_within_bounding_box(struct Surface *surf, f32 xMax, f32 yMax, f32 zM f32 dx; f32 dy; f32 dz; - UNUSED u8 unused[4]; s32 i; s32 j; // result @@ -4494,7 +4376,6 @@ s32 is_range_behind_surface(Vec3f from, Vec3f to, struct Surface *surf, s16 rang s32 behindSurface = TRUE; s32 leftBehind = 0; s32 rightBehind = 0; - UNUSED u8 unused[20]; f32 checkDist; s16 checkPitch; s16 checkYaw; @@ -4763,8 +4644,6 @@ void shake_camera_yaw(Vec3f pos, Vec3f focus) { * Apply a rotational shake to the camera by adjusting its roll */ void shake_camera_roll(s16 *roll) { - UNUSED u8 unused[8]; - if (gLakituState.shakeMagnitude[2] != 0) { increment_shake_offset(&gLakituState.shakeRollPhase, gLakituState.shakeRollVel); *roll += gLakituState.shakeMagnitude[2] * sins(gLakituState.shakeRollPhase); @@ -4999,7 +4878,6 @@ void radial_camera_input(struct Camera *c) { */ s32 trigger_cutscene_dialog(s32 trigger) { s32 result = 0; - UNUSED struct Camera *c = gCamera; if (trigger == 1) { start_object_cutscene_without_focus(CUTSCENE_READ_MESSAGE); @@ -5153,9 +5031,7 @@ u8 open_door_cutscene(u8 pullResult, u8 pushResult) { * @return the cutscene that should start, 0 if none */ u8 get_cutscene_from_mario_status(struct Camera *c) { - UNUSED u8 unused1[4]; u8 cutscene = c->cutscene; - UNUSED u8 unused2[12]; if (cutscene == 0) { // A cutscene started by an object, if any, will start if nothing else happened @@ -5342,7 +5218,6 @@ void stub_camera_4(UNUSED s32 a, UNUSED s32 b, UNUSED s32 c, UNUSED s32 d) { */ void set_focus_rel_mario(struct Camera *c, f32 leftRight, f32 yOff, f32 forwBack, s16 yawOff) { s16 yaw; - UNUSED u16 unused; f32 focFloorYOff; calc_y_to_curr_floor(&focFloorYOff, 1.f, 200.f, &focFloorYOff, 0.9f, 200.f); @@ -6754,24 +6629,18 @@ void resolve_geometry_collisions(Vec3f pos, UNUSED Vec3f lastGood) { * @return 3 if a wall is covering Mario, 1 if a wall is only near the camera. */ s32 rotate_camera_around_walls(struct Camera *c, Vec3f cPos, s16 *avoidYaw, s16 yawRange) { - UNUSED f32 unused1; struct WallCollisionData colData; struct Surface *wall; - UNUSED Vec3f unused2; f32 dummyDist, checkDist; - UNUSED f32 unused3; f32 coarseRadius; f32 fineRadius; s16 wallYaw, horWallNorm; - UNUSED s16 unused4; s16 dummyPitch; // The yaw of the vector from Mario to the camera. s16 yawFromMario; - UNUSED s16 unused5; s32 status = 0; /// The current iteration. The algorithm takes 8 equal steps from Mario back to the camera. s32 step = 0; - UNUSED s32 unused6; vec3f_get_dist_and_angle(sMarioCamState->pos, cPos, &dummyDist, &dummyPitch, &yawFromMario); sStatusFlags &= ~CAM_FLAG_CAM_NEAR_WALL; @@ -6974,8 +6843,7 @@ void stop_cutscene_and_retrieve_stored_info(struct Camera *c) { vec3f_copy(c->pos, sCameraStoreCutscene.pos); } -void cap_switch_save(s16 dummy) { - UNUSED s16 unused = dummy; +void cap_switch_save(UNUSED s16 param) { save_file_do_save(gCurrSaveFileNum - 1); } @@ -6989,7 +6857,6 @@ void init_spline_point(struct CutsceneSplinePoint *splinePoint, s8 index, u8 spe void copy_spline_segment(struct CutsceneSplinePoint dst[], struct CutsceneSplinePoint src[]) { s32 j = 0; s32 i = 0; - UNUSED s32 pad[2]; init_spline_point(&dst[i], src[j].index, src[j].speed, src[j].point); i += 1; @@ -6998,7 +6865,7 @@ void copy_spline_segment(struct CutsceneSplinePoint dst[], struct CutsceneSpline init_spline_point(&dst[i], src[j].index, src[j].speed, src[j].point); i += 1; j += 1; - } while ((src[j].index != -1) && (src[j].index != -1)); //! same comparison performed twice + } while (src[j].index != -1); } while (j > 16); // Create the end of the spline by duplicating the last point @@ -7784,8 +7651,6 @@ void star_dance_bound_yaw(struct Camera *c, s16 absYaw, s16 yawMax) { * Store the camera's focus in cvar9. */ void cutscene_dance_closeup_start(struct Camera *c) { - UNUSED s32 pad[2]; - if ((gLastCompletedStarNum == 4) && (gCurrCourseNum == COURSE_JRB)) { star_dance_bound_yaw(c, 0x0, 0x4000); } @@ -8221,10 +8086,7 @@ void cutscene_star_spawn_store_info(struct Camera *c) { * Focus on the top of the star. */ void cutscene_star_spawn_focus_star(struct Camera *c) { - UNUSED f32 hMul; Vec3f starPos; - UNUSED f32 vMul; - if (gCutsceneFocus != NULL) { object_pos_to_vec3f(starPos, gCutsceneFocus); starPos[1] += gCutsceneFocus->hitboxHeight; @@ -8430,7 +8292,6 @@ void cutscene_red_coin_star_end(struct Camera *c) { * @param rotYaw constant yaw offset to add to the camera's focus */ void cutscene_goto_cvar_pos(struct Camera *c, f32 goalDist, s16 goalPitch, s16 rotPitch, s16 rotYaw) { - UNUSED f32 unused1; f32 nextDist; s16 nextPitch, nextYaw; // The next 2 polar coord points are only used in CUTSCENE_PREPARE_CANNON @@ -8438,7 +8299,6 @@ void cutscene_goto_cvar_pos(struct Camera *c, f32 goalDist, s16 goalPitch, s16 r s16 cannonPitch, cannonYaw; f32 curDist; s16 curPitch, curYaw; - UNUSED f64 unused2; vec3f_get_dist_and_angle(sCutsceneVars[3].point, c->pos, &nextDist, &nextPitch, &nextYaw); // If over 8000 units away from the cannon, just teleport there if ((nextDist > 8000.f) && (c->cutscene == CUTSCENE_PREPARE_CANNON)) { @@ -8698,12 +8558,8 @@ void cutscene_suffocation_fly_away(UNUSED struct Camera *c) { * Keep Lakitu above the gas level. */ void cutscene_suffocation_stay_above_gas(struct Camera *c) { - UNUSED f32 unused1; - f32 gasLevel; - UNUSED f32 unused2; - cutscene_goto_cvar_pos(c, 400.f, 0x2800, 0x200, 0); - gasLevel = find_poison_gas_level(sMarioCamState->pos[0], sMarioCamState->pos[2]); + f32 gasLevel = find_poison_gas_level(sMarioCamState->pos[0], sMarioCamState->pos[2]); if (gasLevel != FLOOR_LOWER_LIMIT) { if ((gasLevel += 130.f) > c->pos[1]) { @@ -8750,8 +8606,6 @@ void cutscene_enter_pool_start(struct Camera *c) { } void cutscene_enter_pool_loop(struct Camera *c) { - UNUSED u32 pad[2]; - cutscene_goto_cvar_pos(c, 1200.f, 0x2000, 0x200, 0); } @@ -8835,8 +8689,6 @@ void cutscene_pyramid_top_explode_cam_shake(UNUSED struct Camera *c) { * Warp back to the old position, and start a heavy camera shake. */ void cutscene_pyramid_top_explode_warp_back(struct Camera *c) { - UNUSED u32 pad[2]; - vec3f_copy(c->pos, sCutsceneVars[4].point); vec3f_copy(c->focus, sCutsceneVars[5].point); set_environmental_camera_shake(SHAKE_ENV_BOWSER_JUMP); @@ -8905,11 +8757,8 @@ UNUSED static void unused_cutscene_goto_cvar(struct Camera *c) { * cvar9.angle[1] is the yaw between Mario and the gCutsceneFocus */ void cutscene_dialog_start(struct Camera *c) { - UNUSED f32 unused1; - UNUSED s16 unused2; s16 yaw; - cutscene_soften_music(c); set_time_stop_flags(TIME_STOP_ENABLED | TIME_STOP_DIALOG); @@ -9063,8 +8912,6 @@ UNUSED static void unused_cam_to_mario(struct Camera *c) { * Cutscene that plays when Mario is reading a message (a sign or message on the wall) */ void cutscene_read_message(struct Camera *c) { - UNUSED u32 pad[2]; - cutscene_event(cutscene_read_message_start, c, 0, 0); sStatusFlags |= CAM_FLAG_SMOOTH_MOVEMENT; @@ -9130,9 +8977,7 @@ void cutscene_exit_succ_start(UNUSED struct Camera *c) { * Set the camera pos depending on which level Mario exited. */ void cutscene_non_painting_set_cam_pos(struct Camera *c) { - UNUSED u32 unused1; struct Surface *floor; - UNUSED Vec3f unused2; switch (gPrevLevel) { case LEVEL_HMC: @@ -9314,12 +9159,8 @@ void cutscene_non_painting_death(struct Camera *c) { * because cvar1 rotates until is reaches 0, so it's important that it's a multiple of 0x100. */ void cutscene_cap_switch_press_start(struct Camera *c) { - UNUSED s16 unused1; - s16 yaw; - UNUSED u32 pad[2]; - store_info_star(c); - yaw = calculate_yaw(sMarioCamState->pos, c->pos); + s16 yaw = calculate_yaw(sMarioCamState->pos, c->pos); sCutsceneVars[3].angle[1] = 0x1200; // Basically the amount of rotation to get from behind Mario to in front of Mario sCutsceneVars[1].angle[1] = (yaw - (sMarioCamState->faceAngle[1] + sCutsceneVars[3].angle[1])) & 0xFF00; @@ -9332,9 +9173,6 @@ void cutscene_cap_switch_press_start(struct Camera *c) { void cutscene_cap_switch_press_rotate_around_mario(struct Camera *c) { f32 dist; s16 pitch, yaw; - UNUSED s16 unusedYaw = sMarioCamState->faceAngle[1] + 0x1000; - UNUSED s16 unused; - UNUSED s32 cvar1Yaw = sCutsceneVars[1].angle[1]; vec3f_get_dist_and_angle(sMarioCamState->pos, c->pos, &dist, &pitch, &yaw); @@ -9625,8 +9463,6 @@ void cutscene_intro_peach_fly_to_pipe(struct Camera *c) { * Lakitu flies around the warp pipe, then Mario jumps out. */ void cutscene_intro_peach_mario_appears(struct Camera *c) { - UNUSED u32 pad[2]; - sMarioCamState->cameraEvent = 0; cutscene_event(cutscene_intro_peach_reset_spline, c, 0, 0); cutscene_event(cutscene_intro_peach_follow_pipe_spline, c, 0, -1); @@ -9936,9 +9772,8 @@ void cutscene_sliding_doors_fly_back_up(UNUSED struct Camera *c) { */ void cutscene_sliding_doors_follow_mario(struct Camera *c) { Vec3f pos; - UNUSED u32 pad[5]; - vec3f_copy(pos, c->pos); + // Update cvar1 with Mario's position (the y value doesn't change) sCutsceneVars[1].point[0] = sMarioCamState->pos[0]; sCutsceneVars[1].point[2] = sMarioCamState->pos[2]; @@ -9962,8 +9797,6 @@ void cutscene_sliding_doors_follow_mario(struct Camera *c) { * Note: the star door unlocking event is not a cutscene, it's handled by Mario separately. */ void cutscene_sliding_doors_open(struct Camera *c) { - UNUSED u32 pad[2]; - reset_pan_distance(c); cutscene_event(cutscene_sliding_doors_open_start, c, 0, 8); cutscene_event(cutscene_sliding_doors_open_set_cvars, c, 8, 8); @@ -10184,7 +10017,6 @@ void cutscene_enter_cannon_end(struct Camera *c) { */ void cutscene_enter_cannon_raise(struct Camera *c) { struct Object *o; - UNUSED u32 pad[2]; f32 floorHeight; struct Surface *floor; Vec3f cannonFocus; @@ -10332,8 +10164,6 @@ void cutscene_door_end(struct Camera *c) { * Used for entering a room that uses a specific camera mode, like the castle lobby or BBH */ void cutscene_door_mode(struct Camera *c) { - UNUSED u32 pad[2]; - reset_pan_distance(c); camera_course_processing(c); @@ -11141,13 +10971,9 @@ struct CutsceneSplinePoint sCcmOutsideCreditsSplineFocus[] = { * the duration they want the flag to be active. */ void play_cutscene(struct Camera *c) { - UNUSED u32 pad[3]; - UNUSED s16 unusedYawFocToMario; s16 cutsceneDuration; - u8 oldCutscene; + u8 oldCutscene = c->cutscene; - unusedYawFocToMario = sAreaYaw; - oldCutscene = c->cutscene; sStatusFlags &= ~CAM_FLAG_SMOOTH_MOVEMENT; gCameraMovementFlags &= ~CAM_MOVING_INTO_MODE; diff --git a/src/game/debug.c b/src/game/debug.c index d8d32dda2..4b240b122 100644 --- a/src/game/debug.c +++ b/src/game/debug.c @@ -162,7 +162,6 @@ void print_debug_top_down_normal(const char *str, s32 number) { } } -#ifndef VERSION_EU void print_mapinfo(void) { struct Surface *pfloor; f32 bgY; @@ -180,10 +179,7 @@ void print_mapinfo(void) { print_debug_top_down_normal("mapinfo", 0); print_debug_top_down_mapinfo("area %x", area); print_debug_top_down_mapinfo("wx %d", gCurrentObject->oPosX); - //! Fat finger: programmer hit tab instead of space. Japanese - // thumb shift keyboards had the tab key next to the spacebar, - // so this was likely the reason. - print_debug_top_down_mapinfo("wy\t %d", gCurrentObject->oPosY); + print_debug_top_down_mapinfo("wy %d", gCurrentObject->oPosY); print_debug_top_down_mapinfo("wz %d", gCurrentObject->oPosZ); print_debug_top_down_mapinfo("bgY %d", bgY); print_debug_top_down_mapinfo("angY %d", angY); @@ -199,41 +195,6 @@ void print_mapinfo(void) { print_debug_top_down_mapinfo("water %d", water); } } -#else -void print_mapinfo(void) { - // EU mostly stubbed this function out. - struct Surface *pfloor; - UNUSED f32 bgY; - UNUSED f32 water; - UNUSED s32 area; - // s32 angY; - // - // angY = gCurrentObject->oMoveAngleYaw / 182.044000; - // area = ((s32)gCurrentObject->oPosX + 0x2000) / 1024 - // + ((s32)gCurrentObject->oPosZ + 0x2000) / 1024 * 16; - // - bgY = find_floor(gCurrentObject->oPosX, gCurrentObject->oPosY, gCurrentObject->oPosZ, &pfloor); - water = find_water_level(gCurrentObject->oPosX, gCurrentObject->oPosZ); - - print_debug_top_down_normal("mapinfo", 0); - // print_debug_top_down_mapinfo("area %x", area); - // print_debug_top_down_mapinfo("wx %d", gCurrentObject->oPosX); - // print_debug_top_down_mapinfo("wy\t %d", gCurrentObject->oPosY); - // print_debug_top_down_mapinfo("wz %d", gCurrentObject->oPosZ); - // print_debug_top_down_mapinfo("bgY %d", bgY); - // print_debug_top_down_mapinfo("angY %d", angY); - // - // if(pfloor) // not null - //{ - // print_debug_top_down_mapinfo("bgcode %d", pfloor->type); - // print_debug_top_down_mapinfo("bgstatus %d", pfloor->flags); - // print_debug_top_down_mapinfo("bgarea %d", pfloor->room); - //} - // - // if(gCurrentObject->oPosY < water) - // print_debug_top_down_mapinfo("water %d", water); -} -#endif void print_checkinfo(void) { print_debug_top_down_normal("checkinfo", 0); @@ -506,8 +467,6 @@ void try_print_debug_mario_level_info(void) { * [5][7] (b7 in the string array) to 1 to enable debug spawn. */ void try_do_mario_debug_object_spawn(void) { - UNUSED s32 unused; - if (sDebugPage == DEBUG_PAGE_STAGEINFO && gDebugInfo[DEBUG_PAGE_ENEMYINFO][7] == 1) { if (gPlayer1Controller->buttonPressed & R_JPAD) { spawn_object_relative(0, 0, 100, 200, gCurrentObject, MODEL_KOOPA_SHELL, bhvKoopaShell); diff --git a/src/game/game_init.c b/src/game/game_init.c index a5916bfa3..f698f9aff 100644 --- a/src/game/game_init.c +++ b/src/game/game_init.c @@ -75,7 +75,6 @@ struct DmaHandlerList gDemoInputsBuf; // fillers UNUSED static u8 sfillerGameInit[0x90]; -UNUSED static s32 sUnusedGameInitValue = 0; // General timer that runs as the game starts u32 gGlobalTimer = 0; @@ -481,8 +480,6 @@ UNUSED static void record_demo(void) { * Take the updated controller struct and calculate the new x, y, and distance floats. */ void adjust_analog_stick(struct Controller *controller) { - UNUSED u8 pad[8]; - // Reset the controller's x and y floats. controller->stickX = 0; controller->stickY = 0; diff --git a/src/game/hud.c b/src/game/hud.c index 5106d7dd0..2d9491276 100644 --- a/src/game/hud.c +++ b/src/game/hud.c @@ -72,12 +72,6 @@ struct PowerMeterHUD { f32 unused; }; -struct UnusedHUDStruct { - u32 unused1; - u16 unused2; - u16 unused3; -}; - struct CameraHUD { s16 status; }; @@ -98,8 +92,6 @@ static struct PowerMeterHUD sPowerMeterHUD = { // when the power meter is hidden. s32 sPowerMeterVisibleTimer = 0; -UNUSED static struct UnusedHUDStruct sUnusedHUDValues = { 0x00, 0x0A, 0x00 }; - static struct CameraHUD sCameraHUD = { CAM_STATUS_NONE }; /** diff --git a/src/game/ingame_menu.c b/src/game/ingame_menu.c index 0292ebf78..d8daa65ea 100644 --- a/src/game/ingame_menu.c +++ b/src/game/ingame_menu.c @@ -656,7 +656,6 @@ void print_hud_my_score_stars(s8 fileNum, s8 courseNum, s16 x, s16 y) { u8 strStarCount[4]; s16 starCount; u8 textSymStar[] = { GLYPH_STAR, GLYPH_SPACE }; - UNUSED u16 unused; u8 textSymX[] = { GLYPH_MULTIPLY, GLYPH_SPACE }; starCount = save_file_get_course_star_count(fileNum, courseNum); @@ -753,8 +752,6 @@ void reset_dialog_render_state(void) { #define Y_VAL2 5.0f void render_dialog_box_type(struct DialogEntry *dialog, s8 linesPerBox) { - UNUSED s32 unused; - create_dl_translation_matrix(MENU_MTX_NOPUSH, dialog->leftOffset, dialog->width, 0); switch (gDialogBoxType) { @@ -890,10 +887,7 @@ u32 ensure_nonnegative(s16 value) { return value; } -void handle_dialog_text_and_pages(s8 colorMode, struct DialogEntry *dialog, s8 lowerBound) -{ - UNUSED s32 pad[2]; - +void handle_dialog_text_and_pages(s8 colorMode, struct DialogEntry *dialog, s8 lowerBound) { u8 strChar; s16 colorLoop; diff --git a/src/game/interaction.c b/src/game/interaction.c index eeddd68f6..fc4ffde5c 100644 --- a/src/game/interaction.c +++ b/src/game/interaction.c @@ -1242,8 +1242,6 @@ u32 interact_clam_or_bubba(struct MarioState *m, UNUSED u32 interactType, struct } u32 interact_bully(struct MarioState *m, UNUSED u32 interactType, struct Object *o) { - UNUSED u32 unused; - u32 interaction; if (m->flags & MARIO_METAL_CAP) { interaction = INT_FAST_ATTACK_OR_SHELL; @@ -1337,8 +1335,6 @@ u32 interact_mr_blizzard(struct MarioState *m, UNUSED u32 interactType, struct O } u32 interact_hit_from_below(struct MarioState *m, UNUSED u32 interactType, struct Object *o) { - UNUSED u32 unused; - u32 interaction; if (m->flags & MARIO_METAL_CAP) { interaction = INT_FAST_ATTACK_OR_SHELL; @@ -1775,8 +1771,8 @@ void check_kick_or_punch_wall(struct MarioState *m) { detector.x = m->pos[0] + 50.0f * sins(m->faceAngle[1]); detector.z = m->pos[2] + 50.0f * coss(m->faceAngle[1]); detector.y = m->pos[1]; - detector.offsetY = 80.0f; - detector.radius = 5.0f; + detector.offsetY = 80.0f; + detector.radius = 5.0f; if (find_wall_collisions(&detector) > 0) { if (m->action != ACT_MOVE_PUNCHING || m->forwardVel >= 0.0f) { diff --git a/src/game/level_update.c b/src/game/level_update.c index d449c5b89..5f36f66c5 100644 --- a/src/game/level_update.c +++ b/src/game/level_update.c @@ -177,17 +177,11 @@ s16 sDelayedWarpOp; s16 sDelayedWarpTimer; s16 sSourceWarpNodeId; s32 sDelayedWarpArg; -#if defined(VERSION_EU) || defined(VERSION_SH) -s16 unusedEULevelUpdateBss1; -#endif s8 sTimerRunning; s8 gNeverEnteredCastle; struct MarioState *gMarioState = &gMarioStates[0]; -u8 unused1[4] = { 0 }; s8 sWarpCheckpointActive = FALSE; -u8 unused3[4]; -u8 unused4[2]; u16 level_control_timer(s32 timerOp) { switch (timerOp) { diff --git a/src/game/level_update.h b/src/game/level_update.h index 1d31bb2ac..cbc8199bb 100644 --- a/src/game/level_update.h +++ b/src/game/level_update.h @@ -68,7 +68,6 @@ extern struct MarioState *gMarioState; extern s16 sCurrPlayMode; extern s16 sTransitionTimer; extern void (*sTransitionUpdate)(s16 *); -extern u8 unused3[4]; extern void load_language_text(void); struct WarpDest { @@ -86,7 +85,6 @@ extern s16 sDelayedWarpOp; extern s16 sDelayedWarpTimer; extern s16 sSourceWarpNodeId; extern s32 sDelayedWarpArg; -extern u8 unused4[2]; extern s8 sTimerRunning; struct HudDisplay { diff --git a/src/game/macro_special_objects.c b/src/game/macro_special_objects.c index cb85214b0..08b62274b 100644 --- a/src/game/macro_special_objects.c +++ b/src/game/macro_special_objects.c @@ -171,8 +171,6 @@ void spawn_macro_objects(s32 areaIndex, s16 *macroObjList) { } void spawn_macro_objects_hardcoded(s32 areaIndex, s16 *macroObjList) { - UNUSED u8 pad[8]; - // This version of macroObjList has the preset and Y-Rotation separated, // and lacks behavior params. Might be an early version of the macro object list? s16 macroObjX; @@ -181,8 +179,6 @@ void spawn_macro_objects_hardcoded(s32 areaIndex, s16 *macroObjList) { s16 macroObjPreset; s16 macroObjRY; // Y Rotation - UNUSED u8 pad2[10]; - gMacroObjectDefaultParent.header.gfx.areaIndex = areaIndex; gMacroObjectDefaultParent.header.gfx.activeAreaIndex = areaIndex; diff --git a/src/game/mario_actions_airborne.c b/src/game/mario_actions_airborne.c index 12dd2c1ed..473ccc43d 100644 --- a/src/game/mario_actions_airborne.c +++ b/src/game/mario_actions_airborne.c @@ -340,8 +340,6 @@ void update_flying_pitch(struct MarioState *m) { } void update_flying(struct MarioState *m) { - UNUSED u32 unused; - update_flying_pitch(m); update_flying_yaw(m); diff --git a/src/game/mario_actions_automatic.c b/src/game/mario_actions_automatic.c index d049e8b09..6c5748e63 100644 --- a/src/game/mario_actions_automatic.c +++ b/src/game/mario_actions_automatic.c @@ -58,9 +58,6 @@ void play_climbing_sounds(struct MarioState *m, s32 b) { } s32 set_pole_position(struct MarioState *m, f32 offsetY) { - UNUSED s32 unused1; - UNUSED s32 unused2; - UNUSED s32 unused3; struct Surface *floor; struct Surface *ceil; f32 floorHeight; @@ -301,16 +298,15 @@ s32 act_top_of_pole(struct MarioState *m) { } s32 perform_hanging_step(struct MarioState *m, Vec3f nextPos) { - UNUSED s32 unused; struct Surface *ceil; struct Surface *floor; f32 ceilHeight; f32 floorHeight; f32 ceilOffset; - struct WallCollisionData wallCollisionData; + struct WallCollisionData wallCollisionData; - resolve_and_return_wall_collisions(nextPos, 50.0f, 50.0f, &wallCollisionData); - m->wall = wallCollisionData.numWalls == 0 ? NULL : wallCollisionData.walls[0]; + resolve_and_return_wall_collisions(nextPos, 50.0f, 50.0f, &wallCollisionData); + m->wall = wallCollisionData.numWalls == 0 ? NULL : wallCollisionData.walls[0]; floorHeight = find_floor(nextPos[0], nextPos[1], nextPos[2], &floor); ceilHeight = find_ceil(nextPos[0], nextPos[1] + 3.0f, nextPos[2], &ceil); diff --git a/src/game/mario_actions_cutscene.c b/src/game/mario_actions_cutscene.c index dc857fed6..248459447 100644 --- a/src/game/mario_actions_cutscene.c +++ b/src/game/mario_actions_cutscene.c @@ -34,7 +34,6 @@ static struct Object *sEndPeachObj; static struct Object *sEndRightToadObj; static struct Object *sEndLeftToadObj; static struct Object *sEndJumboStarObj; -static UNUSED s32 sUnused; static s16 sEndPeachAnimation; static s16 sEndToadAnims[2]; diff --git a/src/game/mario_actions_moving.c b/src/game/mario_actions_moving.c index b4cac3da7..687100f9f 100644 --- a/src/game/mario_actions_moving.c +++ b/src/game/mario_actions_moving.c @@ -511,8 +511,6 @@ s32 should_begin_sliding(struct MarioState *m) { } s32 check_ground_dive_or_punch(struct MarioState *m) { - UNUSED s32 unused; - if (m->input & INPUT_B_PRESSED) { //! Speed kick (shoutouts to SimpleFlips) if (m->forwardVel >= 29.0f && m->controller->stickMag > 48.0f) { diff --git a/src/game/mario_actions_submerged.c b/src/game/mario_actions_submerged.c index fd9cdea3a..1211de91d 100644 --- a/src/game/mario_actions_submerged.c +++ b/src/game/mario_actions_submerged.c @@ -76,7 +76,7 @@ static u32 perform_water_full_step(struct MarioState *m, Vec3f nextPos) { f32 floorHeight; resolve_and_return_wall_collisions(nextPos, 10.0f, 110.0f, &wallData); - wall = wallData.numWalls == 0 ? NULL : wallData.walls[0]; + wall = wallData.numWalls == 0 ? NULL : wallData.walls[0]; floorHeight = find_floor(nextPos[0], nextPos[1], nextPos[2], &floor); ceilHeight = find_ceil(nextPos[0], nextPos[1] + 3.0f, nextPos[2], &ceil); @@ -167,7 +167,6 @@ static void apply_water_current(struct MarioState *m, Vec3f step) { } static u32 perform_water_step(struct MarioState *m) { - UNUSED u32 unused; u32 stepResult; Vec3f nextPos; Vec3f step; diff --git a/src/game/mario_misc.c b/src/game/mario_misc.c index d394c5b1d..6e268766f 100644 --- a/src/game/mario_misc.c +++ b/src/game/mario_misc.c @@ -243,9 +243,7 @@ void bhv_unlock_door_star_init(void) { } void bhv_unlock_door_star_loop(void) { - UNUSED u8 unused1[4]; s16 prevYaw = gCurrentObject->oMoveAngleYaw; - UNUSED u8 unused2[4]; // Speed up the star every frame if (gCurrentObject->oUnlockDoorStarYawVel < 0x2400) { diff --git a/src/game/moving_texture.c b/src/game/moving_texture.c index 744e8e63a..7e99d4738 100644 --- a/src/game/moving_texture.c +++ b/src/game/moving_texture.c @@ -303,7 +303,6 @@ struct MovtexObject gMovtexColored2[] = { */ Gfx *geo_wdw_set_initial_water_level(s32 callContext, UNUSED struct GraphNode *node, UNUSED Mat4 mtx) { s32 i; - UNUSED u8 unused[] = { 1, 0, 4, 0, 7, 0, 10, 0 }; s16 wdwWaterHeight; // Why was this global variable needed when they could just check for GEO_CONTEXT_AREA_LOAD? diff --git a/src/game/nupiinitsram.c b/src/game/nupiinitsram.c index 4e1ad1bff..5ec417096 100644 --- a/src/game/nupiinitsram.c +++ b/src/game/nupiinitsram.c @@ -31,23 +31,23 @@ int nuPiInitSram() { if (SramHandle.baseAddress == PHYS_TO_K1(SRAM_START_ADDR)) return 0; - + /* Fill basic information */ SramHandle.type = DEVICE_TYPE_SRAM; SramHandle.baseAddress = PHYS_TO_K1(SRAM_START_ADDR); - + /* Get Domain parameters */ SramHandle.latency = (u8)SRAM_LATENCY; SramHandle.pulse = (u8)SRAM_PULSE; SramHandle.pageSize = (u8)SRAM_PAGE_SIZE; SramHandle.relDuration = (u8)SRAM_REL_DURATION; SramHandle.domain = PI_DOMAIN2; - + /* Fill speed and transferInfo to zero */ SramHandle.speed = 0; bzero((void *)&(SramHandle.transferInfo), sizeof(SramHandle.transferInfo)); - + /* Put the SramHandle onto PiTable*/ osEPiLinkHandle(&SramHandle); nuPiSramHandle = &SramHandle; diff --git a/src/game/nupireadwritesram.c b/src/game/nupireadwritesram.c index 9f0a3a908..dda54ab52 100644 --- a/src/game/nupireadwritesram.c +++ b/src/game/nupireadwritesram.c @@ -22,7 +22,7 @@ extern OSPiHandle* nuPiSramHandle; /* RET: None */ /*----------------------------------------------------------------------*/ int nuPiReadWriteSram(u32 addr, void* buf_ptr, u32 size, s32 flag) -{ +{ OSIoMesg dmaIoMesgBuf; OSMesgQueue dmaMesgQ; OSMesg dmaMesgBuf; diff --git a/src/game/obj_behaviors_2.c b/src/game/obj_behaviors_2.c index 747de21b1..c6294082b 100644 --- a/src/game/obj_behaviors_2.c +++ b/src/game/obj_behaviors_2.c @@ -153,7 +153,6 @@ static void platform_on_track_update_pos_or_spawn_ball(s32 ballIndex, f32 x, f32 struct Waypoint *initialPrevWaypoint; struct Waypoint *nextWaypoint; struct Waypoint *prevWaypoint; - UNUSED s32 unused; f32 amountToMove; f32 dx; f32 dy; diff --git a/src/game/object_helpers.c b/src/game/object_helpers.c index bea4b015b..6c4268d43 100644 --- a/src/game/object_helpers.c +++ b/src/game/object_helpers.c @@ -368,7 +368,6 @@ 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 = 0; s16 startAngle; @@ -1186,9 +1185,6 @@ static s32 cur_obj_move_xz(f32 steepSlopeNormalY, s32 careAboutEdgesAndSteepSlop f32 intendedFloorHeight = find_floor(intendedX, o->oPosY, intendedZ, &intendedFloor); f32 deltaFloorHeight = intendedFloorHeight - o->oFloorHeight; - UNUSED f32 unused; - UNUSED f32 ny; - o->oMoveFlags &= ~OBJ_MOVE_HIT_EDGE; if (o->oRoom != -1 && intendedFloor != NULL) { @@ -1222,7 +1218,7 @@ static s32 cur_obj_move_xz(f32 steepSlopeNormalY, s32 careAboutEdgesAndSteepSlop o->oMoveFlags |= OBJ_MOVE_HIT_EDGE; return FALSE; } - } else if ((ny = intendedFloor->normal.y) > steepSlopeNormalY || o->oPosY > intendedFloorHeight) { + } else if (intendedFloor->normal.y > steepSlopeNormalY || o->oPosY > intendedFloorHeight) { // Allow movement upward, provided either: // - The target floor is flat enough (e.g. walking up stairs) // - We are above the target floor (most likely in the air) diff --git a/src/game/object_list_processor.c b/src/game/object_list_processor.c index 12948fb04..1cd4e2689 100644 --- a/src/game/object_list_processor.c +++ b/src/game/object_list_processor.c @@ -34,8 +34,6 @@ s32 gDebugInfoFlags; */ s32 gNumFindFloorMisses; -UNUSED s32 unused_8033BEF8; - /** * An unused debug counter with the label "WALL". */ @@ -475,9 +473,7 @@ void spawn_objects_from_info(UNUSED s32 unused, struct SpawnInfo *spawnInfo) { while (spawnInfo != NULL) { struct Object *object; - UNUSED s32 unused; const BehaviorScript *script; - UNUSED s16 arg16 = (s16)(spawnInfo->behaviorArg & 0xFFFF); script = segmented_to_virtual(spawnInfo->behaviorScript); @@ -588,7 +584,6 @@ void update_non_terrain_objects(void) { * Unload deactivated objects in any object list. */ void unload_deactivated_objects(void) { - UNUSED s32 unused; s32 listIndex; s32 i = 0; diff --git a/src/game/object_list_processor.h b/src/game/object_list_processor.h index 38c02aa39..1f2be9cd9 100644 --- a/src/game/object_list_processor.h +++ b/src/game/object_list_processor.h @@ -63,7 +63,6 @@ extern struct ObjectNode gObjectListArray[]; extern s32 gDebugInfoFlags; extern s32 gNumFindFloorMisses; -extern UNUSED s32 unused_8033BEF8; extern s32 gUnknownWallCount; extern u32 gObjectCounter; diff --git a/src/game/paintings.c b/src/game/paintings.c index 5b7e39c82..f0bdcdc00 100644 --- a/src/game/paintings.c +++ b/src/game/paintings.c @@ -770,7 +770,6 @@ s8 normalize_component(f32 comp) { * The table used in game, seg2_painting_mesh_neighbor_tris, is in bin/segment2.c. */ void painting_average_vertex_normals(s16 *neighborTris, s16 numVtx) { - UNUSED s16 unused; s16 tri; s16 i; s16 j; diff --git a/src/game/platform_displacement.c b/src/game/platform_displacement.c index 63e393549..715ad6143 100644 --- a/src/game/platform_displacement.c +++ b/src/game/platform_displacement.c @@ -21,7 +21,6 @@ struct Object *gMarioPlatform = NULL; */ void update_mario_platform(void) { struct Surface *floor; - UNUSED u32 unused; f32 marioX; f32 marioY; f32 marioZ; @@ -242,9 +241,6 @@ void apply_platform_displacement(u32 isMario, struct Object *platform) { Vec3f relativeOffset; Vec3f newObjectOffset; Vec3s rotation; - UNUSED s16 unused1; - UNUSED s16 unused2; - UNUSED s16 unused3; f32 displaceMatrix[4][4]; rotation[0] = platform->oAngleVelPitch; diff --git a/src/game/print.c b/src/game/print.c index e1f9ec267..dcad8d40f 100644 --- a/src/game/print.c +++ b/src/game/print.c @@ -254,8 +254,6 @@ void print_text(s32 x, s32 y, const char *str) { */ void print_text_centered(s32 x, s32 y, const char *str) { char c = 0; - UNUSED s8 unused1 = 0; - UNUSED s32 unused2 = 0; s32 length = 0; s32 srcIndex = 0; diff --git a/src/game/rendering_graph_node.c b/src/game/rendering_graph_node.c index 42f6087bf..d4c3b61cd 100644 --- a/src/game/rendering_graph_node.c +++ b/src/game/rendering_graph_node.c @@ -1316,7 +1316,6 @@ void geo_process_node_and_siblings(struct GraphNode *firstNode) { * to set up the projection and draw display lists. */ void geo_process_root(struct GraphNodeRoot *node, Vp *b, Vp *c, s32 clearColor) { - UNUSED s32 unused; #if PUPPYPRINT_DEBUG OSTime first = osGetTime(); #endif diff --git a/src/game/sram.h b/src/game/sram.h index 7855e0674..98f13ac66 100644 --- a/src/game/sram.h +++ b/src/game/sram.h @@ -20,11 +20,11 @@ extern int nuPiReadWriteSram(u32 addr, void* buf_ptr, u32 size, s32 flag); /*----------------------------------------------------------------------*/ #define nuPiReadSram(addr, buf_ptr, size) \ nuPiReadWriteSram(addr, buf_ptr, size, OS_READ) - + /*----------------------------------------------------------------------*/ /* nuPiWriteSram - Write to SRAM */ /*----------------------------------------------------------------------*/ #define nuPiWriteSram(addr, buf_ptr, size) \ - nuPiReadWriteSram(addr, buf_ptr, size, OS_WRITE) + nuPiReadWriteSram(addr, buf_ptr, size, OS_WRITE) #endif // SRAM_H \ No newline at end of file diff --git a/src/game/vc_check.h b/src/game/vc_check.h index c39ac722d..71d29e238 100644 --- a/src/game/vc_check.h +++ b/src/game/vc_check.h @@ -12,7 +12,7 @@ f32 round_double_to_float(f64); * This check forces RTZ bug on vc * If console is N64/adequate Emu round-to-nearest (RTN) rounding mode is used * If console is VC round-to-zero (RTZ) mode is used - * + * * The double value 0.9999999999999999 used is 0x3FEFFFFFFFFFFFFF in binary * Exponent=01111111110, Mantissa=1111111111111111111111111111111111111111111111111111 * RTZ will output not 1.0f, RTN will output exactly 1.0f diff --git a/src/goddard/debug_utils.c b/src/goddard/debug_utils.c index ff7140596..c18b6f127 100644 --- a/src/goddard/debug_utils.c +++ b/src/goddard/debug_utils.c @@ -439,7 +439,6 @@ void print_stack_trace(void) { */ void fatal_printf(const char *fmt, ...) { char cur; - UNUSED u8 pad[4]; va_list vl; va_start(vl, fmt); @@ -669,7 +668,6 @@ char *sprint_val_withspecifiers(char *str, union PrintVal val, char *specifiers) s32 intPart; // sp38 s32 intPrec; // sp34 s32 fracPrec; // sp30 - UNUSED u8 pad[4]; char cur; // sp2B fracPrec = 6; diff --git a/src/goddard/draw_objects.c b/src/goddard/draw_objects.c index d6fe652b3..0e5bdff14 100644 --- a/src/goddard/draw_objects.c +++ b/src/goddard/draw_objects.c @@ -168,7 +168,6 @@ void draw_shape(struct ObjShape *shape, s32 flag, f32 c, f32 d, f32 e, // "sweep f32 i, f32 j, f32 k, // translate shape f32 l, f32 m, f32 n, // rotate x, y, z s32 colorIdx, Mat4f *rotMtx) { - UNUSED u8 unused[8]; struct GdVec3f sp1C; restart_timer("drawshape"); @@ -245,7 +244,6 @@ void draw_shape(struct ObjShape *shape, s32 flag, f32 c, f32 d, f32 e, // "sweep void draw_shape_2d(struct ObjShape *shape, s32 flag, UNUSED f32 c, UNUSED f32 d, UNUSED f32 e, f32 f, f32 g, f32 h, UNUSED f32 i, UNUSED f32 j, UNUSED f32 k, UNUSED f32 l, UNUSED f32 m, UNUSED f32 n, UNUSED s32 color, UNUSED s32 p) { - UNUSED u8 unused[8]; struct GdVec3f sp1C; restart_timer("drawshape2d"); @@ -437,7 +435,6 @@ void draw_face(struct ObjFace *face) { f32 z; // 38 f32 y; // 34 f32 x; // 30 - UNUSED u8 pad[12]; s32 i; // 20; also used to store mtl's gddl number s32 hasTextCoords; // 1c Vtx *gbiVtx; // 18 @@ -536,7 +533,6 @@ void Unknown801792F0(struct GdObj *obj) { void draw_label(struct ObjLabel *label) { struct GdVec3f position; char strbuf[0x100]; - UNUSED u8 unused[16]; struct ObjValPtr *valptr; union ObjVarVal varval; valptrproc_t valfn = label->valfn; @@ -593,7 +589,6 @@ void draw_label(struct ObjLabel *label) { void draw_net(struct ObjNet *self) { struct ObjNet *net = self; s32 netColor; - UNUSED u8 unused[80]; if (sSceneProcessType == FIND_PICKS) { return; @@ -729,7 +724,6 @@ void world_pos_to_screen_coords(struct GdVec3f *pos, struct ObjCamera *cam, stru */ void check_grabable_click(struct GdObj *input) { struct GdVec3f objPos; - UNUSED u8 unused[12]; struct GdObj *obj; Mat4f *mtx; @@ -772,8 +766,6 @@ void check_grabable_click(struct GdObj *input) { * @param lightgrp lights of `ObjView */ void drawscene(enum SceneType process, struct ObjGroup *interactables, struct ObjGroup *lightgrp) { - UNUSED u8 unused[16]; - restart_timer("drawscene"); imin("draw_scene()"); sUnreadShapeFlag = 0; @@ -868,11 +860,9 @@ void draw_shape_faces(struct ObjShape *shape) { */ void draw_particle(struct GdObj *obj) { struct ObjParticle *ptc = (struct ObjParticle *) obj; - UNUSED u8 unused1[16]; struct GdColour *white; struct GdColour *black; f32 brightness; - UNUSED u8 unused2[16]; if (ptc->timeout > 0) { white = sColourPalette[0]; @@ -906,32 +896,8 @@ void draw_particle(struct GdObj *obj) { * @note This function returns before doing any work. It seems * that Goddard moved away from using bones in the final code */ -void draw_bone(struct GdObj *obj) { - struct ObjBone *bone = (struct ObjBone *) obj; - UNUSED u8 unused1[4]; - s32 colour; - UNUSED u8 unused2[4]; - struct GdVec3f scale; // guess - +void draw_bone(UNUSED struct GdObj *obj) { return; - - // dead code - scale.x = 1.0f; - scale.y = 1.0f; - scale.z = bone->unkF8 / 50.0f; - - if (bone->header.drawFlags & OBJ_HIGHLIGHTED) { - colour = COLOUR_YELLOW; - } else { - colour = bone->colourNum; - } - bone->header.drawFlags &= ~OBJ_HIGHLIGHTED; - - if (sSceneProcessType != FIND_PICKS) { - draw_shape(bone->shapePtr, 0x1B, scale.x, scale.y, scale.z, bone->worldPos.x, bone->worldPos.y, - bone->worldPos.z, 0.0f, 0.0f, 0.0f, bone->unk28.x, bone->unk28.y, bone->unk28.z, colour, - &bone->mat70); - } } /** @@ -939,14 +905,10 @@ void draw_bone(struct GdObj *obj) { */ void draw_joint(struct GdObj *obj) { struct ObjJoint *joint = (struct ObjJoint *) obj; - UNUSED u8 unused1[4]; UNUSED f32 sp7C = 70.0f; - UNUSED u8 unused2[4]; UNUSED s32 sp74 = 1; s32 colour; - UNUSED u8 unused[8]; struct ObjShape *boneShape; - UNUSED u8 unused3[28]; if ((boneShape = joint->shapePtr) == NULL) { return; @@ -1260,7 +1222,7 @@ static void find_thisface_verts(struct ObjFace *face, struct ObjGroup *vertexGrp struct ListNode *node; for (i = 0; i < face->vtxCount; i++) { - // find the vertex or particle whose index in vertexGrp equals face->vertices[i] + // find the vertex or particle whose index in vertexGrp equals face->vertices[i] node = vertexGrp->firstMember; currIndex = 0; while (node != NULL) { @@ -1347,7 +1309,6 @@ void unpick_obj(struct GdObj *obj) { */ void find_closest_pickable_obj(struct GdObj *input) { struct GdObj *obj = input; - UNUSED u8 unused[12]; f32 distance; if (obj->drawFlags & OBJ_IS_GRABBALE) { diff --git a/src/goddard/dynlist_proc.c b/src/goddard/dynlist_proc.c index 60f3b7908..f036dae4a 100644 --- a/src/goddard/dynlist_proc.c +++ b/src/goddard/dynlist_proc.c @@ -158,8 +158,6 @@ void reset_dynlist(void) { * Normally the dynlist specifically sets an object for return. */ struct GdObj *proc_dynlist(struct DynList *dylist) { - UNUSED u32 pad[2]; - if (dylist++->cmd != 0xD1D4) { fatal_printf("proc_dynlist() not a valid dyn list"); } @@ -1224,7 +1222,7 @@ void d_map_materials(DynObjName name) { /** * For all faces in the current `ObjGroup`, resolve their vertex indices to - * `ObjVertex` pointers that point to vertices in the specified vertex group. + * `ObjVertex` pointers that point to vertices in the specified vertex group. * Also compute normals for all faces in the current `ObjGroup` and all vertices * in the specified vertex group. * See `map_vertices()` for more info. @@ -2631,7 +2629,7 @@ void d_set_parm_ptr(enum DParmPtr param, void *ptr) { fatal_printf("dsetparmp() too many points"); } // `ptr` here is a vertex index, not an actual pointer. - // These vertex indices later get converted to `ObjVertex` pointers when `find_thisface_verts` is called. + // These vertex indices later get converted to `ObjVertex` pointers when `find_thisface_verts` is called. ((struct ObjFace *) sDynListCurObj)->vertices[((struct ObjFace *) sDynListCurObj)->vtxCount++] = ptr; break; default: diff --git a/src/goddard/dynlists/dynlist_macros.h b/src/goddard/dynlists/dynlist_macros.h index decb8fa96..cbde7263a 100644 --- a/src/goddard/dynlists/dynlist_macros.h +++ b/src/goddard/dynlists/dynlist_macros.h @@ -24,7 +24,7 @@ /** * Set the initial position of the current object - * Supported Objs: joints, particles, nets, vertices, cameras + * Supported Objs: joints, particles, nets, vertices, cameras */ #define SetInitialPosition(x, y, z) \ { 1, {0}, {0}, {(x), (y), (z)} } @@ -150,7 +150,7 @@ { 19, {0}, {(void *)(type)}, {0.0, 0.0, 0.0} } /** - * Set the current shape's material group to the specified group. + * Set the current shape's material group to the specified group. * Supported Objs: shapes */ #define SetMaterialGroup(mtlGrpName) \ diff --git a/src/goddard/dynlists/dynlist_mario_face.c b/src/goddard/dynlists/dynlist_mario_face.c index e742dd549..b504f7852 100644 --- a/src/goddard/dynlists/dynlist_mario_face.c +++ b/src/goddard/dynlists/dynlist_mario_face.c @@ -354,7 +354,7 @@ struct DynList dynlist_mario_face_shape[] = { MakeDynObj(D_DATA_GRP, DYNOBJ_MARIO_FACE_TRI_GROUP), LinkWithPtr(&mario_Face_FaceInfo), - StartGroup(DYNOBJ_MARIO_FACE_MTL_GROUP), + StartGroup(DYNOBJ_MARIO_FACE_MTL_GROUP), // Teeth color MakeDynObj(D_MATERIAL, 0), SetId(0), @@ -366,7 +366,7 @@ struct DynList dynlist_mario_face_shape[] = { SetAmbient(0.883, 0.602, 0.408), SetDiffuse(0.883, 0.602, 0.408), // Shadow on back of hat - MakeDynObj(D_MATERIAL, 0), + MakeDynObj(D_MATERIAL, 0), SetId(2), SetAmbient(0.362, 0.0, 0.0), SetDiffuse(0.362, 0.0, 0.0), diff --git a/src/goddard/dynlists/dynlist_mario_master.c b/src/goddard/dynlists/dynlist_mario_master.c index 6a5b19ca8..e359280b1 100644 --- a/src/goddard/dynlists/dynlist_mario_master.c +++ b/src/goddard/dynlists/dynlist_mario_master.c @@ -1089,7 +1089,7 @@ struct DynList dynlist_mario_master[] = { AttachTo(0x0, DYNOBJ_MARIO_MAIN_ANIMATOR), SetNodeGroup(DYNOBJ_RIGHT_EYELID_ANIMDATA_GROUP), LinkWith(DYNOBJ_RIGHT_EYELID_JOINT_1), - + // whole head animator? MakeDynObj(D_DATA_GRP, DYNOBJ_MARIO_HEAD_ANIMDATA_GROUP), LinkWithPtr(&anim_mario_intro), diff --git a/src/goddard/gd_macros.h b/src/goddard/gd_macros.h index a895b025e..299f2b61d 100644 --- a/src/goddard/gd_macros.h +++ b/src/goddard/gd_macros.h @@ -3,7 +3,7 @@ /** * @file gd_macros.h - * + * * Common macros that Goddard used throughout the Mario Head subsytem code. */ diff --git a/src/goddard/gd_math.c b/src/goddard/gd_math.c index bc155f6ca..4a31face2 100644 --- a/src/goddard/gd_math.c +++ b/src/goddard/gd_math.c @@ -515,7 +515,7 @@ f32 gd_mat4f_det(Mat4f *mtx) { * returns the determinant. */ f32 gd_3x3_det(f32 r0c0, f32 r0c1, f32 r0c2, - f32 r1c0, f32 r1c1, f32 r1c2, + f32 r1c0, f32 r1c1, f32 r1c2, f32 r2c0, f32 r2c1, f32 r2c2) { f32 det; @@ -602,7 +602,6 @@ void UNUSED gd_quat_rotation(f32 quat[4], UNUSED s32 unused, f32 c, f32 s, s32 i s32 j; s32 k; f32 quatVal; - UNUSED u32 pad[2]; if ((j = i + 1) >= 4) { j = 1; @@ -655,16 +654,14 @@ void gd_shift_mat_up(Mat4f *mtx) { * | 0 w^2+i^2-j^2-k^2 2ij+2wk 2ik+2wj | * | 0 2ij-2wk w^2+j^2-i^2-k^2 2jk+2wi | * | 0 2ik+2wj 2jk-2wi w^2+k^2-i^2-j^2 | - * + * * Potentially broken if 'mtx' is not an identity matrix/zero'ed. */ void UNUSED gd_create_quat_rot_mat(f32 quat[4], UNUSED s32 unused, Mat4f *mtx) { f32 twoIJ; f32 two0K; f32 sqQuat[4]; - s32 i; - s32 j; - s32 k; + s32 i, j, k; for (i = 0; i < 4; i++) { sqQuat[i] = SQ(quat[i]); @@ -699,10 +696,10 @@ void UNUSED gd_create_quat_rot_mat(f32 quat[4], UNUSED s32 unused, Mat4f *mtx) { * Creates a rotation matrix to multiply the primary matrix by. * s/c are sin(angle)/cos(angle). That angular rotation is about vector * 'vec'. - * + * * Matrix has form- * - * | (1-c)z^2+c (1-c)zy-sx (1-c)xz-sy 0 | + * | (1-c)z^2+c (1-c)zy-sx (1-c)xz-sy 0 | * | (1-c)zy-sx (1-c)y^2+c (1-c)xy-sz 0 | * | (1-c)xz-sy (1-c)xy-sz (1-c)x^2+c 0 | * | 0 0 0 1 | @@ -876,8 +873,6 @@ void gd_mult_mat4f(const Mat4f *mA, const Mat4f *mB, Mat4f *dst) { * Printed the prefix at some point, as shown by how the function is used. */ void gd_print_vec(UNUSED const char *prefix, const struct GdVec3f *vec) { - UNUSED u8 pad[8]; - printf("%f,%f,%f\n", vec->x, vec->y, vec->z); printf("\n"); } @@ -888,8 +883,6 @@ void gd_print_vec(UNUSED const char *prefix, const struct GdVec3f *vec) { * Printed a prefix at some point, as shone by how the function is used. */ void gd_print_bounding_box(UNUSED const char *prefix, UNUSED const struct GdBoundingBox *p) { - UNUSED u8 pad[8]; - printf("Min X = %f, Max X = %f \n", p->minX, p->maxX); printf("Min Y = %f, Max Y = %f \n", p->minY, p->maxY); printf("Min Z = %f, Max Z = %f \n", p->minZ, p->maxZ); diff --git a/src/goddard/gd_math.h b/src/goddard/gd_math.h index 53c353976..1028dc83a 100644 --- a/src/goddard/gd_math.h +++ b/src/goddard/gd_math.h @@ -24,7 +24,7 @@ enum GdRotAxis { void gd_adjunct_mat4f(Mat4f *src, Mat4f *dst); f32 gd_mat4f_det(Mat4f *mtx); f32 gd_3x3_det(f32 r0c0, f32 r0c1, f32 r0c2, - f32 r1c0, f32 r1c1, f32 r1c2, + f32 r1c0, f32 r1c1, f32 r1c2, f32 r2c0, f32 r2c1, f32 r2c2); f32 gd_2x2_det(f32 a, f32 b, f32 c, f32 d); diff --git a/src/goddard/gd_types.h b/src/goddard/gd_types.h index 7603796d7..06a9ed4c1 100644 --- a/src/goddard/gd_types.h +++ b/src/goddard/gd_types.h @@ -473,7 +473,7 @@ struct ObjGadget { /* 0x38 */ f32 rangeMin; /* 0x3C */ f32 rangeMax; /* 0x40 */ struct GdVec3f size; // size (x = width, y = height) - /* 0x4C */ struct ObjGroup *valueGrp; // group containing `ObjValPtr`s controlled by this gadget + /* 0x4C */ struct ObjGroup *valueGrp; // group containing `ObjValPtr`s controlled by this gadget /* 0x50 */ struct ObjShape *shapePtr; /* 0x54 */ struct ObjGroup *unk54; //node group? /* 0x58 */ u8 pad58[4]; @@ -605,7 +605,7 @@ struct ObjValPtr { /* 0x14 */ struct GdObj *obj; // maybe just a void *? /* 0x18 */ uintptr_t offset; // value pointed to is `obj` + `offset` /* 0x1C */ enum ValPtrType datatype; - /* 0x20 */ s32 flag; // TODO: better name for this? If 0x40000, then `offset` is an offset to a field in `obj`. Otherwise, `obj` is NULL, and `offset` is the address of a variable. + /* 0x20 */ s32 flag; // TODO: better name for this? If 0x40000, then `offset` is an offset to a field in `obj`. Otherwise, `obj` is NULL, and `offset` is the address of a variable. }; /* sizeof = 0x24 */ enum GdLightFlags { diff --git a/src/goddard/joints.c b/src/goddard/joints.c index 7fd60c5c8..818ab47fa 100644 --- a/src/goddard/joints.c +++ b/src/goddard/joints.c @@ -331,7 +331,6 @@ void func_8018F4CC(struct ObjJoint *j) { void func_8018F520(struct ObjBone *b) { struct ObjJoint *joint1; struct ObjJoint *joint2; - UNUSED u32 pad[3]; struct GdVec3f sp90; struct GdVec3f sp84; struct GdVec3f sp78; @@ -956,7 +955,6 @@ void func_80191220(struct ObjJoint *j) { /* 23FB90 -> 23FBC0 */ void func_801913C0(struct ObjJoint *j) { - UNUSED u32 pad[4]; func_80181894(j); } diff --git a/src/goddard/particles.c b/src/goddard/particles.c index adee570b1..5ff5cfa22 100644 --- a/src/goddard/particles.c +++ b/src/goddard/particles.c @@ -27,7 +27,6 @@ struct Connection { }; // data -UNUSED static void *sUnused801A81D0 = NULL; static s32 D_801A81D4[25] = { /* ID? X Y Z */ 9, 3, 12, -14, 25, 5, 16, -25, 42, 4, 15, -39, 55, @@ -105,7 +104,6 @@ void Unknown80181D14(struct ObjFace *face) { /* 230680 -> 230858 */ void func_80181EB0(struct Connection *cxn) { struct GdVec3f sp34; - UNUSED u8 unused[0x2C]; struct ObjParticle *sp4 = cxn->node1.ptc; struct ObjParticle *sp0 = cxn->node2.ptc; @@ -134,7 +132,6 @@ void func_80181EB0(struct Connection *cxn) { /* @ 230858 -> 230B70 */ void func_80182088(struct Connection *cxn) { struct GdVec3f sp4C; - UNUSED u8 unused[0x24]; f32 sp24; f32 sp20; struct ObjParticle *sp1C; @@ -208,7 +205,6 @@ void func_801823A0(struct ObjNet *net) { /* 230CC0 -> 230DCC */ struct ObjParticle *make_particle(u32 flags, s32 colourNum, f32 x, f32 y, f32 z) { struct ObjParticle *particle = (struct ObjParticle *) make_object(OBJ_TYPE_PARTICLES); - UNUSED u8 unused[8]; particle->pos.x = x; particle->pos.y = y; @@ -317,13 +313,9 @@ void func_80182A08(struct ObjParticle *ptc, struct GdVec3f *b) { /* 231454 -> 231D40; orig name: Unknown80182C84 */ void move_particle(struct ObjParticle *ptc) { f32 sp7C; - UNUSED u8 unused2[12]; struct GdVec3f sp64; struct ObjParticle *sp60; - UNUSED u8 unused1[4]; s32 i; - UNUSED u8 unused4[4]; - UNUSED u8 unused5[4]; struct ObjCamera *sp4C; struct GdVec3f sp40; struct GdVec3f sp34; diff --git a/src/goddard/renderer.c b/src/goddard/renderer.c index d2d49600e..b701067d0 100644 --- a/src/goddard/renderer.c +++ b/src/goddard/renderer.c @@ -2635,11 +2635,8 @@ void gd_create_ortho_matrix(f32 l, f32 r, f32 b, f32 t, f32 n, f32 f) { /* 25245C -> 25262C */ void gd_create_perspective_matrix(f32 fovy, f32 aspect, f32 near, f32 far) { u16 perspNorm; - UNUSED u32 unused1; uintptr_t perspecMtx; uintptr_t rotMtx; - UNUSED u32 unused2; - UNUSED f32 unusedf = 0.0625f; sGdPerspTimer += 0.1; guPerspective(&DL_CURRENT_MTX(sCurrentGdDl), &perspNorm, fovy, aspect, near, far, 1.0f); diff --git a/src/goddard/shape_helper.c b/src/goddard/shape_helper.c index 36d4c17c1..75f29b957 100644 --- a/src/goddard/shape_helper.c +++ b/src/goddard/shape_helper.c @@ -161,7 +161,7 @@ void calc_face_normal(struct ObjFace *face) { p3.z = vtx3->pos.z; // calculate the cross product of edges (p2 - p1) and (p3 - p2) - // not sure why each component is multiplied by 1000. maybe to avoid loss of precision when normalizing? + // not sure why each component is multiplied by 1000. maybe to avoid loss of precision when normalizing? normal.x = (((p2.y - p1.y) * (p3.z - p2.z)) - ((p2.z - p1.z) * (p3.y - p2.y))) * mul; normal.y = (((p2.z - p1.z) * (p3.x - p2.x)) - ((p2.x - p1.x) * (p3.z - p2.z))) * mul; normal.z = (((p2.x - p1.x) * (p3.y - p2.y)) - ((p2.y - p1.y) * (p3.x - p2.x))) * mul; diff --git a/src/goddard/skin.c b/src/goddard/skin.c index 069d0c558..de820bcff 100644 --- a/src/goddard/skin.c +++ b/src/goddard/skin.c @@ -300,10 +300,8 @@ void func_80192CCC(struct ObjNet *net) { /* 241768 -> 241AB4; orig name: func_80192F98 */ void convert_gd_verts_to_Vn(struct ObjGroup *grp) { - UNUSED u8 pad[0x40 - 0x2c]; Vtx *vn; // 28 u8 nx, ny, nz; // 24, 25, 26 - UNUSED u32 pad20; register struct VtxLink *vtxlink; // a1 #ifndef GBI_FLOATS register s16 *vnPos; // a2 diff --git a/src/hvqm/cfbkeep.c b/src/hvqm/cfbkeep.c index 1b0763868..2f15b2b80 100644 --- a/src/hvqm/cfbkeep.c +++ b/src/hvqm/cfbkeep.c @@ -1,10 +1,10 @@ -/* +/* * N64-HVQM2 library Sample program - * + * * FILE : cfbkeep.c (frame buffer management) - * + * * Copyright (C) 1998,1999 NINTENDO Co.,Ltd. - * + * */ /* 1998-12-16 */ diff --git a/src/hvqm/getrecord.c b/src/hvqm/getrecord.c index 61ad39e8f..42c4ee861 100644 --- a/src/hvqm/getrecord.c +++ b/src/hvqm/getrecord.c @@ -1,10 +1,10 @@ -/* +/* * N64-HVQM2 library Sample program - * + * * FILE : getrecord.c (module for reading HVQM2 records) - * + * * Copyright (C) 1998,1999 NINTENDO Co.,Ltd. - * + * */ /* 1999-02-22 */ @@ -14,7 +14,7 @@ #include "hvqm.h" /* - * u8 *get_record(HVQM2Record *headerbuf, void *bodybuf, + * u8 *get_record(HVQM2Record *headerbuf, void *bodybuf, * u16 type, u8 *stream, OSIoMesg *mb, OSMesgQueue *mq) * * Arguments @@ -24,20 +24,20 @@ * stream The current HVQM2 record address * mb I/O message block request sent to PI manager * mq Message queue receiving notice of DMA end from PI manager - * + * * Explanation: * Finds the next record of the specified "type" from the HVQM2 data * address "stream" in ROM, and reads the record header into "headerbuf" * and the data body into "bodybuf." Specify HVQM2_AUDIO for "type" to * read an audio record, and specify HVQM2_VIDEO to read a video record. * - * This function assumes that the reading of audio records and video - * records is performed in parallel by separate threads. Accordingly, + * This function assumes that the reading of audio records and video + * records is performed in parallel by separate threads. Accordingly, * you must prepare in advance a separate mb (I/O message block request * sent to PI manager) and separate mq (message queue receiving notice * of DMA end from PI manager) for audio records and video records. * - * The reading of audio records has priority over the reading of + * The reading of audio records has priority over the reading of * video records. * * "stream" must have 2byte alignment. Please give headerbuf and @@ -45,7 +45,7 @@ * size. * * Please be sure to reserve sufficient space for bodybuf. - * + * * * Returned value: * The address of the next record @@ -65,7 +65,7 @@ get_record( HVQM2Record *headerbuf, void *bodybuf, u16 type, u8 *stream, OSIoMes record_size = load32( headerbuf->size ); if ( record_type == type ) break; stream += record_size; - } + } if ( record_size > 0 ) { romcpy( bodybuf, stream, record_size, pri, mb, mq ); diff --git a/src/hvqm/hvqm.c b/src/hvqm/hvqm.c index 9aabc1b6b..1ca1c3bd5 100644 --- a/src/hvqm/hvqm.c +++ b/src/hvqm/hvqm.c @@ -12,8 +12,8 @@ static OSMesgQueue audioDmaMessageQ; static OSMesg audioDmaMessages[AUDIO_DMA_MSG_SIZE]; /*********************************************************************** - * Message queue for receiving message blocks and end of DMA - * notifications when requesting that video records be read from + * Message queue for receiving message blocks and end of DMA + * notifications when requesting that video records be read from * the HVQM2 data (ROM). ***********************************************************************/ #define VIDEO_DMA_MSG_SIZE 1 @@ -50,7 +50,7 @@ static u64 disptime; /* Counter for scheduled display time of next video frame static ADPCMstate adpcm_state; /* Buffer for state information passed to the ADPCM decoder */ /* - * Macro for loading multi-byte data from buffer holding data from stream + * Macro for loading multi-byte data from buffer holding data from stream */ #define load32(from) (*(u32*)&(from)) #define load16(from) (*(u16*)&(from)) @@ -99,16 +99,16 @@ void hvqm_main_proc() { u32 usec_per_frame; int prev_bufno = -1; - + hvqm_header = OS_DCACHE_ROUNDUP_ADDR( hvqm_headerBuf ); - + osCreateMesgQueue( &spMesgQ, &spMesgBuf, 1 ); osSetEventMesg( OS_EVENT_SP, &spMesgQ, NULL ); - + osCreateMesgQueue( &audioDmaMessageQ, audioDmaMessages, AUDIO_DMA_MSG_SIZE ); osCreateMesgQueue( &videoDmaMessageQ, videoDmaMessages, VIDEO_DMA_MSG_SIZE ); createTimekeeper(); - + hvqm2InitSP1(0xff); hvqtask.t.ucode = (u64 *)hvqm2sp1TextStart; hvqtask.t.ucode_size = (int)hvqm2sp1TextEnd - (int)hvqm2sp1TextStart; @@ -130,12 +130,12 @@ void hvqm_main_proc() { total_frames = load32(hvqm_header->total_frames); usec_per_frame = load32(hvqm_header->usec_per_frame); total_audio_records = load32(hvqm_header->total_audio_records); - + hvqm2SetupSP1(hvqm_header, SCREEN_WD); - + release_all_cfb(); tkStart( &rewind, load32( hvqm_header->samples_per_sec ) ); - + for ( ; ; ) { //while ( video_remain > 0 ) { @@ -152,13 +152,13 @@ void hvqm_main_proc() { //if ( video_remain == 0 ) break; } } - + record_header = OS_DCACHE_ROUNDUP_ADDR( header_buffer ); - - video_streamP = get_record(record_header, hvqbuf, - HVQM2_VIDEO, video_streamP, + + video_streamP = get_record(record_header, hvqbuf, + HVQM2_VIDEO, video_streamP, &videoDmaMesgBlock, &videoDmaMessageQ); - + //! SYNC VIDEO code if ( disptime > 0 && tkGetTime() > 0) { @@ -167,18 +167,18 @@ void hvqm_main_proc() { do { disptime += usec_per_frame; if ( --video_remain == 0 ) break; - video_streamP = get_record( record_header, hvqbuf, - HVQM2_VIDEO, video_streamP, + video_streamP = get_record( record_header, hvqbuf, + HVQM2_VIDEO, video_streamP, &videoDmaMesgBlock, &videoDmaMessageQ ); } while (load16( record_header->format ) != HVQM2_VIDEO_KEYFRAME || tkGetTime() > disptime ); if ( video_remain == 0 ) break; } } - + frame_format = load16(record_header->format); if (frame_format == HVQM2_VIDEO_HOLD) { /* - * Just like when frame_format != HVQM2_VIDEO_HOLD you + * Just like when frame_format != HVQM2_VIDEO_HOLD you * could call hvqm2Decode*() and decode in a new frame * buffer (in this case, just copying from the buffer of * the preceding frame). But here we make use of the @@ -194,9 +194,9 @@ void hvqm_main_proc() { * Process first half in the CPU */ hvqtask.t.flags = 0; - status = hvqm2DecodeSP1( hvqbuf, frame_format, - &gFrameBuffers[bufno][screen_offset], - &gFrameBuffers[prev_bufno][screen_offset], + status = hvqm2DecodeSP1( hvqbuf, frame_format, + &gFrameBuffers[bufno][screen_offset], + &gFrameBuffers[prev_bufno][screen_offset], hvqwork, &hvq_sparg, hvq_spfifo ); osWritebackDCacheAll(); @@ -210,10 +210,10 @@ void hvqm_main_proc() { osRecvMesg( &spMesgQ, NULL, OS_MESG_BLOCK ); } } - + keep_cfb( bufno ); - - if ( prev_bufno >= 0 && prev_bufno != bufno ) + + if ( prev_bufno >= 0 && prev_bufno != bufno ) release_cfb( prev_bufno ); tkPushVideoframe( gFrameBuffers[bufno], &cfb_status[bufno], disptime ); @@ -221,7 +221,7 @@ void hvqm_main_proc() { prev_bufno = bufno; disptime += usec_per_frame; --video_remain; - + //if (1) { //osAiSetFrequency(gAudioSessionPresets[0].frequency); //osSendMesg(&gDmaMesgQueue, 0, OS_MESG_BLOCK); @@ -232,7 +232,7 @@ void hvqm_main_proc() { void createHvqmThread(void) { osCreateMesgQueue( &hvqmMesgQ, &hvqmMesgBuf, 1 ); - osCreateThread( &hvqmThread, HVQM_THREAD_ID, hvqm_main_proc, - NULL, hvqmStack + (STACKSIZE/sizeof(u64)), + osCreateThread( &hvqmThread, HVQM_THREAD_ID, hvqm_main_proc, + NULL, hvqmStack + (STACKSIZE/sizeof(u64)), (OSPri)HVQM_PRIORITY ); } \ No newline at end of file diff --git a/src/hvqm/hvqm.h b/src/hvqm/hvqm.h index ba994c8c0..867194d3e 100644 --- a/src/hvqm/hvqm.h +++ b/src/hvqm/hvqm.h @@ -8,7 +8,7 @@ #define HVQ_SPFIFO_SIZE 30000 /* - * Size of buffer for video records + * Size of buffer for video records */ #define HVQ_DATASIZE_MAX 40000 @@ -58,7 +58,7 @@ #define PCMBUF_SIZE 0xA00 /* - * Macro for loading multi-byte data from buffer holding data from stream + * Macro for loading multi-byte data from buffer holding data from stream */ #define load32(from) (*(u32*)&(from)) #define load16(from) (*(u16*)&(from)) diff --git a/src/hvqm/system.c b/src/hvqm/system.c index 175dcdd01..dc0532b9f 100644 --- a/src/hvqm/system.c +++ b/src/hvqm/system.c @@ -1,10 +1,10 @@ -/* +/* * N64-HVQM2 library Sample program - * + * * FILE : system.c (boot program/system utility) - * + * * Copyright (C) 1998,1999 NINTENDO Co.,Ltd. - * + * */ /* 1998-12-15 */ @@ -15,7 +15,7 @@ /*********************************************************************** * - * void romcpy(void *dest, void *src, u32 len, s32 pri, OSIoMesg *mb, + * void romcpy(void *dest, void *src, u32 len, s32 pri, OSIoMesg *mb, * OSMesgQueue *mq) * * Arguments @@ -27,12 +27,12 @@ * mq Message queue receiving notification of end of DMA * * Explanation - * DMA transfers "len" bytes from ROM address "SRC" to DRAM + * DMA transfers "len" bytes from ROM address "SRC" to DRAM * address "dest" and returns after waiting for end of DMA. The - * data cache of the transfer destination in DRAM is invalidated + * data cache of the transfer destination in DRAM is invalidated * ahead of time. * - * The parameters have the same meaning as for osPiStartDma() + * The parameters have the same meaning as for osPiStartDma() * ***********************************************************************/ void diff --git a/src/hvqm/timekeeper.c b/src/hvqm/timekeeper.c index 5cd55f7b3..8c8a8ab21 100644 --- a/src/hvqm/timekeeper.c +++ b/src/hvqm/timekeeper.c @@ -53,7 +53,7 @@ static OSMesg aiMessages[AI_MSG_SIZE]; /*********************************************************************** * Ring buffer for reserving display of image * - * As soon as image (frame buffer) is complete, put into this + * As soon as image (frame buffer) is complete, put into this * ring buffer, wait for display time to come and set in VI. ***********************************************************************/ #define VIDEO_RING_SIZE NUM_CFBs @@ -70,7 +70,7 @@ static int videoRingRead; /* Ring buffer read index */ /*********************************************************************** * Ring buffer for reserving playback of audio - * + * * As soon as audio (PCM data) is complete, put into this * ring buffer and push as soon as AI FIFO is free. ***********************************************************************/ @@ -93,7 +93,7 @@ static u32 aiFIFOsamples; /* Number of PCM samples waiting in AI FIFO */ static u32 aiDAsamples; /* Number of samples AI is DMA transferring to DA */ /*********************************************************************** - * Buffer for matching PCM transfer data length to PCM_ALIGN + * Buffer for matching PCM transfer data length to PCM_ALIGN ***********************************************************************/ static s16 pcmModBuf[(PCM_ALIGN-1)*PCM_CHANNELS]; @@ -133,7 +133,7 @@ static OSTime last_time; * The time that has passed since the start of HVQM2 movie playback * is calculated back from the number of samples that have finished * playing (samples_played) and the sampling rate (samples_per_sec). - * The time after samples_played was first updated is supplemented + * The time after samples_played was first updated is supplemented * with osGetTime(). * * Returned value @@ -219,7 +219,7 @@ static void timekeeperProc(void UNUSED*argument) { s32 pcm_mod_samples; /* The number of PCM samples left over */ tkAudioProc audioproc; OSTime present_vtime; - + /* Acquire retrace event */ osCreateMesgQueue( &viMessageQ, viMessages, VI_MSG_SIZE ); osViSetEvent( &viMessageQ, 0, 1 ); @@ -231,11 +231,11 @@ static void timekeeperProc(void UNUSED*argument) { /* * Create and start audio DA counter thread */ - osCreateThread(&daCounterThread, DA_COUNTER_THREAD_ID, daCounterProc, - NULL, daCounterStack + (STACKSIZE/sizeof(u64)), + osCreateThread(&daCounterThread, DA_COUNTER_THREAD_ID, daCounterProc, + NULL, daCounterStack + (STACKSIZE/sizeof(u64)), (OSPri)DA_COUNTER_PRIORITY); osStartThread(&daCounterThread); - + osRecvMesg(&tkCmdMesgQ, (OSMesg *)&cmd, OS_MESG_BLOCK); /* @@ -245,10 +245,10 @@ static void timekeeperProc(void UNUSED*argument) { osSendMesg( &tkResMesgQ, NULL, OS_MESG_BLOCK ); osRecvMesg( &tkCmdMesgQ, (OSMesg *)&cmd, OS_MESG_BLOCK ); } - + tkClockDisable(); audioproc = (cmd->rewind)(); - + samples_per_sec = cmd->samples_per_sec; if (samples_per_sec) osAiSetFrequency(samples_per_sec); @@ -275,7 +275,7 @@ static void timekeeperProc(void UNUSED*argument) { osSendMesg( &tkResMesgQ, NULL, OS_MESG_BLOCK ); /* Notification that playback preparations are finished */ present_vtime = osGetTime(); - + while (!video_done || videoRingCount > 0 || pushed_cfb != NULL || !audio_done || audioRingCount > 0 || aiFIFOsamples > 0) { u64 present_time; @@ -288,7 +288,7 @@ static void timekeeperProc(void UNUSED*argument) { last_vtime = present_vtime; present_vtime = osGetTime(); present_time = tkGetTime() + OS_CYCLES_TO_USEC(present_vtime - last_vtime); - + if (pushed_cfb != NULL) { /* The display has switched from showing_cfb to pushed_cfb (it should have) */ if (!video_started) { @@ -311,11 +311,11 @@ static void timekeeperProc(void UNUSED*argument) { pushed_cfb = NULL; pushed_cfb_statP = NULL; } - + /* * Push the next frame buffer to the VI * - * Before the start of video display (video_started == 0), + * Before the start of video display (video_started == 0), * wait until audio data is prepared for playback * (audioRingCount > 0). */ @@ -331,12 +331,12 @@ static void timekeeperProc(void UNUSED*argument) { --videoRingCount; } } - + /* * Push the next PCM data to the AI * - * Before the start of video display (video_started == 0) - * wait until the display of the first image frame + * Before the start of video display (video_started == 0) + * wait until the display of the first image frame * has begun (video_started == 1). */ if ( video_started ) { @@ -398,14 +398,14 @@ static void timekeeperProc(void UNUSED*argument) { } else audio_done = 1; } - + if ( osRecvMesg( &tkCmdMesgQ, (OSMesg *)&cmd, OS_MESG_NOBLOCK ) == 0 ) { /* * tkStop() or tkStart() has been executed - * + * * Set 1 in video_done and end this playback loop - * after playback of the current movie's video and + * after playback of the current movie's video and * and audio has completely finished. */ video_done = 1; @@ -426,8 +426,8 @@ createTimekeeper(void) { osCreateMesgQueue( &tkCmdMesgQ, &tkCmdMesgBuf, 1 ); osCreateMesgQueue( &tkResMesgQ, &tkResMesgBuf, 1 ); - osCreateThread( &tkThread, TIMEKEEPER_THREAD_ID, timekeeperProc, - NULL, tkStack + (STACKSIZE/sizeof(u64)), + osCreateThread( &tkThread, TIMEKEEPER_THREAD_ID, timekeeperProc, + NULL, tkStack + (STACKSIZE/sizeof(u64)), (OSPri)TIMEKEEPER_PRIORITY ); osStartThread( &tkThread ); } @@ -443,9 +443,9 @@ createTimekeeper(void) * Directs the timekeeper to play a new movie. Playback of the * movie starts after callback of "rewind" by the timekeeper. After * this, the HVQM2 video records are read and decoded and the - * completed frame buffers are handed over to the timekeeper by + * completed frame buffers are handed over to the timekeeper by * tkPushVideoframe() in succession to play the video part of the movie. - * As for the audio, the timekeeper itself calls the callback + * As for the audio, the timekeeper itself calls the callback * function (the value returned by rewind) that gets the PCM data as * needed to playback the audio. * @@ -485,7 +485,7 @@ tkStop( void ) /*********************************************************************** * * void tkPushVideoframe(void *vaddr, u32 *statP, u64 disptime) - * + * * Argument * vaddr Frame buffer address * statP Pointer to state flag data regarding vaddr @@ -496,8 +496,8 @@ tkStop( void ) * The timekeeper displays the frame buffer after waiting for the * "disptime" amount of time to pass from the start of the movie. * - * To wait for the display of the vaddr frame buffer or to - * indicate that something is being displayed, the CFB_SHOWING + * To wait for the display of the vaddr frame buffer or to + * indicate that something is being displayed, the CFB_SHOWING * flag is set in the u32 type data pointed to by the statP pointer. * At the time when display of vaddr is finished, (once its display * is over and display has switched to another frame buffer) this diff --git a/src/libz/gzip.c b/src/libz/gzip.c index cb80fedb9..c76532a66 100644 --- a/src/libz/gzip.c +++ b/src/libz/gzip.c @@ -51,7 +51,7 @@ expand_gzip(char *in, char *outbuf, unsigned int inLength, unsigned int outbufLe d_stream.avail_out = outbufLength; /* - * Must pass -ve window bits to tell inflate not to expect + * Must pass -ve window bits to tell inflate not to expect * a gzip or zlib header */ err = inflateInit2(&d_stream, -MAX_WBITS); diff --git a/src/menu/file_select.c b/src/menu/file_select.c index b7f298708..61e8d3aa5 100644 --- a/src/menu/file_select.c +++ b/src/menu/file_select.c @@ -2284,9 +2284,6 @@ void print_save_file_scores(s8 fileIndex) { * Also checks if all saves exists and defines text and main menu timers. */ void print_file_select_strings(void) { - UNUSED s32 unused1; - UNUSED s32 unused2; - create_dl_ortho_matrix(); switch (sSelectedButtonID) { case MENU_BUTTON_NONE: diff --git a/src/s2d_engine/fonts/comicsans.c b/src/s2d_engine/fonts/comicsans.c index cece0df8a..f4afda80d 100644 --- a/src/s2d_engine/fonts/comicsans.c +++ b/src/s2d_engine/fonts/comicsans.c @@ -386,7 +386,7 @@ Gfx comicsans_align_127[] = {gsSPEndDisplayList()}; uObjTxtr comicsans_tex[] = { { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_0, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -396,7 +396,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_1, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -406,7 +406,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_2, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -416,7 +416,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_3, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -426,7 +426,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_4, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -436,7 +436,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_5, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -446,7 +446,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_6, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -456,7 +456,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_7, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -466,7 +466,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_8, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -476,7 +476,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_9, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -486,7 +486,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_10, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -496,7 +496,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_11, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -506,7 +506,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_12, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -516,7 +516,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_13, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -526,7 +526,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_14, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -536,7 +536,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_15, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -546,7 +546,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_16, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -556,7 +556,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_17, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -566,7 +566,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_18, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -576,7 +576,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_19, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -586,7 +586,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_20, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -596,7 +596,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_21, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -606,7 +606,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_22, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -616,7 +616,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_23, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -626,7 +626,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_24, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -636,7 +636,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_25, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -646,7 +646,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_26, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -656,7 +656,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_27, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -666,7 +666,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_28, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -676,7 +676,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_29, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -686,7 +686,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_30, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -696,7 +696,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_31, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -706,7 +706,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_32, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -716,7 +716,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_33, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -726,7 +726,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_34, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -736,7 +736,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_35, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -746,7 +746,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_36, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -756,7 +756,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_37, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -766,7 +766,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_38, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -776,7 +776,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_39, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -786,7 +786,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_40, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -796,7 +796,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_41, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -806,7 +806,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_42, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -816,7 +816,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_43, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -826,7 +826,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_44, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -836,7 +836,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_45, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -846,7 +846,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_46, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -856,7 +856,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_47, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -866,7 +866,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_48, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -876,7 +876,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_49, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -886,7 +886,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_50, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -896,7 +896,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_51, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -906,7 +906,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_52, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -916,7 +916,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_53, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -926,7 +926,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_54, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -936,7 +936,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_55, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -946,7 +946,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_56, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -956,7 +956,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_57, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -966,7 +966,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_58, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -976,7 +976,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_59, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -986,7 +986,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_60, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -996,7 +996,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_61, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1006,7 +1006,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_62, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1016,7 +1016,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_63, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1026,7 +1026,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_64, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1036,7 +1036,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_65, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1046,7 +1046,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_66, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1056,7 +1056,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_67, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1066,7 +1066,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_68, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1076,7 +1076,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_69, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1086,7 +1086,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_70, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1096,7 +1096,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_71, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1106,7 +1106,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_72, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1116,7 +1116,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_73, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1126,7 +1126,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_74, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1136,7 +1136,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_75, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1146,7 +1146,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_76, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1156,7 +1156,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_77, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1166,7 +1166,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_78, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1176,7 +1176,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_79, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1186,7 +1186,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_80, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1196,7 +1196,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_81, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1206,7 +1206,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_82, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1216,7 +1216,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_83, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1226,7 +1226,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_84, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1236,7 +1236,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_85, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1246,7 +1246,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_86, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1256,7 +1256,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_87, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1266,7 +1266,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_88, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1276,7 +1276,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_89, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1286,7 +1286,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_90, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1296,7 +1296,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_91, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1306,7 +1306,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_92, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1316,7 +1316,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_93, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1326,7 +1326,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_94, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1336,7 +1336,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_95, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1346,7 +1346,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_96, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1356,7 +1356,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_97, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1366,7 +1366,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_98, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1376,7 +1376,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_99, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1386,7 +1386,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_100, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1396,7 +1396,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_101, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1406,7 +1406,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_102, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1416,7 +1416,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_103, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1426,7 +1426,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_104, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1436,7 +1436,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_105, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1446,7 +1446,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_106, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1456,7 +1456,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_107, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1466,7 +1466,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_108, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1476,7 +1476,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_109, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1486,7 +1486,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_110, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1496,7 +1496,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_111, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1506,7 +1506,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_112, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1516,7 +1516,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_113, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1526,7 +1526,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_114, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1536,7 +1536,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_115, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1546,7 +1546,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_116, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1556,7 +1556,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_117, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1566,7 +1566,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_118, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1576,7 +1576,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_119, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1586,7 +1586,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_120, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1596,7 +1596,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_121, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1606,7 +1606,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_122, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1616,7 +1616,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_123, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1626,7 +1626,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_124, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1636,7 +1636,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_125, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1646,7 +1646,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_126, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1656,7 +1656,7 @@ uObjTxtr comicsans_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &comicsans_tex_127, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ diff --git a/src/s2d_engine/fonts/delfino.c b/src/s2d_engine/fonts/delfino.c index a5fcdf501..5f6be90b9 100644 --- a/src/s2d_engine/fonts/delfino.c +++ b/src/s2d_engine/fonts/delfino.c @@ -386,7 +386,7 @@ Gfx delfino_align_127[] = {gsSPEndDisplayList()}; uObjTxtr delfino_tex[] = { { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_0, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -396,7 +396,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_1, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -406,7 +406,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_2, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -416,7 +416,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_3, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -426,7 +426,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_4, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -436,7 +436,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_5, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -446,7 +446,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_6, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -456,7 +456,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_7, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -466,7 +466,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_8, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -476,7 +476,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_9, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -486,7 +486,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_10, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -496,7 +496,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_11, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -506,7 +506,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_12, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -516,7 +516,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_13, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -526,7 +526,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_14, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -536,7 +536,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_15, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -546,7 +546,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_16, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -556,7 +556,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_17, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -566,7 +566,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_18, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -576,7 +576,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_19, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -586,7 +586,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_20, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -596,7 +596,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_21, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -606,7 +606,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_22, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -616,7 +616,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_23, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -626,7 +626,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_24, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -636,7 +636,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_25, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -646,7 +646,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_26, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -656,7 +656,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_27, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -666,7 +666,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_28, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -676,7 +676,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_29, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -686,7 +686,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_30, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -696,7 +696,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_31, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -706,7 +706,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_32, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -716,7 +716,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_33, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -726,7 +726,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_34, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -736,7 +736,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_35, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -746,7 +746,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_36, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -756,7 +756,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_37, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -766,7 +766,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_38, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -776,7 +776,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_39, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -786,7 +786,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_40, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -796,7 +796,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_41, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -806,7 +806,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_42, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -816,7 +816,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_43, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -826,7 +826,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_44, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -836,7 +836,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_45, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -846,7 +846,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_46, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -856,7 +856,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_47, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -866,7 +866,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_48, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -876,7 +876,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_49, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -886,7 +886,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_50, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -896,7 +896,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_51, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -906,7 +906,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_52, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -916,7 +916,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_53, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -926,7 +926,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_54, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -936,7 +936,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_55, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -946,7 +946,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_56, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -956,7 +956,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_57, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -966,7 +966,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_58, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -976,7 +976,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_59, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -986,7 +986,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_60, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -996,7 +996,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_61, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1006,7 +1006,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_62, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1016,7 +1016,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_63, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1026,7 +1026,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_64, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1036,7 +1036,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_65, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1046,7 +1046,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_66, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1056,7 +1056,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_67, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1066,7 +1066,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_68, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1076,7 +1076,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_69, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1086,7 +1086,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_70, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1096,7 +1096,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_71, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1106,7 +1106,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_72, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1116,7 +1116,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_73, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1126,7 +1126,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_74, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1136,7 +1136,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_75, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1146,7 +1146,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_76, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1156,7 +1156,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_77, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1166,7 +1166,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_78, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1176,7 +1176,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_79, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1186,7 +1186,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_80, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1196,7 +1196,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_81, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1206,7 +1206,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_82, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1216,7 +1216,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_83, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1226,7 +1226,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_84, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1236,7 +1236,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_85, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1246,7 +1246,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_86, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1256,7 +1256,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_87, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1266,7 +1266,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_88, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1276,7 +1276,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_89, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1286,7 +1286,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_90, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1296,7 +1296,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_91, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1306,7 +1306,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_92, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1316,7 +1316,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_93, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1326,7 +1326,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_94, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1336,7 +1336,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_95, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1346,7 +1346,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_96, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1356,7 +1356,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_97, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1366,7 +1366,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_98, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1376,7 +1376,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_99, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1386,7 +1386,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_100, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1396,7 +1396,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_101, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1406,7 +1406,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_102, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1416,7 +1416,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_103, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1426,7 +1426,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_104, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1436,7 +1436,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_105, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1446,7 +1446,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_106, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1456,7 +1456,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_107, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1466,7 +1466,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_108, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1476,7 +1476,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_109, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1486,7 +1486,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_110, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1496,7 +1496,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_111, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1506,7 +1506,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_112, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1516,7 +1516,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_113, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1526,7 +1526,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_114, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1536,7 +1536,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_115, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1546,7 +1546,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_116, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1556,7 +1556,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_117, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1566,7 +1566,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_118, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1576,7 +1576,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_119, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1586,7 +1586,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_120, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1596,7 +1596,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_121, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1606,7 +1606,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_122, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1616,7 +1616,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_123, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1626,7 +1626,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_124, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1636,7 +1636,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_125, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1646,7 +1646,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_126, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1656,7 +1656,7 @@ uObjTxtr delfino_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &delfino_tex_127, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ diff --git a/src/s2d_engine/fonts/impact.c b/src/s2d_engine/fonts/impact.c index c94c62fd1..8034968ad 100644 --- a/src/s2d_engine/fonts/impact.c +++ b/src/s2d_engine/fonts/impact.c @@ -386,7 +386,7 @@ Gfx impact_align_127[] = {gsSPEndDisplayList()}; uObjTxtr impact_tex[] = { { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_0, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -396,7 +396,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_1, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -406,7 +406,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_2, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -416,7 +416,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_3, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -426,7 +426,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_4, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -436,7 +436,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_5, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -446,7 +446,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_6, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -456,7 +456,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_7, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -466,7 +466,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_8, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -476,7 +476,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_9, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -486,7 +486,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_10, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -496,7 +496,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_11, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -506,7 +506,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_12, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -516,7 +516,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_13, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -526,7 +526,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_14, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -536,7 +536,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_15, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -546,7 +546,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_16, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -556,7 +556,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_17, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -566,7 +566,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_18, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -576,7 +576,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_19, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -586,7 +586,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_20, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -596,7 +596,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_21, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -606,7 +606,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_22, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -616,7 +616,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_23, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -626,7 +626,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_24, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -636,7 +636,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_25, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -646,7 +646,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_26, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -656,7 +656,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_27, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -666,7 +666,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_28, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -676,7 +676,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_29, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -686,7 +686,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_30, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -696,7 +696,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_31, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -706,7 +706,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_32, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -716,7 +716,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_33, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -726,7 +726,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_34, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -736,7 +736,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_35, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -746,7 +746,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_36, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -756,7 +756,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_37, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -766,7 +766,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_38, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -776,7 +776,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_39, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -786,7 +786,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_40, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -796,7 +796,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_41, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -806,7 +806,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_42, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -816,7 +816,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_43, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -826,7 +826,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_44, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -836,7 +836,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_45, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -846,7 +846,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_46, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -856,7 +856,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_47, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -866,7 +866,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_48, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -876,7 +876,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_49, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -886,7 +886,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_50, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -896,7 +896,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_51, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -906,7 +906,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_52, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -916,7 +916,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_53, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -926,7 +926,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_54, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -936,7 +936,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_55, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -946,7 +946,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_56, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -956,7 +956,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_57, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -966,7 +966,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_58, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -976,7 +976,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_59, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -986,7 +986,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_60, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -996,7 +996,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_61, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1006,7 +1006,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_62, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1016,7 +1016,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_63, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1026,7 +1026,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_64, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1036,7 +1036,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_65, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1046,7 +1046,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_66, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1056,7 +1056,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_67, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1066,7 +1066,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_68, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1076,7 +1076,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_69, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1086,7 +1086,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_70, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1096,7 +1096,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_71, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1106,7 +1106,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_72, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1116,7 +1116,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_73, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1126,7 +1126,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_74, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1136,7 +1136,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_75, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1146,7 +1146,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_76, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1156,7 +1156,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_77, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1166,7 +1166,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_78, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1176,7 +1176,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_79, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1186,7 +1186,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_80, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1196,7 +1196,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_81, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1206,7 +1206,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_82, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1216,7 +1216,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_83, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1226,7 +1226,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_84, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1236,7 +1236,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_85, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1246,7 +1246,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_86, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1256,7 +1256,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_87, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1266,7 +1266,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_88, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1276,7 +1276,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_89, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1286,7 +1286,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_90, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1296,7 +1296,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_91, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1306,7 +1306,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_92, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1316,7 +1316,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_93, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1326,7 +1326,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_94, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1336,7 +1336,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_95, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1346,7 +1346,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_96, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1356,7 +1356,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_97, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1366,7 +1366,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_98, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1376,7 +1376,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_99, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1386,7 +1386,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_100, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1396,7 +1396,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_101, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1406,7 +1406,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_102, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1416,7 +1416,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_103, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1426,7 +1426,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_104, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1436,7 +1436,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_105, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1446,7 +1446,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_106, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1456,7 +1456,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_107, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1466,7 +1466,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_108, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1476,7 +1476,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_109, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1486,7 +1486,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_110, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1496,7 +1496,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_111, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1506,7 +1506,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_112, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1516,7 +1516,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_113, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1526,7 +1526,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_114, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1536,7 +1536,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_115, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1546,7 +1546,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_116, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1556,7 +1556,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_117, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1566,7 +1566,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_118, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1576,7 +1576,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_119, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1586,7 +1586,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_120, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1596,7 +1596,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_121, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1606,7 +1606,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_122, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1616,7 +1616,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_123, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1626,7 +1626,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_124, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1636,7 +1636,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_125, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1646,7 +1646,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_126, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1656,7 +1656,7 @@ uObjTxtr impact_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &impact_tex_127, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ diff --git a/src/s2d_engine/fonts/papyrus.c b/src/s2d_engine/fonts/papyrus.c index bd12ec4e7..d91af8bf9 100644 --- a/src/s2d_engine/fonts/papyrus.c +++ b/src/s2d_engine/fonts/papyrus.c @@ -386,7 +386,7 @@ Gfx papyrus_align_127[] = {gsSPEndDisplayList()}; uObjTxtr papyrus_tex[] = { { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_0, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -396,7 +396,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_1, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -406,7 +406,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_2, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -416,7 +416,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_3, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -426,7 +426,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_4, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -436,7 +436,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_5, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -446,7 +446,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_6, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -456,7 +456,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_7, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -466,7 +466,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_8, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -476,7 +476,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_9, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -486,7 +486,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_10, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -496,7 +496,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_11, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -506,7 +506,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_12, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -516,7 +516,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_13, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -526,7 +526,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_14, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -536,7 +536,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_15, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -546,7 +546,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_16, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -556,7 +556,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_17, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -566,7 +566,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_18, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -576,7 +576,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_19, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -586,7 +586,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_20, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -596,7 +596,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_21, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -606,7 +606,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_22, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -616,7 +616,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_23, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -626,7 +626,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_24, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -636,7 +636,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_25, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -646,7 +646,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_26, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -656,7 +656,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_27, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -666,7 +666,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_28, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -676,7 +676,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_29, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -686,7 +686,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_30, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -696,7 +696,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_31, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -706,7 +706,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_32, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -716,7 +716,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_33, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -726,7 +726,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_34, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -736,7 +736,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_35, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -746,7 +746,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_36, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -756,7 +756,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_37, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -766,7 +766,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_38, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -776,7 +776,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_39, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -786,7 +786,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_40, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -796,7 +796,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_41, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -806,7 +806,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_42, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -816,7 +816,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_43, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -826,7 +826,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_44, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -836,7 +836,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_45, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -846,7 +846,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_46, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -856,7 +856,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_47, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -866,7 +866,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_48, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -876,7 +876,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_49, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -886,7 +886,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_50, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -896,7 +896,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_51, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -906,7 +906,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_52, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -916,7 +916,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_53, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -926,7 +926,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_54, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -936,7 +936,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_55, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -946,7 +946,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_56, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -956,7 +956,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_57, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -966,7 +966,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_58, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -976,7 +976,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_59, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -986,7 +986,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_60, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -996,7 +996,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_61, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1006,7 +1006,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_62, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1016,7 +1016,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_63, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1026,7 +1026,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_64, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1036,7 +1036,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_65, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1046,7 +1046,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_66, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1056,7 +1056,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_67, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1066,7 +1066,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_68, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1076,7 +1076,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_69, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1086,7 +1086,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_70, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1096,7 +1096,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_71, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1106,7 +1106,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_72, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1116,7 +1116,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_73, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1126,7 +1126,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_74, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1136,7 +1136,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_75, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1146,7 +1146,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_76, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1156,7 +1156,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_77, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1166,7 +1166,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_78, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1176,7 +1176,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_79, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1186,7 +1186,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_80, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1196,7 +1196,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_81, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1206,7 +1206,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_82, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1216,7 +1216,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_83, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1226,7 +1226,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_84, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1236,7 +1236,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_85, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1246,7 +1246,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_86, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1256,7 +1256,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_87, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1266,7 +1266,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_88, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1276,7 +1276,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_89, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1286,7 +1286,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_90, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1296,7 +1296,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_91, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1306,7 +1306,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_92, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1316,7 +1316,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_93, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1326,7 +1326,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_94, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1336,7 +1336,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_95, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1346,7 +1346,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_96, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1356,7 +1356,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_97, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1366,7 +1366,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_98, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1376,7 +1376,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_99, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1386,7 +1386,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_100, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1396,7 +1396,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_101, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1406,7 +1406,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_102, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1416,7 +1416,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_103, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1426,7 +1426,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_104, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1436,7 +1436,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_105, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1446,7 +1446,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_106, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1456,7 +1456,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_107, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1466,7 +1466,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_108, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1476,7 +1476,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_109, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1486,7 +1486,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_110, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1496,7 +1496,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_111, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1506,7 +1506,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_112, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1516,7 +1516,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_113, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1526,7 +1526,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_114, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1536,7 +1536,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_115, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1546,7 +1546,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_116, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1556,7 +1556,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_117, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1566,7 +1566,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_118, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1576,7 +1576,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_119, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1586,7 +1586,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_120, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1596,7 +1596,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_121, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1606,7 +1606,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_122, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1616,7 +1616,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_123, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1626,7 +1626,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_124, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1636,7 +1636,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_125, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1646,7 +1646,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_126, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1656,7 +1656,7 @@ uObjTxtr papyrus_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &papyrus_tex_127, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ diff --git a/src/s2d_engine/fonts/timesnewroman.c b/src/s2d_engine/fonts/timesnewroman.c index 81b7e7eb9..7ad517afd 100644 --- a/src/s2d_engine/fonts/timesnewroman.c +++ b/src/s2d_engine/fonts/timesnewroman.c @@ -386,7 +386,7 @@ Gfx timesnewroman_align_127[] = {gsSPEndDisplayList()}; uObjTxtr timesnewroman_tex[] = { { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_0, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -396,7 +396,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_1, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -406,7 +406,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_2, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -416,7 +416,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_3, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -426,7 +426,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_4, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -436,7 +436,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_5, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -446,7 +446,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_6, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -456,7 +456,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_7, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -466,7 +466,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_8, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -476,7 +476,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_9, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -486,7 +486,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_10, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -496,7 +496,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_11, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -506,7 +506,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_12, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -516,7 +516,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_13, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -526,7 +526,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_14, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -536,7 +536,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_15, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -546,7 +546,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_16, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -556,7 +556,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_17, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -566,7 +566,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_18, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -576,7 +576,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_19, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -586,7 +586,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_20, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -596,7 +596,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_21, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -606,7 +606,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_22, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -616,7 +616,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_23, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -626,7 +626,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_24, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -636,7 +636,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_25, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -646,7 +646,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_26, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -656,7 +656,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_27, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -666,7 +666,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_28, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -676,7 +676,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_29, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -686,7 +686,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_30, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -696,7 +696,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_31, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -706,7 +706,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_32, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -716,7 +716,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_33, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -726,7 +726,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_34, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -736,7 +736,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_35, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -746,7 +746,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_36, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -756,7 +756,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_37, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -766,7 +766,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_38, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -776,7 +776,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_39, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -786,7 +786,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_40, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -796,7 +796,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_41, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -806,7 +806,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_42, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -816,7 +816,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_43, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -826,7 +826,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_44, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -836,7 +836,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_45, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -846,7 +846,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_46, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -856,7 +856,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_47, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -866,7 +866,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_48, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -876,7 +876,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_49, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -886,7 +886,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_50, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -896,7 +896,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_51, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -906,7 +906,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_52, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -916,7 +916,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_53, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -926,7 +926,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_54, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -936,7 +936,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_55, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -946,7 +946,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_56, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -956,7 +956,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_57, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -966,7 +966,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_58, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -976,7 +976,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_59, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -986,7 +986,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_60, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -996,7 +996,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_61, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1006,7 +1006,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_62, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1016,7 +1016,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_63, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1026,7 +1026,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_64, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1036,7 +1036,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_65, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1046,7 +1046,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_66, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1056,7 +1056,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_67, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1066,7 +1066,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_68, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1076,7 +1076,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_69, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1086,7 +1086,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_70, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1096,7 +1096,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_71, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1106,7 +1106,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_72, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1116,7 +1116,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_73, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1126,7 +1126,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_74, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1136,7 +1136,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_75, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1146,7 +1146,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_76, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1156,7 +1156,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_77, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1166,7 +1166,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_78, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1176,7 +1176,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_79, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1186,7 +1186,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_80, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1196,7 +1196,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_81, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1206,7 +1206,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_82, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1216,7 +1216,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_83, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1226,7 +1226,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_84, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1236,7 +1236,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_85, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1246,7 +1246,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_86, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1256,7 +1256,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_87, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1266,7 +1266,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_88, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1276,7 +1276,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_89, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1286,7 +1286,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_90, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1296,7 +1296,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_91, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1306,7 +1306,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_92, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1316,7 +1316,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_93, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1326,7 +1326,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_94, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1336,7 +1336,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_95, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1346,7 +1346,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_96, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1356,7 +1356,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_97, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1366,7 +1366,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_98, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1376,7 +1376,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_99, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1386,7 +1386,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_100, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1396,7 +1396,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_101, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1406,7 +1406,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_102, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1416,7 +1416,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_103, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1426,7 +1426,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_104, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1436,7 +1436,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_105, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1446,7 +1446,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_106, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1456,7 +1456,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_107, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1466,7 +1466,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_108, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1476,7 +1476,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_109, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1486,7 +1486,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_110, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1496,7 +1496,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_111, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1506,7 +1506,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_112, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1516,7 +1516,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_113, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1526,7 +1526,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_114, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1536,7 +1536,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_115, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1546,7 +1546,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_116, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1556,7 +1556,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_117, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1566,7 +1566,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_118, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1576,7 +1576,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_119, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1586,7 +1586,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_120, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1596,7 +1596,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_121, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1606,7 +1606,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_122, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1616,7 +1616,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_123, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1626,7 +1626,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_124, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1636,7 +1636,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_125, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1646,7 +1646,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_126, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1656,7 +1656,7 @@ uObjTxtr timesnewroman_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) ×newroman_tex_127, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ diff --git a/src/s2d_engine/fonts/ubuntu.c b/src/s2d_engine/fonts/ubuntu.c index f46fc7b0b..d3b7d24f5 100644 --- a/src/s2d_engine/fonts/ubuntu.c +++ b/src/s2d_engine/fonts/ubuntu.c @@ -386,7 +386,7 @@ Gfx ubuntu_align_127[] = {gsSPEndDisplayList()}; uObjTxtr ubuntu_tex[] = { { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_0, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -396,7 +396,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_1, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -406,7 +406,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_2, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -416,7 +416,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_3, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -426,7 +426,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_4, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -436,7 +436,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_5, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -446,7 +446,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_6, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -456,7 +456,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_7, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -466,7 +466,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_8, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -476,7 +476,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_9, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -486,7 +486,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_10, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -496,7 +496,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_11, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -506,7 +506,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_12, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -516,7 +516,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_13, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -526,7 +526,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_14, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -536,7 +536,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_15, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -546,7 +546,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_16, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -556,7 +556,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_17, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -566,7 +566,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_18, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -576,7 +576,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_19, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -586,7 +586,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_20, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -596,7 +596,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_21, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -606,7 +606,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_22, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -616,7 +616,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_23, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -626,7 +626,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_24, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -636,7 +636,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_25, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -646,7 +646,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_26, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -656,7 +656,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_27, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -666,7 +666,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_28, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -676,7 +676,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_29, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -686,7 +686,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_30, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -696,7 +696,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_31, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -706,7 +706,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_32, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -716,7 +716,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_33, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -726,7 +726,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_34, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -736,7 +736,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_35, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -746,7 +746,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_36, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -756,7 +756,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_37, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -766,7 +766,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_38, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -776,7 +776,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_39, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -786,7 +786,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_40, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -796,7 +796,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_41, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -806,7 +806,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_42, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -816,7 +816,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_43, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -826,7 +826,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_44, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -836,7 +836,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_45, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -846,7 +846,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_46, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -856,7 +856,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_47, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -866,7 +866,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_48, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -876,7 +876,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_49, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -886,7 +886,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_50, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -896,7 +896,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_51, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -906,7 +906,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_52, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -916,7 +916,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_53, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -926,7 +926,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_54, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -936,7 +936,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_55, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -946,7 +946,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_56, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -956,7 +956,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_57, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -966,7 +966,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_58, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -976,7 +976,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_59, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -986,7 +986,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_60, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -996,7 +996,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_61, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1006,7 +1006,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_62, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1016,7 +1016,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_63, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1026,7 +1026,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_64, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1036,7 +1036,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_65, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1046,7 +1046,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_66, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1056,7 +1056,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_67, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1066,7 +1066,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_68, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1076,7 +1076,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_69, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1086,7 +1086,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_70, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1096,7 +1096,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_71, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1106,7 +1106,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_72, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1116,7 +1116,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_73, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1126,7 +1126,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_74, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1136,7 +1136,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_75, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1146,7 +1146,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_76, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1156,7 +1156,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_77, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1166,7 +1166,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_78, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1176,7 +1176,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_79, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1186,7 +1186,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_80, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1196,7 +1196,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_81, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1206,7 +1206,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_82, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1216,7 +1216,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_83, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1226,7 +1226,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_84, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1236,7 +1236,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_85, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1246,7 +1246,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_86, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1256,7 +1256,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_87, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1266,7 +1266,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_88, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1276,7 +1276,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_89, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1286,7 +1286,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_90, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1296,7 +1296,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_91, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1306,7 +1306,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_92, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1316,7 +1316,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_93, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1326,7 +1326,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_94, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1336,7 +1336,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_95, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1346,7 +1346,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_96, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1356,7 +1356,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_97, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1366,7 +1366,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_98, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1376,7 +1376,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_99, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1386,7 +1386,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_100, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1396,7 +1396,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_101, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1406,7 +1406,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_102, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1416,7 +1416,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_103, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1426,7 +1426,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_104, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1436,7 +1436,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_105, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1446,7 +1446,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_106, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1456,7 +1456,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_107, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1466,7 +1466,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_108, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1476,7 +1476,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_109, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1486,7 +1486,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_110, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1496,7 +1496,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_111, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1506,7 +1506,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_112, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1516,7 +1516,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_113, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1526,7 +1526,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_114, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1536,7 +1536,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_115, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1546,7 +1546,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_116, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1556,7 +1556,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_117, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1566,7 +1566,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_118, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1576,7 +1576,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_119, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1586,7 +1586,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_120, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1596,7 +1596,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_121, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1606,7 +1606,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_122, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1616,7 +1616,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_123, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1626,7 +1626,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_124, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1636,7 +1636,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_125, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1646,7 +1646,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_126, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ @@ -1656,7 +1656,7 @@ uObjTxtr ubuntu_tex[] = { 0xFFFFFFFF, /* mask */ }, { - G_OBJLT_TXTRBLOCK, + G_OBJLT_TXTRBLOCK, (u64 *) &ubuntu_tex_127, /* image */ GS_PIX2TMEM(0, G_IM_SIZ_8b), /* tmem */ GS_TB_TSIZE(64*64, G_IM_SIZ_8b), /* tsize */ diff --git a/src/s2d_engine/x86_testing_ground/atoi.c b/src/s2d_engine/x86_testing_ground/atoi.c index 16b337178..e1dc498a5 100644 --- a/src/s2d_engine/x86_testing_ground/atoi.c +++ b/src/s2d_engine/x86_testing_ground/atoi.c @@ -91,10 +91,10 @@ void s2d_print(int x, int y, char *str) { // s2d_blue = s2d_atoi(p, &p); // CH_SKIP(p); CH_SKIP(p); - + // s2d_alpha = s2d_atoi(p, &p); // break; - + // break; default: break; @@ -197,12 +197,12 @@ int main(void) { // s2d_print(0,0, t); char laStrBuf[0x100]; char ff[0x100]; - sprintf(ff, + sprintf(ff, "%s %d:" TRANSLATE "134 93" "%s:" , "Floor", 213, "Seed"); sprintf( - laStrBuf, + laStrBuf, "%s" TRANSLATE "138 93" "%s" TRANSLATE "138 110" "%s" diff --git a/src/usb/debug.c b/src/usb/debug.c index e6bd4e94a..47ce46bdb 100644 --- a/src/usb/debug.c +++ b/src/usb/debug.c @@ -1,13 +1,13 @@ /*************************************************************** debug.c - + A basic debug library that makes use of the USB library for N64 -flashcarts. +flashcarts. https://github.com/buu342/N64-UNFLoader ***************************************************************/ #include "debug.h" #ifndef LIBDRAGON - #include + #include #include // Needed for Crash's Linux toolchain #else #include @@ -20,36 +20,36 @@ https://github.com/buu342/N64-UNFLoader #if DEBUG_MODE - + /********************************* Definitions *********************************/ - + #define MSG_FAULT 0x10 #define MSG_READ 0x11 #define MSG_WRITE 0x12 - + #define USBERROR_NONE 0 #define USBERROR_NOTTEXT 1 #define USBERROR_UNKNOWN 2 #define USBERROR_TOOMUCH 3 #define USBERROR_CUSTOM 4 - + #define HASHTABLE_SIZE 7 #define COMMAND_TOKENS 10 #define BUFFER_SIZE 256 - + /********************************* Libultra types (for libdragon) *********************************/ #ifdef LIBDRAGON - typedef unsigned char u8; + typedef unsigned char u8; typedef unsigned short u16; typedef unsigned long u32; typedef unsigned long long u64; - typedef signed char s8; + typedef signed char s8; typedef short s16; typedef long s32; typedef long long s64; @@ -67,42 +67,42 @@ https://github.com/buu342/N64-UNFLoader typedef float f32; typedef double f64; #endif - + /********************************* Structs *********************************/ // Register struct - typedef struct + typedef struct { u32 mask; u32 value; char *string; } regDesc; - + // Thread message struct - typedef struct + typedef struct { int msgtype; int datatype; void* buff; int size; } usbMesg; - + // Debug command struct - typedef struct + typedef struct { char* command; char* description; char* (*execute)(); void* next; } debugCommand; - - + + /********************************* Function Prototypes *********************************/ - + #ifndef LIBDRAGON // Threads #if USE_FAULTTHREAD @@ -117,8 +117,8 @@ https://github.com/buu342/N64-UNFLoader #else static void debug_thread_usb(void *arg); #endif - - + + /********************************* Globals *********************************/ @@ -134,12 +134,12 @@ https://github.com/buu342/N64-UNFLoader // Debug globals static char debug_initialized = 0; static char debug_buffer[BUFFER_SIZE]; - + // Commands hashtable related static debugCommand* debug_commands_hashtable[HASHTABLE_SIZE]; static debugCommand debug_commands_elements[MAX_COMMANDS]; static int debug_commands_count = 0; - + // Command parsing related static int debug_command_current = 0; static int debug_command_totaltokens = 0; @@ -160,7 +160,7 @@ https://github.com/buu342/N64-UNFLoader static OSThread faultThread; static u64 faultThreadStack[FAULT_THREAD_STACK/sizeof(u64)]; #endif - + // USB thread globals static OSMesgQueue usbMessageQ; static OSMesg usbMessageBuf; @@ -265,47 +265,47 @@ https://github.com/buu342/N64-UNFLoader /********************************* Debug functions *********************************/ - + /*============================== debug_initialize Initializes the debug library ==============================*/ - + void debug_initialize() { // Initialize the USB functions if (!usb_initialize()) return; - + // Overwrite osSyncPrintf #ifndef LIBDRAGON #if OVERWRITE_OSPRINT __printfunc = (void*)debug_osSyncPrintf_implementation; #endif - + // Initialize the fault thread #if USE_FAULTTHREAD - osCreateThread(&faultThread, FAULT_THREAD_ID, debug_thread_fault, 0, - (faultThreadStack+FAULT_THREAD_STACK/sizeof(u64)), + osCreateThread(&faultThread, FAULT_THREAD_ID, debug_thread_fault, 0, + (faultThreadStack+FAULT_THREAD_STACK/sizeof(u64)), FAULT_THREAD_PRI); osStartThread(&faultThread); #endif - + // Initialize the USB thread - osCreateThread(&usbThread, USB_THREAD_ID, debug_thread_usb, 0, - (usbThreadStack+USB_THREAD_STACK/sizeof(u64)), + osCreateThread(&usbThread, USB_THREAD_ID, debug_thread_usb, 0, + (usbThreadStack+USB_THREAD_STACK/sizeof(u64)), USB_THREAD_PRI); osStartThread(&usbThread); #endif - + // Mark the debug mode as initialized debug_initialized = 1; #if DEBUG_INIT_MSG debug_printf("Debug mode initialized!\n\n"); #endif } - - + + #ifndef LIBDRAGON /*============================== printf_handler @@ -315,14 +315,14 @@ https://github.com/buu342/N64-UNFLoader @param The length of the string @returns The end of the buffer that was written to ==============================*/ - + static void* printf_handler(void *buf, const char *str, size_t len) { return ((char *) memcpy(buf, str, len) + len); } #endif - - + + /*============================== debug_printf Prints a formatted message to the developer's command prompt. @@ -330,13 +330,13 @@ https://github.com/buu342/N64-UNFLoader @param A string to print @param variadic arguments to print as well ==============================*/ - + void debug_printf(const char* message, ...) { int len = 0; usbMesg msg; va_list args; - + // use the internal libultra printf function to format the string va_start(args, message); #ifndef LIBDRAGON @@ -345,11 +345,11 @@ https://github.com/buu342/N64-UNFLoader len = vsprintf(debug_buffer, message, args); #endif va_end(args); - + // Attach the '\0' if necessary if (0 <= len) debug_buffer[len] = '\0'; - + // Send the printf to the usb thread msg.msgtype = MSG_WRITE; msg.datatype = DATATYPE_TEXT; @@ -361,19 +361,19 @@ https://github.com/buu342/N64-UNFLoader debug_thread_usb(&msg); #endif } - - + + /*============================== debug_dumpbinary Dumps a binary file through USB @param The file to dump @param The size of the file ==============================*/ - + void debug_dumpbinary(void* file, int size) { usbMesg msg; - + // Send the binary file to the usb thread msg.msgtype = MSG_WRITE; msg.datatype = DATATYPE_RAWBINARY; @@ -385,27 +385,27 @@ https://github.com/buu342/N64-UNFLoader debug_thread_usb(&msg); #endif } - - + + /*============================== debug_screenshot Sends the currently displayed framebuffer through USB. DOES NOT PAUSE DRAWING THREAD! Using outside the drawing thread may lead to a screenshot with visible tearing ==============================*/ - + void debug_screenshot() { usbMesg msg; int data[4]; - + // These addresses were obtained from http://en64.shoutwiki.com/wiki/VI_Registers_Detailed void* frame = (void*)(0x80000000|(*(u32*)0xA4400004)); // Same as calling osViGetCurrentFramebuffer() in libultra u32 yscale = (*(u32*)0xA4400034); u32 w = (*(u32*)0xA4400008); u32 h = ((((*(u32*)0xA4400028)&0x3FF)-(((*(u32*)0xA4400028)>>16)&0x3FF))*yscale)/2048; u8 depth = (((*(u32*)0xA4400000)&0x03) == 0x03) ? 4 : 2; - + // Ensure debug mode is initialized if (!debug_initialized) return; @@ -415,7 +415,7 @@ https://github.com/buu342/N64-UNFLoader data[1] = depth; data[2] = w; data[3] = h; - + // Send the header to the USB thread msg.msgtype = MSG_WRITE; msg.datatype = DATATYPE_HEADER; @@ -453,12 +453,12 @@ https://github.com/buu342/N64-UNFLoader #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wunused-but-set-variable" volatile char crash; - + // Set the assert data assert_expr = expression; assert_line = line; assert_file = file; - + // If on libdragon, print where the assertion failed #ifdef LIBDRAGON debug_printf("Assertion failed in file '%s', line %d.\n", assert_file, assert_line); @@ -468,8 +468,8 @@ https://github.com/buu342/N64-UNFLoader crash = *(volatile char *)1; #pragma GCC diagnostic pop } - - + + /*============================== debug_addcommand Adds a command for the USB to listen for @@ -477,23 +477,23 @@ https://github.com/buu342/N64-UNFLoader @param The command description @param The function pointer to execute ==============================*/ - + void debug_addcommand(char* command, char* description, char* (*execute)()) { int entry = command[0]%HASHTABLE_SIZE; debugCommand* slot = debug_commands_hashtable[entry]; - + // Ensure debug mode is initialized if (!debug_initialized) return; - + // Ensure we haven't hit the command limit if (debug_commands_count == MAX_COMMANDS) { debug_printf("Max commands exceeded!\n"); return; } - + // Look for an empty spot in the hash table if (slot != NULL) { @@ -503,53 +503,53 @@ https://github.com/buu342/N64-UNFLoader } else debug_commands_hashtable[entry] = &debug_commands_elements[debug_commands_count]; - + // Fill this spot with info about this command debug_commands_elements[debug_commands_count].command = command; debug_commands_elements[debug_commands_count].description = description; debug_commands_elements[debug_commands_count].execute = execute; debug_commands_count++; } - - + + /*============================== debug_printcommands Prints a list of commands to the developer's command prompt. ==============================*/ - + void debug_printcommands() { int i; - + // Ensure debug mode is initialized if (!debug_initialized) return; - + // Ensure there are commands to print if (debug_commands_count == 0) return; - + // Print the commands debug_printf("Available USB commands\n----------------------\n"); for (i=0; i 0) { int readsize = BUFFER_SIZE; if (readsize > dataleft) readsize = dataleft; - + // Read a block from USB memset(debug_buffer, 0, BUFFER_SIZE); usb_read(debug_buffer, readsize); @@ -642,7 +642,7 @@ https://github.com/buu342/N64-UNFLoader // If we're not reading a file int offset = datasize-dataleft; u8 tok = debug_command_totaltokens; - + // Decide what to do based on the current character switch (debug_buffer[i]) { @@ -655,7 +655,7 @@ https://github.com/buu342/N64-UNFLoader debug_command_incoming_size[tok] = offset-debug_command_incoming_start[tok]; debug_command_totaltokens++; } - + if (debug_buffer[i] == '\0') dataleft = 0; break; @@ -668,7 +668,7 @@ https://github.com/buu342/N64-UNFLoader // Decide what to do based on the file handle if (filestep == 0 && debug_command_incoming_start[tok] == -1) { - // Store the data offsets and sizes in the global command buffers + // Store the data offsets and sizes in the global command buffers debug_command_incoming_start[tok] = offset; } else if (filestep == 1) @@ -678,11 +678,11 @@ https://github.com/buu342/N64-UNFLoader } else if (filestep > 1) { - // Store the file offsets and sizes in the global command buffers + // Store the file offsets and sizes in the global command buffers debug_command_incoming_start[tok] = offset; debug_command_incoming_size[tok] = filesize; debug_command_totaltokens++; - + // Skip a bunch of bytes if ((readsize-i)-filesize < 0) usb_skip(filesize-(readsize-i)); @@ -696,12 +696,12 @@ https://github.com/buu342/N64-UNFLoader dataleft--; } } - + // Rewind the USB fully usb_rewind(datasize); } - - + + /*============================== debug_thread_usb Handles the USB thread @@ -728,13 +728,13 @@ https://github.com/buu342/N64-UNFLoader // Wait for a USB message to arrive osRecvMesg(&usbMessageQ, (OSMesg *)&threadMsg, OS_MESG_BLOCK); #endif - + // Ensure there's no data in the USB (which handles MSG_READ) while (usb_poll() != 0) { int header = usb_poll(); debugCommand* entry; - + // Ensure we're receiving a text command if (USBHEADER_GETTYPE(header) != DATATYPE_TEXT) { @@ -742,14 +742,14 @@ https://github.com/buu342/N64-UNFLoader usb_purge(); break; } - + // Initialize the command trackers debug_command_totaltokens = 0; debug_command_current = 0; - + // Break the USB command into parts debug_commands_setup(); - + // Ensure we don't read past our buffer if (debug_sizecommand() > BUFFER_SIZE) { @@ -757,17 +757,17 @@ https://github.com/buu342/N64-UNFLoader usb_purge(); break; } - + // Read from the USB to retrieve the command name debug_parsecommand(debug_buffer); - + // Iterate through the hashtable to see if we find the command entry = debug_commands_hashtable[debug_buffer[0]%HASHTABLE_SIZE]; while (entry != NULL) { // If we found the command if (!strncmp(debug_buffer, entry->command, debug_command_incoming_size[0])) - { + { // Execute the command function and exit the while loop debug_command_error = entry->execute(); if (debug_command_error != NULL) @@ -777,7 +777,7 @@ https://github.com/buu342/N64-UNFLoader } entry = entry->next; } - + // If no command was found if (entry == NULL) { @@ -786,7 +786,7 @@ https://github.com/buu342/N64-UNFLoader errortype = USBERROR_UNKNOWN; } } - + // Spit out an error if there was one during the command parsing if (errortype != USBERROR_NONE) { @@ -808,7 +808,7 @@ https://github.com/buu342/N64-UNFLoader } errortype = USBERROR_NONE; } - + // Handle the other USB messages switch (threadMsg->msgtype) { @@ -823,10 +823,10 @@ https://github.com/buu342/N64-UNFLoader #endif } } - + #ifndef LIBDRAGON #if OVERWRITE_OSPRINT - + /*============================== debug_osSyncPrintf_implementation Overwrites osSyncPrintf calls with this one @@ -835,31 +835,31 @@ https://github.com/buu342/N64-UNFLoader @param The amount of characters to write @returns The end of the buffer that was written to ==============================*/ - + static void* debug_osSyncPrintf_implementation(void *unused, const char *str, size_t len) { void* ret; usbMesg msg; - + // Clear the debug buffer and copy the formatted string to it memset(debug_buffer, 0, len+1); ret = ((char *) memcpy(debug_buffer, str, len) + len); - + // Send the printf to the usb thread msg.msgtype = MSG_WRITE; msg.datatype = DATATYPE_TEXT; msg.buff = debug_buffer; msg.size = len+1; osSendMesg(&usbMessageQ, (OSMesg)&msg, OS_MESG_BLOCK); - + // Return the end of the buffer return ret; } - - #endif + + #endif #if USE_FAULTTHREAD - + /*============================== debug_printreg Prints info about a register @@ -872,9 +872,9 @@ https://github.com/buu342/N64-UNFLoader { char first = 1; debug_printf("%s\t\t0x%08x <", name, value); - while (desc->mask != 0) + while (desc->mask != 0) { - if ((value & desc->mask) == desc->value) + if ((value & desc->mask) == desc->value) { (first) ? (first = 0) : ((void)debug_printf(",")); debug_printf("%s", desc->string); @@ -883,14 +883,14 @@ https://github.com/buu342/N64-UNFLoader } debug_printf(">\n"); } - - + + /*============================== debug_thread_fault Handles the fault thread @param Arbitrary data that the thread can receive ==============================*/ - + static void debug_thread_fault(void *arg) { OSMesg msg; @@ -905,10 +905,10 @@ https://github.com/buu342/N64-UNFLoader { // Wait for a fault message to arrive osRecvMesg(&faultMessageQ, (OSMesg *)&msg, OS_MESG_BLOCK); - + // Get the faulted thread curr = (OSThread *)__osGetCurrFaultedThread(); - if (curr != NULL) + if (curr != NULL) { __OSThreadContext* context = &curr->context; @@ -921,7 +921,7 @@ https://github.com/buu342/N64-UNFLoader debug_printf("cause\t\tAssertion failed in file '%s', line %d.\n", assert_file, assert_line); debug_printreg(context->sr, "sr", srDesc); debug_printf("badvaddr\t0x%08x\n\n", context->badvaddr); - + // Print the registers debug_printf("at 0x%016llx v0 0x%016llx v1 0x%016llx\n", context->at, context->v0, context->v1); debug_printf("a0 0x%016llx a1 0x%016llx a2 0x%016llx\n", context->a0, context->a1, context->a2); @@ -948,8 +948,8 @@ https://github.com/buu342/N64-UNFLoader } } } - + #endif #endif - + #endif \ No newline at end of file diff --git a/src/usb/debug.h b/src/usb/debug.h index ebe7ea69b..d9c2f5836 100644 --- a/src/usb/debug.h +++ b/src/usb/debug.h @@ -11,32 +11,32 @@ #define USE_FAULTTHREAD 1 // Create a fault detection thread (libultra only) #define OVERWRITE_OSPRINT 1 // Replaces osSyncPrintf calls with debug_printf (libultra only) #define MAX_COMMANDS 25 // The max amount of user defined commands possible - + // Fault thread definitions (libultra only) #define FAULT_THREAD_ID 13 #define FAULT_THREAD_PRI 125 #define FAULT_THREAD_STACK 0x2000 - + // USB thread definitions (libultra only) #define USB_THREAD_ID 14 #define USB_THREAD_PRI 126 #define USB_THREAD_STACK 0x2000 - - + + /********************************* Debug Functions *********************************/ - + #if DEBUG_MODE - + /*============================== debug_initialize Initializes the debug and USB library. ==============================*/ - + extern void debug_initialize(); - - + + /*============================== debug_printf Prints a formatted message to the developer's command prompt. @@ -44,58 +44,58 @@ @param A string to print @param variadic arguments to print as well ==============================*/ - + extern void debug_printf(const char* message, ...); - - + + /*============================== debug_dumpbinary Dumps a binary file through USB @param The file to dump @param The size of the file ==============================*/ - + extern void debug_dumpbinary(void* file, int size); - - + + /*============================== debug_screenshot Sends the currently displayed framebuffer through USB. DOES NOT PAUSE DRAWING THREAD! Using outside the drawing thread may lead to a screenshot with visible tearing ==============================*/ - + extern void debug_screenshot(); - - + + /*============================== debug_assert Halts the program if the expression fails. @param The expression to test ==============================*/ - + #define debug_assert(expr) (expr) ? ((void)0) : _debug_assert(#expr, __FILE__, __LINE__) - - + + /*============================== debug_pollcommands Check the USB for incoming commands. ==============================*/ - + extern void debug_pollcommands(); - - + + /*============================== debug_addcommand Adds a command for the USB to read. @param The command name @param The command description - @param The function pointer to execute + @param The function pointer to execute ==============================*/ - + extern void debug_addcommand(char* command, char* description, char*(*execute)()); - + /*============================== debug_parsecommand Stores the next part of the incoming command into the provided buffer. @@ -103,38 +103,38 @@ If you pass NULL, it skips this command. @param The buffer to store the data in ==============================*/ - + extern void debug_parsecommand(void* buffer); - - + + /*============================== debug_sizecommand Returns the size of the data from this part of the command. @return The size of the data in bytes, or 0 ==============================*/ - + extern int debug_sizecommand(); - - + + /*============================== debug_printcommands Prints a list of commands to the developer's command prompt. ==============================*/ - + extern void debug_printcommands(); - + // Ignore this, use the macro instead extern void _debug_assert(const char* expression, const char* file, int line); - + // Include usb.h automatically #include "usb.h" - + #else - + // Overwrite library functions with useless macros if debug mode is disabled - #define debug_initialize() - #define debug_printf(__VA_ARGS__) + #define debug_initialize() + #define debug_printf(__VA_ARGS__) #define debug_screenshot(a, b, c) #define debug_assert(a) #define debug_pollcommands() @@ -150,7 +150,7 @@ #define usb_skip(a) #define usb_rewind(a) #define usb_purge() - + #endif - + #endif \ No newline at end of file diff --git a/src/usb/usb.c b/src/usb/usb.c index 46f56cf94..11297b9a1 100644 --- a/src/usb/usb.c +++ b/src/usb/usb.c @@ -1,6 +1,6 @@ /*************************************************************** usb.c - + Allows USB communication between an N64 flashcart and the PC using UNFLoader. https://github.com/buu342/N64-UNFLoader @@ -91,7 +91,7 @@ https://github.com/buu342/N64-UNFLoader 64Drive macros *********************************/ -// How many cycles for the 64Drive to wait for data. +// How many cycles for the 64Drive to wait for data. // Lowering this might improve performance slightly faster at the expense of USB reading accuracy #define D64_POLLTIME 2000 @@ -206,12 +206,12 @@ https://github.com/buu342/N64-UNFLoader *********************************/ #ifdef LIBDRAGON - typedef uint8_t u8; + typedef uint8_t u8; typedef uint16_t u16; typedef uint32_t u32; typedef uint64_t u64; - typedef int8_t s8; + typedef int8_t s8; typedef int16_t s16; typedef int32_t s32; typedef int64_t s64; @@ -279,7 +279,7 @@ int usb_readblock = -1; extern s32 __osPiRawWriteIo(u32, u32); extern s32 __osPiRawReadIo(u32, u32 *); extern s32 __osPiRawStartDma(s32, u32, void *, u32); - + #define osPiRawWriteIo(a, b) __osPiRawWriteIo(a, b) #define osPiRawReadIo(a, b) __osPiRawReadIo(a, b) #define osPiRawStartDma(a, b, c, d) __osPiRawStartDma(a, b, c, d) @@ -301,14 +301,14 @@ char usb_initialize() { // Initialize the debug related globals memset(usb_buffer, 0, BUFFER_SIZE); - + #ifndef LIBDRAGON // Create the message queue #if !USE_OSRAW osCreateMesgQueue(&dmaMessageQ, &dmaMessageBuf, 1); #endif #endif - + // Find the flashcart usb_findcart(); @@ -345,7 +345,7 @@ char usb_initialize() static void usb_findcart() { u32 buff __attribute__((aligned(8))); - + // Read the cartridge and check if we have a 64Drive. #ifdef LIBDRAGON buff = io_read(D64_CIBASE_ADDRESS + D64_REGISTER_MAGIC); @@ -377,19 +377,19 @@ static void usb_findcart() usb_cart = CART_SC64; return; } - + // Since we didn't find a 64Drive or SummerCart64, let's assume we have an EverDrive // Write the key to unlock the registers, then read the version register usb_everdrive_writereg(ED_REG_KEY, ED_REGKEY); usb_everdrive_readreg(ED_REG_VERSION, &buff); - + // Check if we have an EverDrive if (buff == ED7_VERSION || buff == ED3_VERSION) { // Set the USB mode usb_everdrive_writereg(ED_REG_SYSCFG, 0); usb_everdrive_writereg(ED_REG_USBCFG, ED_USBMODE_RDNOP); - + // Set the cart to EverDrive usb_cart = CART_EVERDRIVE; return; @@ -423,11 +423,11 @@ void usb_write(int datatype, const void* data, int size) // If no debug cart exists, stop if (usb_cart == CART_NONE) return; - + // If there's data to read first, stop if (usb_dataleft != 0) return; - + // Call the correct write function funcPointer_write(datatype, data, size); } @@ -445,7 +445,7 @@ unsigned long usb_poll() // If no debug cart exists, stop if (usb_cart == CART_NONE) return 0; - + // If we're out of USB data to read, we don't need the header info anymore if (usb_dataleft <= 0) { @@ -454,11 +454,11 @@ unsigned long usb_poll() usb_datasize = 0; usb_readblock = -1; } - + // If there's still data that needs to be read, return the header with the data left if (usb_dataleft != 0) return USBHEADER_CREATE(usb_datatype, usb_dataleft); - + // Call the correct read function return funcPointer_poll(); } @@ -479,11 +479,11 @@ void usb_read(void* buffer, int nbytes) int copystart = offset%BUFFER_SIZE; int block = BUFFER_SIZE-copystart; int blockoffset = (offset/BUFFER_SIZE)*BUFFER_SIZE; - + // If no debug cart exists, stop if (usb_cart == CART_NONE) return; - + // If there's no data to read, stop if (usb_dataleft == 0) return; @@ -496,17 +496,17 @@ void usb_read(void* buffer, int nbytes) left = usb_dataleft; if (block > left) block = left; - + // Call the read function if we're reading a new block if (usb_readblock != blockoffset) { usb_readblock = blockoffset; funcPointer_read(); } - + // Copy from the USB buffer to the supplied buffer memcpy(buffer+read, usb_buffer+copystart, block); - + // Increment/decrement all our counters read += block; left -= block; @@ -576,7 +576,7 @@ static s8 usb_64drive_wait() { u32 ret __attribute__((aligned(8))); u32 timeout = 0; // I wanted to use osGetTime() but that requires the VI manager - + // Wait until the cartridge interface is ready do { @@ -589,14 +589,14 @@ static s8 usb_64drive_wait() osPiReadIo(D64_CIBASE_ADDRESS + D64_REGISTER_STATUS, &ret); #endif #endif - + // Took too long, abort if((timeout++) > 10000) return -1; } while((ret >> 8) & D64_CI_BUSY); (void) timeout; // Needed to stop unused variable warning - + // Success return 0; } @@ -633,7 +633,7 @@ static int usb_64drive_waitidle() { u32 status __attribute__((aligned(8))); u32 timeout = 0; - do + do { #ifdef LIBDRAGON status = io_read(D64_CIBASE_ADDRESS + D64_REGISTER_USBCOMSTAT); @@ -713,19 +713,19 @@ static void usb_64drive_write(int datatype, const void* data, int size) { int left = size; int read = 0; - + // Spin until the write buffer is free and then set the cartridge to write mode if (!usb_64drive_waitidle()) return; usb_64drive_setwritable(TRUE); - + // Write data to SDRAM until we've finished while (left > 0) { int block = left; if (block > BUFFER_SIZE) block = BUFFER_SIZE; - + // Copy the data to the global buffer memcpy(usb_buffer, (void*)((char*)data+read), block); @@ -735,18 +735,18 @@ static void usb_64drive_write(int datatype, const void* data, int size) u32 i; u32 size_new = (size & ~3)+4; block += size_new-size; - for (i=size; i> 1); @@ -785,7 +785,7 @@ static void usb_64drive_write(int datatype, const void* data, int size) osPiWriteIo(D64_CIBASE_ADDRESS + D64_REGISTER_USBCOMSTAT, D64_COMMAND_WRITE); #endif #endif - + // Spin until the write buffer is free and then disable write mode usb_64drive_waitidle(); usb_64drive_setwritable(FALSE); @@ -803,11 +803,11 @@ static void usb_64drive_arm(u32 offset, u32 size) { u32 ret __attribute__((aligned(8))); ret = usb_64drive_armstatus(); - + if (ret != D64_USB_ARMING && ret != D64_USB_ARMED) { usb_64drive_waitidle(); - + // Arm the 64Drive, using the ROM space as a buffer #ifdef LIBDRAGON io_write(D64_CIBASE_ADDRESS + D64_REGISTER_USBCOMSTAT, D64_USB_ARM); @@ -840,9 +840,9 @@ static void usb_64drive_disarm() io_write(D64_CIBASE_ADDRESS + D64_REGISTER_USBCOMSTAT, D64_USB_DISARM); #else #if USE_OSRAW - osPiRawWriteIo(D64_CIBASE_ADDRESS + D64_REGISTER_USBCOMSTAT, D64_USB_DISARM); + osPiRawWriteIo(D64_CIBASE_ADDRESS + D64_REGISTER_USBCOMSTAT, D64_USB_DISARM); #else - osPiWriteIo(D64_CIBASE_ADDRESS + D64_REGISTER_USBCOMSTAT, D64_USB_DISARM); + osPiWriteIo(D64_CIBASE_ADDRESS + D64_REGISTER_USBCOMSTAT, D64_USB_DISARM); #endif #endif usb_64drive_waitdisarmed(); @@ -860,16 +860,16 @@ static u32 usb_64drive_poll() { int i; u32 ret __attribute__((aligned(8))); - + // Arm the USB buffer usb_64drive_waitidle(); usb_64drive_setwritable(TRUE); usb_64drive_arm(DEBUG_ADDRESS, DEBUG_ADDRESS_SIZE); - + // Burn some time to see if any USB data comes in for (i=0; i size) block = size; addr = BUFFER_SIZE - block; - + // Request to read from the USB - usb_everdrive_writereg(ED_REG_USBCFG, ED_USBMODE_RD | addr); + usb_everdrive_writereg(ED_REG_USBCFG, ED_USBMODE_RD | addr); // Wait for the FPGA to transfer the data to its internal buffer - usb_everdrive_usbbusy(); + usb_everdrive_usbbusy(); // Read from the internal buffer and store it in our buffer - usb_everdrive_readdata(buffer, ED_GET_REGADD(ED_REG_USBDAT + addr), block); + usb_everdrive_readdata(buffer, ED_GET_REGADD(ED_REG_USBDAT + addr), block); buffer = (char*)buffer + block; size -= block; } @@ -1150,7 +1150,7 @@ static void usb_everdrive_write(int datatype, const void* data, int size) int left = size; int offset = 8; u32 header = (size & 0x00FFFFFF) | (datatype << 24); - + // Put in the DMA header along with length and type information in the global buffer usb_buffer[0] = 'D'; usb_buffer[1] = 'M'; @@ -1160,7 +1160,7 @@ static void usb_everdrive_write(int datatype, const void* data, int size) usb_buffer[5] = (header >> 16) & 0xFF; usb_buffer[6] = (header >> 8) & 0xFF; usb_buffer[7] = header & 0xFF; - + // Write data to USB until we've finished while (left > 0) { @@ -1168,10 +1168,10 @@ static void usb_everdrive_write(int datatype, const void* data, int size) int blocksend, baddr; if (block+offset > BUFFER_SIZE) block = BUFFER_SIZE-offset; - + // Copy the data to the next available spots in the global buffer memcpy(usb_buffer+offset, (void*)((char*)data+read), block); - + // Restart the loop to write the CMP signal if we've finished if (!wrotecmp && read+block >= size) { @@ -1182,7 +1182,7 @@ static void usb_everdrive_write(int datatype, const void* data, int size) read = 0; continue; } - + // Ensure the data is 16 byte aligned and the block address is correct blocksend = (block+offset)+15 - ((block+offset)+15)%16; baddr = BUFFER_SIZE - blocksend; @@ -1190,11 +1190,11 @@ static void usb_everdrive_write(int datatype, const void* data, int size) // Set USB to write mode and send data through USB usb_everdrive_writereg(ED_REG_USBCFG, ED_USBMODE_WRNOP); usb_everdrive_writedata(usb_buffer, ED_GET_REGADD(ED_REG_USBDAT + baddr), blocksend); - + // Set USB to write mode with the new address and wait for USB to end usb_everdrive_writereg(ED_REG_USBCFG, ED_USBMODE_WR | baddr); usb_everdrive_usbbusy(); - + // Keep track of what we've read so far left -= block; read += block; @@ -1215,45 +1215,45 @@ static u32 usb_everdrive_poll() char buff[16] __attribute__((aligned(8))); int len; int offset = 0; - + // Wait for the USB to be ready usb_everdrive_usbbusy(); - + // Check if the USB is ready to be read if (!usb_everdrive_canread()) return 0; - + // Read the first 8 bytes that are being received and check if they're valid usb_everdrive_readusb(buff, 16); if (buff[0] != 'D' || buff[1] != 'M' || buff[2] != 'A' || buff[3] != '@') return 0; - + // Store information about the incoming data usb_datatype = (int)buff[4]; usb_datasize = (int)buff[5]<<16 | (int)buff[6]<<8 | (int)buff[7]<<0; usb_dataleft = usb_datasize; usb_readblock = -1; - + // Begin receiving data usb_everdrive_writereg(ED_REG_USBCFG, ED_USBMODE_RD | BUFFER_SIZE); len = (usb_datasize + BUFFER_SIZE-usb_datasize%BUFFER_SIZE)/BUFFER_SIZE; - + // While there's data to service - while (len--) + while (len--) { // Wait for the USB to be ready and then read data usb_everdrive_usbbusy(); usb_everdrive_readdata(usb_buffer, ED_GET_REGADD(ED_REG_USBDAT), BUFFER_SIZE); // TODO: Replace with usb_everdrive_readusb? - + // Tell the FPGA we can receive more data if (len != 0) usb_everdrive_writereg(ED_REG_USBCFG, ED_USBMODE_RD | BUFFER_SIZE); - + // Copy received block to ROM usb_everdrive_writedata(usb_buffer, ED_BASE + DEBUG_ADDRESS + offset, BUFFER_SIZE); offset += BUFFER_SIZE; } - + // Read the CMP Signal usb_everdrive_usbbusy(); usb_everdrive_readusb(buff, 16); @@ -1289,12 +1289,12 @@ static void usb_everdrive_read() #else osWritebackDCacheAll(); #if USE_OSRAW - osPiRawStartDma(OS_READ, - ED_BASE + DEBUG_ADDRESS + usb_readblock, usb_buffer, + osPiRawStartDma(OS_READ, + ED_BASE + DEBUG_ADDRESS + usb_readblock, usb_buffer, BUFFER_SIZE); #else - osPiStartDma(&dmaIOMessageBuf, OS_MESG_PRI_NORMAL, OS_READ, - ED_BASE + DEBUG_ADDRESS + usb_readblock, usb_buffer, + osPiStartDma(&dmaIOMessageBuf, OS_MESG_PRI_NORMAL, OS_READ, + ED_BASE + DEBUG_ADDRESS + usb_readblock, usb_buffer, BUFFER_SIZE, &dmaMessageQ); (void)osRecvMesg(&dmaMessageQ, NULL, OS_MESG_BLOCK); #endif @@ -1348,7 +1348,7 @@ static u32 usb_sc64_read_usb_fifo(void) osPiReadIo(SC64_MEM_USB_FIFO_BASE, &data); #endif #endif - + return data; } @@ -1577,7 +1577,7 @@ static u32 usb_sc64_poll(void) u32 buff __attribute__((aligned(8))); u32 sdram_address; int left; - + // Load how many 32 bit words are in FIFO u32 fifo_items = SC64_USB_FIFO_ITEMS(usb_sc64_read_usb_scr()); diff --git a/src/usb/usb.h b/src/usb/usb.h index 813b1b28b..bcbe812bb 100644 --- a/src/usb/usb.h +++ b/src/usb/usb.h @@ -1,43 +1,43 @@ #ifndef UNFL_USB_H #define UNFL_USB_H - + /********************************* DataType macros *********************************/ - + // UNCOMMENT THE #DEFINE IF USING LIBDRAGON - //#define LIBDRAGON + //#define LIBDRAGON // Settings #define USE_OSRAW 0 // Use if you're doing USB operations without the PI Manager (libultra only) #define DEBUG_ADDRESS_SIZE 8*1024*1024 // Max size of USB I/O. The bigger this value, the more ROM you lose! - + // Cart definitions #define CART_NONE 0 #define CART_64DRIVE 1 #define CART_EVERDRIVE 2 #define CART_SC64 3 - + // Data types defintions #define DATATYPE_TEXT 0x01 #define DATATYPE_RAWBINARY 0x02 #define DATATYPE_HEADER 0x03 #define DATATYPE_SCREENSHOT 0x04 - + extern int usb_datatype; extern int usb_datasize; extern int usb_dataleft; extern int usb_readblock; - + /********************************* Convenience macros *********************************/ - + // Use these to conveniently read the header from usb_poll() #define USBHEADER_GETTYPE(header) ((header & 0xFF000000) >> 24) #define USBHEADER_GETSIZE(header) ((header & 0x00FFFFFF)) - + /********************************* USB Functions @@ -48,19 +48,19 @@ Initializes the USB buffers and pointers @return 1 if the USB initialization was successful, 0 if not ==============================*/ - + extern char usb_initialize(); - - + + /*============================== usb_getcart Returns which flashcart is currently connected @return The CART macro that corresponds to the identified flashcart ==============================*/ - + extern char usb_getcart(); - - + + /*============================== usb_write Writes data to the USB. @@ -69,53 +69,53 @@ @param A buffer with the data to send @param The size of the data being sent ==============================*/ - + extern void usb_write(int datatype, const void* data, int size); - - + + /*============================== usb_poll Returns the header of data being received via USB The first byte contains the data type, the next 3 the number of bytes left to read @return The data header, or 0 ==============================*/ - + extern unsigned long usb_poll(); - - + + /*============================== usb_read Reads bytes from USB into the provided buffer @param The buffer to put the read data in @param The number of bytes to read ==============================*/ - + extern void usb_read(void* buffer, int size); - - + + /*============================== usb_skip Skips a USB read by the specified amount of bytes @param The number of bytes to skip ==============================*/ - + extern void usb_skip(int nbytes); - - + + /*============================== usb_rewind Rewinds a USB read by the specified amount of bytes @param The number of bytes to rewind ==============================*/ - + extern void usb_rewind(int nbytes); - - + + /*============================== usb_purge Purges the incoming USB data ==============================*/ - + extern void usb_purge(); #endif \ No newline at end of file diff --git a/tools/clang-tidy.sh b/tools/clang-tidy.sh index 224814333..088b19be8 100755 --- a/tools/clang-tidy.sh +++ b/tools/clang-tidy.sh @@ -1,11 +1,11 @@ #!/usr/bin/env bash # Use clang-tidy to brace if statements and loops. This should be a feature of clang-format. -# The brace check is the only check being applied right now, -# but other checks (like naming scheme) may be added at a later time. +# The brace check is the only check being applied right now, +# but other checks (like naming scheme) may be added at a later time. # '--fix-errors` due to generated text_strings.h as well as the enhancement inc.c files -TIDY_OPTS="-p . --fix --fix-errors" +TIDY_OPTS="-p . --fix --fix-errors" COMPILER_OPTS="-nostdinc -fno-builtin -std=gnu90 -Iinclude -Isrc -D_LANGUAGE_C" VERSIONS="-DVERSION_US -DVERSION_JP -DVERSION_EU" @@ -15,7 +15,7 @@ cd "$( dirname $0 )" >/dev/null 2>&1; cd ../ if (( $# > 0 )); then printf "Tidy file(s) $*" echo - for VER in ${VERSIONS}; do + for VER in ${VERSIONS}; do echo "with compiler version flag ${VER}" clang-tidy ${TIDY_OPTS} "$@" -- ${COMPILER_OPTS} ${VER} done @@ -25,7 +25,7 @@ if (( $# > 0 )); then fi echo "Tidying all C files for all versions. This will take a bit" -for VER in ${VERSIONS}; do +for VER in ${VERSIONS}; do echo "Tidying for compiler version flag ${VER}" # Don't run clang-tidy on behaviors clang-tidy ${TIDY_OPTS} src/audio/*.c -- ${COMPILER_OPTS} ${VER} diff --git a/tools/create_patch.sh b/tools/create_patch.sh index ea75d9cca..689f11ddd 100755 --- a/tools/create_patch.sh +++ b/tools/create_patch.sh @@ -21,5 +21,5 @@ fi git add . # Generate the patch. git diff -p --staged > "$1" -# Undo the 'git add'. +# Undo the 'git add'. git reset diff --git a/tools/demo_data_converter.py b/tools/demo_data_converter.py index 86ea94c5e..e05b14bb3 100755 --- a/tools/demo_data_converter.py +++ b/tools/demo_data_converter.py @@ -23,7 +23,7 @@ def main(): prog_args.append(a) defines = [d.split("=")[0] for d in defines] - + if len(prog_args) < 1 or need_help: print("Usage: {} [-D ] > ".format(sys.argv[0])) sys.exit(0 if need_help else 1) diff --git a/tools/extract_data_for_mio.c b/tools/extract_data_for_mio.c index 3d13185a1..68b2697eb 100644 --- a/tools/extract_data_for_mio.c +++ b/tools/extract_data_for_mio.c @@ -145,7 +145,7 @@ uint16_t u16be(uint16_t val) { return __builtin_bswap16(val); #else return val; -#endif +#endif } static bool elf_get_section_range(uint8_t *file, const char *searched_name, uint32_t *address, uint32_t *offset, uint32_t *size, uint32_t *section_index) { diff --git a/tools/n64graphics_ci_dir/README.md b/tools/n64graphics_ci_dir/README.md index 14bda5da6..9f23e2a2c 100644 --- a/tools/n64graphics_ci_dir/README.md +++ b/tools/n64graphics_ci_dir/README.md @@ -6,7 +6,7 @@ CI4 textures will always assume a 16 color palette is used, and CI8 textures a 2 ## Libraries Used (All MIT licensed) -* **Exoquant** by Dennis Ranke, for color reduction. https://github.com/exoticorn/exoquant +* **Exoquant** by Dennis Ranke, for color reduction. https://github.com/exoticorn/exoquant * **stb** by Sean Barrett, for loading PNG images. https://github.com/nothings/stb ## PNG -> CI4 + Palette diff --git a/tools/patch_elf_32bit.c b/tools/patch_elf_32bit.c index 8e5295207..edf0c36bf 100644 --- a/tools/patch_elf_32bit.c +++ b/tools/patch_elf_32bit.c @@ -80,7 +80,7 @@ struct ar_header { //These constants found by inspecting output of objdump #define FLAGS_MIPS3 0x20 -#define FLAGS_O32ABI 0x100000 +#define FLAGS_O32ABI 0x100000 int fix_mips_elf(FILE *f, size_t filesize) { diff --git a/tools/skyconv.c b/tools/skyconv.c index 5db4419e2..f04ffcfff 100644 --- a/tools/skyconv.c +++ b/tools/skyconv.c @@ -535,7 +535,7 @@ static int parse_arguments(int argc, char *argv[]) { output = argv[i]; } - + if (strcmp(argv[i], "--type") == 0) { if (++i >= argc || type != InvalidType) { goto invalid; @@ -576,7 +576,7 @@ bool imageMatchesDimensions(int width, int height) { break; } } - + if (!matchesDimensions) { if (type != CakeEU) { fprintf(stderr, "err: That type of image must be either %d x %d or %d x %d. Yours is %d x %d.\n", @@ -645,7 +645,7 @@ int main(int argc, char *argv[]) { } allocate_tiles(); - + init_tiles(image, expanded); switch (type) { case Skybox: diff --git a/tools/slienc.c b/tools/slienc.c index ec44e5197..d12b057ff 100644 --- a/tools/slienc.c +++ b/tools/slienc.c @@ -38,24 +38,24 @@ int main(int argc, const char **argv, const char **envp) fprintf(stderr, "slienc [infile] [outfile]\n"); return 1; } - + strcpy(src, argv[1]); strcpy(dest, argv[2]); - + if ((fp = fopen(src, "rb")) == NULL) { fprintf(stderr, "FILE OPEN ERROR![%s]\n", src); return 1; } - + fseek(fp, 0, SEEK_END); insize = ftell(fp); fseek(fp, 0, SEEK_SET); - + bz = malloc(insize); size_t fread_result = fread(bz, 1, insize, fp); fclose(fp); - + for (int i = 0; src[i]; i++) { if (src[i] == '.') @@ -64,31 +64,31 @@ int main(int argc, const char **argv, const char **envp) break; } } - + if ((fp = fopen(dest, "wb")) == NULL) { fprintf(stderr, "FILE CREATE ERROR![%s]\n", dest); exit(1); } - + encode(); - + fprintf(fp, "Yay0"); - + writeint4(insize); - + writeint4(4 * cp + 16); writeint4(2 * pp + 4 * cp + 16); - + for (int i = 0; i < cp; i++) writeint4(cmd[i]); - + for (int i = 0; i < pp; i++) writeshort(pol[i]); - + fwrite(def, 1u, dp, fp); fclose(fp); - + return 0; } @@ -299,7 +299,7 @@ void initskip(unsigned char *pattern, int len) { for (int i = 0; i < 256; i++) skip[i] = len; - + for (int i = 0; i < len; i++) skip[pattern[i]] = len - i - 1; } diff --git a/tools/stb/stb_image.h b/tools/stb/stb_image.h index d9c21bc81..acec20a1b 100644 --- a/tools/stb/stb_image.h +++ b/tools/stb/stb_image.h @@ -1077,8 +1077,8 @@ static void stbi__vertical_flip_slices(void *image, int w, int h, int z, int byt stbi_uc *bytes = (stbi_uc *)image; for (slice = 0; slice < z; ++slice) { - stbi__vertical_flip(bytes, w, h, bytes_per_pixel); - bytes += slice_size; + stbi__vertical_flip(bytes, w, h, bytes_per_pixel); + bytes += slice_size; } } @@ -1237,15 +1237,15 @@ STBIDEF stbi_uc *stbi_load_from_callbacks(stbi_io_callbacks const *clbk, void *u STBIDEF stbi_uc *stbi_load_gif_from_memory(stbi_uc const *buffer, int len, int **delays, int *x, int *y, int *z, int *comp, int req_comp) { unsigned char *result; - stbi__context s; - stbi__start_mem(&s,buffer,len); - + stbi__context s; + stbi__start_mem(&s,buffer,len); + result = (unsigned char*) stbi__load_gif_main(&s, delays, x, y, z, comp, req_comp); if (stbi__vertically_flip_on_load) { - stbi__vertical_flip_slices( result, *x, *y, *z, *comp ); + stbi__vertical_flip_slices( result, *x, *y, *z, *comp ); } - return result; + return result; } #endif @@ -6127,7 +6127,7 @@ typedef struct int w,h; stbi_uc *out; // output buffer (always 4 components) stbi_uc *background; // The current "background" as far as a gif is concerned - stbi_uc *history; + stbi_uc *history; int flags, bgindex, ratio, transparent, eflags; stbi_uc pal[256][4]; stbi_uc lpal[256][4]; @@ -6215,7 +6215,7 @@ static int stbi__gif_info_raw(stbi__context *s, int *x, int *y, int *comp) static void stbi__out_gif_code(stbi__gif *g, stbi__uint16 code) { stbi_uc *p, *c; - int idx; + int idx; // recurse to decode the prefixes, since the linked-list is backwards, // and working backwards through an interleaved image would be nasty @@ -6224,12 +6224,12 @@ static void stbi__out_gif_code(stbi__gif *g, stbi__uint16 code) if (g->cur_y >= g->max_y) return; - idx = g->cur_x + g->cur_y; + idx = g->cur_x + g->cur_y; p = &g->out[idx]; - g->history[idx / 4] = 1; + g->history[idx / 4] = 1; c = &g->color_table[g->codes[code].suffix * 4]; - if (c[3] > 128) { // don't render transparent pixels; + if (c[3] > 128) { // don't render transparent pixels; p[0] = c[2]; p[1] = c[1]; p[2] = c[0]; @@ -6338,31 +6338,31 @@ static stbi_uc *stbi__process_gif_raster(stbi__context *s, stbi__gif *g) // two back is the image from two frames ago, used for a very specific disposal format static stbi_uc *stbi__gif_load_next(stbi__context *s, stbi__gif *g, int *comp, int req_comp, stbi_uc *two_back) { - int dispose; - int first_frame; - int pi; - int pcount; + int dispose; + int first_frame; + int pi; + int pcount; // on first frame, any non-written pixels get the background colour (non-transparent) - first_frame = 0; + first_frame = 0; if (g->out == 0) { if (!stbi__gif_header(s, g, comp,0)) return 0; // stbi__g_failure_reason set by stbi__gif_header g->out = (stbi_uc *) stbi__malloc(4 * g->w * g->h); - g->background = (stbi_uc *) stbi__malloc(4 * g->w * g->h); - g->history = (stbi_uc *) stbi__malloc(g->w * g->h); + g->background = (stbi_uc *) stbi__malloc(4 * g->w * g->h); + g->history = (stbi_uc *) stbi__malloc(g->w * g->h); if (g->out == 0) return stbi__errpuc("outofmem", "Out of memory"); - // image is treated as "tranparent" at the start - ie, nothing overwrites the current background; + // image is treated as "tranparent" at the start - ie, nothing overwrites the current background; // background colour is only used for pixels that are not rendered first frame, after that "background" - // color refers to teh color that was there the previous frame. - memset( g->out, 0x00, 4 * g->w * g->h ); + // color refers to teh color that was there the previous frame. + memset( g->out, 0x00, 4 * g->w * g->h ); memset( g->background, 0x00, 4 * g->w * g->h ); // state of the background (starts transparent) memset( g->history, 0x00, g->w * g->h ); // pixels that were affected previous frame - first_frame = 1; + first_frame = 1; } else { // second frame - how do we dispoase of the previous one? - dispose = (g->eflags & 0x1C) >> 2; - pcount = g->w * g->h; + dispose = (g->eflags & 0x1C) >> 2; + pcount = g->w * g->h; if ((dispose == 3) && (two_back == 0)) { dispose = 2; // if I don't have an image to revert back to, default to the old background @@ -6371,32 +6371,32 @@ static stbi_uc *stbi__gif_load_next(stbi__context *s, stbi__gif *g, int *comp, i if (dispose == 3) { // use previous graphic for (pi = 0; pi < pcount; ++pi) { if (g->history[pi]) { - memcpy( &g->out[pi * 4], &two_back[pi * 4], 4 ); + memcpy( &g->out[pi * 4], &two_back[pi * 4], 4 ); } } - } else if (dispose == 2) { - // restore what was changed last frame to background before that frame; + } else if (dispose == 2) { + // restore what was changed last frame to background before that frame; for (pi = 0; pi < pcount; ++pi) { if (g->history[pi]) { - memcpy( &g->out[pi * 4], &g->background[pi * 4], 4 ); + memcpy( &g->out[pi * 4], &g->background[pi * 4], 4 ); } } } else { - // This is a non-disposal case eithe way, so just + // This is a non-disposal case eithe way, so just // leave the pixels as is, and they will become the new background // 1: do not dispose // 0: not specified. } - // background is what out is after the undoing of the previou frame; - memcpy( g->background, g->out, 4 * g->w * g->h ); + // background is what out is after the undoing of the previou frame; + memcpy( g->background, g->out, 4 * g->w * g->h ); } - // clear my history; + // clear my history; memset( g->history, 0x00, g->w * g->h ); // pixels that were affected previous frame for (;;) { - int tag = stbi__get8(s); + int tag = stbi__get8(s); switch (tag) { case 0x2C: /* Image Descriptor */ { @@ -6434,19 +6434,19 @@ static stbi_uc *stbi__gif_load_next(stbi__context *s, stbi__gif *g, int *comp, i } else if (g->flags & 0x80) { g->color_table = (stbi_uc *) g->pal; } else - return stbi__errpuc("missing color table", "Corrupt GIF"); - + return stbi__errpuc("missing color table", "Corrupt GIF"); + o = stbi__process_gif_raster(s, g); if (o == NULL) return NULL; - // if this was the first frame, - pcount = g->w * g->h; + // if this was the first frame, + pcount = g->w * g->h; if (first_frame && (g->bgindex > 0)) { // if first frame, any pixel not drawn to gets the background color for (pi = 0; pi < pcount; ++pi) { if (g->history[pi] == 0) { - g->pal[g->bgindex][3] = 255; // just in case it was made transparent, undo that; It will be reset next frame if need be; - memcpy( &g->out[pi * 4], &g->pal[g->bgindex], 4 ); + g->pal[g->bgindex][3] = 255; // just in case it was made transparent, undo that; It will be reset next frame if need be; + memcpy( &g->out[pi * 4], &g->pal[g->bgindex], 4 ); } } } @@ -6457,7 +6457,7 @@ static stbi_uc *stbi__gif_load_next(stbi__context *s, stbi__gif *g, int *comp, i case 0x21: // Comment Extension. { int len; - int ext = stbi__get8(s); + int ext = stbi__get8(s); if (ext == 0xF9) { // Graphic Control Extension. len = stbi__get8(s); if (len == 4) { @@ -6466,23 +6466,23 @@ static stbi_uc *stbi__gif_load_next(stbi__context *s, stbi__gif *g, int *comp, i // unset old transparent if (g->transparent >= 0) { - g->pal[g->transparent][3] = 255; - } + g->pal[g->transparent][3] = 255; + } if (g->eflags & 0x01) { g->transparent = stbi__get8(s); if (g->transparent >= 0) { - g->pal[g->transparent][3] = 0; + g->pal[g->transparent][3] = 0; } } else { // don't need transparent - stbi__skip(s, 1); - g->transparent = -1; + stbi__skip(s, 1); + g->transparent = -1; } } else { stbi__skip(s, len); break; } - } + } while ((len = stbi__get8(s)) != 0) { stbi__skip(s, len); } @@ -6501,15 +6501,15 @@ static stbi_uc *stbi__gif_load_next(stbi__context *s, stbi__gif *g, int *comp, i static void *stbi__load_gif_main(stbi__context *s, int **delays, int *x, int *y, int *z, int *comp, int req_comp) { if (stbi__gif_test(s)) { - int layers = 0; + int layers = 0; stbi_uc *u = 0; stbi_uc *out = 0; - stbi_uc *two_back = 0; + stbi_uc *two_back = 0; stbi__gif g; - int stride; + int stride; memset(&g, 0, sizeof(g)); if (delays) { - *delays = 0; + *delays = 0; } do { @@ -6519,44 +6519,44 @@ static void *stbi__load_gif_main(stbi__context *s, int **delays, int *x, int *y, if (u) { *x = g.w; *y = g.h; - ++layers; - stride = g.w * g.h * 4; - + ++layers; + stride = g.w * g.h * 4; + if (out) { - out = (stbi_uc*) STBI_REALLOC( out, layers * stride ); + out = (stbi_uc*) STBI_REALLOC( out, layers * stride ); if (delays) { - *delays = (int*) STBI_REALLOC( *delays, sizeof(int) * layers ); + *delays = (int*) STBI_REALLOC( *delays, sizeof(int) * layers ); } } else { - out = (stbi_uc*)stbi__malloc( layers * stride ); + out = (stbi_uc*)stbi__malloc( layers * stride ); if (delays) { - *delays = (int*) stbi__malloc( layers * sizeof(int) ); + *delays = (int*) stbi__malloc( layers * sizeof(int) ); } } - memcpy( out + ((layers - 1) * stride), u, stride ); + memcpy( out + ((layers - 1) * stride), u, stride ); if (layers >= 2) { - two_back = out - 2 * stride; + two_back = out - 2 * stride; } if (delays) { - (*delays)[layers - 1U] = g.delay; + (*delays)[layers - 1U] = g.delay; } } - } while (u != 0); + } while (u != 0); - // free temp buffer; - STBI_FREE(g.out); - STBI_FREE(g.history); - STBI_FREE(g.background); + // free temp buffer; + STBI_FREE(g.out); + STBI_FREE(g.history); + STBI_FREE(g.background); - // do the final conversion after loading everything; + // do the final conversion after loading everything; if (req_comp && req_comp != 4) out = stbi__convert_format(out, 4, req_comp, layers * g.w, g.h); - *z = layers; + *z = layers; return out; } else { - return stbi__errpuc("not GIF", "Image was not as a gif type."); + return stbi__errpuc("not GIF", "Image was not as a gif type."); } } @@ -6573,14 +6573,14 @@ static void *stbi__gif_load(stbi__context *s, int *x, int *y, int *comp, int req *y = g.h; // moved conversion to after successful load so that the same - // can be done for multiple frames. + // can be done for multiple frames. if (req_comp && req_comp != 4) u = stbi__convert_format(u, 4, req_comp, g.w, g.h); } - // free buffers needed for multiple frame loading; + // free buffers needed for multiple frame loading; STBI_FREE(g.history); - STBI_FREE(g.background); + STBI_FREE(g.background); return u; } diff --git a/tools/stb/stb_image_write.h b/tools/stb/stb_image_write.h index c05e95812..6354335bd 100644 --- a/tools/stb/stb_image_write.h +++ b/tools/stb/stb_image_write.h @@ -10,7 +10,7 @@ Will probably not work correctly with strict-aliasing optimizations. - If using a modern Microsoft Compiler, non-safe versions of CRT calls may cause + If using a modern Microsoft Compiler, non-safe versions of CRT calls may cause compilation warnings or even errors. To avoid this, also before #including, #define STBI_MSC_SECURE_CRT @@ -103,7 +103,7 @@ USAGE: TGA supports RLE or non-RLE compressed data. To use non-RLE-compressed data, set the global variable 'stbi_write_tga_with_rle' to 0. - + JPEG does ignore alpha channels in input data; quality is between 1 and 100. Higher quality looks better but results in a bigger image. JPEG baseline (no JPEG progressive). @@ -111,7 +111,7 @@ USAGE: CREDITS: - Sean Barrett - PNG/BMP/TGA + Sean Barrett - PNG/BMP/TGA Baldur Karlsson - HDR Jean-Sebastien Guay - TGA monochrome Tim Kelsey - misc enhancements @@ -1356,7 +1356,7 @@ static int stbi_write_jpg_core(stbi__write_context *s, int width, int height, in 37,56,68,109,103,77,24,35,55,64,81,104,113,92,49,64,78,87,103,121,120,101,72,92,95,98,112,100,103,99}; static const int UVQT[] = {17,18,24,47,99,99,99,99,18,21,26,66,99,99,99,99,24,26,56,99,99,99,99,99,47,66,99,99,99,99,99,99, 99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99}; - static const float aasf[] = { 1.0f * 2.828427125f, 1.387039845f * 2.828427125f, 1.306562965f * 2.828427125f, 1.175875602f * 2.828427125f, + static const float aasf[] = { 1.0f * 2.828427125f, 1.387039845f * 2.828427125f, 1.306562965f * 2.828427125f, 1.175875602f * 2.828427125f, 1.0f * 2.828427125f, 0.785694958f * 2.828427125f, 0.541196100f * 2.828427125f, 0.275899379f * 2.828427125f }; int row, col, i, k; @@ -1531,38 +1531,38 @@ This software is available under 2 licenses -- choose whichever you prefer. ------------------------------------------------------------------------------ ALTERNATIVE A - MIT License Copyright (c) 2017 Sean Barrett -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in all +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ------------------------------------------------------------------------------ ALTERNATIVE B - Public Domain (www.unlicense.org) This is free and unencumbered software released into the public domain. -Anyone is free to copy, modify, publish, use, compile, sell, or distribute this -software, either in source code form or as a compiled binary, for any purpose, +Anyone is free to copy, modify, publish, use, compile, sell, or distribute this +software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means. -In jurisdictions that recognize copyright laws, the author or authors of this -software dedicate any and all copyright interest in the software to the public -domain. We make this dedication for the benefit of the public at large and to -the detriment of our heirs and successors. We intend this dedication to be an -overt act of relinquishment in perpetuity of all present and future rights to +In jurisdictions that recognize copyright laws, the author or authors of this +software dedicate any and all copyright interest in the software to the public +domain. We make this dedication for the benefit of the public at large and to +the detriment of our heirs and successors. We intend this dedication to be an +overt act of relinquishment in perpetuity of all present and future rights to this software under copyright law. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN -ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ------------------------------------------------------------------------------ */ diff --git a/tools/util/audiofile_strip.patch b/tools/util/audiofile_strip.patch index e6e224700..1ad5c3af0 100644 --- a/tools/util/audiofile_strip.patch +++ b/tools/util/audiofile_strip.patch @@ -36,10 +36,10 @@ index 64e798b..374838b 100644 @@ -47,7 +47,7 @@ AUpvlist AUpvnew (int maxitems) if (aupvlist == NULL) return AU_NULL_PVLIST; - + - aupvlist->items = calloc(maxitems, sizeof (struct _AUpvitem)); + aupvlist->items = (struct _AUpvitem *)calloc(maxitems, sizeof (struct _AUpvitem)); - + assert(aupvlist->items); if (aupvlist->items == NULL) diff --git a/libaudiofile/g711.c b/libaudiofile/g711.c @@ -72,7 +72,7 @@ index ffd0a63..51d2dc3 100644 +++ b/libaudiofile/units.cpp @@ -32,24 +32,12 @@ #include "units.h" - + #include "AIFF.h" -#include "AVR.h" -#include "CAF.h" @@ -85,16 +85,16 @@ index ffd0a63..51d2dc3 100644 -#include "SampleVision.h" -#include "VOC.h" #include "WAVE.h" - + #include "compression.h" - + -#include "modules/ALAC.h" -#include "modules/FLAC.h" #include "modules/G711.h" -#include "modules/IMA.h" #include "modules/MSADPCM.h" #include "modules/PCM.h" - + @@ -99,20 +87,6 @@ const Unit _af_units[_AF_NUM_UNITS] = _AF_AIFF_NUM_INSTPARAMS, _af_aiff_inst_params @@ -259,7 +259,7 @@ index ffd0a63..51d2dc3 100644 - NULL // instrument parameters - } }; - + const CompressionUnit _af_compression[_AF_NUM_COMPRESSION] = @@ -309,19 +145,6 @@ const CompressionUnit _af_compression[_AF_NUM_COMPRESSION] = _af_g711_format_ok, From 6fcbb426320862be3c3e25bb6cdb6567999506c0 Mon Sep 17 00:00:00 2001 From: Arceveti <73617174+Arceveti@users.noreply.github.com> Date: Thu, 23 Sep 2021 17:37:05 -0700 Subject: [PATCH 24/26] Name warp-related defines and add option to disable intro demo --- enhancements/mem_error_screen.patch | 8 +-- include/config.h | 2 + include/level_table.h | 7 ++- levels/intro/geo.c | 4 +- levels/intro/header.h | 24 ++++---- levels/intro/leveldata.c | 8 +-- levels/intro/script.c | 48 ++++++++-------- levels/menu/header.h | 4 +- levels/menu/script.c | 6 +- levels/scripts.c | 29 +++++----- src/engine/level_script.c | 24 ++++---- src/game/game_init.c | 86 +++++++++++++++-------------- src/game/interaction.c | 8 +-- src/game/level_update.c | 70 +++++++++++------------ src/game/level_update.h | 16 +++++- src/game/mario_actions_cutscene.c | 21 +++---- src/game/mario_actions_stationary.c | 2 +- src/game/puppycam2.c | 2 +- src/game/puppylights.c | 4 +- src/game/segment7.h | 8 +-- src/goddard/renderer.c | 2 - src/menu/intro_geo.c | 8 +-- src/menu/title_screen.c | 55 ++++++++++-------- 23 files changed, 233 insertions(+), 213 deletions(-) diff --git a/enhancements/mem_error_screen.patch b/enhancements/mem_error_screen.patch index 7530c2fc5..c6c76eef1 100644 --- a/enhancements/mem_error_screen.patch +++ b/enhancements/mem_error_screen.patch @@ -84,15 +84,15 @@ index 30a87806..6bf7b79a 100644 +}; + // 0x0E0002D0 - const GeoLayout intro_geo_0002D0[] = { + const GeoLayout intro_geo_splash_screen[] = { GEO_NODE_SCREEN_AREA(0, SCREEN_WIDTH/2, SCREEN_HEIGHT/2, SCREEN_WIDTH/2, SCREEN_HEIGHT/2), diff --git a/levels/intro/header.h b/levels/intro/header.h index 99277e86..04797cd7 100644 --- a/levels/intro/header.h +++ b/levels/intro/header.h -@@ -26,4 +26,8 @@ extern const LevelScript script_intro_L3[]; - extern const LevelScript script_intro_L4[]; - extern const LevelScript script_intro_L5[]; +@@ -26,4 +26,8 @@ extern const LevelScript script_intro_main_level_entry_stop_music[]; + extern const LevelScript script_intro_main_level_entry[]; + extern const LevelScript script_intro_splash_screen[]; +extern const GeoLayout intro_geo_error_screen[]; +extern const LevelScript level_intro_entry_error_screen[]; diff --git a/include/config.h b/include/config.h index d7e63a0ae..bb47c503d 100644 --- a/include/config.h +++ b/include/config.h @@ -98,6 +98,8 @@ //#define SKIP_TITLE_SCREEN // Uncomment this if you want to keep the mario head and not skip it //#define KEEP_MARIO_HEAD +// Disables the demo that plays when idle on the start screen (Arceveti) +#define DISABLE_DEMO // Enables "parallel lakitu camera" or "aglab cam" which lets you move the camera smoothly with the dpad #define PARALLEL_LAKITU_CAM // Allows Mario to ledgegrab sloped floors diff --git a/include/level_table.h b/include/level_table.h index e3062c49d..3ad47eb78 100644 --- a/include/level_table.h +++ b/include/level_table.h @@ -9,11 +9,14 @@ enum LevelNum { + LEVEL_RESTART_GAME = -1, LEVEL_NONE, #include "levels/level_defines.h" LEVEL_COUNT, - LEVEL_MAX = LEVEL_COUNT - 1, - LEVEL_MIN = LEVEL_NONE + 1 + LEVEL_MAX = (LEVEL_COUNT - 1), + LEVEL_MIN = (LEVEL_NONE + 1), + LEVEL_FILE_SELECT = 100, //! This probably breaks if you have 99+ levels + LEVEL_LEVEL_SELECT = (LEVEL_FILE_SELECT + 1) }; #undef STUB_LEVEL diff --git a/levels/intro/geo.c b/levels/intro/geo.c index 91783833d..c64670bb5 100644 --- a/levels/intro/geo.c +++ b/levels/intro/geo.c @@ -18,7 +18,7 @@ #include "config.h" // 0x0E0002D0 -const GeoLayout intro_geo_0002D0[] = { +const GeoLayout intro_geo_splash_screen[] = { GEO_NODE_SCREEN_AREA(0, SCREEN_WIDTH/2, SCREEN_HEIGHT/2, SCREEN_WIDTH/2, SCREEN_HEIGHT/2), GEO_OPEN_NODE(), GEO_ZBUFFER(0), @@ -113,7 +113,7 @@ const GeoLayout intro_geo_mario_head_dizzy[] = { }; // 0x0E000414 -const GeoLayout intro_geo_000414[] = { +const GeoLayout intro_geo_debug_level_select[] = { GEO_NODE_SCREEN_AREA(0, SCREEN_WIDTH/2, SCREEN_HEIGHT/2, SCREEN_WIDTH/2, SCREEN_HEIGHT/2), GEO_OPEN_NODE(), GEO_ZBUFFER(0), diff --git a/levels/intro/header.h b/levels/intro/header.h index 99277e863..5197daf0e 100644 --- a/levels/intro/header.h +++ b/levels/intro/header.h @@ -4,26 +4,26 @@ #include "types.h" // geo -extern const GeoLayout intro_geo_0002D0[]; +extern const GeoLayout intro_geo_splash_screen[]; extern const GeoLayout intro_geo_mario_head_regular[]; extern const GeoLayout intro_geo_mario_head_dizzy[]; -extern const GeoLayout intro_geo_000414[]; +extern const GeoLayout intro_geo_debug_level_select[]; // leveldata -extern const Gfx intro_seg7_dl_0700B3A0[]; -extern const Gfx intro_seg7_dl_0700C6A0[]; -extern const f32 intro_seg7_table_0700C790[]; -extern const f32 intro_seg7_table_0700C880[]; +extern const Gfx intro_seg7_dl_main_logo[]; +extern const Gfx intro_seg7_dl_copyright_trademark[]; +extern const f32 intro_seg7_table_scale_1[]; +extern const f32 intro_seg7_table_scale_2[]; // script extern const LevelScript level_intro_splash_screen[]; extern const LevelScript level_intro_mario_head_regular[]; extern const LevelScript level_intro_mario_head_dizzy[]; -extern const LevelScript level_intro_entry_4[]; -extern const LevelScript script_intro_L1[]; -extern const LevelScript script_intro_L2[]; -extern const LevelScript script_intro_L3[]; -extern const LevelScript script_intro_L4[]; -extern const LevelScript script_intro_L5[]; +extern const LevelScript level_intro_entry_level_select[]; +extern const LevelScript script_intro_file_select[]; +extern const LevelScript script_intro_level_select[]; +extern const LevelScript script_intro_main_level_entry_stop_music[]; +extern const LevelScript script_intro_main_level_entry[]; +extern const LevelScript script_intro_splash_screen[]; #endif diff --git a/levels/intro/leveldata.c b/levels/intro/leveldata.c index 7a4474d27..5f61dfe77 100644 --- a/levels/intro/leveldata.c +++ b/levels/intro/leveldata.c @@ -3298,7 +3298,7 @@ static const Gfx intro_seg7_dl_0700ADC0[] = { }; // 0x0700B3A0 - 0x0700B420 -const Gfx intro_seg7_dl_0700B3A0[] = { +const Gfx intro_seg7_dl_main_logo[] = { gsDPPipeSync(), gsDPSetCombineMode(G_CC_MODULATERGB, G_CC_MODULATERGB), gsSPClearGeometryMode(G_LIGHTING), @@ -3363,7 +3363,7 @@ ALIGNED8 static const Texture intro_seg7_texture_0700C4A0[] = { #endif // 0x0700C6A0 - 0x0700C790 -const Gfx intro_seg7_dl_0700C6A0[] = { +const Gfx intro_seg7_dl_copyright_trademark[] = { gsDPPipeSync(), gsDPSetCombineMode(G_CC_DECALFADE, G_CC_DECALFADE), gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON), @@ -3386,7 +3386,7 @@ const Gfx intro_seg7_dl_0700C6A0[] = { }; // 0x0700C790 -const f32 intro_seg7_table_0700C790[] = { +const f32 intro_seg7_table_scale_1[] = { 0.016000f, 0.052000f, 0.002500f, 0.148300f, 0.189200f, 0.035200f, 0.471600f, 0.525300f, 0.116600f, 0.875800f, 0.947000f, 0.222100f, @@ -3405,7 +3405,7 @@ const f32 intro_seg7_table_0700C790[] = { }; // 0x0700C880 -const f32 intro_seg7_table_0700C880[] = { +const f32 intro_seg7_table_scale_2[] = { 1.000000f, 1.000000f, 1.000000f, 0.987300f, 0.987300f, 0.987300f, 0.951400f, 0.951400f, 0.951400f, 0.896000f, 0.896000f, 0.896000f, diff --git a/levels/intro/script.c b/levels/intro/script.c index ebf9f5570..bef410180 100644 --- a/levels/intro/script.c +++ b/levels/intro/script.c @@ -33,7 +33,7 @@ const LevelScript level_intro_splash_screen[] = { // Load "Super Mario 64" logo ALLOC_LEVEL_POOL(), - AREA(/*index*/ 1, intro_geo_0002D0), + AREA(/*index*/ 1, intro_geo_splash_screen), END_AREA(), FREE_LEVEL_POOL(), @@ -51,8 +51,8 @@ const LevelScript level_intro_splash_screen[] = { }; const LevelScript level_intro_mario_head_regular[] = { - INIT_LEVEL(), #ifdef KEEP_MARIO_HEAD + INIT_LEVEL(), BLACKOUT(/*active*/ TRUE), FIXED_LOAD(/*loadAddr*/ _goddardSegmentStart, /*romStart*/ _goddardSegmentRomStart, /*romEnd*/ _goddardSegmentRomEnd), LOAD_MARIO_HEAD(/*loadHeadID*/ REGULAR_FACE), @@ -72,9 +72,9 @@ const LevelScript level_intro_mario_head_regular[] = { SLEEP(/*frames*/ 20), #endif CALL_LOOP(/*arg*/ LVL_INTRO_REGULAR, /*func*/ lvl_intro_update), - JUMP_IF(/*op*/ OP_EQ, /*arg*/ 100, script_intro_L1), - JUMP_IF(/*op*/ OP_EQ, /*arg*/ 101, script_intro_L2), - JUMP(script_intro_L4), + JUMP_IF(/*op*/ OP_EQ, /*arg*/ LEVEL_FILE_SELECT, script_intro_file_select), + JUMP_IF(/*op*/ OP_EQ, /*arg*/ LEVEL_LEVEL_SELECT, script_intro_level_select), + JUMP(script_intro_main_level_entry), }; const LevelScript level_intro_mario_head_dizzy[] = { @@ -99,12 +99,12 @@ const LevelScript level_intro_mario_head_dizzy[] = { TRANSITION(/*transType*/ WARP_TRANSITION_FADE_FROM_STAR, /*time*/ 20, /*color*/ 0x00, 0x00, 0x00), SLEEP(/*frames*/ 20), CALL_LOOP(/*arg*/ LVL_INTRO_GAME_OVER, /*func*/ lvl_intro_update), - JUMP_IF(/*op*/ OP_EQ, /*arg*/ 100, script_intro_L1), - JUMP_IF(/*op*/ OP_EQ, /*arg*/ 101, script_intro_L2), - JUMP(script_intro_L4), + JUMP_IF(/*op*/ OP_EQ, /*arg*/ LEVEL_FILE_SELECT, script_intro_file_select), + JUMP_IF(/*op*/ OP_EQ, /*arg*/ LEVEL_LEVEL_SELECT, script_intro_level_select), + JUMP(script_intro_main_level_entry), }; -const LevelScript level_intro_entry_4[] = { +const LevelScript level_intro_entry_level_select[] = { INIT_LEVEL(), LOAD_RAW(/*seg*/ 0x13, _behaviorSegmentRomStart, _behaviorSegmentRomEnd), LOAD_YAY0_TEXTURE(/*seg*/ 0x0A, _title_screen_bg_yay0SegmentRomStart, _title_screen_bg_yay0SegmentRomEnd), @@ -112,7 +112,7 @@ const LevelScript level_intro_entry_4[] = { FIXED_LOAD(/*loadAddr*/ _goddardSegmentStart, /*romStart*/ _goddardSegmentRomStart, /*romEnd*/ _goddardSegmentRomEnd), ALLOC_LEVEL_POOL(), - AREA(/*index*/ 1, intro_geo_000414), + AREA(/*index*/ 1, intro_geo_debug_level_select), END_AREA(), FREE_LEVEL_POOL(), @@ -121,32 +121,36 @@ const LevelScript level_intro_entry_4[] = { TRANSITION(/*transType*/ WARP_TRANSITION_FADE_FROM_COLOR, /*time*/ 16, /*color*/ 0xFF, 0xFF, 0xFF), SLEEP(/*frames*/ 16), CALL_LOOP(/*arg*/ LVL_INTRO_LEVEL_SELECT, /*func*/ lvl_intro_update), - JUMP_IF(/*op*/ OP_EQ, /*arg*/ -1, script_intro_L5), - JUMP(script_intro_L3), + JUMP_IF(/*op*/ OP_EQ, /*arg*/ LEVEL_RESTART_GAME, script_intro_splash_screen), + JUMP(script_intro_main_level_entry_stop_music), }; // These should be static, but C doesn't allow non-sized forward declarations of static arrays -const LevelScript script_intro_L1[] = { +const LevelScript script_intro_file_select[] = { STOP_MUSIC(/*fadeOutTime*/ 0x00BE), TRANSITION(/*transType*/ WARP_TRANSITION_FADE_INTO_COLOR, /*time*/ 16, /*color*/ 0xFF, 0xFF, 0xFF), SLEEP(/*frames*/ 16), CLEAR_LEVEL(), SLEEP(/*frames*/ 2), SET_REG(/*value*/ 16), - EXIT_AND_EXECUTE(/*seg*/ 0x14, _menuSegmentRomStart, _menuSegmentRomEnd, level_main_menu_entry_1), + EXIT_AND_EXECUTE(/*seg*/ 0x14, _menuSegmentRomStart, _menuSegmentRomEnd, level_main_menu_entry_file_select), }; -const LevelScript script_intro_L2[] = { +const LevelScript script_intro_level_select[] = { TRANSITION(/*transType*/ WARP_TRANSITION_FADE_INTO_COLOR, /*time*/ 16, /*color*/ 0xFF, 0xFF, 0xFF), SLEEP(/*frames*/ 16), CLEAR_LEVEL(), SLEEP(/*frames*/ 2), - EXIT_AND_EXECUTE_WITH_CODE(/*seg*/ 0x14, _introSegmentRomStart, _introSegmentRomEnd, level_intro_entry_4, _introSegmentBssStart, _introSegmentBssEnd), + EXIT_AND_EXECUTE_WITH_CODE(/*seg*/ 0x14, _introSegmentRomStart, _introSegmentRomEnd, level_intro_entry_level_select, _introSegmentBssStart, _introSegmentBssEnd), }; -const LevelScript script_intro_L3[] = { +const LevelScript script_intro_main_level_entry_stop_music[] = { STOP_MUSIC(/*fadeOutTime*/ 0x00BE), + JUMP(script_intro_main_level_entry), +}; + +const LevelScript script_intro_main_level_entry[] = { TRANSITION(/*transType*/ WARP_TRANSITION_FADE_INTO_COLOR, /*time*/ 16, /*color*/ 0xFF, 0xFF, 0xFF), SLEEP(/*frames*/ 16), CLEAR_LEVEL(), @@ -154,15 +158,7 @@ const LevelScript script_intro_L3[] = { EXIT_AND_EXECUTE(/*seg*/ 0x15, _scriptsSegmentRomStart, _scriptsSegmentRomEnd, level_main_scripts_entry), }; -const LevelScript script_intro_L4[] = { - TRANSITION(/*transType*/ WARP_TRANSITION_FADE_INTO_COLOR, /*time*/ 16, /*color*/ 0xFF, 0xFF, 0xFF), - SLEEP(/*frames*/ 16), - CLEAR_LEVEL(), - SLEEP(/*frames*/ 2), - EXIT_AND_EXECUTE(/*seg*/ 0x15, _scriptsSegmentRomStart, _scriptsSegmentRomEnd, level_main_scripts_entry), -}; - -const LevelScript script_intro_L5[] = { +const LevelScript script_intro_splash_screen[] = { STOP_MUSIC(/*fadeOutTime*/ 0x00BE), TRANSITION(/*transType*/ WARP_TRANSITION_FADE_INTO_COLOR, /*time*/ 16, /*color*/ 0x00, 0x00, 0x00), SLEEP(/*frames*/ 16), diff --git a/levels/menu/header.h b/levels/menu/header.h index 170c16c19..59bfb3413 100644 --- a/levels/menu/header.h +++ b/levels/menu/header.h @@ -46,7 +46,7 @@ extern const u8 eu_course_strings_de_table[]; #endif // script -extern const LevelScript level_main_menu_entry_1[]; -extern const LevelScript level_main_menu_entry_2[]; +extern const LevelScript level_main_menu_entry_file_select[]; +extern const LevelScript level_main_menu_entry_act_select[]; #endif diff --git a/levels/menu/script.c b/levels/menu/script.c index 5360dea57..bb1594eaa 100644 --- a/levels/menu/script.c +++ b/levels/menu/script.c @@ -18,7 +18,7 @@ #include "make_const_nonconst.h" #include "levels/menu/header.h" -const LevelScript level_main_menu_entry_1[] = { +const LevelScript level_main_menu_entry_file_select[] = { INIT_LEVEL(), FIXED_LOAD(/*loadAddr*/ _goddardSegmentStart, /*romStart*/ _goddardSegmentRomStart, /*romEnd*/ _goddardSegmentRomEnd), LOAD_YAY0(/*seg*/ 0x07, _menu_segment_7SegmentRomStart, _menu_segment_7SegmentRomEnd), @@ -57,9 +57,9 @@ const LevelScript level_main_menu_entry_1[] = { EXIT_AND_EXECUTE(/*seg*/ 0x15, _scriptsSegmentRomStart, _scriptsSegmentRomEnd, level_main_scripts_entry), }; -const LevelScript level_main_menu_entry_2[] = { +const LevelScript level_main_menu_entry_act_select[] = { /*0*/ CALL(/*arg*/ 0, /*func*/ lvl_set_current_level), - /*2*/ JUMP_IF(/*op*/ OP_EQ, /*arg*/ 0, level_main_menu_entry_2 + 42), + /*2*/ JUMP_IF(/*op*/ OP_EQ, /*arg*/ 0, level_main_menu_entry_act_select + 42), /*5*/ INIT_LEVEL(), /*6*/ FIXED_LOAD(/*loadAddr*/ _goddardSegmentStart, /*romStart*/ _goddardSegmentRomStart, /*romEnd*/ _goddardSegmentRomEnd), /*10*/ LOAD_YAY0(/*seg*/ 0x07, _menu_segment_7SegmentRomStart, _menu_segment_7SegmentRomEnd), diff --git a/levels/scripts.c b/levels/scripts.c index 5d4c873a5..d13d0d5b7 100644 --- a/levels/scripts.c +++ b/levels/scripts.c @@ -44,11 +44,11 @@ static const LevelScript script_exec_level_table[2 #undef DEFINE_LEVEL #undef STUB_LEVEL -static const LevelScript script_L1[6]; -static const LevelScript script_L2[6]; +static const LevelScript goto_intro_splash_screen[6]; +static const LevelScript goto_ending[6]; static const LevelScript goto_mario_head_regular[6]; static const LevelScript goto_mario_head_dizzy[6]; -static const LevelScript script_L5[6]; +static const LevelScript goto_debug_level_select[6]; #define STUB_LEVEL(_0, _1, _2, _3, _4, _5, _6, _7, _8) #define DEFINE_LEVEL(_0, _1, _2, folder, _4, _5, _6, _7, _8, _9, _10) static const LevelScript script_exec_ ## folder [6 + 1]; @@ -101,7 +101,6 @@ const LevelScript level_main_scripts_entry[] = { LOAD_MODEL_FROM_GEO(MODEL_MARIOS_METAL_CAP, marios_metal_cap_geo), LOAD_MODEL_FROM_GEO(MODEL_MARIOS_WING_CAP, marios_wing_cap_geo), LOAD_MODEL_FROM_GEO(MODEL_MARIOS_CAP, marios_cap_geo), - //LOAD_MODEL_FROM_GEO(MODEL_MARIOS_CAP, marios_cap_geo), // repeated LOAD_MODEL_FROM_GEO(MODEL_BOWSER_KEY_CUTSCENE, bowser_key_cutscene_geo), LOAD_MODEL_FROM_GEO(MODEL_BOWSER_KEY, bowser_key_geo), LOAD_MODEL_FROM_GEO(MODEL_RED_FLAME_SHADOW, red_flame_shadow_geo), @@ -115,22 +114,22 @@ const LevelScript level_main_scripts_entry[] = { FREE_LEVEL_POOL(), CALL(/*arg*/ 0, /*func*/ lvl_init_from_save_file), LOOP_BEGIN(), - EXECUTE(/*seg*/ 0x14, _menuSegmentRomStart, _menuSegmentRomEnd, level_main_menu_entry_2), + EXECUTE(/*seg*/ 0x14, _menuSegmentRomStart, _menuSegmentRomEnd, level_main_menu_entry_act_select), JUMP_LINK(script_exec_level_table), SLEEP(/*frames*/ 1), - LOOP_UNTIL(/*op*/ OP_LT, /*arg*/ 0), - JUMP_IF(/*op*/ OP_EQ, /*arg*/ -1, script_L2), - JUMP_IF(/*op*/ OP_EQ, /*arg*/ -2, goto_mario_head_regular), - JUMP_IF(/*op*/ OP_EQ, /*arg*/ -3, goto_mario_head_dizzy), - JUMP_IF(/*op*/ OP_EQ, /*arg*/ -8, script_L1), - JUMP_IF(/*op*/ OP_EQ, /*arg*/ -9, script_L5), + LOOP_UNTIL(/*op*/ OP_LT, /*arg*/ WARP_SPECIAL_NONE), + JUMP_IF( /*op*/ OP_EQ, /*arg*/ WARP_SPECIAL_ENDING, goto_ending), + JUMP_IF( /*op*/ OP_EQ, /*arg*/ WARP_SPECIAL_MARIO_HEAD_REGULAR, goto_mario_head_regular), + JUMP_IF( /*op*/ OP_EQ, /*arg*/ WARP_SPECIAL_MARIO_HEAD_DIZZY, goto_mario_head_dizzy), + JUMP_IF( /*op*/ OP_EQ, /*arg*/ WARP_SPECIAL_INTRO_SPLASH_SCREEN, goto_intro_splash_screen), + JUMP_IF( /*op*/ OP_EQ, /*arg*/ WARP_SPECIAL_LEVEL_SELECT, goto_debug_level_select), }; -static const LevelScript script_L1[] = { +static const LevelScript goto_intro_splash_screen[] = { EXIT_AND_EXECUTE_WITH_CODE(/*seg*/ 0x14, _introSegmentRomStart, _introSegmentRomEnd, level_intro_splash_screen, _introSegmentBssStart, _introSegmentBssEnd), }; -static const LevelScript script_L2[] = { +static const LevelScript goto_ending[] = { EXIT_AND_EXECUTE_WITH_CODE(/*seg*/ 0x0E, _endingSegmentRomStart, _endingSegmentRomEnd, level_ending_entry, _endingSegmentBssStart, _endingSegmentBssEnd), }; @@ -142,8 +141,8 @@ static const LevelScript goto_mario_head_dizzy[] = { EXIT_AND_EXECUTE_WITH_CODE(/*seg*/ 0x14, _introSegmentRomStart, _introSegmentRomEnd, level_intro_mario_head_dizzy, _introSegmentBssStart, _introSegmentBssEnd), }; -static const LevelScript script_L5[] = { - EXIT_AND_EXECUTE_WITH_CODE(/*seg*/ 0x14, _introSegmentRomStart, _introSegmentRomEnd, level_intro_entry_4, _introSegmentBssStart, _introSegmentBssEnd), +static const LevelScript goto_debug_level_select[] = { + EXIT_AND_EXECUTE_WITH_CODE(/*seg*/ 0x14, _introSegmentRomStart, _introSegmentRomEnd, level_intro_entry_level_select, _introSegmentBssStart, _introSegmentBssEnd), }; // Include the level jumptable. diff --git a/src/engine/level_script.c b/src/engine/level_script.c index 739e6756c..892525b67 100644 --- a/src/engine/level_script.c +++ b/src/engine/level_script.c @@ -21,6 +21,7 @@ #include "graph_node.h" #include "level_script.h" #include "level_misc_macros.h" +#include "level_commands.h" #include "math_util.h" #include "surface_collision.h" #include "surface_load.h" @@ -296,7 +297,6 @@ static void level_cmd_load_mario_head(void) { gd_add_to_heap(gFrameBuffer0, 3 * sizeof(gFrameBuffer0)); // 0x70800 gdm_setup(); gdm_maketestdl(CMD_GET(s16, 2)); - } else { } #endif sCurrentCmd = CMD_NEXT; @@ -756,39 +756,39 @@ static void level_cmd_38(void) { } static void level_cmd_get_or_set_var(void) { - if (CMD_GET(u8, 2) == 0) { + if (CMD_GET(u8, 2) == OP_SET) { switch (CMD_GET(u8, 3)) { - case 0: + case VAR_CURR_SAVE_FILE_NUM: gCurrSaveFileNum = sRegister; break; - case 1: + case VAR_CURR_COURSE_NUM: gCurrCourseNum = sRegister; break; - case 2: + case VAR_CURR_ACT_NUM: gCurrActNum = sRegister; break; - case 3: + case VAR_CURR_LEVEL_NUM: gCurrLevelNum = sRegister; break; - case 4: + case VAR_CURR_AREA_INDEX: gCurrAreaIndex = sRegister; break; } } else { switch (CMD_GET(u8, 3)) { - case 0: + case VAR_CURR_SAVE_FILE_NUM: sRegister = gCurrSaveFileNum; break; - case 1: + case VAR_CURR_COURSE_NUM: sRegister = gCurrCourseNum; break; - case 2: + case VAR_CURR_ACT_NUM: sRegister = gCurrActNum; break; - case 3: + case VAR_CURR_LEVEL_NUM: sRegister = gCurrLevelNum; break; - case 4: + case VAR_CURR_AREA_INDEX: sRegister = gCurrAreaIndex; break; } diff --git a/src/game/game_init.c b/src/game/game_init.c index f698f9aff..37b96c296 100644 --- a/src/game/game_init.c +++ b/src/game/game_init.c @@ -414,8 +414,7 @@ void select_gfx_pool(void) { */ void display_and_vsync(void) { gIsVC = IS_VC(); - if (IO_READ(DPC_PIPEBUSY_REG) && gIsConsole != 1) - { + if (IO_READ(DPC_PIPEBUSY_REG) && gIsConsole != 1) { gIsConsole = 1; gBorderHeight = BORDER_HEIGHT_CONSOLE; } @@ -444,6 +443,7 @@ void display_and_vsync(void) { gGlobalTimer++; } +#if !defined(DISABLE_DEMO) && defined(KEEP_MARIO_HEAD) // this function records distinct inputs over a 255-frame interval to RAM locations and was likely // used to record the demo sequences seen in the final game. This function is unused. UNUSED static void record_demo(void) { @@ -476,44 +476,6 @@ UNUSED static void record_demo(void) { gRecordedDemoInput.timer++; } -/** - * Take the updated controller struct and calculate the new x, y, and distance floats. - */ -void adjust_analog_stick(struct Controller *controller) { - // Reset the controller's x and y floats. - controller->stickX = 0; - controller->stickY = 0; - - // Modulate the rawStickX and rawStickY to be the new f32 values by adding/subtracting 6. - if (controller->rawStickX <= -8) { - controller->stickX = controller->rawStickX + 6; - } - - if (controller->rawStickX >= 8) { - controller->stickX = controller->rawStickX - 6; - } - - if (controller->rawStickY <= -8) { - controller->stickY = controller->rawStickY + 6; - } - - if (controller->rawStickY >= 8) { - controller->stickY = controller->rawStickY - 6; - } - - // Calculate f32 magnitude from the center by vector length. - controller->stickMag = - sqrtf(controller->stickX * controller->stickX + controller->stickY * controller->stickY); - - // Magnitude cannot exceed 64.0f: if it does, modify the values - // appropriately to flatten the values down to the allowed maximum value. - if (controller->stickMag > 64) { - controller->stickX *= 64 / controller->stickMag; - controller->stickY *= 64 / controller->stickMag; - controller->stickMag = 64; - } -} - /** * If a demo sequence exists, this will run the demo input list until it is complete. */ @@ -571,6 +533,46 @@ void run_demo_inputs(void) { } } +#endif + +/** + * Take the updated controller struct and calculate the new x, y, and distance floats. + */ +void adjust_analog_stick(struct Controller *controller) { + // Reset the controller's x and y floats. + controller->stickX = 0; + controller->stickY = 0; + + // Modulate the rawStickX and rawStickY to be the new f32 values by adding/subtracting 6. + if (controller->rawStickX <= -8) { + controller->stickX = controller->rawStickX + 6; + } + + if (controller->rawStickX >= 8) { + controller->stickX = controller->rawStickX - 6; + } + + if (controller->rawStickY <= -8) { + controller->stickY = controller->rawStickY + 6; + } + + if (controller->rawStickY >= 8) { + controller->stickY = controller->rawStickY - 6; + } + + // Calculate f32 magnitude from the center by vector length. + controller->stickMag = + sqrtf(controller->stickX * controller->stickX + controller->stickY * controller->stickY); + + // Magnitude cannot exceed 64.0f: if it does, modify the values + // appropriately to flatten the values down to the allowed maximum value. + if (controller->stickMag > 64) { + controller->stickX *= 64 / controller->stickMag; + controller->stickY *= 64 / controller->stickMag; + controller->stickMag = 64; + } +} + /** * Update the controller struct with available inputs if present. */ @@ -586,7 +588,9 @@ void read_controller_inputs(s32 threadID) { release_rumble_pak_control(); #endif } +#if !defined(DISABLE_DEMO) && defined(KEEP_MARIO_HEAD) run_demo_inputs(); +#endif for (i = 0; i < 2; i++) { struct Controller *controller = &gControllers[i]; @@ -673,8 +677,6 @@ void init_controllers(void) { * Setup main segments and framebuffers. */ void setup_game_memory(void) { - UNUSED u64 padding; - // Setup general Segment 0 set_segment_base_addr(0, (void *) 0x80000000); // Create Mesg Queues diff --git a/src/game/interaction.c b/src/game/interaction.c index fc4ffde5c..5997b1002 100644 --- a/src/game/interaction.c +++ b/src/game/interaction.c @@ -675,7 +675,7 @@ u32 should_push_or_pull_door(struct MarioState *m, struct Object *o) { s16 dYaw = o->oMoveAngleYaw - atan2s(dz, dx); - return (dYaw >= -0x4000 && dYaw <= 0x4000) ? 0x00000001 : 0x00000002; + return (dYaw >= -0x4000 && dYaw <= 0x4000) ? WARP_FLAG_DOOR_PULLED : WARP_FLAG_DOOR_FLIP_MARIO; } u32 take_damage_from_interact_object(struct MarioState *m) { @@ -947,10 +947,10 @@ u32 interact_warp_door(struct MarioState *m, UNUSED u32 interactType, struct Obj #endif if (m->action == ACT_WALKING || m->action == ACT_DECELERATING) { - actionArg = should_push_or_pull_door(m, o) + 0x00000004; + actionArg = should_push_or_pull_door(m, o) + WARP_FLAG_DOOR_IS_WARP; if (doorAction == 0) { - if (actionArg & 0x00000001) { + if (actionArg & WARP_FLAG_DOOR_PULLED) { doorAction = ACT_PULLING_DOOR; } else { doorAction = ACT_PUSHING_DOOR; @@ -1018,7 +1018,7 @@ u32 interact_door(struct MarioState *m, UNUSED u32 interactType, struct Object * u32 enterDoorAction; u32 doorSaveFileFlag; - if (actionArg & 0x00000001) { + if (actionArg & WARP_FLAG_DOOR_PULLED) { enterDoorAction = ACT_PULLING_DOOR; } else { enterDoorAction = ACT_PUSHING_DOOR; diff --git a/src/game/level_update.c b/src/game/level_update.c index 5f36f66c5..15ece9322 100644 --- a/src/game/level_update.c +++ b/src/game/level_update.c @@ -34,24 +34,25 @@ #include "config.h" -#define PLAY_MODE_NORMAL 0 -#define PLAY_MODE_PAUSED 2 -#define PLAY_MODE_CHANGE_AREA 3 -#define PLAY_MODE_CHANGE_LEVEL 4 -#define PLAY_MODE_FRAME_ADVANCE 5 +#define PLAY_MODE_NORMAL 0x00 +#define PLAY_MODE_PAUSED 0x02 +#define PLAY_MODE_CHANGE_AREA 0x03 +#define PLAY_MODE_CHANGE_LEVEL 0x04 +#define PLAY_MODE_FRAME_ADVANCE 0x05 -#define WARP_TYPE_NOT_WARPING 0 -#define WARP_TYPE_CHANGE_LEVEL 1 -#define WARP_TYPE_CHANGE_AREA 2 -#define WARP_TYPE_SAME_AREA 3 +#define WARP_TYPE_NOT_WARPING 0x00 +#define WARP_TYPE_CHANGE_LEVEL 0x01 +#define WARP_TYPE_CHANGE_AREA 0x02 +#define WARP_TYPE_SAME_AREA 0x03 -#define WARP_NODE_F0 0xF0 -#define WARP_NODE_DEATH 0xF1 -#define WARP_NODE_F2 0xF2 -#define WARP_NODE_WARP_FLOOR 0xF3 -#define WARP_NODE_CREDITS_START 0xF8 -#define WARP_NODE_CREDITS_NEXT 0xF9 -#define WARP_NODE_CREDITS_END 0xFA +#define WARP_NODE 0xF0 +#define WARP_NODE_F0 (0x00 | WARP_NODE) +#define WARP_NODE_DEATH (0x01 | WARP_NODE) +#define WARP_NODE_LOOK_UP (0x02 | WARP_NODE) +#define WARP_NODE_WARP_FLOOR (0x03 | WARP_NODE) +#define WARP_NODE_CREDITS_START (0x08 | WARP_NODE) +#define WARP_NODE_CREDITS_NEXT (0x09 | WARP_NODE) +#define WARP_NODE_CREDITS_END (0x0A | WARP_NODE) #define WARP_NODE_CREDITS_MIN 0xF8 @@ -278,7 +279,7 @@ void load_level_init_text(u32 arg) { } void init_door_warp(struct SpawnInfo *spawnInfo, u32 arg1) { - if (arg1 & 0x00000002) { + if (arg1 & WARP_FLAG_DOOR_FLIP_MARIO) { spawnInfo->startAngle[1] += 0x8000; } @@ -706,7 +707,7 @@ void initiate_painting_warp(void) { sWarpCheckpointActive = check_warp_checkpoint(&warpNode); } - initiate_warp(warpNode.destLevel & 0x7F, warpNode.destArea, warpNode.destNode, 0); + initiate_warp(warpNode.destLevel & 0x7F, warpNode.destArea, warpNode.destNode, WARP_FLAGS_NONE); check_if_should_set_warp_checkpoint(&warpNode); play_transition_after_delay(WARP_TRANSITION_FADE_INTO_COLOR, 30, 255, 255, 255, 45); @@ -737,7 +738,7 @@ s16 level_trigger_warp(struct MarioState *m, s32 warpOp) { if (sDelayedWarpOp == WARP_OP_NONE) { m->invincTimer = -1; - sDelayedWarpArg = 0; + sDelayedWarpArg = WARP_FLAGS_NONE; sDelayedWarpOp = warpOp; switch (warpOp) { @@ -794,16 +795,16 @@ s16 level_trigger_warp(struct MarioState *m, s32 warpOp) { play_transition(WARP_TRANSITION_FADE_INTO_CIRCLE, 0x14, 0x00, 0x00, 0x00); break; - case WARP_OP_UNKNOWN_01: // enter totwc + case WARP_OP_LOOK_UP: // enter totwc sDelayedWarpTimer = 30; - sSourceWarpNodeId = WARP_NODE_F2; + sSourceWarpNodeId = WARP_NODE_LOOK_UP; play_transition(WARP_TRANSITION_FADE_INTO_COLOR, 0x1E, 0xFF, 0xFF, 0xFF); #ifndef VERSION_JP play_sound(SOUND_MENU_STAR_SOUND, gGlobalSoundSource); #endif break; - case WARP_OP_UNKNOWN_02: // bbh enter + case WARP_OP_SPIN_SHRINK: // bbh enter sDelayedWarpTimer = 30; sSourceWarpNodeId = (m->usedObj->oBehParams & 0x00FF0000) >> 16; play_transition(WARP_TRANSITION_FADE_INTO_COLOR, 0x1E, 0xFF, 0xFF, 0xFF); @@ -867,34 +868,34 @@ void initiate_delayed_warp(void) { reset_dialog_render_state(); if (gDebugLevelSelect && (sDelayedWarpOp & WARP_OP_TRIGGERS_LEVEL_SELECT)) { - warp_special(-9); + warp_special(WARP_SPECIAL_LEVEL_SELECT); } else if (gCurrDemoInput != NULL) { if (sDelayedWarpOp == WARP_OP_DEMO_END) { - warp_special(-8); + warp_special(WARP_SPECIAL_INTRO_SPLASH_SCREEN); } else { - warp_special(-2); + warp_special(WARP_SPECIAL_MARIO_HEAD_REGULAR); } } else { switch (sDelayedWarpOp) { case WARP_OP_GAME_OVER: save_file_reload(); - warp_special(-3); + warp_special(WARP_SPECIAL_MARIO_HEAD_DIZZY); break; case WARP_OP_CREDITS_END: - warp_special(-1); + warp_special(WARP_SPECIAL_ENDING); sound_banks_enable(SEQ_PLAYER_SFX, SOUND_BANKS_ALL & ~SOUND_BANKS_DISABLED_AFTER_CREDITS); break; case WARP_OP_DEMO_NEXT: - warp_special(-2); + warp_special(WARP_SPECIAL_MARIO_HEAD_REGULAR); break; case WARP_OP_CREDITS_START: gCurrCreditsEntry = &sCreditsSequence[0]; initiate_warp(gCurrCreditsEntry->levelNum, gCurrCreditsEntry->areaIndex, - WARP_NODE_CREDITS_START, 0); + WARP_NODE_CREDITS_START, WARP_FLAGS_NONE); break; case WARP_OP_CREDITS_NEXT: @@ -1066,10 +1067,10 @@ s32 play_mode_paused(void) { set_play_mode(PLAY_MODE_NORMAL); } else { // MENU_OPT_EXIT_COURSE if (gDebugLevelSelect) { - fade_into_special_warp(-9, 1); + fade_into_special_warp(WARP_SPECIAL_LEVEL_SELECT, 1); } else { - initiate_warp(EXIT_COURSE_LEVEL, EXIT_COURSE_AREA, EXIT_COURSE_NODE, 0); - fade_into_special_warp(0, 0); + initiate_warp(EXIT_COURSE_LEVEL, EXIT_COURSE_AREA, EXIT_COURSE_NODE, WARP_FLAGS_NONE); + fade_into_special_warp(WARP_SPECIAL_NONE, 0); gSavedCourseNum = COURSE_NONE; } @@ -1211,7 +1212,7 @@ s32 init_level(void) { sDelayedWarpOp = WARP_OP_NONE; sTransitionTimer = 0; - sSpecialWarpDest = 0; + sSpecialWarpDest = WARP_SPECIAL_NONE; if (gCurrCreditsEntry == NULL) { gHudDisplay.flags = HUD_DISPLAY_DEFAULT; @@ -1352,8 +1353,7 @@ s32 lvl_set_current_level(UNUSED s16 arg0, s32 levelNum) { return 0; } - if (gCurrLevelNum != LEVEL_BOWSER_1 && gCurrLevelNum != LEVEL_BOWSER_2 - && gCurrLevelNum != LEVEL_BOWSER_3) { + if (gCurrLevelNum != LEVEL_BOWSER_1 && gCurrLevelNum != LEVEL_BOWSER_2 && gCurrLevelNum != LEVEL_BOWSER_3) { gMarioState->numCoins = 0; gHudDisplay.coins = 0; gCurrCourseStarFlags = save_file_get_star_flags(gCurrSaveFileNum - 1, gCurrCourseNum - 1); diff --git a/src/game/level_update.h b/src/game/level_update.h index cbc8199bb..a8bd0e3cc 100644 --- a/src/game/level_update.h +++ b/src/game/level_update.h @@ -12,8 +12,8 @@ #define TIMER_CONTROL_HIDE 0x03 #define WARP_OP_NONE 0x00 -#define WARP_OP_UNKNOWN_01 0x01 -#define WARP_OP_UNKNOWN_02 0x02 +#define WARP_OP_LOOK_UP 0x01 +#define WARP_OP_SPIN_SHRINK 0x02 #define WARP_OP_WARP_DOOR 0x03 #define WARP_OP_WARP_OBJECT 0x04 #define WARP_OP_TELEPORT 0x05 @@ -29,6 +29,18 @@ #define WARP_OP_TRIGGERS_LEVEL_SELECT 0x10 +#define WARP_SPECIAL_LEVEL_SELECT -9 +#define WARP_SPECIAL_INTRO_SPLASH_SCREEN -8 +#define WARP_SPECIAL_MARIO_HEAD_DIZZY -3 +#define WARP_SPECIAL_MARIO_HEAD_REGULAR -2 +#define WARP_SPECIAL_ENDING -1 +#define WARP_SPECIAL_NONE 0 + +#define WARP_FLAGS_NONE (0 << 0) // 0x00 +#define WARP_FLAG_DOOR_PULLED (1 << 0) // 0x01 +#define WARP_FLAG_DOOR_FLIP_MARIO (1 << 1) // 0x02 +#define WARP_FLAG_DOOR_IS_WARP (1 << 2) // 0x04 + #define MARIO_SPAWN_DOOR_WARP 0x01 #define MARIO_SPAWN_UNKNOWN_02 0x02 #define MARIO_SPAWN_UNKNOWN_03 0x03 diff --git a/src/game/mario_actions_cutscene.c b/src/game/mario_actions_cutscene.c index 248459447..08ea592d9 100644 --- a/src/game/mario_actions_cutscene.c +++ b/src/game/mario_actions_cutscene.c @@ -253,7 +253,8 @@ void handle_save_menu(struct MarioState *m) { save_file_do_save(gCurrSaveFileNum - 1); if (gSaveOptSelectIndex == MENU_OPT_SAVE_AND_QUIT) { - fade_into_special_warp(-2, 0); // reset game + //! crashes + fade_into_special_warp(WARP_SPECIAL_MARIO_HEAD_REGULAR, 0);// reset game } } @@ -778,7 +779,7 @@ s32 act_unlocking_key_door(struct MarioState *m) { m->pos[0] = m->usedObj->oPosX + coss(m->faceAngle[1]) * 75.0f; m->pos[2] = m->usedObj->oPosZ + sins(m->faceAngle[1]) * 75.0f; - if (m->actionArg & 2) { + if (m->actionArg & WARP_FLAG_DOOR_FLIP_MARIO) { m->faceAngle[1] += 0x8000; } @@ -818,7 +819,7 @@ s32 act_unlocking_star_door(struct MarioState *m) { switch (m->actionState) { case 0: m->faceAngle[1] = m->usedObj->oMoveAngleYaw; - if (m->actionArg & 2) { + if (m->actionArg & WARP_FLAG_DOOR_FLIP_MARIO) { m->faceAngle[1] += 0x8000; } m->marioObj->oMarioReadingSignDPosX = m->pos[0]; @@ -865,7 +866,7 @@ s32 act_entering_star_door(struct MarioState *m) { // ~30 degrees / 1/12 rot targetAngle = m->usedObj->oMoveAngleYaw + 0x1555; - if (m->actionArg & 2) { + if (m->actionArg & WARP_FLAG_DOOR_FLIP_MARIO) { targetAngle += 0x5556; // ~120 degrees / 1/3 rot (total 150d / 5/12) } @@ -897,7 +898,7 @@ s32 act_entering_star_door(struct MarioState *m) { else { m->faceAngle[1] = m->usedObj->oMoveAngleYaw; - if (m->actionArg & 2) { + if (m->actionArg & WARP_FLAG_DOOR_FLIP_MARIO) { m->faceAngle[1] += 0x8000; } @@ -918,7 +919,7 @@ s32 act_entering_star_door(struct MarioState *m) { s32 act_going_through_door(struct MarioState *m) { if (m->actionTimer == 0) { - if (m->actionArg & 1) { + if (m->actionArg & WARP_FLAG_DOOR_PULLED) { m->interactObj->oInteractStatus = INT_STATUS_DOOR_PULLED; set_mario_animation(m, MARIO_ANIM_PULL_DOOR_WALK_IN); } else { @@ -933,12 +934,12 @@ s32 act_going_through_door(struct MarioState *m) { update_mario_pos_for_anim(m); stop_and_set_height_to_floor(m); - if (m->actionArg & 4) { + if (m->actionArg & WARP_FLAG_DOOR_IS_WARP) { if (m->actionTimer == 16) { level_trigger_warp(m, WARP_OP_WARP_DOOR); } } else if (is_anim_at_end(m)) { - if (m->actionArg & 2) { + if (m->actionArg & WARP_FLAG_DOOR_FLIP_MARIO) { m->faceAngle[1] += 0x8000; } set_mario_action(m, ACT_IDLE, 0); @@ -951,7 +952,7 @@ s32 act_going_through_door(struct MarioState *m) { s32 act_warp_door_spawn(struct MarioState *m) { if (m->actionState == 0) { m->actionState = 1; - if (m->actionArg & 1) { + if (m->actionArg & WARP_FLAG_DOOR_PULLED) { m->usedObj->oInteractStatus = INT_STATUS_WARP_DOOR_PULLED; } else { m->usedObj->oInteractStatus = INT_STATUS_WARP_DOOR_PUSHED; @@ -1328,7 +1329,7 @@ s32 act_bbh_enter_spin(struct MarioState *m) { mario_set_forward_vel(m, forwardVel); m->flags &= ~MARIO_JUMPING; if (perform_air_step(m, 0) == AIR_STEP_LANDED) { - level_trigger_warp(m, WARP_OP_UNKNOWN_02); + level_trigger_warp(m, WARP_OP_SPIN_SHRINK); #if ENABLE_RUMBLE queue_rumble_data(15, 80); #endif diff --git a/src/game/mario_actions_stationary.c b/src/game/mario_actions_stationary.c index 163e2d2e8..1d9aa8b99 100644 --- a/src/game/mario_actions_stationary.c +++ b/src/game/mario_actions_stationary.c @@ -1071,7 +1071,7 @@ s32 act_first_person(struct MarioState *m) { s16 headRX = m->statusForCamera->headRotation[0]; s16 totalRY = ((m->statusForCamera->headRotation[1] * 4) / 3) + m->faceAngle[1]; if (headRX == -0x1800 && (totalRY < -0x6FFF || totalRY >= 0x7000)) { - level_trigger_warp(m, WARP_OP_UNKNOWN_01); + level_trigger_warp(m, WARP_OP_LOOK_UP); } } diff --git a/src/game/puppycam2.c b/src/game/puppycam2.c index dcac6145d..ad928260f 100644 --- a/src/game/puppycam2.c +++ b/src/game/puppycam2.c @@ -544,7 +544,7 @@ void puppycam_init(void) gPuppyCam.intendedFlags = PUPPYCAM_BEHAVIOUR_DEFAULT; - if (gCurrLevelNum == 27 || (gCurrLevelNum == 36 && gCurrAreaIndex == 2) || (gCurrLevelNum == 5 && gCurrAreaIndex == 2)) + if (gCurrLevelNum == LEVEL_PSS || (gCurrLevelNum == LEVEL_TTM && gCurrAreaIndex == 2) || (gCurrLevelNum == LEVEL_CCM && gCurrAreaIndex == 2)) gPuppyCam.intendedFlags |= PUPPYCAM_BEHAVIOUR_SLIDE_CORRECTION; gPuppyCam.flags = gPuppyCam.intendedFlags; gPuppyCam.zoom = gPuppyCam.zoomPoints[1]; diff --git a/src/game/puppylights.c b/src/game/puppylights.c index bdc062315..a3a499006 100644 --- a/src/game/puppylights.c +++ b/src/game/puppylights.c @@ -220,7 +220,7 @@ void puppylights_run(Lights1 *src, struct Object *obj, s32 flags, u32 baseColour s32 offsetPlaced = 0; s32 lightFlags = flags; - if (gCurrLevelNum < 4) + if (gCurrLevelNum < LEVEL_BBH) return; //Checks if there's a hardset colour. Colours are only the first 3 bytes, so you can really put whatever you want in the last. //If there isn't a colour, then it decides whether to apply the ambient lighting, or the default lighting as the baseline. @@ -272,7 +272,7 @@ void puppylights_run(Lights1 *src, struct Object *obj, s32 flags, u32 baseColour void puppylights_object_emit(struct Object *obj) { s32 i; - if (gCurrLevelNum < 4) + if (gCurrLevelNum < LEVEL_BBH) return; if (obj->oFlags & OBJ_FLAG_EMIT_LIGHT) diff --git a/src/game/segment7.h b/src/game/segment7.h index 6692ac6b4..c552be2ee 100644 --- a/src/game/segment7.h +++ b/src/game/segment7.h @@ -24,9 +24,9 @@ extern const u8 eu_course_strings_de_table[]; #endif // from intro_segment7 -extern Gfx *intro_seg7_dl_0700B3A0; -extern Gfx *intro_seg7_dl_0700C6A0; -extern f32 intro_seg7_table_0700C790[]; -extern f32 intro_seg7_table_0700C880[]; +extern Gfx *intro_seg7_dl_main_logo; +extern Gfx *intro_seg7_dl_copyright_trademark; +extern f32 intro_seg7_table_scale_1[]; +extern f32 intro_seg7_table_scale_2[]; #endif // SEGMENT7_H diff --git a/src/goddard/renderer.c b/src/goddard/renderer.c index b701067d0..a0c98c72b 100644 --- a/src/goddard/renderer.c +++ b/src/goddard/renderer.c @@ -1164,8 +1164,6 @@ void gdm_init(void *blockpool, u32 size) { * Initializes the Mario head demo */ void gdm_setup(void) { - UNUSED u32 pad; - imin("gdm_setup"); sYoshiSceneGrp = NULL; sMarioSceneGrp = NULL; diff --git a/src/menu/intro_geo.c b/src/menu/intro_geo.c index 3058081d7..8f6ca65f4 100644 --- a/src/menu/intro_geo.c +++ b/src/menu/intro_geo.c @@ -44,8 +44,8 @@ Gfx *geo_intro_super_mario_64_logo(s32 state, struct GraphNode *node, UNUSED voi Gfx *dl = NULL; Gfx *dlIter = NULL; Mtx *scaleMat; - f32 *scaleTable1 = segmented_to_virtual(intro_seg7_table_0700C790); - f32 *scaleTable2 = segmented_to_virtual(intro_seg7_table_0700C880); + f32 *scaleTable1 = segmented_to_virtual(intro_seg7_table_scale_1); + f32 *scaleTable2 = segmented_to_virtual(intro_seg7_table_scale_2); f32 scaleX; f32 scaleY; f32 scaleZ; @@ -83,7 +83,7 @@ Gfx *geo_intro_super_mario_64_logo(s32 state, struct GraphNode *node, UNUSED voi guScale(scaleMat, scaleX, scaleY, scaleZ); gSPMatrix(dlIter++, scaleMat, G_MTX_MODELVIEW | G_MTX_MUL | G_MTX_PUSH); - gSPDisplayList(dlIter++, &intro_seg7_dl_0700B3A0); // draw model + gSPDisplayList(dlIter++, &intro_seg7_dl_main_logo); // draw model gSPPopMatrix(dlIter++, G_MTX_MODELVIEW); gSPEndDisplayList(dlIter); @@ -117,7 +117,7 @@ Gfx *geo_intro_tm_copyright(s32 state, struct GraphNode *node, UNUSED void *cont gDPSetRenderMode(dlIter++, G_RM_AA_XLU_SURF, G_RM_AA_XLU_SURF2); break; } - gSPDisplayList(dlIter++, &intro_seg7_dl_0700C6A0); // draw model + gSPDisplayList(dlIter++, &intro_seg7_dl_copyright_trademark); // draw model gSPEndDisplayList(dlIter); // Once the "Super Mario 64" logo has just about zoomed fully, fade in the "TM" and copyright text diff --git a/src/menu/title_screen.c b/src/menu/title_screen.c index 9ba6aadec..33eef7340 100644 --- a/src/menu/title_screen.c +++ b/src/menu/title_screen.c @@ -32,12 +32,16 @@ static char sLevelSelectStageNames[64][16] = { #undef STUB_LEVEL #undef DEFINE_LEVEL +#ifdef KEEP_MARIO_HEAD +#ifndef DISABLE_DEMO static u16 sDemoCountdown = 0; +#endif #ifndef VERSION_JP static s16 sPlayMarioGreeting = TRUE; static s16 sPlayMarioGameOver = TRUE; #endif +#ifndef DISABLE_DEMO #define PRESS_START_DEMO_TIMER 800 /** @@ -77,13 +81,15 @@ s32 run_level_id_or_demo(s32 level) { } return level; } +#endif +#endif /** * Level select intro function, updates the selected stage * count if an input was received. signals the stage to be started * or the level select to be exited if start or the quit combo is pressed. */ -s16 intro_level_select(void) { +s16 intro_level_select(void) { //! this function runs and crashes on save+quit even if level select is disabled s32 stageChanged = FALSE; // perform the ID updates per each button press. @@ -138,14 +144,15 @@ s16 intro_level_select(void) { // is the case, quit the menu instead. if (gPlayer1Controller->buttonDown == QUIT_LEVEL_SELECT_COMBO) { gDebugLevelSelect = FALSE; - return -1; + return LEVEL_RESTART_GAME; } play_sound(SOUND_MENU_STAR_SOUND, gGlobalSoundSource); return gCurrLevelNum; } - return 0; + return LEVEL_NONE; } +#ifdef KEEP_MARIO_HEAD /** * Regular intro function that handles Mario's greeting voice and game start. */ @@ -177,12 +184,16 @@ s32 intro_regular(void) { // calls level ID 100 (or 101 adding level select bool value) // defined in level_intro_mario_head_regular JUMP_IF commands // 100 is File Select - 101 is Level Select - level = 100 + gDebugLevelSelect; + level = (LEVEL_FILE_SELECT + gDebugLevelSelect); #ifndef VERSION_JP sPlayMarioGreeting = TRUE; #endif } +#if !defined(DISABLE_DEMO) && defined(KEEP_MARIO_HEAD) return run_level_id_or_demo(level); +#else + return level; +#endif } /** @@ -207,12 +218,16 @@ s32 intro_game_over(void) { queue_rumble_decay(1); #endif // same criteria as intro_regular - level = 100 + gDebugLevelSelect; + level = LEVEL_FILE_SELECT + gDebugLevelSelect; #ifndef VERSION_JP sPlayMarioGameOver = TRUE; #endif } +#if !defined(DISABLE_DEMO) && defined(KEEP_MARIO_HEAD) return run_level_id_or_demo(level); +#else + return level; +#endif } /** @@ -221,37 +236,29 @@ s32 intro_game_over(void) { s32 intro_play_its_a_me_mario(void) { set_background_music(0, SEQ_SOUND_PLAYER, 0); play_sound(SOUND_MENU_COIN_ITS_A_ME_MARIO, gGlobalSoundSource); - return 1; + return (LEVEL_NONE + 1); } +#endif + /** * Update intro functions to handle title screen actions. * Returns a level ID after their criteria is met. */ s32 lvl_intro_update(s16 arg, UNUSED s32 unusedArg) { - s32 retVar = 0; + s32 retVar = LEVEL_NONE; switch (arg) { - case LVL_INTRO_PLAY_ITS_A_ME_MARIO: - retVar = intro_play_its_a_me_mario(); - break; #ifdef KEEP_MARIO_HEAD - case LVL_INTRO_REGULAR: - retVar = intro_regular(); - break; - case LVL_INTRO_GAME_OVER: - retVar = intro_game_over(); - break; + case LVL_INTRO_PLAY_ITS_A_ME_MARIO: retVar = intro_play_its_a_me_mario(); break; + case LVL_INTRO_REGULAR: retVar = intro_regular(); break; + case LVL_INTRO_GAME_OVER: retVar = intro_game_over(); break; #else - case LVL_INTRO_REGULAR: - // fall through - case LVL_INTRO_GAME_OVER: - retVar = (100 + gDebugLevelSelect); - break; + case LVL_INTRO_PLAY_ITS_A_ME_MARIO: // fall through + case LVL_INTRO_REGULAR: // fall through + case LVL_INTRO_GAME_OVER: retVar = (LEVEL_FILE_SELECT + gDebugLevelSelect); break; #endif - case LVL_INTRO_LEVEL_SELECT: - retVar = intro_level_select(); - break; + case LVL_INTRO_LEVEL_SELECT: retVar = intro_level_select(); break; //! this runs on save and quit for some reason? } return retVar; } From ecd56464cd52a126f6936467a62a0b1aae15ea41 Mon Sep 17 00:00:00 2001 From: Arceveti <73617174+Arceveti@users.noreply.github.com> Date: Thu, 23 Sep 2021 18:02:28 -0700 Subject: [PATCH 25/26] Fix intro sound --- src/menu/title_screen.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/menu/title_screen.c b/src/menu/title_screen.c index 33eef7340..abe8f743d 100644 --- a/src/menu/title_screen.c +++ b/src/menu/title_screen.c @@ -136,13 +136,11 @@ s16 intro_level_select(void) { //! this function runs and crashes on save+quit e print_text_fmt_int(40, 60, "%2d", gCurrLevelNum); print_text(80, 60, sLevelSelectStageNames[gCurrLevelNum - 1]); // print stage name -#define QUIT_LEVEL_SELECT_COMBO (Z_TRIG | START_BUTTON | L_CBUTTONS | R_CBUTTONS) - // start being pressed signals the stage to be started. that is, unless... if (gPlayer1Controller->buttonPressed & START_BUTTON) { // ... the level select quit combo is being pressed, which uses START. If this // is the case, quit the menu instead. - if (gPlayer1Controller->buttonDown == QUIT_LEVEL_SELECT_COMBO) { + if (gPlayer1Controller->buttonDown == (Z_TRIG | START_BUTTON | L_CBUTTONS | R_CBUTTONS)) { gDebugLevelSelect = FALSE; return LEVEL_RESTART_GAME; } @@ -230,6 +228,8 @@ s32 intro_game_over(void) { #endif } +#endif + /** * Plays the casual "It's a me mario" when the game stars. */ @@ -239,8 +239,6 @@ s32 intro_play_its_a_me_mario(void) { return (LEVEL_NONE + 1); } -#endif - /** * Update intro functions to handle title screen actions. * Returns a level ID after their criteria is met. @@ -249,12 +247,11 @@ s32 lvl_intro_update(s16 arg, UNUSED s32 unusedArg) { s32 retVar = LEVEL_NONE; switch (arg) { -#ifdef KEEP_MARIO_HEAD case LVL_INTRO_PLAY_ITS_A_ME_MARIO: retVar = intro_play_its_a_me_mario(); break; +#ifdef KEEP_MARIO_HEAD case LVL_INTRO_REGULAR: retVar = intro_regular(); break; case LVL_INTRO_GAME_OVER: retVar = intro_game_over(); break; #else - case LVL_INTRO_PLAY_ITS_A_ME_MARIO: // fall through case LVL_INTRO_REGULAR: // fall through case LVL_INTRO_GAME_OVER: retVar = (LEVEL_FILE_SELECT + gDebugLevelSelect); break; #endif From 304ee502c8b666f6f543db7b0876b5a702b13a2f Mon Sep 17 00:00:00 2001 From: Arceveti <73617174+Arceveti@users.noreply.github.com> Date: Thu, 23 Sep 2021 18:56:14 -0700 Subject: [PATCH 26/26] Some small optimizations --- data/behavior_data.c | 2 +- src/engine/math_util.c | 397 +++++++----------- src/engine/math_util.h | 2 +- src/game/behaviors/donut_platform.inc.c | 2 +- src/game/behaviors/drawbridge.inc.c | 10 +- .../behaviors/falling_rising_platform.inc.c | 4 +- src/game/behaviors/grand_star.inc.c | 2 +- src/game/behaviors/klepto.inc.c | 2 +- src/game/behaviors/mad_piano.inc.c | 2 +- src/game/behaviors/monty_mole.inc.c | 9 +- src/game/behaviors/sparkle_spawn_star.inc.c | 2 +- .../behaviors/tilting_inverted_pyramid.inc.c | 2 +- src/game/behaviors/wiggler.inc.c | 2 +- src/game/camera.c | 42 +- src/game/envfx_snow.c | 4 +- src/game/mario.c | 10 +- src/game/mario_actions_cutscene.c | 2 +- src/game/mario_actions_moving.c | 2 +- src/game/mario_actions_submerged.c | 6 +- src/game/obj_behaviors_2.c | 6 +- src/game/object_collision.c | 5 +- src/game/object_helpers.c | 8 +- src/game/rendering_graph_node.c | 9 +- 23 files changed, 191 insertions(+), 341 deletions(-) diff --git a/data/behavior_data.c b/data/behavior_data.c index 4048f1dee..0d537900a 100644 --- a/data/behavior_data.c +++ b/data/behavior_data.c @@ -2370,7 +2370,7 @@ const BehaviorScript bhvLllTiltingInvertedPyramid[] = { const BehaviorScript bhvKoopaShell[] = { BEGIN(OBJ_LIST_LEVEL), - OR_LONG(oFlags, (OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE | OBJ_FLAG_SILHOUETTE)), //! Silhouette doesn't show up in-game + OR_LONG(oFlags, (OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE | OBJ_FLAG_SILHOUETTE)), //! Silhouette doesn't show up in-game, due to the combine mode SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 30, /*Gravity*/ -400, /*Bounciness*/ -50, /*Drag strength*/ 1000, /*Friction*/ 1000, /*Buoyancy*/ 200, /*Unused*/ 0, 0), BEGIN_LOOP(), CALL_NATIVE(bhv_koopa_shell_loop), diff --git a/src/engine/math_util.c b/src/engine/math_util.c index 37fb64f0d..6e6f0c232 100644 --- a/src/engine/math_util.c +++ b/src/engine/math_util.c @@ -22,72 +22,47 @@ int gSplineState; /// Copy vector 'src' to 'dest' void vec3f_copy(Vec3f dest, Vec3f src) { - dest[0] = src[0]; - dest[1] = src[1]; - dest[2] = src[2]; + vec3_copy(dest, src); } /// Set vector 'dest' to (x, y, z) void vec3f_set(Vec3f dest, f32 x, f32 y, f32 z) { - dest[0] = x; - dest[1] = y; - dest[2] = z; + vec3_set(dest, x, y, z); } /// Add vector 'a' to 'dest' void vec3f_add(Vec3f dest, Vec3f a) { - dest[0] += a[0]; - dest[1] += a[1]; - dest[2] += a[2]; + vec3_add(dest, a); } /// Make 'dest' the sum of vectors a and b. void vec3f_sum(Vec3f dest, Vec3f a, Vec3f b) { - dest[0] = a[0] + b[0]; - dest[1] = a[1] + b[1]; - dest[2] = a[2] + b[2]; + vec3_sum(dest, a, b); } /// Copy vector src to dest void vec3s_copy(Vec3s dest, Vec3s src) { - dest[0] = src[0]; - dest[1] = src[1]; - dest[2] = src[2]; + vec3_copy(dest, src); } /// Set vector 'dest' to (x, y, z) void vec3s_set(Vec3s dest, s16 x, s16 y, s16 z) { - dest[0] = x; - dest[1] = y; - dest[2] = z; + vec3_set(dest, x, y, z); } /// Add vector a to 'dest' void vec3s_add(Vec3s dest, Vec3s a) { - dest[0] += a[0]; - dest[1] += a[1]; - dest[2] += a[2]; + vec3_add(dest, a); } /// Make 'dest' the sum of vectors a and b. void vec3s_sum(Vec3s dest, Vec3s a, Vec3s b) { - dest[0] = a[0] + b[0]; - dest[1] = a[1] + b[1]; - dest[2] = a[2] + b[2]; + vec3_sum(dest, a, b); } /// Subtract vector a from 'dest' void vec3s_sub(Vec3s dest, Vec3s a) { - dest[0] -= a[0]; - dest[1] -= a[1]; - dest[2] -= a[2]; -} - -/// Convert short vector a to float vector 'dest' -void vec3s_to_vec3f(Vec3f dest, Vec3s a) { - dest[0] = a[0]; - dest[1] = a[1]; - dest[2] = a[2]; + vec3_sub(dest, a); } /** @@ -114,22 +89,15 @@ void find_vector_perpendicular_to_plane(Vec3f dest, Vec3f a, Vec3f b, Vec3f c) { /// Make vector 'dest' the cross product of vectors a and b. void vec3f_cross(Vec3f dest, Vec3f a, Vec3f b) { - dest[0] = a[1] * b[2] - b[1] * a[2]; - dest[1] = a[2] * b[0] - b[2] * a[0]; - dest[2] = a[0] * b[1] - b[0] * a[1]; + vec3_cross(dest, a, b); } /// Scale vector 'dest' so it has length 1 void vec3f_normalize(Vec3f dest) { f32 invsqrt = sqrtf(sqr(dest[0]) + sqr(dest[1]) + sqr(dest[2])); - if (invsqrt < 0.00001f) return; - invsqrt = 1.0f / invsqrt; - - dest[0] *= invsqrt; - dest[1] *= invsqrt; - dest[2] *= invsqrt; + vec3_mul_val(dest, invsqrt); } /// Copy matrix 'src' to 'dest' @@ -163,9 +131,7 @@ void mtxf_identity(Mat4 mtx) { */ void mtxf_translate(Mat4 dest, Vec3f b) { mtxf_identity(dest); - dest[3][0] = b[0]; - dest[3][1] = b[1]; - dest[3][2] = b[2]; + vec3_copy(dest[3], b); } /** @@ -175,65 +141,47 @@ void mtxf_translate(Mat4 dest, Vec3f b) { * angle allows a bank rotation of the camera. */ void mtxf_lookat(Mat4 mtx, Vec3f from, Vec3f to, s16 roll) { - register f32 invLength; - f32 dx, dz; - f32 xColX, xColY, xColZ; - f32 yColX, yColY, yColZ; - f32 zColX, zColY, zColZ; + Vec3f colX, colY, colZ; - dx = to[0] - from[0]; - dz = to[2] - from[2]; + f32 dx = to[0] - from[0]; + f32 dz = to[2] - from[2]; - invLength = -1.0f / MAX(sqrtf(sqr(dx) + sqr(dz)), 0.00001f); + register f32 invLength = -1.0f / MAX(sqrtf(sqr(dx) + sqr(dz)), 0.00001f); dx *= invLength; dz *= invLength; - yColY = coss(roll); - xColY = sins(roll) * dz; - zColY = -sins(roll) * dx; + colY[1] = coss(roll); + colY[0] = sins(roll) * dz; + colY[2] = -sins(roll) * dx; + vec3_diff(colZ, to, from); - xColZ = to[0] - from[0]; - yColZ = to[1] - from[1]; - zColZ = to[2] - from[2]; + invLength = -1.0f / MAX(sqrtf(sqr(colZ[0]) + sqr(colZ[1]) + sqr(colZ[2])), 0.00001f); + vec3_mul_val(colZ, invLength); - invLength = -1.0f / MAX(sqrtf(sqr(xColZ) + sqr(yColZ) + sqr(zColZ)), 0.00001f); - xColZ *= invLength; - yColZ *= invLength; - zColZ *= invLength; + vec3_cross(colX, colY, colZ); - xColX = yColY * zColZ - zColY * yColZ; - yColX = zColY * xColZ - xColY * zColZ; - zColX = xColY * yColZ - yColY * xColZ; + invLength = 1.0f / MAX(sqrtf(sqr(colX[0]) + sqr(colX[1]) + sqr(colX[2])), 0.00001f); + vec3_mul_val(colX, invLength); - invLength = 1.0f / MAX(sqrtf(sqr(xColX) + sqr(yColX) + sqr(zColX)), 0.00001f); + vec3_cross(colY, colZ, colX); - xColX *= invLength; - yColX *= invLength; - zColX *= invLength; + invLength = 1.0f / MAX(sqrtf(sqr(colY[0]) + sqr(colY[1]) + sqr(colY[2])), 0.00001f); + vec3_mul_val(colY, invLength); - xColY = yColZ * zColX - zColZ * yColX; - yColY = zColZ * xColX - xColZ * zColX; - zColY = xColZ * yColX - yColZ * xColX; + mtx[0][0] = colX[0]; + mtx[1][0] = colX[1]; + mtx[2][0] = colX[2]; - invLength = 1.0f / MAX(sqrtf(sqr(xColY) + sqr(yColY) + sqr(zColY)), 0.00001f); - xColY *= invLength; - yColY *= invLength; - zColY *= invLength; + mtx[0][1] = colY[0]; + mtx[1][1] = colY[1]; + mtx[2][1] = colY[2]; - mtx[0][0] = xColX; - mtx[1][0] = yColX; - mtx[2][0] = zColX; - mtx[3][0] = -(from[0] * xColX + from[1] * yColX + from[2] * zColX); - - mtx[0][1] = xColY; - mtx[1][1] = yColY; - mtx[2][1] = zColY; - mtx[3][1] = -(from[0] * xColY + from[1] * yColY + from[2] * zColY); - - mtx[0][2] = xColZ; - mtx[1][2] = yColZ; - mtx[2][2] = zColZ; - mtx[3][2] = -(from[0] * xColZ + from[1] * yColZ + from[2] * zColZ); + mtx[0][2] = colZ[0]; + mtx[1][2] = colZ[1]; + mtx[2][2] = colZ[2]; + mtx[3][0] = -vec3_dot(from, colX); + mtx[3][1] = -vec3_dot(from, colY); + mtx[3][2] = -vec3_dot(from, colZ); mtx[0][3] = 0; mtx[1][3] = 0; @@ -316,8 +264,13 @@ void mtxf_rotate_xyz_and_translate(Mat4 dest, Vec3f b, Vec3s c) { * 'angle' rotates the object while still facing the camera. */ void mtxf_billboard(Mat4 dest, Mat4 mtx, Vec3f position, s16 angle) { - dest[0][0] = coss(angle); - dest[0][1] = sins(angle); + if (angle == 0x0) { + dest[0][0] = 1; + dest[0][1] = 0; + } else { + dest[0][0] = coss(angle); + dest[0][1] = sins(angle); + } dest[0][2] = 0; dest[0][3] = 0; @@ -331,12 +284,9 @@ void mtxf_billboard(Mat4 dest, Mat4 mtx, Vec3f position, s16 angle) { dest[2][2] = 1; dest[2][3] = 0; - dest[3][0] = - mtx[0][0] * position[0] + mtx[1][0] * position[1] + mtx[2][0] * position[2] + mtx[3][0]; - dest[3][1] = - mtx[0][1] * position[0] + mtx[1][1] * position[1] + mtx[2][1] * position[2] + mtx[3][1]; - dest[3][2] = - mtx[0][2] * position[0] + mtx[1][2] * position[1] + mtx[2][2] * position[2] + mtx[3][2]; + dest[3][0] = mtx[0][0] * position[0] + mtx[1][0] * position[1] + mtx[2][0] * position[2] + mtx[3][0]; + dest[3][1] = mtx[0][1] * position[0] + mtx[1][1] * position[1] + mtx[2][1] * position[2] + mtx[3][1]; + dest[3][2] = mtx[0][2] * position[0] + mtx[1][2] * position[1] + mtx[2][2] * position[2] + mtx[3][2]; dest[3][3] = 1; } @@ -352,29 +302,19 @@ void mtxf_align_terrain_normal(Mat4 dest, Vec3f upDir, Vec3f pos, s16 yaw) { Vec3f leftDir; Vec3f forwardDir; - vec3f_set(lateralDir, sins(yaw), 0, coss(yaw)); + vec3_set(lateralDir, sins(yaw), 0, coss(yaw)); vec3f_normalize(upDir); - vec3f_cross(leftDir, upDir, lateralDir); + vec3_cross(leftDir, upDir, lateralDir); vec3f_normalize(leftDir); - vec3f_cross(forwardDir, leftDir, upDir); + vec3_cross(forwardDir, leftDir, upDir); vec3f_normalize(forwardDir); - dest[0][0] = leftDir[0]; - dest[0][1] = leftDir[1]; - dest[0][2] = leftDir[2]; - dest[3][0] = pos[0]; - - dest[1][0] = upDir[0]; - dest[1][1] = upDir[1]; - dest[1][2] = upDir[2]; - dest[3][1] = pos[1]; - - dest[2][0] = forwardDir[0]; - dest[2][1] = forwardDir[1]; - dest[2][2] = forwardDir[2]; - dest[3][2] = pos[2]; + vec3_copy(dest[0], leftDir); + vec3_copy(dest[1], upDir); + vec3_copy(dest[2], forwardDir); + vec3_copy(dest[3], pos); dest[0][3] = 0.0f; dest[1][3] = 0.0f; @@ -391,14 +331,10 @@ void mtxf_align_terrain_normal(Mat4 dest, Vec3f upDir, Vec3f pos, s16 yaw) { * 'radius' is the distance from each triangle vertex to the center */ void mtxf_align_terrain_triangle(Mat4 mtx, Vec3f pos, s16 yaw, f32 radius) { - struct Surface *sp74; - Vec3f point0; - Vec3f point1; - Vec3f point2; + struct Surface *floor; + Vec3f point0, point1, point2; Vec3f forward; - Vec3f xColumn; - Vec3f yColumn; - Vec3f zColumn; + Vec3f xColumn, yColumn, zColumn; f32 avgY; f32 minY = -radius * 3; @@ -409,9 +345,9 @@ void mtxf_align_terrain_triangle(Mat4 mtx, Vec3f pos, s16 yaw, f32 radius) { point2[0] = pos[0] + radius * sins(yaw + 0xD555); point2[2] = pos[2] + radius * coss(yaw + 0xD555); - point0[1] = find_floor(point0[0], pos[1] + 150, point0[2], &sp74); - point1[1] = find_floor(point1[0], pos[1] + 150, point1[2], &sp74); - point2[1] = find_floor(point2[0], pos[1] + 150, point2[2], &sp74); + point0[1] = find_floor(point0[0], pos[1] + 150, point0[2], &floor); + point1[1] = find_floor(point1[0], pos[1] + 150, point1[2], &floor); + point2[1] = find_floor(point2[0], pos[1] + 150, point2[2], &floor); if (point0[1] - pos[1] < minY) { point0[1] = pos[1]; @@ -427,27 +363,19 @@ void mtxf_align_terrain_triangle(Mat4 mtx, Vec3f pos, s16 yaw, f32 radius) { avgY = (point0[1] + point1[1] + point2[1]) / 3; - vec3f_set(forward, sins(yaw), 0, coss(yaw)); + vec3_set(forward, sins(yaw), 0, coss(yaw)); find_vector_perpendicular_to_plane(yColumn, point0, point1, point2); vec3f_normalize(yColumn); - vec3f_cross(xColumn, yColumn, forward); + vec3_cross(xColumn, yColumn, forward); vec3f_normalize(xColumn); - vec3f_cross(zColumn, xColumn, yColumn); + vec3_cross(zColumn, xColumn, yColumn); vec3f_normalize(zColumn); + vec3_copy(mtx[0], xColumn); + vec3_copy(mtx[1], yColumn); + vec3_copy(mtx[2], zColumn); - mtx[0][0] = xColumn[0]; - mtx[0][1] = xColumn[1]; - mtx[0][2] = xColumn[2]; mtx[3][0] = pos[0]; - - mtx[1][0] = yColumn[0]; - mtx[1][1] = yColumn[1]; - mtx[1][2] = yColumn[2]; mtx[3][1] = (avgY < pos[1]) ? pos[1] : avgY; - - mtx[2][0] = zColumn[0]; - mtx[2][1] = zColumn[1]; - mtx[2][2] = zColumn[2]; mtx[3][2] = pos[2]; mtx[0][3] = 0; @@ -466,41 +394,31 @@ void mtxf_align_terrain_triangle(Mat4 mtx, Vec3f pos, s16 yaw, f32 radius) { */ void mtxf_mul(Mat4 dest, Mat4 a, Mat4 b) { Mat4 temp; - register f32 entry0; - register f32 entry1; - register f32 entry2; + register Vec3f entry; // column 0 - entry0 = a[0][0]; - entry1 = a[0][1]; - entry2 = a[0][2]; - temp[0][0] = entry0 * b[0][0] + entry1 * b[1][0] + entry2 * b[2][0]; - temp[0][1] = entry0 * b[0][1] + entry1 * b[1][1] + entry2 * b[2][1]; - temp[0][2] = entry0 * b[0][2] + entry1 * b[1][2] + entry2 * b[2][2]; + vec3_copy(entry, a[0]); + temp[0][0] = entry[0] * b[0][0] + entry[1] * b[1][0] + entry[2] * b[2][0]; + temp[0][1] = entry[0] * b[0][1] + entry[1] * b[1][1] + entry[2] * b[2][1]; + temp[0][2] = entry[0] * b[0][2] + entry[1] * b[1][2] + entry[2] * b[2][2]; // column 1 - entry0 = a[1][0]; - entry1 = a[1][1]; - entry2 = a[1][2]; - temp[1][0] = entry0 * b[0][0] + entry1 * b[1][0] + entry2 * b[2][0]; - temp[1][1] = entry0 * b[0][1] + entry1 * b[1][1] + entry2 * b[2][1]; - temp[1][2] = entry0 * b[0][2] + entry1 * b[1][2] + entry2 * b[2][2]; + vec3_copy(entry, a[1]); + temp[1][0] = entry[0] * b[0][0] + entry[1] * b[1][0] + entry[2] * b[2][0]; + temp[1][1] = entry[0] * b[0][1] + entry[1] * b[1][1] + entry[2] * b[2][1]; + temp[1][2] = entry[0] * b[0][2] + entry[1] * b[1][2] + entry[2] * b[2][2]; // column 2 - entry0 = a[2][0]; - entry1 = a[2][1]; - entry2 = a[2][2]; - temp[2][0] = entry0 * b[0][0] + entry1 * b[1][0] + entry2 * b[2][0]; - temp[2][1] = entry0 * b[0][1] + entry1 * b[1][1] + entry2 * b[2][1]; - temp[2][2] = entry0 * b[0][2] + entry1 * b[1][2] + entry2 * b[2][2]; + vec3_copy(entry, a[2]); + temp[2][0] = entry[0] * b[0][0] + entry[1] * b[1][0] + entry[2] * b[2][0]; + temp[2][1] = entry[0] * b[0][1] + entry[1] * b[1][1] + entry[2] * b[2][1]; + temp[2][2] = entry[0] * b[0][2] + entry[1] * b[1][2] + entry[2] * b[2][2]; // column 3 - entry0 = a[3][0]; - entry1 = a[3][1]; - entry2 = a[3][2]; - temp[3][0] = entry0 * b[0][0] + entry1 * b[1][0] + entry2 * b[2][0] + b[3][0]; - temp[3][1] = entry0 * b[0][1] + entry1 * b[1][1] + entry2 * b[2][1] + b[3][1]; - temp[3][2] = entry0 * b[0][2] + entry1 * b[1][2] + entry2 * b[2][2] + b[3][2]; + vec3_copy(entry, a[3]); + temp[3][0] = entry[0] * b[0][0] + entry[1] * b[1][0] + entry[2] * b[2][0] + b[3][0]; + temp[3][1] = entry[0] * b[0][1] + entry[1] * b[1][1] + entry[2] * b[2][1] + b[3][1]; + temp[3][2] = entry[0] * b[0][2] + entry[1] * b[1][2] + entry[2] * b[2][2] + b[3][2]; temp[0][3] = temp[1][3] = temp[2][3] = 0; temp[3][3] = 1; @@ -587,12 +505,9 @@ void get_pos_from_transform_mtx(Vec3f dest, Mat4 objMtx, Mat4 camMtx) { f32 camY = camMtx[3][0] * camMtx[1][0] + camMtx[3][1] * camMtx[1][1] + camMtx[3][2] * camMtx[1][2]; f32 camZ = camMtx[3][0] * camMtx[2][0] + camMtx[3][1] * camMtx[2][1] + camMtx[3][2] * camMtx[2][2]; - dest[0] = - objMtx[3][0] * camMtx[0][0] + objMtx[3][1] * camMtx[0][1] + objMtx[3][2] * camMtx[0][2] - camX; - dest[1] = - objMtx[3][0] * camMtx[1][0] + objMtx[3][1] * camMtx[1][1] + objMtx[3][2] * camMtx[1][2] - camY; - dest[2] = - objMtx[3][0] * camMtx[2][0] + objMtx[3][1] * camMtx[2][1] + objMtx[3][2] * camMtx[2][2] - camZ; + dest[0] = objMtx[3][0] * camMtx[0][0] + objMtx[3][1] * camMtx[0][1] + objMtx[3][2] * camMtx[0][2] - camX; + dest[1] = objMtx[3][0] * camMtx[1][0] + objMtx[3][1] * camMtx[1][1] + objMtx[3][2] * camMtx[1][2] - camY; + dest[2] = objMtx[3][0] * camMtx[2][0] + objMtx[3][1] * camMtx[2][1] + objMtx[3][2] * camMtx[2][2] - camZ; } /** @@ -625,19 +540,11 @@ void vec3f_set_dist_and_angle(Vec3f from, Vec3f to, f32 dist, s16 pitch, s16 yaw * most 'inc' and going down at most 'dec'. */ s32 approach_s32(s32 current, s32 target, s32 inc, s32 dec) { - //! If target is close to the max or min s32, then it's possible to overflow - // past it without stopping. - - if (current < target) { - current += inc; - if (current > target) { - current = target; - } - } else { - current -= dec; - if (current < target) { - current = target; - } + s32 dist = (target - current); + if (dist > 0) { // current < target + current = ((dist > inc) ? (current + inc) : target); + } else if (dist < 0) { // current > target + current = ((dist < -dec) ? (current - dec) : target); } return current; } @@ -647,16 +554,11 @@ s32 approach_s32(s32 current, s32 target, s32 inc, s32 dec) { * most 'inc' and going down at most 'dec'. */ f32 approach_f32(f32 current, f32 target, f32 inc, f32 dec) { - if (current < target) { - current += inc; - if (current > target) { - current = target; - } - } else { - current -= dec; - if (current < target) { - current = target; - } + f32 dist = (target - current); + if (dist >= 0.0f) { // target >= current + current = ((dist > inc) ? (current + inc) : target); + } else { // target < current + current = ((dist < -dec) ? (current - dec) : target); } return current; } @@ -665,16 +567,7 @@ f32 approach_f32(f32 current, f32 target, f32 inc, f32 dec) { * Helper function for atan2s. Does a look up of the arctangent of y/x assuming * the resulting angle is in range [0, 0x2000] (1/8 of a circle). */ -static u16 atan2_lookup(f32 y, f32 x) { - u16 ret; - - if (x == 0) { - ret = gArctanTable[0]; - } else { - ret = gArctanTable[(s32)(y / x * 1024 + 0.5f)]; - } - return ret; -} +#define atan2_lookup(y, x) ((x == 0) ? 0x0 : atans((y) / (x))) /** * Compute the angle from (0, 0) to (x, y) as a s16. Given that terrain is in @@ -725,11 +618,11 @@ f32 atan2f(f32 y, f32 x) { return (f32) atan2s(y, x) * M_PI / 0x8000; } -#define CURVE_BEGIN_1 1 -#define CURVE_BEGIN_2 2 -#define CURVE_MIDDLE 3 -#define CURVE_END_1 4 -#define CURVE_END_2 5 +#define CURVE_BEGIN_1 0x1 +#define CURVE_BEGIN_2 0x2 +#define CURVE_MIDDLE 0x3 +#define CURVE_END_1 0x4 +#define CURVE_END_2 0x5 /** * Set 'result' to a 4-vector with weights corresponding to interpolation @@ -820,7 +713,7 @@ s32 anim_spline_poll(Vec3f result) { s32 i; s32 hasEnded = FALSE; - vec3f_copy(result, gVec3fZero); + vec3_zero(result); spline_get_weights(weights, gSplineKeyframeFraction, gSplineState); for (i = 0; i < 4; i++) { result[0] += weights[i] * gSplineKeyframe[i][1]; @@ -851,9 +744,7 @@ s32 anim_spline_poll(Vec3f result) { /// Multiply vector 'dest' by a void vec3f_mul(Vec3f dest, f32 a) { - dest[0] *= a; - dest[1] *= a; - dest[2] *= a; + vec3_mul_val(dest, a); } /// Get length of vector 'a' @@ -863,14 +754,12 @@ f32 vec3f_length(Vec3f a) { /// Get dot product of vectors 'a' and 'b' f32 vec3f_dot(Vec3f a, Vec3f b) { - return a[0] * b[0] + a[1] * b[1] + a[2] * b[2]; + return vec3_dot(a, b); } /// Make 'dest' the difference of vectors a and b. void vec3f_dif(Vec3f dest, Vec3f a, Vec3f b) { - dest[0] = a[0] - b[0]; - dest[1] = a[1] - b[1]; - dest[2] = a[2] - b[2]; + vec3_diff(dest, a, b); } // Raycasting @@ -885,51 +774,49 @@ s32 ray_surface_intersect(Vec3f orig, Vec3f dir, f32 dir_length, struct Surface return FALSE; // Get surface normal and some other stuff - norm[0] = 0; - norm[1] = surface->normal.y; - norm[2] = 0; - vec3f_mul(norm,RAY_OFFSET); + vec3_set(norm, 0, surface->normal.y, 0); + vec3_mul_val(norm, RAY_OFFSET); - vec3s_to_vec3f(v0, surface->vertex1); - vec3s_to_vec3f(v1, surface->vertex2); - vec3s_to_vec3f(v2, surface->vertex3); + vec3_copy(v0, surface->vertex1); + vec3_copy(v1, surface->vertex2); + vec3_copy(v2, surface->vertex3); - vec3f_add(v0, norm); - vec3f_add(v1, norm); - vec3f_add(v2, norm); + vec3_add(v0, norm); + vec3_add(v1, norm); + vec3_add(v2, norm); - vec3f_dif(e1, v1, v0); - vec3f_dif(e2, v2, v0); + vec3_diff(e1, v1, v0); + vec3_diff(e2, v2, v0); - vec3f_cross(h, dir, e2); + vec3_cross(h, dir, e2); // Check if we're perpendicular from the surface - a = vec3f_dot(e1, h); - if (a > -0.00001f && a < 0.00001f) + a = vec3_dot(e1, h); + if (a > -0.00001f && a < 0.00001f) { return FALSE; - + } // Check if we're making contact with the surface f = 1.0f / a; - vec3f_dif(s, orig, v0); - u = f * vec3f_dot(s, h); - if (u < 0.0f || u > 1.0f) + vec3_diff(s, orig, v0); + u = f * vec3_dot(s, h); + if (u < 0.0f || u > 1.0f) { return FALSE; - - vec3f_cross(q, s, e1); - v = f * vec3f_dot(dir, q); - if (v < 0.0f || u + v > 1.0f) + } + vec3_cross(q, s, e1); + v = f * vec3_dot(dir, q); + if (v < 0.0f || u + v > 1.0f) { return FALSE; - + } // Get the length between our origin and the surface contact point - *length = f * vec3f_dot(e2, q); - if (*length <= 0.00001 || *length > dir_length) + *length = f * vec3_dot(e2, q); + if (*length <= 0.00001 || *length > dir_length) { return FALSE; - + } // Successful contact - vec3f_copy(add_dir, dir); - vec3f_mul(add_dir, *length); - vec3f_sum(hit_pos, orig, add_dir); + vec3_copy(add_dir, dir); + vec3_mul_val(add_dir, *length); + vec3_sum(hit_pos, orig, add_dir); return TRUE; } @@ -954,14 +841,14 @@ void find_surface_on_ray_list(struct SurfaceNode *list, Vec3f orig, Vec3f dir, f // Iterate through every surface of the list for (; list != NULL; list = list->next) { // Reject surface if out of vertical bounds - if (list->surface->lowerY > top || list->surface->upperY < bottom) + if (list->surface->lowerY > top || list->surface->upperY < bottom) { continue; - + } // Check intersection between the ray and this surface if ((hit = ray_surface_intersect(orig, dir, dir_length, list->surface, chk_hit_pos, &length)) != 0) { if (length <= *max_length) { *hit_surface = list->surface; - vec3f_copy(hit_pos, chk_hit_pos); + vec3_copy(hit_pos, chk_hit_pos); *max_length = length; } } @@ -1005,12 +892,12 @@ void find_surface_on_ray(Vec3f orig, Vec3f dir, struct Surface **hit_surface, Ve // Set that no surface has been hit *hit_surface = NULL; - vec3f_sum(hit_pos, orig, dir); + vec3_sum(hit_pos, orig, dir); // Get normalized direction dir_length = vec3f_length(dir); max_length = dir_length; - vec3f_copy(normalized_dir, dir); + vec3_copy(normalized_dir, dir); vec3f_normalize(normalized_dir); // Get our cell coordinate diff --git a/src/engine/math_util.h b/src/engine/math_util.h index 60ecc52c9..a17b063b4 100644 --- a/src/engine/math_util.h +++ b/src/engine/math_util.h @@ -23,6 +23,7 @@ extern f32 gSineTable[]; #define sins(x) gSineTable[(u16) (x) >> 4] #define coss(x) gCosineTable[(u16) (x) >> 4] +#define atans(x) gArctanTable[(s32)((((x) * 1024) + 0.5f))] // is this correct? used for atan2_lookup #define DEG_PER_RAD 57.29577950560105 #define RAD_PER_DEG (1.0 / DEG_PER_RAD) @@ -349,7 +350,6 @@ void vec3s_set(Vec3s dest, s16 x, s16 y, s16 z); void vec3s_add(Vec3s dest, Vec3s a); void vec3s_sum(Vec3s dest, Vec3s a, Vec3s b); void vec3s_sub(Vec3s dest, Vec3s a); -void vec3s_to_vec3f(Vec3f dest, Vec3s a); void vec3f_to_vec3s(Vec3s dest, Vec3f a); void find_vector_perpendicular_to_plane(Vec3f dest, Vec3f a, Vec3f b, Vec3f c); void vec3f_cross(Vec3f dest, Vec3f a, Vec3f b); diff --git a/src/game/behaviors/donut_platform.inc.c b/src/game/behaviors/donut_platform.inc.c index f1503a0e5..b3e074309 100644 --- a/src/game/behaviors/donut_platform.inc.c +++ b/src/game/behaviors/donut_platform.inc.c @@ -25,7 +25,7 @@ void bhv_donut_platform_spawner_update(void) { dx = gMarioObject->oPosX - sDonutPlatformPositions[i][0]; dy = gMarioObject->oPosY - sDonutPlatformPositions[i][1]; dz = gMarioObject->oPosZ - sDonutPlatformPositions[i][2]; - marioSqDist = dx * dx + dy * dy + dz * dz; + marioSqDist = sqr(dx) + sqr(dy) + sqr(dz); // dist > 1000 and dist < 2000 if (marioSqDist > 1000000.0f && marioSqDist < 4000000.0f) { diff --git a/src/game/behaviors/drawbridge.inc.c b/src/game/behaviors/drawbridge.inc.c index 0fd049059..885613666 100644 --- a/src/game/behaviors/drawbridge.inc.c +++ b/src/game/behaviors/drawbridge.inc.c @@ -17,8 +17,6 @@ void bhv_lll_drawbridge_spawner_loop(void) { } void bhv_lll_drawbridge_loop(void) { - s32 globalTimer = gGlobalTimer; - switch (o->oAction) { case LLL_DRAWBRIDGE_ACT_LOWER: o->oFaceAngleRoll += 0x100; @@ -32,9 +30,7 @@ void bhv_lll_drawbridge_loop(void) { if ((s16) o->oFaceAngleRoll < -0x1FFD) { o->oFaceAngleRoll = 0xDFFF; - //! Because the global timer increments when the game is paused, pausing and unpausing - // the game at regular intervals can leave the drawbridge raised indefinitely. - if (o->oTimer >= 51 && (globalTimer % 8) == 0) { + if (o->oTimer >= 51 && (o->oTimer % 8) == 0) { o->oAction = LLL_DRAWBRIDGE_ACT_LOWER; cur_obj_play_sound_2(SOUND_GENERAL_BOAT_TILT1); } @@ -43,9 +39,7 @@ void bhv_lll_drawbridge_loop(void) { if ((s16) o->oFaceAngleRoll >= 0) { o->oFaceAngleRoll = 0; - //! Because the global timer increments when the game is paused, pausing and unpausing - // the game at regular intervals can leave the drawbridge lowered indefinitely. - if (o->oTimer >= 51 && (globalTimer % 8) == 0) { + if (o->oTimer >= 51 && (o->oTimer % 8) == 0) { o->oAction = LLL_DRAWBRIDGE_ACT_RAISE; cur_obj_play_sound_2(SOUND_GENERAL_BOAT_TILT2); } diff --git a/src/game/behaviors/falling_rising_platform.inc.c b/src/game/behaviors/falling_rising_platform.inc.c index 35359690f..6701027d4 100644 --- a/src/game/behaviors/falling_rising_platform.inc.c +++ b/src/game/behaviors/falling_rising_platform.inc.c @@ -9,9 +9,7 @@ void bhv_squishable_platform_loop(void) { } void bhv_bitfs_sinking_platform_loop(void) { - o->oPosY -= - sins(o->oBitfsPlatformTimer) - * 0.58; //! f32 double conversion error accumulates on Wii VC causing the platform to rise up + o->oPosY -= sins(o->oBitfsPlatformTimer) * 0.58f; o->oBitfsPlatformTimer += 0x100; } diff --git a/src/game/behaviors/grand_star.inc.c b/src/game/behaviors/grand_star.inc.c index 333aea6cd..4fa2ec990 100644 --- a/src/game/behaviors/grand_star.inc.c +++ b/src/game/behaviors/grand_star.inc.c @@ -3,7 +3,7 @@ s32 arc_to_goal_pos(Vec3f a0, Vec3f a1, f32 yVel, f32 gravity) { f32 dx = a0[0] - a1[0]; f32 dz = a0[2] - a1[2]; - f32 planarDist = sqrtf(dx * dx + dz * dz); + f32 planarDist = sqrtf(sqr(dx) + sqr(dz)); s32 time; o->oMoveAngleYaw = atan2s(dz, dx); o->oVelY = yVel; diff --git a/src/game/behaviors/klepto.inc.c b/src/game/behaviors/klepto.inc.c index 97e816baf..c7051475d 100644 --- a/src/game/behaviors/klepto.inc.c +++ b/src/game/behaviors/klepto.inc.c @@ -104,7 +104,7 @@ static void klepto_change_target(void) { dx = gMarioObject->oPosX - sKleptoTargetPositions[i][0]; dz = gMarioObject->oPosZ - sKleptoTargetPositions[i][2]; - targetDist = sqrtf(dx * dx + dz * dz); + targetDist = sqrtf(sqr(dx) + sqr(dz)); if (targetDist < minTargetDist) { minTargetDist = targetDist; newTarget = i; diff --git a/src/game/behaviors/mad_piano.inc.c b/src/game/behaviors/mad_piano.inc.c index efefaba43..08c053a30 100644 --- a/src/game/behaviors/mad_piano.inc.c +++ b/src/game/behaviors/mad_piano.inc.c @@ -44,7 +44,7 @@ static void mad_piano_act_attack(void) { } else { f32 dx = o->oPosX - o->oHomeX; f32 dz = o->oPosZ - o->oHomeZ; - f32 distToHome = sqrtf(dx * dx + dz * dz); + f32 distToHome = sqrtf(sqr(dx) + sqr(dz)); if (distToHome > 400.0f) { distToHome = 400.0f / distToHome; diff --git a/src/game/behaviors/monty_mole.inc.c b/src/game/behaviors/monty_mole.inc.c index 685f5aae6..3276cefd4 100644 --- a/src/game/behaviors/monty_mole.inc.c +++ b/src/game/behaviors/monty_mole.inc.c @@ -372,12 +372,10 @@ void bhv_monty_mole_update(void) { f32 dy = o->oPosY - sMontyMoleLastKilledPosY; f32 dz = o->oPosZ - sMontyMoleLastKilledPosZ; - f32 distToLastKill = sqrtf(dx * dx + dy * dy + dz * dz); - //! The two farthest holes on the bottom level of TTM are more than // 1500 units away from each other, so the counter resets if you // attack moles in these holes consecutively. - if (distToLastKill < 1500.0f) { + if ((sqr(dx) + sqr(dy) + sqr(dz)) < sqr(1500.0f)) { if (sMontyMoleKillStreak == 7) { play_puzzle_jingle(); spawn_object(o, MODEL_1UP, bhv1upWalking); @@ -387,8 +385,9 @@ void bhv_monty_mole_update(void) { } } - //! No overflow check - sMontyMoleKillStreak += 1; + if (sMontyMoleKillStreak < (1 << 15)) { + sMontyMoleKillStreak++; + } sMontyMoleLastKilledPosX = o->oPosX; sMontyMoleLastKilledPosY = o->oPosY; diff --git a/src/game/behaviors/sparkle_spawn_star.inc.c b/src/game/behaviors/sparkle_spawn_star.inc.c index 08c271817..0121f4e8d 100644 --- a/src/game/behaviors/sparkle_spawn_star.inc.c +++ b/src/game/behaviors/sparkle_spawn_star.inc.c @@ -41,7 +41,7 @@ void set_home_to_mario(void) { o->oPosY = o->oHomeY; dx = o->oHomeX - o->oPosX; dz = o->oHomeZ - o->oPosZ; - o->oForwardVel = sqrtf(dx * dx + dz * dz) / 23.0f; + o->oForwardVel = sqrtf(sqr(dx) + sqr(dz)) / 23.0f; } void set_y_home_to_pos(void) { diff --git a/src/game/behaviors/tilting_inverted_pyramid.inc.c b/src/game/behaviors/tilting_inverted_pyramid.inc.c index 1e56addce..4e07cf115 100644 --- a/src/game/behaviors/tilting_inverted_pyramid.inc.c +++ b/src/game/behaviors/tilting_inverted_pyramid.inc.c @@ -92,7 +92,7 @@ void bhv_tilting_inverted_pyramid_loop(void) { dx = gMarioObject->oPosX - o->oPosX; dy = 500.0f; dz = gMarioObject->oPosZ - o->oPosZ; - d = sqrtf(dx * dx + dy * dy + dz * dz); + d = sqrtf(sqr(dx) + sqr(dy) + sqr(dz)); //! Always true since dy = 500, making d >= 500. if (d != 0.0f) { diff --git a/src/game/behaviors/wiggler.inc.c b/src/game/behaviors/wiggler.inc.c index 785daca47..718245afd 100644 --- a/src/game/behaviors/wiggler.inc.c +++ b/src/game/behaviors/wiggler.inc.c @@ -192,7 +192,7 @@ void wiggler_init_segments(void) { bodyPart->yaw = prevBodyPart->yaw + dyaw; // As the head tilts, propagate the tilt backward - dxz = sqrtf(dx * dx + dz * dz); + dxz = sqrtf(sqr(dx) + sqr(dz)); dpitch = atan2s(dxz, dy) - prevBodyPart->pitch; clamp_s16(&dpitch, -0x2000, 0x2000); bodyPart->pitch = prevBodyPart->pitch + dpitch; diff --git a/src/game/camera.c b/src/game/camera.c index 260aea67f..92dd9bc0d 100644 --- a/src/game/camera.c +++ b/src/game/camera.c @@ -1287,8 +1287,8 @@ s32 update_parallel_tracking_camera(struct Camera *c, Vec3f focus, Vec3f pos) { vec3f_copy(focOffset, marioOffset); // OK - focOffset[0] = -focOffset[0] * 0.f; - focOffset[1] = focOffset[1] * 0.f; + focOffset[0] = 0.f; + focOffset[1] = 0.f; // Repeat above calcs with camOffset camOffset[0] = pos[0] - parMidPoint[0]; @@ -1319,11 +1319,6 @@ s32 update_parallel_tracking_camera(struct Camera *c, Vec3f focus, Vec3f pos) { marioOffset[1] = marioOffset[1] * zoom; marioOffset[2] = camOffset[2]; - //! Does nothing because focOffset[0] is always 0 - focOffset[0] *= 0.3f; - //! Does nothing because focOffset[1] is always 0 - focOffset[1] *= 0.3f; - pathAngle[0] = pathPitch; pathAngle[1] = pathYaw; //! No effect @@ -2128,12 +2123,8 @@ s16 update_default_camera(struct Camera *c) { unusedFreeRoamWallYaw = avoidYaw; sAvoidYawVel = yaw; sStatusFlags |= CAM_FLAG_COLLIDED_WITH_WALL; - //! Does nothing - vec3f_get_dist_and_angle(sMarioCamState->pos, cPos, &xzDist, &tempPitch, &tempYaw); // Rotate to avoid the wall approach_s16_asymptotic_bool(&yaw, avoidYaw, 10); - //! Does nothing - vec3f_set_dist_and_angle(sMarioCamState->pos, cPos, xzDist, tempPitch, tempYaw); sAvoidYawVel = (sAvoidYawVel - yaw) / 0x100; } else { if (gMarioStates[0].forwardVel == 0.f) { @@ -2386,8 +2377,6 @@ s32 update_spiral_stairs_camera(struct Camera *c, Vec3f focus, Vec3f pos) { } focYaw += sSpiralStairsYawOffset; posYaw = focYaw; - //! @bug unnecessary - camera_approach_s16_symmetric_bool(&posYaw, focYaw, 0x1000); vec3f_set_dist_and_angle(sFixedModeBasePosition, cPos, 300.f, 0, posYaw); @@ -4442,7 +4431,7 @@ s16 calculate_pitch(Vec3f from, Vec3f to) { f32 dx = to[0] - from[0]; f32 dy = to[1] - from[1]; f32 dz = to[2] - from[2]; - s16 pitch = atan2s(sqrtf(dx * dx + dz * dz), dy); + s16 pitch = atan2s(sqrtf(sqr(dx) + sqr(dz)), dy); return pitch; } @@ -4464,7 +4453,7 @@ void calculate_angles(Vec3f from, Vec3f to, s16 *pitch, s16 *yaw) { f32 dy = to[1] - from[1]; f32 dz = to[2] - from[2]; - *pitch = atan2s(sqrtf(dx * dx + dz * dz), dy); + *pitch = atan2s(sqrtf(sqr(dx) + sqr(dz)), dy); *yaw = atan2s(dz, dx); } @@ -4475,7 +4464,7 @@ f32 calc_abs_dist(Vec3f a, Vec3f b) { f32 distX = b[0] - a[0]; f32 distY = b[1] - a[1]; f32 distZ = b[2] - a[2]; - f32 distAbs = sqrtf(distX * distX + distY * distY + distZ * distZ); + f32 distAbs = sqrtf(sqr(distX) + sqr(distY) + sqr(distZ)); return distAbs; } @@ -4486,7 +4475,7 @@ f32 calc_abs_dist(Vec3f a, Vec3f b) { f32 calc_hor_dist(Vec3f a, Vec3f b) { f32 distX = b[0] - a[0]; f32 distZ = b[2] - a[2]; - f32 distHor = sqrtf(distX * distX + distZ * distZ); + f32 distHor = sqrtf(sqr(distX) + sqr(distZ)); return distHor; } @@ -7028,20 +7017,6 @@ void retrieve_info_star(struct Camera *c) { vec3f_copy(c->focus, sCameraStoreCutscene.focus); } -static UNUSED void unused_vec3s_to_vec3f(Vec3f dst, Vec3s src) { - dst[0] = src[0]; - dst[1] = src[1]; - dst[2] = src[2]; -} - -static UNUSED void unused_vec3f_to_vec3s(Vec3s dst, Vec3f src) { - // note: unlike vec3f_to_vec3s(), this function doesn't round the numbers and instead simply - // truncates them - dst[0] = src[0]; - dst[1] = src[1]; - dst[2] = src[2]; -} - /** * Rotate the camera's focus around the camera's position by incYaw and incPitch */ @@ -7942,11 +7917,8 @@ void cutscene_bowser_arena_set_pos(struct Camera *c) { * The y offset starts at 120, then decreases to 0 before reaching ~240 on the last frame. */ void cutscene_bowser_arena_focus_sine(UNUSED struct Camera *c) { - //! unused initialization - f32 yOff = 150.0f; - // cvar4 was zeroed when the cutscene started. - yOff = sins(sCutsceneVars[4].angle[1]) * 120.0f + 120.0f; + f32 yOff = sins(sCutsceneVars[4].angle[1]) * 120.0f + 120.0f; sCutsceneVars[4].angle[1] -= 0x200; approach_f32_asymptotic_bool(&sCutsceneVars[0].point[1], yOff, 0.5f); } diff --git a/src/game/envfx_snow.c b/src/game/envfx_snow.c index 11cc09454..a3640cdb6 100644 --- a/src/game/envfx_snow.c +++ b/src/game/envfx_snow.c @@ -151,8 +151,8 @@ void orbit_from_positions(Vec3s from, Vec3s to, s16 *radius, s16 *pitch, s16 *ya f32 dy = to[1] - from[1]; f32 dz = to[2] - from[2]; - *radius = (s16) sqrtf(dx * dx + dy * dy + dz * dz); - *pitch = atan2s(sqrtf(dx * dx + dz * dz), dy); + *radius = (s16) sqrtf(sqr(dx) + sqr(dy) + sqr(dz)); + *pitch = atan2s(sqrtf(sqr(dx) + sqr(dz)), dy); *yaw = atan2s(dz, dx); } diff --git a/src/game/mario.c b/src/game/mario.c index a7fa35267..7bdb88db8 100644 --- a/src/game/mario.c +++ b/src/game/mario.c @@ -718,7 +718,7 @@ void set_steep_jump_action(struct MarioState *m) { f32 y = sins(faceAngleTemp) * m->forwardVel; f32 x = coss(faceAngleTemp) * m->forwardVel * 0.75f; - m->forwardVel = sqrtf(y * y + x * x); + m->forwardVel = sqrtf(sqr(y) + sqr(x)); m->faceAngle[1] = atan2s(x, y) + angleTemp; } @@ -1834,10 +1834,10 @@ void init_mario(void) { gMarioState->area = gCurrentArea; gMarioState->marioObj = gMarioObject; gMarioState->marioObj->header.gfx.animInfo.animID = -1; - vec3s_copy(gMarioState->faceAngle, gMarioSpawnInfo->startAngle); - vec3s_set(gMarioState->angleVel, 0, 0, 0); - vec3s_to_vec3f(gMarioState->pos, gMarioSpawnInfo->startPos); - vec3f_set(gMarioState->vel, 0, 0, 0); + vec3_copy(gMarioState->faceAngle, gMarioSpawnInfo->startAngle); + vec3_zero(gMarioState->angleVel); + vec3_copy(gMarioState->pos, gMarioSpawnInfo->startPos); + vec3_zero(gMarioState->vel); gMarioState->floorHeight = find_floor(gMarioState->pos[0], gMarioState->pos[1], gMarioState->pos[2], &gMarioState->floor); if (gMarioState->pos[1] < gMarioState->floorHeight) { diff --git a/src/game/mario_actions_cutscene.c b/src/game/mario_actions_cutscene.c index 08ea592d9..45ffa280c 100644 --- a/src/game/mario_actions_cutscene.c +++ b/src/game/mario_actions_cutscene.c @@ -254,7 +254,7 @@ void handle_save_menu(struct MarioState *m) { if (gSaveOptSelectIndex == MENU_OPT_SAVE_AND_QUIT) { //! crashes - fade_into_special_warp(WARP_SPECIAL_MARIO_HEAD_REGULAR, 0);// reset game + fade_into_special_warp(WARP_SPECIAL_MARIO_HEAD_REGULAR, 0); // reset game } } diff --git a/src/game/mario_actions_moving.c b/src/game/mario_actions_moving.c index 687100f9f..bbb0e753e 100644 --- a/src/game/mario_actions_moving.c +++ b/src/game/mario_actions_moving.c @@ -694,7 +694,7 @@ void push_or_sidle_wall(struct MarioState *m, Vec3f startPos) { s16 dWallAngle; f32 dx = m->pos[0] - startPos[0]; f32 dz = m->pos[2] - startPos[2]; - f32 movedDistance = sqrtf(dx * dx + dz * dz); + f32 movedDistance = sqrtf(sqr(dx) + sqr(dz)); //! (Speed Crash) If a wall is after moving 16384 distance, this crashes. s32 animSpeed = (s32)(movedDistance * 2.0f * 0x10000); diff --git a/src/game/mario_actions_submerged.c b/src/game/mario_actions_submerged.c index 1211de91d..7d57a2a91 100644 --- a/src/game/mario_actions_submerged.c +++ b/src/game/mario_actions_submerged.c @@ -139,8 +139,8 @@ static void apply_water_current(struct MarioState *m, Vec3f step) { f32 dy = whirlpool->pos[1] - m->pos[1]; f32 dz = whirlpool->pos[2] - m->pos[2]; - f32 lateralDist = sqrtf(dx * dx + dz * dz); - f32 distance = sqrtf(lateralDist * lateralDist + dy * dy); + f32 lateralDist = sqrtf(sqr(dx) + sqr(dz)); + f32 distance = sqrtf(lateralDist * lateralDist + sqr(dy)); s16 pitchToWhirlpool = atan2s(lateralDist, dy); s16 yawToWhirlpool = atan2s(dz, dx); @@ -1049,7 +1049,7 @@ static s32 act_caught_in_whirlpool(struct MarioState *m) { f32 dx = m->pos[0] - whirlpool->oPosX; f32 dz = m->pos[2] - whirlpool->oPosZ; - f32 distance = sqrtf(dx * dx + dz * dz); + f32 distance = sqrtf(sqr(dx) + sqr(dz)); if ((marioObj->oMarioWhirlpoolPosY += m->vel[1]) < 0.0f) { marioObj->oMarioWhirlpoolPosY = 0.0f; diff --git a/src/game/obj_behaviors_2.c b/src/game/obj_behaviors_2.c index c6294082b..74c3b7a24 100644 --- a/src/game/obj_behaviors_2.c +++ b/src/game/obj_behaviors_2.c @@ -191,7 +191,7 @@ static void platform_on_track_update_pos_or_spawn_ball(s32 ballIndex, f32 x, f32 dy = nextWaypoint->pos[1] - y; dz = nextWaypoint->pos[2] - z; - distToNextWaypoint = sqrtf(dx * dx + dy * dy + dz * dz); + distToNextWaypoint = sqrtf(sqr(dx) + sqr(dy) + sqr(dz)); // Move directly to the next waypoint, even if it's farther away // than amountToMove @@ -856,7 +856,7 @@ static void treat_far_home_as_mario(f32 threshold) { f32 dx = o->oHomeX - o->oPosX; f32 dy = o->oHomeY - o->oPosY; f32 dz = o->oHomeZ - o->oPosZ; - f32 distance = sqrtf(dx * dx + dy * dy + dz * dz); + f32 distance = sqrtf(sqr(dx) + sqr(dy) + sqr(dz)); if (distance > threshold) { o->oAngleToMario = atan2s(dz, dx); @@ -865,7 +865,7 @@ static void treat_far_home_as_mario(f32 threshold) { dx = o->oHomeX - gMarioObject->oPosX; dy = o->oHomeY - gMarioObject->oPosY; dz = o->oHomeZ - gMarioObject->oPosZ; - distance = sqrtf(dx * dx + dy * dy + dz * dz); + distance = sqrtf(sqr(dx) + sqr(dy) + sqr(dz)); if (distance > threshold) { o->oDistanceToMario = 20000.0f; diff --git a/src/game/object_collision.c b/src/game/object_collision.c index 03be06110..3e4b0bf40 100644 --- a/src/game/object_collision.c +++ b/src/game/object_collision.c @@ -6,6 +6,7 @@ #include "mario.h" #include "object_list_processor.h" #include "spawn_object.h" +#include "engine/math_util.h" struct Object *debug_print_obj_collision(struct Object *a) { struct Object *currCollidedObj; @@ -27,7 +28,7 @@ s32 detect_object_hitbox_overlap(struct Object *a, struct Object *b) { f32 dx = a->oPosX - b->oPosX; f32 dz = a->oPosZ - b->oPosZ; f32 collisionRadius = a->hitboxRadius + b->hitboxRadius; - f32 distance = sqrtf(dx * dx + dz * dz); + f32 distance = sqrtf(sqr(dx) + sqr(dz)); if (collisionRadius > distance) { f32 dya_top = a->hitboxHeight + dya_bottom; @@ -63,7 +64,7 @@ s32 detect_object_hurtbox_overlap(struct Object *a, struct Object *b) { f32 dx = a->oPosX - b->oPosX; f32 dz = a->oPosZ - b->oPosZ; f32 collisionRadius = a->hurtboxRadius + b->hurtboxRadius; - f32 distance = sqrtf(dx * dx + dz * dz); + f32 distance = sqrtf(sqr(dx) + sqr(dz)); if (a == gMarioObject) { b->oInteractionSubtype |= INT_SUBTYPE_DELAY_INVINCIBILITY; diff --git a/src/game/object_helpers.c b/src/game/object_helpers.c index 6c4268d43..5fcd99f1b 100644 --- a/src/game/object_helpers.c +++ b/src/game/object_helpers.c @@ -263,7 +263,7 @@ f32 lateral_dist_between_objects(struct Object *obj1, struct Object *obj2) { f32 dx = obj1->oPosX - obj2->oPosX; f32 dz = obj1->oPosZ - obj2->oPosZ; - return sqrtf(dx * dx + dz * dz); + return sqrtf(sqr(dx) + sqr(dz)); } f32 dist_between_objects(struct Object *obj1, struct Object *obj2) { @@ -271,7 +271,7 @@ f32 dist_between_objects(struct Object *obj1, struct Object *obj2) { f32 dy = obj1->oPosY - obj2->oPosY; f32 dz = obj1->oPosZ - obj2->oPosZ; - return sqrtf(dx * dx + dy * dy + dz * dz); + return sqrtf(sqr(dx) + sqr(dy) + sqr(dz)); } void cur_obj_forward_vel_approach_upward(f32 target, f32 increment) { @@ -1462,7 +1462,7 @@ f32 cur_obj_lateral_dist_from_mario_to_home(void) { f32 dx = o->oHomeX - gMarioObject->oPosX; f32 dz = o->oHomeZ - gMarioObject->oPosZ; - dist = sqrtf(dx * dx + dz * dz); + dist = sqrtf(sqr(dx) + sqr(dz)); return dist; } @@ -1471,7 +1471,7 @@ f32 cur_obj_lateral_dist_to_home(void) { f32 dx = o->oHomeX - o->oPosX; f32 dz = o->oHomeZ - o->oPosZ; - dist = sqrtf(dx * dx + dz * dz); + dist = sqrtf(sqr(dx) + sqr(dz)); return dist; } diff --git a/src/game/rendering_graph_node.c b/src/game/rendering_graph_node.c index d4c3b61cd..22b3854f1 100644 --- a/src/game/rendering_graph_node.c +++ b/src/game/rendering_graph_node.c @@ -566,7 +566,7 @@ static void geo_process_translation_rotation(struct GraphNodeTranslationRotation Vec3f translation; Mtx *mtx = alloc_display_list(sizeof(*mtx)); - vec3s_to_vec3f(translation, node->translation); + vec3_copy(translation, node->translation); mtxf_rotate_zxy_and_translate(mtxf, translation, node->rotation); mtxf_mul(gMatStack[gMatStackIndex + 1], mtxf, gMatStack[gMatStackIndex]); gMatStackIndex++; @@ -591,7 +591,7 @@ static void geo_process_translation(struct GraphNodeTranslation *node) { Vec3f translation; Mtx *mtx = alloc_display_list(sizeof(*mtx)); - vec3s_to_vec3f(translation, node->translation); + vec3_copy(translation, node->translation); mtxf_rotate_zxy_and_translate(mtxf, translation, gVec3sZero); mtxf_mul(gMatStack[gMatStackIndex + 1], mtxf, gMatStack[gMatStackIndex]); gMatStackIndex++; @@ -664,7 +664,7 @@ static void geo_process_billboard(struct GraphNodeBillboard *node) { Mtx *mtx = alloc_display_list(sizeof(*mtx)); gMatStackIndex++; - vec3s_to_vec3f(translation, node->translation); + vec3_copy(translation, node->translation); mtxf_billboard(gMatStack[gMatStackIndex], gMatStack[gMatStackIndex - 1], translation, gCurGraphNodeCamera->roll); if (gCurGraphNodeHeldObject != NULL) { @@ -1058,8 +1058,7 @@ static s32 obj_is_in_view(struct GraphNodeObject *node, Mat4 matrix) { hScreenEdge *= GFX_DIMENSIONS_ASPECT_RATIO; if (geo != NULL && geo->type == GRAPH_NODE_TYPE_CULLING_RADIUS) { - cullingRadius = - (f32)((struct GraphNodeCullingRadius *) geo)->cullingRadius; //! Why is there a f32 cast? + cullingRadius = ((struct GraphNodeCullingRadius *) geo)->cullingRadius; } else { cullingRadius = 300; }