sounds halfway named (#1110)

* first few

* more

* more sounds

* for now

* visually separate remaining sounds

* checkpoint

* star power refactor

* standard name

* fix

---------

Co-authored-by: HailSanta <Hail2Santa@gmail.com>
This commit is contained in:
HailSanta 2023-08-12 17:08:33 -04:00 committed by GitHub
parent ff4935de77
commit 308af519a5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
373 changed files with 3623 additions and 6073 deletions

View File

@ -24,6 +24,7 @@ typedef void NoArgCallback(void*);
#define PAL_BIN u16
typedef s32 b32;
typedef s16 b16;
typedef s8 b8;
typedef s32 HitID;
@ -184,7 +185,7 @@ typedef struct NpcQuizmoBlur {
} NpcQuizmoBlur; // size = 0x8;
typedef struct NpcHistoryPoint {
/* 0x00 */ s8 isAirborne;
/* 0x00 */ b8 isAirborne;
/* 0x01 */ char unk_01[0x3];
/* 0x04 */ Vec3f pos;
} NpcHistoryPoint; // size = 0x10
@ -245,7 +246,7 @@ typedef struct Npc {
/* 0x080 */ s32 collisionChannel; /* flags used with collision tracing */
/* 0x084 */ s16 curFloor; /* colliderID */
/* 0x086 */ s16 curWall; /* colliderID */
/* 0x088 */ s16 isFacingAway;
/* 0x088 */ b16 isFacingAway;
/* 0x08A */ s16 yawCamOffset;
/* 0x08C */ s16 turnAroundYawAdjustment;
/* 0x08E */ s16 duration; // TODO: name less vaguely
@ -760,7 +761,7 @@ typedef struct Camera {
/* 0x002 */ s16 moveFlags;
/* 0x004 */ s16 updateMode;
/* 0x006 */ s16 needsInit;
/* 0x008 */ s16 isChangingMap;
/* 0x008 */ b16 isChangingMap;
/* 0x00A */ s16 viewportW;
/* 0x00C */ s16 viewportH;
/* 0x00E */ s16 viewportStartX;
@ -881,9 +882,9 @@ typedef struct BattleStatus {
/* 0x081 */ s8 actionSuccess;
/* 0x082 */ char unk_82;
/* 0x083 */ s8 actionCommandMode;
/* 0x084 */ s8 actionResult;
/* 0x084 */ s8 actionResult; // actionResultAmount?
/* 0x085 */ s8 unk_85;
/* 0x086 */ s8 unk_86;
/* 0x086 */ s8 unk_86; // actionResult?
/* 0x087 */ s8 blockResult; /* 0 = fail, 1 = success, -1 = mashed */
/* 0x088 */ s8 itemUsesLeft; /* set to 2 for double dip, 3 for triple dip */
/* 0x089 */ s8 hpDrainCount;
@ -1198,7 +1199,7 @@ typedef struct MessagePrintState {
/* 0x45E */ u8 printDelayTime; // delay to print each chunk
/* 0x45F */ u8 charsPerChunk; // how many chars to print at once
/* 0x460 */ s32 curLinePos; // position along current line
/* 0x464 */ u8 unk_464;
/* 0x464 */ u8 windowScrollRate;
/* 0x465 */ char unk_465;
/* 0x466 */ u16 nextLinePos; // ?
/* 0x468 */ u8 lineCount;
@ -1416,8 +1417,7 @@ typedef struct GameStatus {
/* 0x07F */ s8 peachDisguise; /* (1 = koopatrol, 2 = hammer bros, 3 = clubba) */
/* 0x080 */ u8 peachBakingIngredient; ///< @see enum PeachBakingItems
/* 0x081 */ s8 multiplayerEnabled;
/* 0x082 */ s8 unk_82;
/* 0x083 */ s8 unk_83;
/* 0x082 */ Vec2b unk_82;
/* 0x084 */ s8 playerSpriteSet;
/* 0x085 */ char unk_85;
/* 0x086 */ s16 areaID;
@ -1432,7 +1432,7 @@ typedef struct GameStatus {
/* 0x0A4 */ f32 playerYaw;
/* 0x0A8 */ s8 creditsViewportMode;
/* 0x0A9 */ s8 unk_A9; // selected language?
/* 0x0AA */ s8 demoFlags;
/* 0x0AA */ s8 demoBattleFlags;
/* 0x0AB */ u8 soundOutputMode;
/* 0x0AC */ s8 introState;
/* 0x0AD */ s8 introCounter;
@ -1716,7 +1716,7 @@ typedef struct DecorationTable {
} DecorationTable; // size = 0x8E8
typedef struct PlayerPathElement {
/* 0x00 */ s8 isJumping;
/* 0x00 */ b8 isJumping;
/* 0x03 */ char unk_01[3];
/* 0x04 */ Vec3f pos;
} PlayerPathElement; // size = 0x10
@ -1905,7 +1905,7 @@ typedef struct Actor {
/* 0x21C */ s8 statusAfflicted;
/* 0x21D */ s8 disableDismissTimer;
/* 0x21E */ s16 unk_21E;
/* 0x220 */ s8 isGlowing; // also used for goombario charge amount
/* 0x220 */ b8 isGlowing; // also used for goombario charge amount
/* 0x221 */ s8 attackBoost;
/* 0x222 */ s8 defenseBoost;
/* 0x223 */ s8 chillOutAmount; /* attack reduction */

View File

@ -252,7 +252,7 @@
#define AssignPanelFlag dead_AssignPanelFlag
#define Entity_HiddenPanel dead_Entity_HiddenPanel
#define ShakeCam dead_ShakeCam
#define func_802D62E4 dead_func_802D62E4
#define StopTrackingSoundPos dead_StopTrackingSoundPos
#define IsStartingConversation dead_IsStartingConversation
#define ModifyGlobalOverrideFlags dead_ModifyGlobalOverrideFlags
#define FindKeyItem dead_FindKeyItem

View File

@ -181,26 +181,22 @@ typedef struct SnowflakeFXData {
typedef struct StarFXData {
/* 0x000 */ s32 unk_00;
/* 0x004 */ f32 unk_04;
/* 0x008 */ f32 unk_08;
/* 0x00C */ f32 unk_0C;
/* 0x010 */ f32 unk_10;
/* 0x014 */ f32 unk_14;
/* 0x018 */ f32 unk_18;
/* 0x004 */ Vec3f pos;
/* 0x010 */ Vec3f vel;
/* 0x01C */ f32 unk_1C;
/* 0x020 */ f32 unk_20;
/* 0x024 */ f32 unk_24;
/* 0x024 */ f32 angle;
/* 0x028 */ s32 unk_28;
/* 0x02C */ f32 unk_2C;
/* 0x030 */ s32 unk_30;
/* 0x034 */ f32 unk_34;
/* 0x038 */ s32 unk_38;
/* 0x038 */ s32 type;
/* 0x03C */ s32 unk_3C;
/* 0x040 */ Mtx unk_40[8];
/* 0x240 */ f32 unk_240;
/* 0x244 */ s32 unk_244;
/* 0x248 */ s32 unk_248;
/* 0x24C */ s32 unk_24C;
/* 0x240 */ f32 scale;
/* 0x244 */ s32 primR;
/* 0x248 */ s32 primG;
/* 0x24C */ s32 primB;
} StarFXData; // size = 0x250
typedef struct EmoteFXData {
@ -572,17 +568,17 @@ typedef struct ShockwaveFXData {
} ShockwaveFXData; // size = 0x58
typedef struct MusicNoteFXData {
/* 0x00 */ s32 unk_00;
/* 0x00 */ s32 type;
/* 0x04 */ Vec3f pos;
/* 0x10 */ f32 unk_10;
/* 0x14 */ s32 unk_14;
/* 0x10 */ f32 scale;
/* 0x14 */ s32 alpha;
/* 0x18 */ s32 timeLeft;
/* 0x1C */ s32 unk_1C;
/* 0x20 */ s32 unk_20;
/* 0x24 */ f32 unk_24;
/* 0x28 */ f32 unk_28;
/* 0x2C */ f32 unk_2C;
/* 0x30 */ f32 unk_30;
/* 0x1C */ s32 lifetime;
/* 0x20 */ s32 noteType;
/* 0x24 */ f32 velX;
/* 0x28 */ f32 velY;
/* 0x2C */ f32 finalVelX;
/* 0x30 */ f32 finalVelY;
} MusicNoteFXData; // size = 0x34
typedef struct SmokeBurstFXData {
@ -1077,22 +1073,18 @@ typedef struct FireFlowerFXData {
} FireFlowerFXData; // size = 0x4C
typedef struct RecoverFXData {
/* 0x00 */ s32 unk_00;
/* 0x04 */ f32 unk_04;
/* 0x08 */ f32 unk_08;
/* 0x0C */ f32 unk_0C;
/* 0x10 */ f32 unk_10;
/* 0x14 */ f32 unk_14;
/* 0x18 */ f32 unk_18;
/* 0x1C */ f32 unk_1C;
/* 0x00 */ s32 type;
/* 0x04 */ Vec3f pos;
/* 0x10 */ Vec3f vel;
/* 0x1C */ f32 angle;
/* 0x20 */ s32 unk_20;
/* 0x24 */ f32 unk_24;
/* 0x28 */ s32 unk_28;
/* 0x2C */ s32 unk_2C;
/* 0x30 */ s32 unk_30;
/* 0x24 */ f32 offsetX;
/* 0x28 */ s32 alpha;
/* 0x2C */ s32 timeLeft;
/* 0x30 */ s32 lifetime;
/* 0x34 */ s32 unk_34;
/* 0x38 */ f32 unk_38;
/* 0x3C */ f32 unk_3C;
/* 0x38 */ f32 scaleX;
/* 0x3C */ f32 scaleY;
/* 0x40 */ s32 unk_40;
/* 0x44 */ s32 unk_44;
} RecoverFXData; // size = 0x48

View File

@ -210,7 +210,7 @@ typedef struct ChestData {
typedef struct BlueWarpPipeData {
/* 0x00 */ s32 unk_00; // proably flags
/* 0x04 */ s32 timer;
/* 0x08 */ s32 isRaised;
/* 0x08 */ b32 isRaised;
/* 0x0C */ s32 entryID;
/* 0x10 */ EvtScript* onEnterPipeEvt;
/* 0x14 */ s32 flagIndex;

File diff suppressed because it is too large Load Diff

View File

@ -47,7 +47,7 @@
#define PTR_LIST_END ((void*) -1)
#define API_CALLABLE(name) ApiStatus name(Evt* script, s32 isInitialCall)
#define API_CALLABLE(name) ApiStatus name(Evt* script, b32 isInitialCall)
// standardized padding macros for map overlays
#define MAP_RODATA_PAD(n,name) const s32 N(rodata_pad_##name)[n] = {};
@ -257,6 +257,13 @@
} \
};
#define UNPACK_PAL_R(color) (((color) >> 11) & 0x1F)
#define UNPACK_PAL_G(color) (((color) >> 6) & 0x1F)
#define UNPACK_PAL_B(color) (((color) >> 1) & 0x1F)
#define UNPACK_PAL_A(color) ((color) & 1)
#define PACK_PAL_RGBA(r, g, b, a) (((r) << 11) | ((g) << 6) | ((b) << 1) | (a));
#define PM_CC_01 0, 0, 0, TEXEL0, PRIMITIVE, 0, TEXEL0, 0
#define PM_CC_02 0, 0, 0, TEXEL0, TEXEL0, 0, PRIMITIVE, 0
#define PM_CC_03 TEXEL0, 0, SHADE, 0, PRIMITIVE, 0, SHADE, 0

View File

@ -223,7 +223,7 @@ typedef struct {
/* 0x1C */ Vec3i detectPos;
/* 0x28 */ VecXZi detectSize;
/* 0x30 */ enum TerritoryShape detectShape;
/* 0x34 */ s32 isFlying;
/* 0x34 */ b32 isFlying;
} EnemyTerritoryWander; // size = 0x38
typedef struct {
@ -233,7 +233,7 @@ typedef struct {
/* 0x80 */ Vec3i detectPos;
/* 0x8C */ VecXZi detectSize;
/* 0x94 */ enum TerritoryShape detectShape;
/* 0x98 */ s32 isFlying;
/* 0x98 */ b32 isFlying;
} EnemyTerritoryPatrol; // size = 0x9C
typedef union {

View File

@ -4,8 +4,8 @@
#include "common_structs.h"
#include "macros.h"
ApiStatus FadeBackgroundToBlack(Evt* script, s32 isInitialCall);
ApiStatus UnfadeBackgroundFromBlack(Evt* script, s32 isInitialCall);
ApiStatus FadeBackgroundDarken(Evt* script, s32 isInitialCall);
ApiStatus FadeBackgroundLighten(Evt* script, s32 isInitialCall);
ApiStatus GetCamLookAtObjVector(Evt* script, s32 isInitialCall);
ApiStatus HasMerleeCasts(Evt* script, s32 isInitialCall);
ApiStatus OnDefeatEnemy(Evt* script, s32 isInitialCall);
@ -331,7 +331,7 @@ ApiStatus SetPlayerImgFXFlags(Evt* script, s32 isInitialCall);
ApiStatus UpdatePlayerImgFX(Evt* script, s32 isInitialCall);
ApiStatus PushSong(Evt* script, s32 isInitialCall);
ApiStatus PopSong(Evt* script, s32 isInitialCall);
ApiStatus func_802D62E4(Evt* script, s32 isInitialCall);
ApiStatus StopTrackingSoundPos(Evt* script, s32 isInitialCall);
ApiStatus func_80044238(Evt* script, s32 isInitialCall);
ApiStatus MakeLocalVertexCopy(Evt* script, s32 isInitialCall);
ApiStatus SetCustomGfx(Evt* script, s32 isInitialCall);

View File

@ -116,7 +116,7 @@ extern s32 gCurrentDisplayContextIndex;
extern s16 gCurrentCamID;
extern s32 D_8029C890[10][5];
extern s32 PartnerWishAnims[][5];
extern HeapNode heap_battleHead;

View File

@ -238,7 +238,7 @@ void btl_state_update_normal_start(void) {
read_background_size(&gBackgroundImage);
}
if (gGameStatusPtr->demoFlags & 1) {
if (gGameStatusPtr->demoBattleFlags & DEMO_BTL_FLAG_ENABLED) {
set_curtain_scale_goal(1.0f);
}
@ -446,7 +446,7 @@ void btl_state_update_normal_start(void) {
btl_set_state(BATTLE_STATE_ENEMY_FIRST_STRIKE);
break;
default:
if (!(gGameStatusPtr->demoFlags & 1)) {
if (!(gGameStatusPtr->demoBattleFlags & DEMO_BTL_FLAG_ENABLED)) {
actor = battleStatus->playerActor;
if (gBattleStatus.flags2 & BS_FLAGS2_PEACH_BATTLE) {
script = start_script(&EVS_PeachEnterStage, EVT_PRIORITY_A, 0);
@ -486,7 +486,7 @@ void btl_state_update_normal_start(void) {
btl_cam_use_preset(BTL_CAM_DEFAULT);
}
if (!(gGameStatusPtr->demoFlags & 1)) {
if (!(gGameStatusPtr->demoBattleFlags & DEMO_BTL_FLAG_ENABLED)) {
BattleScreenFadeAmt -= 10;
} else {
BattleScreenFadeAmt -= 50;
@ -771,7 +771,7 @@ void btl_state_update_begin_player_turn(void) {
fx_water_splash(0, player->curPos.x - 15.0f, player->curPos.y + 32.0f, player->curPos.z + 5.0f, 1.0f, 24);
fx_water_splash(1, player->curPos.x + 15.0f, player->curPos.y + 22.0f, player->curPos.z + 5.0f, 1.0f, 24);
battleStatus->waterBlockEffect = NULL;
sfx_play_sound(SOUND_0299);
sfx_play_sound(SOUND_DESTROY_WATER_BLOCK);
btl_show_battle_message(BTL_MSG_WATER_BLOCK_END, 60);
gBattleSubState = BTL_SUBSTATE_BEGIN_PLAYER_TURN_AWAIT_WATER_BLOCK;
} else {
@ -918,11 +918,11 @@ back:
}
if (player->transparentStatus != 0) {
player->transparentDuration--;
part->flags |= ACTOR_PART_FLAG_100;
part->flags |= ACTOR_PART_FLAG_TRANSPARENT;
do {
if (player->transparentDuration <= 0) {
player->transparentStatus = 0;
part->flags &= ~ACTOR_PART_FLAG_100;
part->flags &= ~ACTOR_PART_FLAG_TRANSPARENT;
remove_status_transparent(player->hudElementDataIndex);
}
} while (0); // TODO required to match
@ -2763,7 +2763,7 @@ void btl_state_update_player_move(void) {
break;
}
if (gGameStatusPtr->demoFlags & 1) {
if (gGameStatusPtr->demoBattleFlags & DEMO_BTL_FLAG_ENABLED) {
btl_set_state(BATTLE_STATE_END_DEMO_BATTLE);
break;
}
@ -3258,7 +3258,7 @@ void btl_state_update_partner_move(void) {
break;
}
if (gGameStatusPtr->demoFlags & 1) {
if (gGameStatusPtr->demoBattleFlags & DEMO_BTL_FLAG_ENABLED) {
btl_set_state(BATTLE_STATE_END_DEMO_BATTLE);
break;
}
@ -3266,7 +3266,7 @@ void btl_state_update_partner_move(void) {
if (playerData->curPartner == PARTNER_GOOMBARIO
&& battleStatus->moveCategory == BTL_MENU_TYPE_CHANGE_PARTNER
&& battleStatus->selectedMoveID != MOVE_CHARGE) {
partner->isGlowing = 0;
partner->isGlowing = FALSE;
gBattleStatus.flags1 &= ~BS_FLAGS1_GOOMBARIO_CHARGED;
}
if (btl_check_player_defeated()) {
@ -3677,7 +3677,7 @@ void btl_state_update_enemy_move(void) {
}
if (battleStatus->stateFreezeCount == 0) {
if (gGameStatusPtr->demoFlags & 1) {
if (gGameStatusPtr->demoBattleFlags & DEMO_BTL_FLAG_ENABLED) {
btl_set_state(BATTLE_STATE_END_DEMO_BATTLE);
} else {
btl_update_ko_status();
@ -3952,7 +3952,7 @@ void btl_state_update_first_strike(void) {
if (battleStatus->stateFreezeCount == 0) {
decrement_status_bar_disabled();
if (!(gGameStatusPtr->demoFlags & 1)) {
if (!(gGameStatusPtr->demoBattleFlags & DEMO_BTL_FLAG_ENABLED)) {
Actor* target;
if (btl_check_player_defeated() || btl_check_enemies_defeated()) {
@ -4003,7 +4003,7 @@ void btl_state_draw_first_stike(void) {
if (BattleScreenFadeAmt == 0) {
set_screen_overlay_params_front(OVERLAY_NONE, -1.0f);
} else {
if (!(gGameStatusPtr->demoFlags & 1)) {
if (!(gGameStatusPtr->demoBattleFlags & DEMO_BTL_FLAG_ENABLED)) {
BattleScreenFadeAmt -= 20;
} else {
BattleScreenFadeAmt -= 50;

View File

@ -51,22 +51,22 @@ HudScript* bHPDigitHudScripts[] = {
s32 BattleScreenFadeAmt = 0xFF;
EvtScript BtlPutPartnerAway = {
EVT_CALL(DispatchEvent, 256, 62)
EVT_CALL(DispatchEvent, ACTOR_PARTNER, EVENT_PUT_PARTNER_AWAY)
EVT_CHILD_THREAD
EVT_SETF(LVar0, EVT_FLOAT(1.0))
EVT_LOOP(10)
EVT_CALL(SetActorScale, 256, LVar0, LVar0, EVT_FLOAT(1.0))
EVT_CALL(SetActorScale, ACTOR_PARTNER, LVar0, LVar0, EVT_FLOAT(1.0))
EVT_SUBF(LVar0, EVT_FLOAT(0.1))
EVT_WAIT(1)
EVT_END_LOOP
EVT_END_CHILD_THREAD
EVT_CALL(EnablePartnerBlur)
EVT_CALL(PlaySoundAtActor, 0, 14)
EVT_CALL(PlaySoundAtActor, 0, SOUND_PARTNER_GET_OUT)
EVT_CALL(GetActorPos, 0, LVar0, LVar1, LVar2)
EVT_ADD(LVar1, 25)
EVT_CALL(SetActorJumpGravity, 256, EVT_FLOAT(1.0))
EVT_CALL(SetGoalPos, 256, LVar0, LVar1, LVar2)
EVT_CALL(JumpToGoal, 256, 10, 0, 0, 1)
EVT_CALL(SetActorJumpGravity, ACTOR_PARTNER, EVT_FLOAT(1.0))
EVT_CALL(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
EVT_CALL(JumpToGoal, ACTOR_PARTNER, 10, 0, 0, 1)
EVT_CALL(DisablePartnerBlur)
EVT_RETURN
EVT_END
@ -76,22 +76,22 @@ EvtScript BtlBringPartnerOut = {
EVT_CHILD_THREAD
EVT_SETF(LVar0, EVT_FLOAT(0.1))
EVT_LOOP(20)
EVT_CALL(SetActorScale, 256, LVar0, LVar0, EVT_FLOAT(1.0))
EVT_CALL(SetActorScale, ACTOR_PARTNER, LVar0, LVar0, EVT_FLOAT(1.0))
EVT_ADDF(LVar0, EVT_FLOAT(0.05))
EVT_WAIT(1)
EVT_END_LOOP
EVT_CALL(SetActorScale, 256, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0))
EVT_CALL(SetActorScale, ACTOR_PARTNER, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0))
EVT_END_CHILD_THREAD
EVT_CALL(PlaySoundAtActor, 0, 13)
EVT_CALL(GetGoalPos, 256, LVar0, LVar1, LVar2)
EVT_CALL(SetActorJumpGravity, 256, EVT_FLOAT(1.0))
EVT_CALL(PlaySoundAtActor, 0, SOUND_PARTNER_PUT_AWAY)
EVT_CALL(GetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
EVT_CALL(SetActorJumpGravity, ACTOR_PARTNER, EVT_FLOAT(1.0))
EVT_IF_EQ(LVar1, 0)
EVT_CALL(JumpToGoal, 256, 20, 0, 0, 1)
EVT_CALL(JumpToGoal, ACTOR_PARTNER, 20, 0, 0, 1)
EVT_ELSE
EVT_CALL(JumpToGoal, 256, 20, 0, 0, 1)
EVT_CALL(JumpToGoal, ACTOR_PARTNER, 20, 0, 0, 1)
EVT_END_IF
EVT_CALL(GetActorPos, 256, LVar0, LVar1, LVar2)
EVT_CALL(ForceHomePos, 256, LVar0, LVar1, LVar2)
EVT_CALL(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
EVT_CALL(ForceHomePos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
EVT_RETURN
EVT_END
};
@ -745,9 +745,9 @@ void tattle_cam_pre_render(Camera* camera) {
} else {
for (i = 0; i < ARRAY_COUNT(gTattleBgPalette); i++) {
u16 palColor = gGameStatusPtr->backgroundPalette[i];
u16 blendedB = blend_background_channel_COPY((palColor >> 1) & 0x1F, fogB >> 3, fogA);
u16 blendedG = blend_background_channel_COPY((palColor >> 6) & 0x1F, fogG >> 3, fogA);
u16 blendedR = blend_background_channel_COPY((palColor >> 11) & 0x1F, fogR >> 3, fogA);
u16 blendedB = blend_background_channel_COPY(UNPACK_PAL_B(palColor), fogB >> 3, fogA);
u16 blendedG = blend_background_channel_COPY(UNPACK_PAL_G(palColor), fogG >> 3, fogA);
u16 blendedR = blend_background_channel_COPY(UNPACK_PAL_R(palColor), fogR >> 3, fogA);
gTattleBgPalette[i] = blendedB << 1 | blendedG << 6 | blendedR << 11 | 1;
}
}

View File

@ -618,8 +618,8 @@ ActorSounds bActorSoundTable[ACTOR_TYPE_COUNT] = {
.delay = { 30, 30 }
},
[ACTOR_TYPE_LAKITU] = {
.walk = { SOUND_LRAW_0295, SOUND_LRAW_0295 },
.fly = { SOUND_LRAW_0295, SOUND_LRAW_0295 },
.walk = { SOUND_FLIGHT, SOUND_FLIGHT },
.fly = { SOUND_FLIGHT, SOUND_FLIGHT },
.jump = SOUND_ACTOR_JUMP,
.hurt = SOUND_ACTOR_HURT,
.delay = { -5, -5 }
@ -660,15 +660,15 @@ ActorSounds bActorSoundTable[ACTOR_TYPE_COUNT] = {
.delay = { 30, 30 }
},
[ACTOR_TYPE_RUFF_PUFF] = {
.walk = { SOUND_LRAW_0295, NULL },
.fly = { SOUND_LRAW_0295, NULL },
.walk = { SOUND_FLIGHT, NULL },
.fly = { SOUND_FLIGHT, NULL },
.jump = SOUND_ACTOR_JUMP,
.hurt = SOUND_ACTOR_HURT,
.delay = { 30, 30 }
},
[ACTOR_TYPE_SPIKE] = {
.walk = { SOUND_LRAW_0295, NULL },
.fly = { SOUND_LRAW_0295, NULL },
.walk = { SOUND_FLIGHT, NULL },
.fly = { SOUND_FLIGHT, NULL },
.jump = SOUND_ACTOR_JUMP,
.hurt = SOUND_ACTOR_HURT,
.delay = { 30, 30 }
@ -709,7 +709,7 @@ ActorSounds bActorSoundTable[ACTOR_TYPE_COUNT] = {
.delay = { 30, 30 }
},
[ACTOR_TYPE_DUPLIGHOST] = {
.walk = { SOUND_02CA, SOUND_02CA },
.walk = { SOUND_DUPLIGHOST_STEP, SOUND_DUPLIGHOST_STEP },
.fly = { NULL, NULL },
.jump = SOUND_ACTOR_JUMP,
.hurt = SOUND_ACTOR_HURT,
@ -758,15 +758,15 @@ ActorSounds bActorSoundTable[ACTOR_TYPE_COUNT] = {
.delay = { 30, 30 }
},
[ACTOR_TYPE_GHOST_SUSHIE] = {
.walk = { SOUND_029A, SOUND_029A },
.walk = { SOUND_SUSHIE_STEP, SOUND_SUSHIE_STEP },
.fly = { NULL, NULL },
.jump = SOUND_ACTOR_JUMP,
.hurt = SOUND_ACTOR_HURT,
.delay = { 30, 30 }
},
[ACTOR_TYPE_GHOST_LAKILESTER] = {
.walk = { SOUND_LRAW_0295, SOUND_LRAW_0295 },
.fly = { SOUND_LRAW_0295, SOUND_LRAW_0295 },
.walk = { SOUND_FLIGHT, SOUND_FLIGHT },
.fly = { SOUND_FLIGHT, SOUND_FLIGHT },
.jump = SOUND_ACTOR_JUMP,
.hurt = SOUND_ACTOR_HURT,
.delay = { -5, -5 }
@ -1010,8 +1010,8 @@ ActorSounds bActorSoundTable[ACTOR_TYPE_COUNT] = {
.delay = { 30, 30 }
},
[ACTOR_TYPE_UNUSED_66] = {
.walk = { SOUND_LRAW_0295, SOUND_LRAW_0295 },
.fly = { SOUND_LRAW_0295, SOUND_LRAW_0295 },
.walk = { SOUND_FLIGHT, SOUND_FLIGHT },
.fly = { SOUND_FLIGHT, SOUND_FLIGHT },
.jump = SOUND_ACTOR_JUMP,
.hurt = SOUND_ACTOR_HURT,
.delay = { -5, -5 }
@ -1115,15 +1115,15 @@ ActorSounds bActorSoundTable[ACTOR_TYPE_COUNT] = {
.delay = { 30, 30 }
},
[ACTOR_TYPE_SUSHIE] = {
.walk = { SOUND_029A, SOUND_029A },
.walk = { SOUND_SUSHIE_STEP, SOUND_SUSHIE_STEP },
.fly = { NULL, NULL },
.jump = SOUND_ACTOR_JUMP,
.hurt = SOUND_ACTOR_HURT,
.delay = { 30, 30 }
},
[ACTOR_TYPE_LAKILESTER] = {
.walk = { SOUND_LRAW_0295, SOUND_LRAW_0295 },
.fly = { SOUND_LRAW_0295, SOUND_LRAW_0295 },
.walk = { SOUND_FLIGHT, SOUND_FLIGHT },
.fly = { SOUND_FLIGHT, SOUND_FLIGHT },
.jump = SOUND_ACTOR_JUMP,
.hurt = SOUND_ACTOR_HURT,
.delay = { -5, -5 }
@ -1178,7 +1178,7 @@ ActorSounds bActorSoundTable[ACTOR_TYPE_COUNT] = {
.delay = { 30, 30 }
},
[ACTOR_TYPE_LEE] = {
.walk = { SOUND_02CA, SOUND_02CA },
.walk = { SOUND_DUPLIGHOST_STEP, SOUND_DUPLIGHOST_STEP },
.fly = { NULL, NULL },
.jump = SOUND_ACTOR_JUMP,
.hurt = SOUND_ACTOR_HURT,
@ -1227,15 +1227,15 @@ ActorSounds bActorSoundTable[ACTOR_TYPE_COUNT] = {
.delay = { 30, 30 }
},
[ACTOR_TYPE_LEE_SUSHIE] = {
.walk = { SOUND_029A, SOUND_029A },
.walk = { SOUND_SUSHIE_STEP, SOUND_SUSHIE_STEP },
.fly = { NULL, NULL },
.jump = SOUND_ACTOR_JUMP,
.hurt = SOUND_ACTOR_HURT,
.delay = { 30, 30 }
},
[ACTOR_TYPE_LEE_LAKILESTER] = {
.walk = { SOUND_LRAW_0295, SOUND_LRAW_0295 },
.fly = { SOUND_LRAW_0295, SOUND_LRAW_0295 },
.walk = { SOUND_FLIGHT, SOUND_FLIGHT },
.fly = { SOUND_FLIGHT, SOUND_FLIGHT },
.jump = SOUND_ACTOR_JUMP,
.hurt = SOUND_ACTOR_HURT,
.delay = { -5, -5 }

View File

@ -758,7 +758,8 @@ ApiStatus ItemCheckHit(Evt* script, s32 isInitialCall) {
flags = *args++;
if ((flags & (BS_FLAGS1_10 | BS_FLAGS1_SP_EVT_ACTIVE)) == (BS_FLAGS1_10 | BS_FLAGS1_SP_EVT_ACTIVE)) {
gBattleStatus.flags1 |= BS_FLAGS1_10 | BS_FLAGS1_SP_EVT_ACTIVE;
gBattleStatus.flags1 |= BS_FLAGS1_10;
gBattleStatus.flags1 |= BS_FLAGS1_SP_EVT_ACTIVE;
} else if (flags & BS_FLAGS1_10) {
gBattleStatus.flags1 |= BS_FLAGS1_10;
gBattleStatus.flags1 &= ~BS_FLAGS1_SP_EVT_ACTIVE;

View File

@ -10,13 +10,6 @@ enum StandardPalettes {
STANDARD_PAL_STATIC = 3,
};
#define UNPACK_PAL_R(color) (((color) >> 11) & 0x1F)
#define UNPACK_PAL_G(color) (((color) >> 6) & 0x1F)
#define UNPACK_PAL_B(color) (((color) >> 1) & 0x1F)
#define UNPACK_PAL_A(color) ((color) & 1)
#define PACK_PAL_RGBA(r, g, b, a) (((r) << 11) | ((g) << 6) | ((b) << 1) | (a));
// lerp from A to B as alpha does from 0 to 255
#define LERP_COMPONENT(a, b, alpha) ((a) * (255 - (alpha)) + (b) * (alpha)) / 255;
@ -770,7 +763,7 @@ void update_actor_shadow(s32 arg0, Actor* actor) {
set_standard_shadow_scale(shadow, dist);
shadow->scale.x *= actorPart->shadowScale;
}
if (actorPart->opacity < 255 || actorPart->flags & ACTOR_PART_FLAG_100) {
if (actorPart->opacity < 255 || actorPart->flags & ACTOR_PART_FLAG_TRANSPARENT) {
actor->renderMode = RENDER_MODE_SURFACE_XLU_LAYER3;
}
}
@ -988,9 +981,9 @@ void appendGfx_npc_actor(s32 isPartner, s32 actorIndex) {
}
if (actor->transparentStatus == STATUS_KEY_TRANSPARENT) {
part->flags |= ACTOR_PART_FLAG_100;
part->flags |= ACTOR_PART_FLAG_TRANSPARENT;
} else {
part->flags &= ~ACTOR_PART_FLAG_100;
part->flags &= ~ACTOR_PART_FLAG_TRANSPARENT;
}
do {
@ -1152,7 +1145,7 @@ void appendGfx_npc_actor(s32 isPartner, s32 actorIndex) {
if (actor->staticStatus == STATUS_KEY_STATIC) {
create_status_static(actor->hudElementDataIndex, STATUS_KEY_STATIC);
}
if ((actor->transparentStatus == STATUS_KEY_TRANSPARENT) || (part->flags & ACTOR_PART_FLAG_100)) {
if ((actor->transparentStatus == STATUS_KEY_TRANSPARENT) || (part->flags & ACTOR_PART_FLAG_TRANSPARENT)) {
create_status_transparent(actor->hudElementDataIndex, STATUS_KEY_TRANSPARENT);
}
if (actor->chillOutAmount != 0) {
@ -1434,7 +1427,7 @@ void update_player_actor_shadow(void) {
set_standard_shadow_scale(shadow, distance);
shadow->scale.x *= player->shadowScale * player->scalingFactor;
if (parts->opacity >= 255 && !(parts->flags & ACTOR_PART_FLAG_100)) {
if (parts->opacity >= 255 && !(parts->flags & ACTOR_PART_FLAG_TRANSPARENT)) {
player->renderMode = RENDER_MODE_ALPHATEST;
} else {
player->renderMode = RENDER_MODE_SURFACE_XLU_LAYER3;
@ -1597,7 +1590,7 @@ void appendGfx_player_actor(void* arg0) {
}
if (player->transparentStatus == STATUS_KEY_TRANSPARENT) {
playerParts->flags |= ACTOR_PART_FLAG_100;
playerParts->flags |= ACTOR_PART_FLAG_TRANSPARENT;
if (FALSE) { // TODO required to match - also whyyyyyy compiler, whyyyyy
back:
@ -1606,7 +1599,7 @@ void appendGfx_player_actor(void* arg0) {
goto end;
}
} else {
playerParts->flags &= ~ACTOR_PART_FLAG_100;
playerParts->flags &= ~ACTOR_PART_FLAG_TRANSPARENT;
}
do {
@ -1785,7 +1778,7 @@ void appendGfx_player_actor(void* arg0) {
playerParts->curAnimation = get_player_anim_for_status(STATUS_KEY_STATIC);
animChanged = TRUE;
}
if ((player->transparentStatus == STATUS_KEY_TRANSPARENT) || (playerParts->flags & ACTOR_PART_FLAG_100)) {
if ((player->transparentStatus == STATUS_KEY_TRANSPARENT) || (playerParts->flags & ACTOR_PART_FLAG_TRANSPARENT)) {
if (!animChanged) {
playerParts->curAnimation = get_player_anim_for_status(STATUS_KEY_TRANSPARENT);
animChanged = TRUE;
@ -1819,7 +1812,7 @@ void appendGfx_player_actor(void* arg0) {
create_status_static(player->hudElementDataIndex, STATUS_KEY_STATIC);
}
}
if ((player->transparentStatus == STATUS_KEY_TRANSPARENT) || (playerParts->flags & ACTOR_PART_FLAG_100)) {
if ((player->transparentStatus == STATUS_KEY_TRANSPARENT) || (playerParts->flags & ACTOR_PART_FLAG_TRANSPARENT)) {
create_status_transparent(player->hudElementDataIndex, STATUS_KEY_TRANSPARENT);
}
} else {
@ -1953,7 +1946,7 @@ s32 render_with_adjusted_palettes(b32 isNpcSprite, ActorPart* part, s32 yaw, Mat
sprDrawOpts = DRAW_SPRITE_OVERRIDE_ALPHA;
opacity = part->opacity;
}
if (part->flags & ACTOR_PART_FLAG_100) {
if (part->flags & ACTOR_PART_FLAG_TRANSPARENT) {
sprDrawOpts = DRAW_SPRITE_OVERRIDE_ALPHA;
opacity = opacity * 120 / 255;
}
@ -2056,7 +2049,7 @@ void func_8025950C(ActorPart* part, s32 yaw, Matrix4f mtx) {
idMask = DRAW_SPRITE_OVERRIDE_ALPHA;
opacity = part->opacity;
}
if (part->flags & ACTOR_PART_FLAG_100) {
if (part->flags & ACTOR_PART_FLAG_TRANSPARENT) {
idMask = DRAW_SPRITE_OVERRIDE_ALPHA;
opacity = (opacity * 120) / 255;
}
@ -2100,7 +2093,7 @@ void func_802596C0(ActorPart* part, s32 yaw, Matrix4f mtx) {
opacity = part->opacity;
}
if (part->flags & ACTOR_PART_FLAG_100) {
if (part->flags & ACTOR_PART_FLAG_TRANSPARENT) {
idMask = DRAW_SPRITE_OVERRIDE_ALPHA;
opacity = (opacity * 120) / 255;
}
@ -2125,7 +2118,7 @@ void func_802597B0(ActorPart* part, s32 yaw, Matrix4f mtx) {
idMask = DRAW_SPRITE_OVERRIDE_ALPHA;
opacity = part->opacity;
}
if (part->flags & ACTOR_PART_FLAG_100) {
if (part->flags & ACTOR_PART_FLAG_TRANSPARENT) {
idMask = DRAW_SPRITE_OVERRIDE_ALPHA;
opacity = (opacity * 120) / 255;
}
@ -2167,7 +2160,7 @@ void func_8025995C(ActorPart* part, s32 yaw, Matrix4f mtx) {
idMask = DRAW_SPRITE_OVERRIDE_ALPHA;
opacity = part->opacity;
}
if (part->flags & ACTOR_PART_FLAG_100) {
if (part->flags & ACTOR_PART_FLAG_TRANSPARENT) {
idMask = DRAW_SPRITE_OVERRIDE_ALPHA;
opacity = (opacity * 120) / 255;
}

View File

@ -338,7 +338,7 @@ API_CALLABLE(BattleMerleeFadeStageToBlack) {
script->functionTemp[0] = 25;
}
set_background_color_blend(0, 0, 0, ((25 - script->functionTemp[0]) * 10) & 0xFE);
set_background_color_blend(0, 0, 0, ((25 - script->functionTemp[0]) * 10) & 254);
script->functionTemp[0]--;
if (script->functionTemp[0] == 0) {
@ -1001,13 +1001,13 @@ EvtScript EVS_Player_HandleEvent = {
EVT_END_CASE_GROUP
EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_208C)
EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_NO_DAMGE)
EVT_SET_CONST(LVar1, ANIM_Mario1_Idle)
EVT_EXEC_WAIT(EVS_Player_NoDamageHit)
EVT_END_CASE_GROUP
EVT_CASE_OR_EQ(EVENT_18)
EVT_CASE_OR_EQ(EVENT_BLOCK)
EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_208C)
EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_NO_DAMGE)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Mario1_Crouch)
EVT_EXEC_WAIT(EVS_Player_NoDamageHit)
@ -1331,7 +1331,7 @@ EvtScript D_80287404 = {
EVT_IF_EQ(LVar1, 0)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_69)
EVT_WAIT(10)
EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_208D)
EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_USE_ITEM)
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_UsePower)
EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2)
EVT_ADD(LVar0, 18)
@ -1352,7 +1352,7 @@ EvtScript D_80287404 = {
EVT_CALL(RemoveItemEntity, LVarA)
EVT_ELSE
EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2)
EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_208D)
EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_USE_ITEM)
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_UsePower)
EVT_WAIT(4)
EVT_ADD(LVar1, 45)
@ -1405,7 +1405,7 @@ EvtScript D_80287834 = {
EvtScript EVS_PlayEatFX = {
EVT_THREAD
EVT_LOOP(4)
EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_2095)
EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_EAT_OR_DRINK)
EVT_WAIT(10)
EVT_END_LOOP
EVT_END_THREAD
@ -1418,7 +1418,7 @@ EvtScript EVS_PlayEatFX = {
EvtScript EVS_PlayDrinkFX = {
EVT_THREAD
EVT_LOOP(4)
EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_2095)
EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_EAT_OR_DRINK)
EVT_WAIT(10)
EVT_END_LOOP
EVT_END_THREAD
@ -1485,7 +1485,7 @@ EvtScript EVS_UseLifeShroom = {
EVT_END_LOOP
EVT_CALL(RemoveEffect, LVar0)
EVT_CALL(RemoveItemEntity, LVarA)
EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_2055)
EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_START_RECOVERY)
EVT_PLAY_EFFECT(EFFECT_STARS_SHIMMER, 1, LVar3, LVar4, LVar5, 70, 70, 10, 20)
EVT_WAIT(20)
EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_0373)

View File

@ -1219,7 +1219,7 @@ void load_player_actor(void) {
player->actorBlueprint = &bPlayerActorBlueprint;
player->actorType = bPlayerActorBlueprint.type;
if ((gBattleStatus.flags2 & BS_FLAGS2_PEACH_BATTLE) || (gGameStatusPtr->demoFlags & 2)) {
if ((gBattleStatus.flags2 & BS_FLAGS2_PEACH_BATTLE) || (gGameStatusPtr->demoBattleFlags & DEMO_BTL_FLAG_PARTNER_ACTING)) {
player->homePos.x = player->curPos.x = -130.0f;
player->homePos.y = player->curPos.y = 0.0f;
player->homePos.z = player->curPos.z = -10.0f;
@ -1281,7 +1281,7 @@ void load_player_actor(void) {
player->koDuration = 0;
player->transparentStatus = 0;
player->transparentDuration = 0;
player->isGlowing = 0;
player->isGlowing = FALSE;
player->unk_21E = 0;
player->disableDismissTimer = 0;
player->attackBoost = 0;
@ -1440,7 +1440,7 @@ void load_partner_actor(void) {
ASSERT(actorBP != NULL);
nuPiReadRom(partnerData->dmaStart, partnerData->dmaDest, partnerData->dmaEnd - partnerData->dmaStart);
if ((gBattleStatus.flags2 & BS_FLAGS2_PEACH_BATTLE) || (gGameStatusPtr->demoFlags & 2)) {
if ((gBattleStatus.flags2 & BS_FLAGS2_PEACH_BATTLE) || (gGameStatusPtr->demoBattleFlags & DEMO_BTL_FLAG_PARTNER_ACTING)) {
x = -95.0f;
y = partnerData->y;
z = 0.0f;
@ -1520,7 +1520,7 @@ void load_partner_actor(void) {
partnerActor->koDuration = 0;
partnerActor->transparentStatus = 0;
partnerActor->transparentDuration = 0;
partnerActor->isGlowing = 0;
partnerActor->isGlowing = FALSE;
partnerActor->unk_21E = 0;
partnerActor->disableDismissTimer = 0;
partnerActor->attackBoost = 0;
@ -1772,7 +1772,7 @@ Actor* create_actor(Formation formation) {
actor->koDuration = 0;
actor->transparentStatus = 0;
actor->transparentDuration = 0;
actor->isGlowing = 0;
actor->isGlowing = FALSE;
actor->unk_21E = 0;
actor->disableDismissTimer = 0;
actor->attackBoost = 0;
@ -2861,7 +2861,7 @@ void remove_player_buffs(s32 buffs) {
if (buffs & PLAYER_BUFF_TRANSPARENT && (player->transparentStatus != 0)) {
player->transparentDuration = 0;
player->transparentStatus = 0;
playerActorParts->flags &= ~ACTOR_PART_FLAG_100;
playerActorParts->flags &= ~ACTOR_PART_FLAG_TRANSPARENT;
remove_status_transparent(player->hudElementDataIndex);
}
if (buffs & PLAYER_BUFF_WATER_BLOCK && (battleStatus->waterBlockTurnsLeft != 0)) {
@ -2875,7 +2875,7 @@ void remove_player_buffs(s32 buffs) {
fx_water_splash(1, player->curPos.x + 15.0f, player->curPos.y + 22.0f, player->curPos.z + 5.0f, 1.0f, 0x18);
battleStatus->waterBlockEffect = NULL;
sfx_play_sound(SOUND_0299);
sfx_play_sound(SOUND_DESTROY_WATER_BLOCK);
}
if (buffs & PLAYER_BUFF_TURBO_CHARGE && (battleStatus->turboChargeTurnsLeft != 0)) {
battleStatus->turboChargeTurnsLeft = 0;

View File

@ -417,7 +417,7 @@ HitResult calc_player_damage_enemy(void) {
sfx_play_sound_at_position(SOUND_2073, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
break;
case 6:
sfx_play_sound_at_position(SOUND_205B, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
sfx_play_sound_at_position(SOUND_FLOWERS_LAUGH, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
break;
}
}

View File

@ -2999,7 +2999,7 @@ ApiStatus DispatchDamageEvent(Evt* script, s32 isInitialCall) {
s32 actorID = evt_get_variable(script, *args++);
Actor* actor;
s32 damageAmount;
s32 scriptExists;
s32 eventID;
if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID;
@ -3007,13 +3007,17 @@ ApiStatus DispatchDamageEvent(Evt* script, s32 isInitialCall) {
actor = get_actor(actorID);
damageAmount = evt_get_variable(script, *args++);
eventID = evt_get_variable(script, *args++);
if (dispatch_damage_event_actor_0(actor, damageAmount, evt_get_variable(script, *args++)) < 0) {
if (dispatch_damage_event_actor_0(actor, damageAmount, eventID) < 0) {
return ApiStatus_BLOCK;
}
scriptExists = does_script_exist_by_ref(script) != 0;
return scriptExists * ApiStatus_DONE2;
if (does_script_exist_by_ref(script)) {
return ApiStatus_DONE2;
} else {
return ApiStatus_BLOCK;
}
}
ApiStatus DispatchEvent(Evt* script, s32 isInitialCall) {
@ -3434,7 +3438,7 @@ ApiStatus ClearStatusEffects(Evt* script, s32 isInitialCall) {
actor->disableEffect->data.disableX->koDuration = 0;
actor->attackBoost = 0;
actor->defenseBoost = 0;
actor->isGlowing = 0;
actor->isGlowing = FALSE;
return ApiStatus_DONE2;
}

View File

@ -568,7 +568,7 @@ void update_status_bar(void) {
return;
}
if (gGameStatusPtr->isBattle == 0 && playerData->coins != uiStatus->displayCoins) {
if (!gGameStatusPtr->isBattle && playerData->coins != uiStatus->displayCoins) {
status_bar_start_blinking_coins();
}
@ -612,7 +612,7 @@ void update_status_bar(void) {
}
if (uiStatus->displayHP != playerData->curHP) {
if (gGameStatusPtr->isBattle == 0 && playerData->curHP < uiStatus->displayHP) {
if (!gGameStatusPtr->isBattle && playerData->curHP < uiStatus->displayHP) {
status_bar_start_blinking_hp();
}
if (uiStatus->displayHP < playerData->curHP) {
@ -630,7 +630,7 @@ void update_status_bar(void) {
}
if (uiStatus->displayFP != playerData->curFP) {
if (gGameStatusPtr->isBattle == 0 && playerData->curFP < uiStatus->displayFP) {
if (!gGameStatusPtr->isBattle && playerData->curFP < uiStatus->displayFP) {
status_bar_start_blinking_fp();
}
if (uiStatus->displayFP < playerData->curFP) {
@ -672,7 +672,7 @@ void update_status_bar(void) {
}
switch (uiStatus->hidden) {
case 0:
case FALSE:
uiStatus->drawPosY += 10;
if (uiStatus->drawPosY >= 18) {
uiStatus->drawPosY = 18;
@ -684,8 +684,8 @@ void update_status_bar(void) {
} else {
if (!uiStatus->ignoreChanges) {
if (!uiStatus->unk_3B[0] || playerStatus->actionState != ACTION_STATE_IDLE) {
if (gGameStatusPtr->isBattle == 0) {
uiStatus->hidden = 1;
if (!gGameStatusPtr->isBattle) {
uiStatus->hidden = TRUE;
uiStatus->showTimer = 0;
uiStatus->unk_3B[1] = 0;
}
@ -694,7 +694,7 @@ void update_status_bar(void) {
}
}
break;
case 1:
case TRUE:
uiStatus->drawPosY -= 5;
if (uiStatus->drawPosY < -100) {
uiStatus->drawPosY = -100;
@ -707,9 +707,9 @@ void update_status_bar(void) {
uiStatus->showTimer++;
}
if (uiStatus->showTimer >= 240 && gGameStatusPtr->isBattle == 0) {
if (uiStatus->showTimer >= 240 && !gGameStatusPtr->isBattle) {
uiStatus->showTimer = 210;
uiStatus->hidden = 0;
uiStatus->hidden = FALSE;
uiStatus->unk_3B[0] = 1;
uiStatus->unk_3B[1] = 1;
}
@ -1355,7 +1355,7 @@ s32 is_status_bar_visible(void) {
void status_bar_start_blinking_hp(void) {
UiStatus* uiStatus = &gUIStatus;
if (gGameStatusPtr->isBattle == 0) {
if (!gGameStatusPtr->isBattle) {
uiStatus->hpBlinkTimer = 120;
}
@ -1378,7 +1378,7 @@ void status_bar_stop_blinking_hp(void) {
void status_bar_start_blinking_fp(void) {
UiStatus* uiStatus = &gUIStatus;
if (gGameStatusPtr->isBattle == 0) {
if (!gGameStatusPtr->isBattle) {
uiStatus->fpBlinkTimer = 120;
}
@ -1400,7 +1400,7 @@ void status_bar_stop_blinking_fp(void) {
void status_bar_start_blinking_coins(void) {
UiStatus* uiStatus = &gUIStatus;
if (gGameStatusPtr->isBattle == 0) {
if (!gGameStatusPtr->isBattle) {
uiStatus->coinsBlinkTimer = 120;
}

View File

@ -192,8 +192,8 @@ void render_frame(s32 isSecondPass) {
camera->unkMatrix = &gDisplayContext->matrixStack[gMatrixListPos];
matrixListPos = gMatrixListPos++;
guRotate(&gDisplayContext->matrixStack[matrixListPos], -camera->trueRot.x, 0.0f, 1.0f, 0.0f);
camera->vpAlt.vp.vtrans[0] = camera->vp.vp.vtrans[0] + gGameStatusPtr->unk_82;
camera->vpAlt.vp.vtrans[1] = camera->vp.vp.vtrans[1] + gGameStatusPtr->unk_83;
camera->vpAlt.vp.vtrans[0] = camera->vp.vp.vtrans[0] + gGameStatusPtr->unk_82.x;
camera->vpAlt.vp.vtrans[1] = camera->vp.vp.vtrans[1] + gGameStatusPtr->unk_82.y;
if (!(camera->flags & CAMERA_FLAG_ORTHO)) {
if (gCurrentCamID != CAM_3) {
@ -436,8 +436,8 @@ void set_cam_viewport(s16 id, s16 x, s16 y, s16 width, s16 height) {
camera->vpAlt.vp.vscale[2] = 0x1FF;
camera->vpAlt.vp.vscale[3] = 0;
camera->vpAlt.vp.vtrans[0] = gGameStatusPtr->unk_82 + 4 * (s16) ((u16) camera->viewportStartX + (camera->viewportW / 2));
camera->vpAlt.vp.vtrans[1] = gGameStatusPtr->unk_83 + 4 * (s16) ((u16) camera->viewportStartY + (camera->viewportH / 2));
camera->vpAlt.vp.vtrans[0] = gGameStatusPtr->unk_82.x + 4 * (s16) ((u16) camera->viewportStartX + (camera->viewportW / 2));
camera->vpAlt.vp.vtrans[1] = gGameStatusPtr->unk_82.y + 4 * (s16) ((u16) camera->viewportStartY + (camera->viewportH / 2));
camera->vpAlt.vp.vtrans[2] = 0x200;
camera->vpAlt.vp.vtrans[3] = 0;
}

View File

@ -1654,7 +1654,7 @@ void render_item_entities(void) {
alpha = alpha * (255 - a1) / 255;
}
if (item->flags & (ITEM_ENTITY_FLAG_TRANSPARENT | ITEM_ENTITY_FLAG_HIDING)) {
if (gSpriteShadingProfile->flags) {
if (gSpriteShadingProfile->flags != 0) {
gDPSetRenderMode(gMainGfxPos++, AA_EN | IM_RD | CVG_DST_SAVE | ZMODE_OPA | FORCE_BL | G_RM_PASS,
AA_EN | IM_RD | CVG_DST_SAVE | ZMODE_OPA | FORCE_BL | GBL_c2(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_1MA));
} else {
@ -1668,7 +1668,7 @@ void render_item_entities(void) {
if (!(item->flags & ITEM_ENTITY_FLAG_40000)) {
gDPLoadTLUT_pal16(gMainGfxPos++, 0, gHudElementCacheTablePalette[item->lookupPaletteIndex].data);
if (gSpriteShadingProfile->flags) {
if (gSpriteShadingProfile->flags != 0) {
gDPSetTextureImage(gMainGfxPos++, G_IM_FMT_CI, G_IM_SIZ_8b, 12, gHudElementCacheTableRaster[item->lookupRasterIndex].data);
gDPSetTile(gMainGfxPos++, G_IM_FMT_CI, G_IM_SIZ_8b, 2, 0x0000, G_TX_LOADTILE, 0, G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD);
gDPLoadSync(gMainGfxPos++);
@ -2371,9 +2371,9 @@ void update_item_entity_collectable(ItemEntity* item) {
item->flags |= ITEM_ENTITY_FLAG_DONE_FALLING;
} else {
if (IS_BADGE(item->itemID)) {
sfx_play_sound_at_position(SOUND_021B, SOUND_SPACE_MODE_0, item->pos.x, item->pos.y, item->pos.z);
sfx_play_sound_at_position(SOUND_BADGE_BOUNCE, SOUND_SPACE_MODE_0, item->pos.x, item->pos.y, item->pos.z);
} else if (IS_ITEM(item->itemID)) {
sfx_play_sound_at_position(SOUND_021A, SOUND_SPACE_MODE_0, item->pos.x, item->pos.y, item->pos.z);
sfx_play_sound_at_position(SOUND_ITEM_BOUNCE, SOUND_SPACE_MODE_0, item->pos.x, item->pos.y, item->pos.z);
} else {
switch (item->itemID) {
case ITEM_HEART:

View File

@ -2855,7 +2855,7 @@ ApiStatus GetStatusFlags(Evt* script, s32 isInitialCall) {
}
for (partsTable = actor->partsTable; partsTable != NULL; partsTable = partsTable->nextPart) {
if (partsTable->flags & 0x100) {
if (partsTable->flags & ACTOR_PART_FLAG_TRANSPARENT) {
flags |= STATUS_FLAG_TRANSPARENT;
}
if (partsTable->eventFlags & ACTOR_EVENT_FLAG_ILLUSORY) {
@ -2969,7 +2969,6 @@ ApiStatus GetBattleVar(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2;
}