API_CALLABLE + misc minor cleanup (#1150)

* leftover work

* remaining API_CALLABLE

---------

Co-authored-by: HailSanta <Hail2Santa@gmail.com>
This commit is contained in:
HailSanta 2024-01-15 23:56:57 -05:00 committed by GitHub
parent b2cf91c8ca
commit 1589a30e26
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
60 changed files with 1688 additions and 1630 deletions

View File

@ -2633,7 +2633,7 @@ enum EntityFlags {
ENTITY_FLAG_PARTNER_COLLISION = 0x00020000, ENTITY_FLAG_PARTNER_COLLISION = 0x00020000,
ENTITY_FLAG_DRAW_IF_CLOSE_HIDE_MODE2 = 0x00040000, ENTITY_FLAG_DRAW_IF_CLOSE_HIDE_MODE2 = 0x00040000,
ENTITY_FLAG_IGNORE_DISTANCE_CULLING = 0x00080000, ENTITY_FLAG_IGNORE_DISTANCE_CULLING = 0x00080000,
ENTITY_FLAG_100000 = 0x00100000, ENTITY_FLAG_USED = 0x00100000,
ENTITY_FLAG_200000 = 0x00200000, ENTITY_FLAG_200000 = 0x00200000,
ENTITY_FLAG_SHADOW_POS_DIRTY = 0x00400000, ENTITY_FLAG_SHADOW_POS_DIRTY = 0x00400000,
ENTITY_FLAG_DARK_SHADOW = 0x00800000, ENTITY_FLAG_DARK_SHADOW = 0x00800000,
@ -5044,13 +5044,6 @@ enum ModelTransformGroupFlags {
}; };
enum NpcDropFlags { enum NpcDropFlags {
NPC_DROP_FLAG_1 = 0x01,
NPC_DROP_FLAG_2 = 0x02,
NPC_DROP_FLAG_4 = 0x04,
NPC_DROP_FLAG_8 = 0x08,
NPC_DROP_FLAG_10 = 0x10,
NPC_DROP_FLAG_20 = 0x20,
NPC_DROP_FLAG_40 = 0x40,
NPC_DROP_FLAG_80 = 0x80, NPC_DROP_FLAG_80 = 0x80,
}; };
@ -5168,6 +5161,11 @@ enum SpriteCompImgFXFlags {
SPR_IMGFX_FLAG_ALL = 0xF0000000, SPR_IMGFX_FLAG_ALL = 0xF0000000,
}; };
enum SpriteShadingFlags {
SPR_SHADING_FLAG_ENABLED = 1,
SPR_SHADING_FLAG_SET_VIEWPORT = 2, // never set
};
enum MoveType { enum MoveType {
MOVE_TYPE_NONE = 0, MOVE_TYPE_NONE = 0,
MOVE_TYPE_HAMMER = 1, MOVE_TYPE_HAMMER = 1,

View File

@ -276,7 +276,7 @@
#define PACK_PAL_RGBA(r, g, b, a) (((r) << 11) | ((g) << 6) | ((b) << 1) | (a)); #define PACK_PAL_RGBA(r, g, b, a) (((r) << 11) | ((g) << 6) | ((b) << 1) | (a));
#define PM_RM_TILEMODE_B GBL_c1(G_BL_CLR_BL, G_BL_A_FOG, G_BL_CLR_IN, G_BL_1MA) #define PM_RM_SHROUD GBL_c1(G_BL_CLR_BL, G_BL_A_FOG, G_BL_CLR_IN, G_BL_1MA)
#define PM_CC_01 0, 0, 0, TEXEL0, PRIMITIVE, 0, TEXEL0, 0 #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_02 0, 0, 0, TEXEL0, TEXEL0, 0, PRIMITIVE, 0
@ -288,47 +288,83 @@
#define PM_CC_PRIM_FULL_ALPHA 0, 0, 0, PRIMITIVE, 0, 0, 0, 1 #define PM_CC_PRIM_FULL_ALPHA 0, 0, 0, PRIMITIVE, 0, 0, 0, 1
#define PM_CC_PRIM_NO_ALPHA 0, 0, 0, PRIMITIVE, 0, 0, 0, 0 #define PM_CC_PRIM_NO_ALPHA 0, 0, 0, PRIMITIVE, 0, 0, 0, 0
#define PM_CC_0A 0, 0, 0, 0, ENVIRONMENT, 0, TEXEL0, 0 #define PM_CC_0A 0, 0, 0, 0, ENVIRONMENT, 0, TEXEL0, 0
#define PM_CC_0B 0, 0, 0, 0, ENVIRONMENT, 0, TEXEL1, 0 #define PM_CC_0B 0, 0, 0, 0, ENVIRONMENT, 0, TEXEL1, 0
#define PM_CC_0C 0, 0, 0, 0, 0, 0, 0, COMBINED
#define PM_CC_0D 0, 0, 0, 0, SHADE, 0, TEXEL1, 0 #define PM_CC_0D 0, 0, 0, 0, SHADE, 0, TEXEL1, 0
#define PM_CC_0C 0, 0, 0, 0, 0, 0, 0, COMBINED
#define PM_CC_0E 0, 0, 0, TEXEL0, 0, 0, 0, 0 #define PM_CC_0E 0, 0, 0, TEXEL0, 0, 0, 0, 0
#define PM_CC_0F 0, 0, 0, TEXEL0, 0, 0, 0, 1 #define PM_CC_0F 0, 0, 0, TEXEL0, 0, 0, 0, 1
#define PM_CC_10 0, 0, 0, TEXEL0, 0, 0, 0, PRIMITIVE #define PM_CC_10 0, 0, 0, TEXEL0, 0, 0, 0, PRIMITIVE
#define PM_CC_11 0, 0, 0, TEXEL0, SHADE, 0, TEXEL0, 0 #define PM_CC_11 0, 0, 0, TEXEL0, SHADE, 0, TEXEL0, 0
#define PM_CC_12 0, 0, 0, TEXEL0, TEXEL0, 0, SHADE, 0 #define PM_CC_12 0, 0, 0, TEXEL0, TEXEL0, 0, SHADE, 0
#define PM_CC_13 TEXEL0, 0, PRIMITIVE, 0, 0, 0, 0, TEXEL1
#define PM_CC_MSG_UP_ARROW \
TEXEL0, 0, PRIMITIVE, 0, \
0, 0, 0, TEXEL1
#define PM_CC_14 PRIMITIVE, ENVIRONMENT, TEXEL1, ENVIRONMENT, PRIMITIVE, 0, TEXEL1, 0 #define PM_CC_14 PRIMITIVE, ENVIRONMENT, TEXEL1, ENVIRONMENT, PRIMITIVE, 0, TEXEL1, 0
#define PM_CC_15 PRIMITIVE, ENVIRONMENT, TEXEL1, ENVIRONMENT, 0, 0, 0, TEXEL1 #define PM_CC_15 PRIMITIVE, ENVIRONMENT, TEXEL1, ENVIRONMENT, 0, 0, 0, TEXEL1
#define PM_CC_16 COMBINED, 0, PRIMITIVE, 0, 0, 0, 0, COMBINED // multiply the combined color from cycle1 with PRIMITIVE color; PRIMITIVE alpha is ignored
#define PM_CC2_MULTIPLY_PRIM COMBINED, 0, PRIMITIVE, 0, 0, 0, 0, COMBINED
// (COMB * PRIM) + ENV // multiply the combined color from cycle1 with SHADE color; SHADE alpha is ignored
#define PM_CC_17 COMBINED, 0, PRIMITIVE, ENVIRONMENT, 0, 0, 0, COMBINED #define PM_CC2_MULTIPLY_SHADE COMBINED, 0, SHADE, 0, 0, 0, 0, COMBINED
#define PM_CC_18 COMBINED, 0, SHADE, 0, 0, 0, 0, COMBINED
#define PM_CC_19 COMBINED, 0, SHADE, PRIMITIVE, 0, 0, 0, COMBINED
#define PM_CC_1B COMBINED, 0, PRIMITIVE, ENVIRONMENT, COMBINED, 0, SHADE, 0
#define PM_CC_NOISE NOISE, 0, SHADE_ALPHA, 0, 0, 0, 0, 1 #define PM_CC_NOISE NOISE, 0, SHADE_ALPHA, 0, 0, 0, 0, 1
#define PM_CC_1A TEXEL0, 0, PRIMITIVE_ALPHA, PRIMITIVE, 0, 0, 0, TEXEL0 #define PM_CC_1A TEXEL0, 0, PRIMITIVE_ALPHA, PRIMITIVE, 0, 0, 0, TEXEL0
// implements ENV_TINT_DEPTH for untextured models // implements ENV_TINT_DEPTH for untextured models
// applies just the base color; depth-based fog color will be added during RPD blend step // applies just the base color; depth-based fog color will be added during RDP blend step
// color = SHADE * PRIM_ALPHA + PRIM // color = SHADE * PRIM_ALPHA + PRIM
// alpha = SHADE // alpha = SHADE
#define PM_CC_NOTEX_TINT_FOG \ #define PM_CC_TINT_DEPTH_NOTEX \
SHADE, 0, PRIMITIVE_ALPHA, PRIMITIVE, 0, 0, 0, SHADE SHADE, 0, PRIMITIVE_ALPHA, PRIMITIVE, \
0, 0, 0, SHADE
// implements ENV_TINT_DEPTH for single-textured or mipmaped models
// applies just the base color; depth-based fog color will be added during RDP blend step
// color = COMB * PRIM_ALPHA + PRIM
// alpha = COMB
#define PM_CC_TINT_DEPTH_NO_SHADE \
COMBINED, 0, PRIMITIVE_ALPHA, PRIMITIVE, \
0, 0, 0, COMBINED
// color = (COMB - PRIM) * PRIM_ALPHA + COMB
// alpha = COMB
#define PM_CC_20 \
COMBINED, PRIMITIVE, PRIMITIVE_ALPHA, COMBINED, \
0, 0, 0, COMBINED
#define PM_CC_TINT_DEPTH_MIPMAPS \
COMBINED, 0, SHADE, PRIMITIVE, \
0, 0, 0, COMBINED
// implements ENV_TINT_REMAP for untextured models // implements ENV_TINT_REMAP for untextured models
// color = SHADE * PRIM + ENV // color = SHADE * PRIM + ENV
// alpha = SHADE // alpha = SHADE
#define PM_CC_NOTEX_TINT_REMAP \ #define PM_CC_TINT_REMAP_NOTEX \
SHADE, 0, PRIMITIVE, ENVIRONMENT, 0, 0, 0, SHADE SHADE, 0, PRIMITIVE, ENVIRONMENT, \
0, 0, 0, SHADE
// implements ENV_TINT_REMAP for single-textured or mipmaped models
// NOTE: SHADE color is not used
// color = COMB * PRIM + ENV
// alpha = COMB
#define PM_CC_TINT_REMAP_NO_SHADE \
COMBINED, 0, PRIMITIVE, ENVIRONMENT, \
0, 0, 0, COMBINED
// implements ENV_TINT_REMAP for multi-textured models
// only SHADE alpha is used
// color = COMB * PRIM + ENV
// alpha = COMB * SHADE
#define PM_CC_TINT_REMAP_SHADE_ALPHA \
COMBINED, 0, PRIMITIVE, ENVIRONMENT, \
COMBINED, 0, SHADE, 0
#define PM_CC_20 COMBINED, PRIMITIVE, PRIMITIVE_ALPHA, COMBINED, 0, 0, 0, COMBINED
#define PM_CC_21 COMBINED, 0, PRIMITIVE_ALPHA, PRIMITIVE, 0, 0, 0, COMBINED
#define PM_CC_22 TEXEL0, TEXEL1, SHADE_ALPHA, TEXEL1, 0, 0, 0, TEXEL0 #define PM_CC_22 TEXEL0, TEXEL1, SHADE_ALPHA, TEXEL1, 0, 0, 0, TEXEL0
#define PM_CC_23 1, TEXEL0, PRIMITIVE, TEXEL0, 0, 0, 0, TEXEL0 #define PM_CC_23 1, TEXEL0, PRIMITIVE, TEXEL0, 0, 0, 0, TEXEL0
#define PM_CC1_24 1, TEXEL0, PRIMITIVE, TEXEL0, 1, TEXEL0, TEXEL1, TEXEL0 #define PM_CC1_24 1, TEXEL0, PRIMITIVE, TEXEL0, 1, TEXEL0, TEXEL1, TEXEL0
@ -340,7 +376,10 @@
#define PM_CC1_29 TEXEL0, SHADE, TEXEL0, TEXEL0, 1, TEXEL1, TEXEL0, TEXEL1 #define PM_CC1_29 TEXEL0, SHADE, TEXEL0, TEXEL0, 1, TEXEL1, TEXEL0, TEXEL1
#define PM_CC2_29 TEXEL0, COMBINED, TEXEL0_ALPHA, TEXEL0, 1, TEXEL0, TEXEL1, TEXEL0 #define PM_CC2_29 TEXEL0, COMBINED, TEXEL0_ALPHA, TEXEL0, 1, TEXEL0, TEXEL1, TEXEL0
#define PM_CC_ALT_INTERFERENCE TEXEL1, 0, TEXEL0, 0, TEXEL1, 0, TEXEL0, 0 // same as G_CC_INTERFERENCE, except the roles of TEXEL0 and TEXEL1 are swapped
#define PM_CC_ALT_INTERFERENCE \
TEXEL1, 0, TEXEL0, 0, \
TEXEL1, 0, TEXEL0, 0
#define PM_CC_2B PRIMITIVE, 0, TEXEL1, 0, 0, 0, 0, TEXEL1 #define PM_CC_2B PRIMITIVE, 0, TEXEL1, 0, 0, 0, 0, TEXEL1
#define PM_CC_2C PRIMITIVE, 0, TEXEL1, 0, TEXEL1, 0, PRIMITIVE, 0 #define PM_CC_2C PRIMITIVE, 0, TEXEL1, 0, TEXEL1, 0, PRIMITIVE, 0
@ -361,14 +400,15 @@
#define PM_CC_39 TEXEL1, K4, COMBINED_ALPHA, COMBINED, 0, 0, 0, 1 #define PM_CC_39 TEXEL1, K4, COMBINED_ALPHA, COMBINED, 0, 0, 0, 1
#define PM_CC_3A 0, 0, 0, PRIMITIVE, 1, TEXEL0, PRIMITIVE, TEXEL0 #define PM_CC_3A 0, 0, 0, PRIMITIVE, 1, TEXEL0, PRIMITIVE, TEXEL0
#define PM_CC_3B 0, 0, 0, SHADE, 1, 0, PRIMITIVE, 0
#define PM_CC_SCREEN_OVERLAY \
0, 0, 0, SHADE, \
1, 0, PRIMITIVE, 0
#define PM_CC_3C 0, 0, 0, PRIMITIVE, SHADE, 0, PRIMITIVE, 0 #define PM_CC_3C 0, 0, 0, PRIMITIVE, SHADE, 0, PRIMITIVE, 0
#define PM_CC_3D SHADE, ENVIRONMENT, TEXEL0, TEXEL0, PRIMITIVE, 0, TEXEL0, 0 #define PM_CC_3D SHADE, ENVIRONMENT, TEXEL0, TEXEL0, PRIMITIVE, 0, TEXEL0, 0
#define PM_CC_3E 0, 0, 0, COMBINED, 0, 0, 0, PRIMITIVE
#define PM_CC_3F TEXEL0, 0, SHADE, 0, SHADE, 0, PRIMITIVE, 0 #define PM_CC_3F TEXEL0, 0, SHADE, 0, SHADE, 0, PRIMITIVE, 0
// animated tiles spreading over the screen when the game is reset // animated tiles spreading over the screen when the game is reset
@ -386,6 +426,10 @@
// alpha = PRIM // alpha = PRIM
#define PM_CC_KKJ_SPILL_LIGHT TEXEL0, 0, SHADE, 0, 0, 0, 0, PRIMITIVE #define PM_CC_KKJ_SPILL_LIGHT TEXEL0, 0, SHADE, 0, 0, 0, 0, PRIMITIVE
// color = pass from cycle1
// alpha = PRIM
#define PM_CC_KKJ14_FIRE 0, 0, 0, COMBINED, 0, 0, 0, PRIMITIVE
// color = SHADE + PRIM // color = SHADE + PRIM
// alpha = PRIMITIVE * TEXEL0 // alpha = PRIMITIVE * TEXEL0
#define PM_CC_DAMAGE_INDICATOR 1, 0, SHADE, PRIMITIVE, PRIMITIVE, 0, TEXEL0, 0 #define PM_CC_DAMAGE_INDICATOR 1, 0, SHADE, PRIMITIVE, PRIMITIVE, 0, TEXEL0, 0

View File

@ -9,315 +9,315 @@
#include "effects.h" #include "effects.h"
ApiStatus EnablePartnerBlur(Evt* script, s32 isInitialCall); API_CALLABLE(EnablePartnerBlur);
ApiStatus DisablePartnerBlur(Evt* script, s32 isInitialCall); API_CALLABLE(DisablePartnerBlur);
ApiStatus UseBattleCamPreset(Evt* script, s32 isInitialCall); API_CALLABLE(UseBattleCamPreset);
ApiStatus SetBattleCamTarget(Evt* script, s32 isInitialCall); API_CALLABLE(SetBattleCamTarget);
ApiStatus SetBattleCamOffsetZ(Evt* script, s32 isInitialCall); API_CALLABLE(SetBattleCamOffsetZ);
ApiStatus AddBattleCamOffsetZ(Evt* script, s32 isInitialCall); API_CALLABLE(AddBattleCamOffsetZ);
ApiStatus SetBattleCamYaw(Evt* script, s32 isInitialCall); API_CALLABLE(SetBattleCamYaw);
ApiStatus BattleCamTargetActor(Evt* script, s32 isInitialCall); API_CALLABLE(BattleCamTargetActor);
ApiStatus MoveBattleCamOver(Evt* script, s32 isInitialCall); API_CALLABLE(MoveBattleCamOver);
ApiStatus SetBattleCamZoom(Evt* script, s32 isInitialCall); API_CALLABLE(SetBattleCamZoom);
ApiStatus AddBattleCamZoom(Evt* script, s32 isInitialCall); API_CALLABLE(AddBattleCamZoom);
ApiStatus FreezeBattleCam(Evt* script, s32 isInitialCall); API_CALLABLE(FreezeBattleCam);
ApiStatus func_8024EDA4(Evt* script, s32 isInitialCall); API_CALLABLE(func_8024EDA4);
ApiStatus ShowMessageBox(Evt* script, s32 isInitialCall); API_CALLABLE(ShowMessageBox);
ApiStatus ShowVariableMessageBox(Evt* script, s32 isInitialCall); API_CALLABLE(ShowVariableMessageBox);
ApiStatus IsMessageBoxDisplayed(Evt* script, s32 isInitialCall); API_CALLABLE(IsMessageBoxDisplayed);
ApiStatus WaitForMessageBoxDone(Evt* script, s32 isInitialCall); API_CALLABLE(WaitForMessageBoxDone);
ApiStatus ForceCloseMessageBox(Evt* script, s32 isInitialCall); API_CALLABLE(ForceCloseMessageBox);
ApiStatus SetMessageBoxDuration(Evt* script, s32 isInitialCall); API_CALLABLE(SetMessageBoxDuration);
ApiStatus ItemDamageEnemy(Evt* script, s32 isInitialCall); API_CALLABLE(ItemDamageEnemy);
ApiStatus ItemAfflictEnemy(Evt* script, s32 isInitialCall); API_CALLABLE(ItemAfflictEnemy);
ApiStatus ItemSpookEnemy(Evt* script, s32 isInitialCall); API_CALLABLE(ItemSpookEnemy);
ApiStatus ItemCheckHit(Evt* script, s32 isInitialCall); API_CALLABLE(ItemCheckHit);
ApiStatus ActorSpeak(Evt* script, s32 isInitialCall); API_CALLABLE(ActorSpeak);
ApiStatus EndActorSpeech(Evt* script, s32 isInitialCall); API_CALLABLE(EndActorSpeech);
ApiStatus ShowBattleChoice(Evt* script, s32 isInitialCall); API_CALLABLE(ShowBattleChoice);
ApiStatus OverrideBattleDmaDest(Evt* script, s32 isInitialCall); API_CALLABLE(OverrideBattleDmaDest);
ApiStatus LoadBattleDmaData(Evt* script, s32 isInitialCall); API_CALLABLE(LoadBattleDmaData);
ApiStatus EnableBattleFloorReflections(Evt* script, s32 isInitialCall); API_CALLABLE(EnableBattleFloorReflections);
ApiStatus SetDarknessMode(Evt* script, s32 isInitialCall); API_CALLABLE(SetDarknessMode);
ApiStatus PlaySoundAtActor(Evt* script, s32 isInitialCall); API_CALLABLE(PlaySoundAtActor);
ApiStatus PlaySoundAtPart(Evt* script, s32 isInitialCall); API_CALLABLE(PlaySoundAtPart);
ApiStatus SetForegroundModelsVisibleUnchecked(Evt* script, s32 isInitialCall); API_CALLABLE(SetForegroundModelsVisibleUnchecked);
ApiStatus SetForegroundModelsVisible(Evt* script, s32 isInitialCall); API_CALLABLE(SetForegroundModelsVisible);
ApiStatus MakeStatusField(Evt* script, s32 isInitialCall); API_CALLABLE(MakeStatusField);
ApiStatus MultiplyByActorScale(Evt* script, s32 isInitialCall); API_CALLABLE(MultiplyByActorScale);
ApiStatus MultiplyVec2ByActorScale(Evt* script, s32 isInitialCall); API_CALLABLE(MultiplyVec2ByActorScale);
ApiStatus MultiplyVec3ByActorScale(Evt* script, s32 isInitialCall); API_CALLABLE(MultiplyVec3ByActorScale);
ApiStatus ApplyShrinkFromOwner(Evt* script, s32 isInitialCall); API_CALLABLE(ApplyShrinkFromOwner);
ApiStatus StartRumble(Evt* script, s32 isInitialCall); API_CALLABLE(StartRumble);
ApiStatus HasMerleeCastsLeft(Evt* script, s32 isInitialCall); API_CALLABLE(HasMerleeCastsLeft);
ApiStatus SpawnRecoverHeartFX(Evt* script, s32 isInitialCall); API_CALLABLE(SpawnRecoverHeartFX);
ApiStatus SpawnRecoverFlowerFX(Evt* script, s32 isInitialCall); API_CALLABLE(SpawnRecoverFlowerFX);
ApiStatus IncrementPlayerHP(Evt* script, s32 isInitialCall); API_CALLABLE(IncrementPlayerHP);
ApiStatus IncrementPlayerFP(Evt* script, s32 isInitialCall); API_CALLABLE(IncrementPlayerFP);
ApiStatus StartRumbleWithParams(Evt* script, s32 isInitialCall); API_CALLABLE(StartRumbleWithParams);
ApiStatus LoadItemScript(Evt* script, s32 isInitialCall); API_CALLABLE(LoadItemScript);
ApiStatus LoadMoveScript(Evt* script, s32 isInitialCall); API_CALLABLE(LoadMoveScript);
ApiStatus LoadBattleSection(Evt* script, s32 isInitialCall); API_CALLABLE(LoadBattleSection);
ApiStatus GetBattlePhase(Evt* script, s32 isInitialCall); API_CALLABLE(GetBattlePhase);
ApiStatus GetLastElement(Evt* script, s32 isInitialCall); API_CALLABLE(GetLastElement);
ApiStatus SetDamageSource(Evt* script, s32 isInitialCall); API_CALLABLE(SetDamageSource);
ApiStatus GetDamageSource(Evt* script, s32 isInitialCall); API_CALLABLE(GetDamageSource);
ApiStatus SetGoalToHome(Evt* script, s32 isInitialCall); API_CALLABLE(SetGoalToHome);
ApiStatus SetIdleGoalToHome(Evt* script, s32 isInitialCall); API_CALLABLE(SetIdleGoalToHome);
ApiStatus SetGoalToIndex(Evt* script, s32 isInitialCall); API_CALLABLE(SetGoalToIndex);
ApiStatus GetIndexFromPos(Evt* script, s32 isInitialCall); API_CALLABLE(GetIndexFromPos);
ApiStatus GetIndexFromHome(Evt* script, s32 isInitialCall); API_CALLABLE(GetIndexFromHome);
ApiStatus CountTargets(Evt* script, s32 isInitialCall); API_CALLABLE(CountTargets);
ApiStatus ForceHomePos(Evt* script, s32 isInitialCall); API_CALLABLE(ForceHomePos);
ApiStatus SetHomePos(Evt* script, s32 isInitialCall); API_CALLABLE(SetHomePos);
ApiStatus SetGoalToTarget(Evt* script, s32 isInitialCall); API_CALLABLE(SetGoalToTarget);
ApiStatus SetPartGoalToTarget(Evt* script, s32 isInitialCall); API_CALLABLE(SetPartGoalToTarget);
ApiStatus SetGoalToFirstTarget(Evt* script, s32 isInitialCall); API_CALLABLE(SetGoalToFirstTarget);
ApiStatus SetGoalPos(Evt* script, s32 isInitialCall); API_CALLABLE(SetGoalPos);
ApiStatus SetIdleGoal(Evt* script, s32 isInitialCall); API_CALLABLE(SetIdleGoal);
ApiStatus AddGoalPos(Evt* script, s32 isInitialCall); API_CALLABLE(AddGoalPos);
ApiStatus GetGoalPos(Evt* script, s32 isInitialCall); API_CALLABLE(GetGoalPos);
ApiStatus GetIdleGoal(Evt* script, s32 isInitialCall); API_CALLABLE(GetIdleGoal);
ApiStatus GetPartTarget(Evt* script, s32 isInitialCall); API_CALLABLE(GetPartTarget);
ApiStatus GetActorPos(Evt* script, s32 isInitialCall); API_CALLABLE(GetActorPos);
ApiStatus GetPartOffset(Evt* script, s32 isInitialCall); API_CALLABLE(GetPartOffset);
ApiStatus GetPartPos(Evt* script, s32 isInitialCall); API_CALLABLE(GetPartPos);
ApiStatus GetHomePos(Evt* script, s32 isInitialCall); API_CALLABLE(GetHomePos);
ApiStatus SetActorPos(Evt* script, s32 isInitialCall); API_CALLABLE(SetActorPos);
ApiStatus SetPartPos(Evt* script, s32 isInitialCall); API_CALLABLE(SetPartPos);
ApiStatus SetEnemyTargetOffset(Evt* script, s32 isInitialCall); API_CALLABLE(SetEnemyTargetOffset);
ApiStatus SetAnimation(Evt* script, s32 isInitialCall); API_CALLABLE(SetAnimation);
ApiStatus GetAnimation(Evt* script, s32 isInitialCall); API_CALLABLE(GetAnimation);
ApiStatus SetAnimationRate(Evt* script, s32 isInitialCall); API_CALLABLE(SetAnimationRate);
ApiStatus SetActorYaw(Evt* script, s32 isInitialCall); API_CALLABLE(SetActorYaw);
ApiStatus GetActorYaw(Evt* script, s32 isInitialCall); API_CALLABLE(GetActorYaw);
ApiStatus SetPartYaw(Evt* script, s32 isInitialCall); API_CALLABLE(SetPartYaw);
ApiStatus GetPartYaw(Evt* script, s32 isInitialCall); API_CALLABLE(GetPartYaw);
ApiStatus SetActorJumpGravity(Evt* script, s32 isInitialCall); API_CALLABLE(SetActorJumpGravity);
ApiStatus SetActorIdleJumpGravity(Evt* script, s32 isInitialCall); API_CALLABLE(SetActorIdleJumpGravity);
ApiStatus SetActorSpeed(Evt* script, s32 isInitialCall); API_CALLABLE(SetActorSpeed);
ApiStatus SetActorIdleSpeed(Evt* script, s32 isInitialCall); API_CALLABLE(SetActorIdleSpeed);
ApiStatus SetPartJumpGravity(Evt* script, s32 isInitialCall); API_CALLABLE(SetPartJumpGravity);
ApiStatus SetPartMoveSpeed(Evt* script, s32 isInitialCall); API_CALLABLE(SetPartMoveSpeed);
ApiStatus SetJumpAnimations(Evt* script, s32 isInitialCall); API_CALLABLE(SetJumpAnimations);
ApiStatus AddActorPos(Evt* script, s32 isInitialCall); API_CALLABLE(AddActorPos);
ApiStatus SetActorDispOffset(Evt* script, s32 isInitialCall); API_CALLABLE(SetActorDispOffset);
ApiStatus GetPartDispOffset(Evt* script, s32 isInitialCall); API_CALLABLE(GetPartDispOffset);
ApiStatus SetPartDispOffset(Evt* script, s32 isInitialCall); API_CALLABLE(SetPartDispOffset);
ApiStatus AddPartDispOffset(Evt* script, s32 isInitialCall); API_CALLABLE(AddPartDispOffset);
ApiStatus FreezeBattleState(Evt* script, s32 isInitialCall); API_CALLABLE(FreezeBattleState);
ApiStatus GetActorVar(Evt* script, s32 isInitialCall); API_CALLABLE(GetActorVar);
ApiStatus SetActorVar(Evt* script, s32 isInitialCall); API_CALLABLE(SetActorVar);
ApiStatus AddActorVar(Evt* script, s32 isInitialCall); API_CALLABLE(AddActorVar);
ApiStatus GetPartMovementVar(Evt* script, s32 isInitialCall); API_CALLABLE(GetPartMovementVar);
ApiStatus SetPartMovementVar(Evt* script, s32 isInitialCall); API_CALLABLE(SetPartMovementVar);
ApiStatus AddPartMovementVar(Evt* script, s32 isInitialCall); API_CALLABLE(AddPartMovementVar);
ApiStatus SetActorRotation(Evt* script, s32 isInitialCall); API_CALLABLE(SetActorRotation);
ApiStatus SetActorRotationOffset(Evt* script, s32 isInitialCall); API_CALLABLE(SetActorRotationOffset);
ApiStatus GetActorRotation(Evt* script, s32 isInitialCall); API_CALLABLE(GetActorRotation);
ApiStatus SetPartRotation(Evt* script, s32 isInitialCall); API_CALLABLE(SetPartRotation);
ApiStatus SetPartRotationOffset(Evt* script, s32 isInitialCall); API_CALLABLE(SetPartRotationOffset);
ApiStatus GetPartRotation(Evt* script, s32 isInitialCall); API_CALLABLE(GetPartRotation);
ApiStatus SetActorScale(Evt* script, s32 isInitialCall); API_CALLABLE(SetActorScale);
ApiStatus SetActorScaleModifier(Evt* script, s32 isInitialCall); API_CALLABLE(SetActorScaleModifier);
ApiStatus GetActorScale(Evt* script, s32 isInitialCall); API_CALLABLE(GetActorScale);
ApiStatus SetPartScale(Evt* script, s32 isInitialCall); API_CALLABLE(SetPartScale);
ApiStatus GetPartScale(Evt* script, s32 isInitialCall); API_CALLABLE(GetPartScale);
ApiStatus GetBattleFlags(Evt* script, s32 isInitialCall); API_CALLABLE(GetBattleFlags);
ApiStatus SetBattleFlagBits(Evt* script, s32 isInitialCall); API_CALLABLE(SetBattleFlagBits);
ApiStatus GetBattleFlags2(Evt* script, s32 isInitialCall); API_CALLABLE(GetBattleFlags2);
ApiStatus SetBattleFlagBits2(Evt* script, s32 isInitialCall); API_CALLABLE(SetBattleFlagBits2);
ApiStatus SetActorFlags(Evt* script, s32 isInitialCall); API_CALLABLE(SetActorFlags);
ApiStatus SetActorFlagBits(Evt* script, s32 isInitialCall); API_CALLABLE(SetActorFlagBits);
ApiStatus GetActorFlags(Evt* script, s32 isInitialCall); API_CALLABLE(GetActorFlags);
ApiStatus SetPartFlags(Evt* script, s32 isInitialCall); API_CALLABLE(SetPartFlags);
ApiStatus SetPartFlagBits(Evt* script, s32 isInitialCall); API_CALLABLE(SetPartFlagBits);
ApiStatus SetPartTargetFlags(Evt* script, s32 isInitialCall); API_CALLABLE(SetPartTargetFlags);
ApiStatus SetPartTargetFlagBits(Evt* script, s32 isInitialCall); API_CALLABLE(SetPartTargetFlagBits);
ApiStatus GetPartFlags(Evt* script, s32 isInitialCall); API_CALLABLE(GetPartFlags);
ApiStatus GetPartTargetFlags(Evt* script, s32 isInitialCall); API_CALLABLE(GetPartTargetFlags);
ApiStatus SetPartEventFlags(Evt* script, s32 isInitialCall); API_CALLABLE(SetPartEventFlags);
ApiStatus SetPartEventBits(Evt* script, s32 isInitialCall); API_CALLABLE(SetPartEventBits);
ApiStatus GetPartEventFlags(Evt* script, s32 isInitialCall); API_CALLABLE(GetPartEventFlags);
ApiStatus HPBarToHome(Evt* script, s32 isInitialCall); API_CALLABLE(HPBarToHome);
ApiStatus HPBarToCurrent(Evt* script, s32 isInitialCall); API_CALLABLE(HPBarToCurrent);
ApiStatus SetHPBarOffset(Evt* script, s32 isInitialCall); API_CALLABLE(SetHPBarOffset);
ApiStatus SetActorStatusOffsets(Evt* script, s32 isInitialCall); API_CALLABLE(SetActorStatusOffsets);
ApiStatus SummonEnemy(Evt* script, s32 isInitialCall); API_CALLABLE(SummonEnemy);
ApiStatus GetOwnerID(Evt* script, s32 isInitialCall); API_CALLABLE(GetOwnerID);
ApiStatus SetOwnerID(Evt* script, s32 isInitialCall); API_CALLABLE(SetOwnerID);
ApiStatus ActorExists(Evt* script, s32 isInitialCall); API_CALLABLE(ActorExists);
ApiStatus SetEnabledStarPowers(Evt* script, s32 isInitialCall); API_CALLABLE(SetEnabledStarPowers);
ApiStatus SetBattleInputMask(Evt* script, s32 isInitialCall); API_CALLABLE(SetBattleInputMask);
ApiStatus SetBattleInputButtons(Evt* script, s32 isInitialCall); API_CALLABLE(SetBattleInputButtons);
ApiStatus CheckButtonPress(Evt* script, s32 isInitialCall); API_CALLABLE(CheckButtonPress);
ApiStatus CheckButtonHeld(Evt* script, s32 isInitialCall); API_CALLABLE(CheckButtonHeld);
ApiStatus CheckButtonDown(Evt* script, s32 isInitialCall); API_CALLABLE(CheckButtonDown);
ApiStatus GetBattleState(Evt* script, s32 isInitialCall); API_CALLABLE(GetBattleState);
ApiStatus CreateCurrentPosTargetList(Evt* script, s32 isInitialCall); API_CALLABLE(CreateCurrentPosTargetList);
ApiStatus CreateHomeTargetList(Evt* script, s32 isInitialCall); API_CALLABLE(CreateHomeTargetList);
ApiStatus InitTargetIterator(Evt* script, s32 isInitialCall); API_CALLABLE(InitTargetIterator);
ApiStatus SetOwnerTarget(Evt* script, s32 isInitialCall); API_CALLABLE(SetOwnerTarget);
ApiStatus ChooseNextTarget(Evt* script, s32 isInitialCall); API_CALLABLE(ChooseNextTarget);
ApiStatus GetTargetListLength(Evt* script, s32 isInitialCall); API_CALLABLE(GetTargetListLength);
ApiStatus GetOwnerTarget(Evt* script, s32 isInitialCall); API_CALLABLE(GetOwnerTarget);
ApiStatus func_8026E914(Evt* script, s32 isInitialCall); API_CALLABLE(func_8026E914);
ApiStatus GetPlayerActorID(Evt* script, s32 isInitialCall); API_CALLABLE(GetPlayerActorID);
ApiStatus GetDistanceToGoal(Evt* script, s32 isInitialCall); API_CALLABLE(GetDistanceToGoal);
ApiStatus SetActorPaletteEffect(Evt* script, s32 isInitialCall); API_CALLABLE(SetActorPaletteEffect);
ApiStatus AddActorDecoration(Evt* script, s32 isInitialCall); API_CALLABLE(AddActorDecoration);
ApiStatus RemoveActorDecoration(Evt* script, s32 isInitialCall); API_CALLABLE(RemoveActorDecoration);
ApiStatus ModifyActorDecoration(Evt* script, s32 isInitialCall); API_CALLABLE(ModifyActorDecoration);
ApiStatus UseIdleAnimation(Evt* script, s32 isInitialCall); API_CALLABLE(UseIdleAnimation);
ApiStatus GetStatusFlags(Evt* script, s32 isInitialCall); API_CALLABLE(GetStatusFlags);
ApiStatus RemovePlayerBuffs(Evt* script, s32 isInitialCall); API_CALLABLE(RemovePlayerBuffs);
ApiStatus SetPartAlpha(Evt* script, s32 isInitialCall); API_CALLABLE(SetPartAlpha);
ApiStatus CreatePartShadow(Evt* script, s32 isInitialCall); API_CALLABLE(CreatePartShadow);
ApiStatus RemovePartShadow(Evt* script, s32 isInitialCall); API_CALLABLE(RemovePartShadow);
ApiStatus SetEndBattleFadeOutRate(Evt* script, s32 isInitialCall); API_CALLABLE(SetEndBattleFadeOutRate);
ApiStatus SetBattleVar(Evt* script, s32 isInitialCall); API_CALLABLE(SetBattleVar);
ApiStatus GetBattleVar(Evt* script, s32 isInitialCall); API_CALLABLE(GetBattleVar);
ApiStatus ResetAllActorSounds(Evt* script, s32 isInitialCall); API_CALLABLE(ResetAllActorSounds);
ApiStatus SetActorSounds(Evt* script, s32 isInitialCall); API_CALLABLE(SetActorSounds);
ApiStatus ResetActorSounds(Evt* script, s32 isInitialCall); API_CALLABLE(ResetActorSounds);
ApiStatus SetPartSounds(Evt* script, s32 isInitialCall); API_CALLABLE(SetPartSounds);
ApiStatus SetActorType(Evt* script, s32 isInitialCall); API_CALLABLE(SetActorType);
ApiStatus ShowShockEffect(Evt* script, s32 isInitialCall); API_CALLABLE(ShowShockEffect);
ApiStatus GetActorAttackBoost(Evt* script, s32 isInitialCall); API_CALLABLE(GetActorAttackBoost);
ApiStatus GetActorDefenseBoost(Evt* script, s32 isInitialCall); API_CALLABLE(GetActorDefenseBoost);
ApiStatus BoostAttack(Evt* script, s32 isInitialCall); API_CALLABLE(BoostAttack);
ApiStatus BoostDefense(Evt* script, s32 isInitialCall); API_CALLABLE(BoostDefense);
ApiStatus VanishActor(Evt* script, s32 isInitialCall); API_CALLABLE(VanishActor);
ApiStatus ElectrifyActor(Evt* script, s32 isInitialCall); API_CALLABLE(ElectrifyActor);
ApiStatus HealActor(Evt* script, s32 isInitialCall); API_CALLABLE(HealActor);
ApiStatus WaitForBuffDone(Evt* script, s32 isInitialCall); API_CALLABLE(WaitForBuffDone);
ApiStatus CopyBuffs(Evt* script, s32 isInitialCall); API_CALLABLE(CopyBuffs);
ApiStatus GetMenuSelection(Evt* script, s32 isInitialCall); API_CALLABLE(GetMenuSelection);
ApiStatus PlayerFallToGoal(Evt* script, s32 isInitialCall); API_CALLABLE(PlayerFallToGoal);
ApiStatus PlayerLandJump(Evt* script, s32 isInitialCall); API_CALLABLE(PlayerLandJump);
ApiStatus PlayerRunToGoal(Evt* script, s32 isInitialCall); API_CALLABLE(PlayerRunToGoal);
ApiStatus CancelablePlayerRunToGoal(Evt* script, s32 isInitialCall); API_CALLABLE(CancelablePlayerRunToGoal);
ApiStatus GetPlayerHP(Evt* script, s32 isInitialCall); API_CALLABLE(GetPlayerHP);
ApiStatus PlayerDamageEnemy(Evt* script, s32 isInitialCall); API_CALLABLE(PlayerDamageEnemy);
ApiStatus PlayerPowerBounceEnemy(Evt* script, s32 isInitialCall); API_CALLABLE(PlayerPowerBounceEnemy);
ApiStatus PlayerTestEnemy(Evt* script, s32 isInitialCall); API_CALLABLE(PlayerTestEnemy);
ApiStatus DispatchDamagePlayerEvent(Evt* script, s32 isInitialCall); API_CALLABLE(DispatchDamagePlayerEvent);
ApiStatus EnablePlayerBlur(Evt* script, s32 isInitialCall); API_CALLABLE(EnablePlayerBlur);
ApiStatus func_80274A18(Evt* script, s32 isInitialCall); API_CALLABLE(func_80274A18);
ApiStatus func_802752AC(Evt* script, s32 isInitialCall); API_CALLABLE(func_802752AC);
ApiStatus func_80275F00(Evt* script, s32 isInitialCall); API_CALLABLE(func_80275F00);
ApiStatus GetPlayerActionSuccess(Evt* script, s32 isInitialCall); API_CALLABLE(GetPlayerActionSuccess);
ApiStatus BindTakeTurn(Evt* script, s32 isInitialCall); API_CALLABLE(BindTakeTurn);
ApiStatus PauseTakeTurn(Evt* script, s32 isInitialCall); API_CALLABLE(PauseTakeTurn);
ApiStatus ResumeTakeTurn(Evt* script, s32 isInitialCall); API_CALLABLE(ResumeTakeTurn);
ApiStatus BindIdle(Evt* script, s32 isInitialCall); API_CALLABLE(BindIdle);
ApiStatus EnableIdleScript(Evt* script, s32 isInitialCall); API_CALLABLE(EnableIdleScript);
ApiStatus BindHandleEvent(Evt* script, s32 isInitialCall); API_CALLABLE(BindHandleEvent);
ApiStatus BindHandlePhase(Evt* script, s32 isInitialCall); API_CALLABLE(BindHandlePhase);
ApiStatus JumpToGoal(Evt* script, s32 isInitialCall); API_CALLABLE(JumpToGoal);
ApiStatus IdleJumpToGoal(Evt* script, s32 isInitialCall); API_CALLABLE(IdleJumpToGoal);
ApiStatus JumpWithBounce(Evt* script, s32 isInitialCall); API_CALLABLE(JumpWithBounce);
ApiStatus LandJump(Evt* script, s32 isInitialCall); API_CALLABLE(LandJump);
ApiStatus FallToGoal(Evt* script, s32 isInitialCall); API_CALLABLE(FallToGoal);
ApiStatus RunToGoal(Evt* script, s32 isInitialCall); API_CALLABLE(RunToGoal);
ApiStatus IdleRunToGoal(Evt* script, s32 isInitialCall); API_CALLABLE(IdleRunToGoal);
ApiStatus JumpPartTo(Evt* script, s32 isInitialCall); API_CALLABLE(JumpPartTo);
ApiStatus FallPartTo(Evt* script, s32 isInitialCall); API_CALLABLE(FallPartTo);
ApiStatus LandJumpPart(Evt* script, s32 isInitialCall); API_CALLABLE(LandJumpPart);
ApiStatus RunPartTo(Evt* script, s32 isInitialCall); API_CALLABLE(RunPartTo);
ApiStatus FlyToGoal(Evt* script, s32 isInitialCall); API_CALLABLE(FlyToGoal);
ApiStatus IdleFlyToGoal(Evt* script, s32 isInitialCall); API_CALLABLE(IdleFlyToGoal);
ApiStatus FlyPartTo(Evt* script, s32 isInitialCall); API_CALLABLE(FlyPartTo);
ApiStatus GetLastEvent(Evt* script, s32 isInitialCall); API_CALLABLE(GetLastEvent);
ApiStatus SetTargetActor(Evt* script, s32 isInitialCall); API_CALLABLE(SetTargetActor);
ApiStatus SetEnemyHP(Evt* script, s32 isInitialCall); API_CALLABLE(SetEnemyHP);
ApiStatus GetActorHP(Evt* script, s32 isInitialCall); API_CALLABLE(GetActorHP);
ApiStatus GetEnemyMaxHP(Evt* script, s32 isInitialCall); API_CALLABLE(GetEnemyMaxHP);
ApiStatus RemoveActor(Evt* script, s32 isInitialCall); API_CALLABLE(RemoveActor);
ApiStatus DropStarPoints(Evt* script, s32 isInitialCall); API_CALLABLE(DropStarPoints);
ApiStatus SetDefenseTable(Evt* script, s32 isInitialCall); API_CALLABLE(SetDefenseTable);
ApiStatus SetStatusTable(Evt* script, s32 isInitialCall); API_CALLABLE(SetStatusTable);
ApiStatus SetIdleAnimations(Evt* script, s32 isInitialCall); API_CALLABLE(SetIdleAnimations);
ApiStatus EnemyDamageTarget(Evt* script, s32 isInitialCall); API_CALLABLE(EnemyDamageTarget);
ApiStatus EnemyFollowupAfflictTarget(Evt* script, s32 isInitialCall); API_CALLABLE(EnemyFollowupAfflictTarget);
ApiStatus EnemyTestTarget(Evt* script, s32 isInitialCall); API_CALLABLE(EnemyTestTarget);
ApiStatus DispatchDamageEvent(Evt* script, s32 isInitialCall); API_CALLABLE(DispatchDamageEvent);
ApiStatus DispatchEvent(Evt* script, s32 isInitialCall); API_CALLABLE(DispatchEvent);
ApiStatus ShowHealthBar(Evt* script, s32 isInitialCall); API_CALLABLE(ShowHealthBar);
ApiStatus SetTargetOffset(Evt* script, s32 isInitialCall); API_CALLABLE(SetTargetOffset);
ApiStatus SetProjectileTargetOffset(Evt* script, s32 isInitialCall); API_CALLABLE(SetProjectileTargetOffset);
ApiStatus EnableActorBlur(Evt* script, s32 isInitialCall); API_CALLABLE(EnableActorBlur);
ApiStatus AfflictActor(Evt* script, s32 isInitialCall); API_CALLABLE(AfflictActor);
ApiStatus GetInstigatorValue(Evt* script, s32 isInitialCall); API_CALLABLE(GetInstigatorValue);
ApiStatus GetEncounterTrigger(Evt* script, s32 isInitialCall); API_CALLABLE(GetEncounterTrigger);
ApiStatus YieldTurn(Evt* script, s32 isInitialCall); API_CALLABLE(YieldTurn);
ApiStatus SetActorSize(Evt* script, s32 isInitialCall); API_CALLABLE(SetActorSize);
ApiStatus GetActorSize(Evt* script, s32 isInitialCall); API_CALLABLE(GetActorSize);
ApiStatus SetPartSize(Evt* script, s32 isInitialCall); API_CALLABLE(SetPartSize);
ApiStatus GetOriginalActorType(Evt* script, s32 isInitialCall); API_CALLABLE(GetOriginalActorType);
ApiStatus GetCurrentActorType(Evt* script, s32 isInitialCall); API_CALLABLE(GetCurrentActorType);
ApiStatus GetLastDamage(Evt* script, s32 isInitialCall); API_CALLABLE(GetLastDamage);
ApiStatus EnableActorGlow(Evt* script, s32 isInitialCall); API_CALLABLE(EnableActorGlow);
ApiStatus WasStatusInflicted(Evt* script, s32 isInitialCall); API_CALLABLE(WasStatusInflicted);
ApiStatus CopyStatusEffects(Evt* script, s32 isInitialCall); API_CALLABLE(CopyStatusEffects);
ApiStatus ClearStatusEffects(Evt* script, s32 isInitialCall); API_CALLABLE(ClearStatusEffects);
ApiStatus MakeOwnerTargetIndex(Evt* script, s32 isInitialCall); API_CALLABLE(MakeOwnerTargetIndex);
ApiStatus GetActorLevel(Evt* script, s32 isInitialCall); API_CALLABLE(GetActorLevel);
ApiStatus PartnerDamageEnemy(Evt* script, s32 isInitialCall); API_CALLABLE(PartnerDamageEnemy);
ApiStatus PartnerAfflictEnemy(Evt* script, s32 isInitialCall); API_CALLABLE(PartnerAfflictEnemy);
ApiStatus PartnerPowerBounceEnemy(Evt* script, s32 isInitialCall); API_CALLABLE(PartnerPowerBounceEnemy);
ApiStatus PartnerTestEnemy(Evt* script, s32 isInitialCall); API_CALLABLE(PartnerTestEnemy);
ApiStatus DeletePartner(Evt* script, s32 isInitialCall); API_CALLABLE(DeletePartner);
ApiStatus GetDamageIntensity(Evt* script, s32 isInitialCall); API_CALLABLE(GetDamageIntensity);
ApiStatus AddEffectOffset(Evt* script, s32 isInitialCall); API_CALLABLE(AddEffectOffset);
ApiStatus LoadStarPowerScript(Evt* script, s32 isInitialCall); API_CALLABLE(LoadStarPowerScript);
ApiStatus CamPresetUpdate_B(Evt* script, s32 isInitialCall); API_CALLABLE(CamPresetUpdate_B);
ApiStatus CamPresetUpdate_F(Evt* script, s32 isInitialCall); API_CALLABLE(CamPresetUpdate_F);
ApiStatus CamPresetUpdate_M(Evt* script, s32 isInitialCall); API_CALLABLE(CamPresetUpdate_M);
ApiStatus CamPresetUpdate_G(Evt* script, s32 isInitialCall); API_CALLABLE(CamPresetUpdate_G);
ApiStatus CamPresetUpdate_I(Evt* script, s32 isInitialCall); API_CALLABLE(CamPresetUpdate_I);
ApiStatus CamPresetUpdate_H(Evt* script, s32 isInitialCall); API_CALLABLE(CamPresetUpdate_H);
ApiStatus CamPresetUpdate_N(Evt* script, s32 isInitialCall); API_CALLABLE(CamPresetUpdate_N);
ApiStatus BattleCamImpl_Default(Evt* script, s32 isInitialCall); API_CALLABLE(BattleCamImpl_Default);
ApiStatus CamPresetUpdate_D(Evt* script, s32 isInitialCall); API_CALLABLE(CamPresetUpdate_D);
ApiStatus CamPresetUpdate_E(Evt* script, s32 isInitialCall); API_CALLABLE(CamPresetUpdate_E);
ApiStatus CamPresetUpdate_J(Evt* script, s32 isInitialCall); API_CALLABLE(CamPresetUpdate_J);
ApiStatus CamPresetUpdate_K(Evt* script, s32 isInitialCall); API_CALLABLE(CamPresetUpdate_K);
ApiStatus CamPresetUpdate_L(Evt* script, s32 isInitialCall); API_CALLABLE(CamPresetUpdate_L);
ApiStatus SetBattleCamPos(Evt* script, s32 isInitialCall); API_CALLABLE(SetBattleCamPos);
ApiStatus SetBattleCamParam(Evt* script, s32 isInitialCall); API_CALLABLE(SetBattleCamParam);
ApiStatus GetPartAnimNotify(Evt* script, s32 isInitialCall); API_CALLABLE(GetPartAnimNotify);
ApiStatus InitAnimatedModels(Evt* script, s32 isInitialCall); API_CALLABLE(InitAnimatedModels);
ApiStatus func_8024CE9C(Evt* script, s32 isInitialCall); API_CALLABLE(func_8024CE9C);
ApiStatus func_802CAE50(Evt* script, s32 isInitialCall); API_CALLABLE(func_802CAE50);
ApiStatus func_802807D0(Evt* script, s32 isInitialCall); API_CALLABLE(func_802807D0);
ApiStatus PartnerYieldTurn(Evt* script, s32 isInitialCall); ///< YieldTurn copy API_CALLABLE(PartnerYieldTurn); ///< YieldTurn copy
ApiStatus func_8024ECF8(Evt* script, s32 isInitialCall); API_CALLABLE(func_8024ECF8);
ApiStatus UseBattleCamPresetImmediately(Evt* script, s32 isInitialCall); API_CALLABLE(UseBattleCamPresetImmediately);
ApiStatus UseBattleCamPresetWait(Evt* script, s32 isInitialCall); API_CALLABLE(UseBattleCamPresetWait);
ApiStatus HideHealthBar(Evt* script, s32 isInitialCall); API_CALLABLE(HideHealthBar);
ApiStatus GetPartnerActionSuccess(Evt* script, s32 isInitialCall); API_CALLABLE(GetPartnerActionSuccess);
ApiStatus CreateNpc(Evt* script, s32 isInitialCall); API_CALLABLE(CreateNpc);
ApiStatus EnableBattleStatusBar(Evt* script, s32 isInitialCall); API_CALLABLE(EnableBattleStatusBar);
ApiStatus PlayerYieldTurn(Evt* script, s32 isInitialCall); API_CALLABLE(PlayerYieldTurn);
ApiStatus ShowStartRecoveryShimmer(Evt* script, s32 isInitialCall); API_CALLABLE(ShowStartRecoveryShimmer);
ApiStatus ShowRecoveryShimmer(Evt* script, s32 isInitialCall); API_CALLABLE(ShowRecoveryShimmer);
ApiStatus func_80273444(Evt* script, s32 isInitialCall); API_CALLABLE(func_80273444);
ApiStatus WaitForState(Evt* script, s32 isInitialCall); API_CALLABLE(WaitForState);
ApiStatus SetBattleMenuEnabledFlags(Evt* script, s32 isInitialCall); API_CALLABLE(SetBattleMenuEnabledFlags);
ApiStatus SetBattleState(Evt* script, s32 isInitialCall); API_CALLABLE(SetBattleState);
ApiStatus func_8027D434(Evt* script, s32 isInitialCall); API_CALLABLE(func_8027D434);
ApiStatus func_8026F1A0(Evt* script, s32 isInitialCall); API_CALLABLE(func_8026F1A0);
ApiStatus PlayLoopingSoundAtActor(Evt* script, s32 isInitialCall); API_CALLABLE(PlayLoopingSoundAtActor);
ApiStatus StopLoopingSoundAtActor(Evt* script, s32 isInitialCall); API_CALLABLE(StopLoopingSoundAtActor);
ApiStatus EnableActorPaletteEffects(Evt* script, s32 isInitialCall); API_CALLABLE(EnableActorPaletteEffects);
ApiStatus SetActorPaletteSwapParams(Evt* script, s32 isInitialCall); API_CALLABLE(SetActorPaletteSwapParams);
ApiStatus BattleCamTargetActorPart(Evt* script, s32 isInitialCall); API_CALLABLE(BattleCamTargetActorPart);
ApiStatus GetDarknessStatus(Evt* script, s32 isInitialCall); API_CALLABLE(GetDarknessStatus);
ApiStatus CancelEnemyTurn(Evt* script, s32 isInitialCall); API_CALLABLE(CancelEnemyTurn);
ApiStatus GetAnimatedNodeRotation(Evt* script, s32 isInitialCall); API_CALLABLE(GetAnimatedNodeRotation);
ApiStatus GetAnimatedNodePosition(Evt* script, s32 isInitialCall); API_CALLABLE(GetAnimatedNodePosition);
ApiStatus DispatchEventPlayer(Evt* script, s32 isInitialCall); API_CALLABLE(DispatchEventPlayer);
extern EvtScript EVS_Mario_HandlePhase; extern EvtScript EVS_Mario_HandlePhase;
extern EvtScript EVS_Peach_HandlePhase; extern EvtScript EVS_Peach_HandlePhase;

File diff suppressed because it is too large Load Diff

View File

@ -578,7 +578,7 @@
/// ///
/// An API function has the following signature: /// An API function has the following signature:
/// ///
/// ApiStatus ApiFunction(Evt* thread, s32 isInitialCall); /// ApiStatus ApiFunction(Evt* script, s32 isInitialCall);
/// ///
/// This function could then be called with the following command: /// This function could then be called with the following command:
/// ///

View File

@ -6,19 +6,19 @@
#include "script_api/common.h" #include "script_api/common.h"
ApiStatus MakeNpcs(Evt* script, s32 isInitialCall); API_CALLABLE(MakeNpcs);
ApiStatus BasicAI_Main(Evt* script, s32 isInitialCall); API_CALLABLE(BasicAI_Main);
ApiStatus ResetFromLava(Evt* script, s32 isInitialCall); API_CALLABLE(ResetFromLava);
ApiStatus MakeShop(Evt* script, s32 isInitialCall); API_CALLABLE(MakeShop);
ApiStatus MakeShopOwner(Evt* script, s32 isInitialCall); API_CALLABLE(MakeShopOwner);
ApiStatus CreateMapRoom(Evt* script, s32 isInitialCall); API_CALLABLE(CreateMapRoom);
ApiStatus CheckActionState(Evt* script, s32 isInitialCall); API_CALLABLE(CheckActionState);
ApiStatus CreatePushBlockGrid(Evt* script, s32 isInitialCall); API_CALLABLE(CreatePushBlockGrid);
ApiStatus SetPushBlock(Evt* script, s32 isInitialCall); API_CALLABLE(SetPushBlock);
ApiStatus GetPushBlock(Evt* script, s32 isInitialCall); API_CALLABLE(GetPushBlock);
ApiStatus GetGridIndexFromPos(Evt* script, s32 isInitialCall); API_CALLABLE(GetGridIndexFromPos);
ApiStatus SetPushBlockFallEffect(Evt* script, s32 isInitialCall); API_CALLABLE(SetPushBlockFallEffect);
ApiStatus TeleportPartnerToPlayer(Evt* script, s32 isInitialCall); API_CALLABLE(TeleportPartnerToPlayer);
extern EvtScript EnterWalk; extern EvtScript EnterWalk;
extern EvtScript EnterWalkShort; extern EvtScript EnterWalkShort;

View File

@ -836,7 +836,7 @@ void basic_ai_lose_player(Evt* script, MobileAISettings* npcAISettings, EnemyDet
} }
} }
ApiStatus BasicAI_Main(Evt* script, s32 isInitialCall) { API_CALLABLE(BasicAI_Main) {
Enemy* enemy = script->owner1.enemy; Enemy* enemy = script->owner1.enemy;
Npc* npc = get_npc_unsafe(enemy->npcID); Npc* npc = get_npc_unsafe(enemy->npcID);
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;

View File

@ -1,8 +1,8 @@
#include "common.h" #include "common.h"
ApiStatus func_8005DB00(Evt* script, s32 isInitialCall); API_CALLABLE(func_8005DB00);
ApiStatus func_8005DD54(Evt* script, s32 isInitialCall); API_CALLABLE(func_8005DD54);
ApiStatus func_8005DDF0(Evt* script, s32 isInitialCall); API_CALLABLE(func_8005DDF0);
EvtScript EVS_800936C0 = { EvtScript EVS_800936C0 = {
EVT_CALL(func_8005DB00) EVT_CALL(func_8005DB00)
@ -85,7 +85,7 @@ EvtScript D_800939B4 = {
EVT_END EVT_END
}; };
ApiStatus func_8005DB00(Evt* script, s32 isInitialCall) { API_CALLABLE(func_8005DB00) {
Npc* npc; Npc* npc;
f32 targetDir, npcYaw; f32 targetDir, npcYaw;
PlayerStatus* playerStatus; PlayerStatus* playerStatus;
@ -143,7 +143,7 @@ ApiStatus func_8005DB00(Evt* script, s32 isInitialCall) {
return ApiStatus_BLOCK; return ApiStatus_BLOCK;
} }
ApiStatus func_8005DD54(Evt* script, s32 isInitialCall) { API_CALLABLE(func_8005DD54) {
f32 angle = clamp_angle(script->varTable[0]); f32 angle = clamp_angle(script->varTable[0]);
script->varTable[0] = angle; script->varTable[0] = angle;
@ -157,7 +157,7 @@ ApiStatus func_8005DD54(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus func_8005DDF0(Evt* script, s32 isInitialCall) { API_CALLABLE(func_8005DDF0) {
if (gCurrentEncounter.unk_08 != -1) { if (gCurrentEncounter.unk_08 != -1) {
return ApiStatus_DONE1; return ApiStatus_DONE1;
} else { } else {

View File

@ -874,7 +874,7 @@ void appendGfx_animator_node(ModelAnimator* animator, AnimatorNode* node, Matrix
if (!gAnimModelFogEnabled) { if (!gAnimModelFogEnabled) {
gDPSetCombineMode(gMainGfxPos++, G_CC_DECALRGBA, G_CC_DECALRGBA); gDPSetCombineMode(gMainGfxPos++, G_CC_DECALRGBA, G_CC_DECALRGBA);
} else { } else {
gDPSetCombineMode(gMainGfxPos++, PM_CC_42, PM_CC_18); gDPSetCombineMode(gMainGfxPos++, PM_CC_42, PM_CC2_MULTIPLY_SHADE);
} }
gDPPipeSync(gMainGfxPos++); gDPPipeSync(gMainGfxPos++);

View File

@ -897,7 +897,7 @@ s32 dispatch_damage_event_actor_1(Actor* actor, s32 damageAmount, s32 event) {
return dispatch_damage_event_actor(actor, damageAmount, event, TRUE); return dispatch_damage_event_actor(actor, damageAmount, event, TRUE);
} }
ApiStatus BindTakeTurn(Evt* script, s32 isInitialCall) { API_CALLABLE(BindTakeTurn) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 actorID = evt_get_variable(script, *args++); s32 actorID = evt_get_variable(script, *args++);
EvtScript* takeTurnScript; EvtScript* takeTurnScript;
@ -911,7 +911,7 @@ ApiStatus BindTakeTurn(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus PauseTakeTurn(Evt* script, s32 isInitialCall) { API_CALLABLE(PauseTakeTurn) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 actorID = evt_get_variable(script, *args++); s32 actorID = evt_get_variable(script, *args++);
@ -924,7 +924,7 @@ ApiStatus PauseTakeTurn(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus ResumeTakeTurn(Evt* script, s32 isInitialCall) { API_CALLABLE(ResumeTakeTurn) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 actorID = evt_get_variable(script, *args++); s32 actorID = evt_get_variable(script, *args++);
@ -937,7 +937,7 @@ ApiStatus ResumeTakeTurn(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus BindIdle(Evt* script, s32 isInitialCall) { API_CALLABLE(BindIdle) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 actorID = evt_get_variable(script, *args++); s32 actorID = evt_get_variable(script, *args++);
EvtScript* idleCode; EvtScript* idleCode;
@ -964,7 +964,7 @@ ApiStatus BindIdle(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus EnableIdleScript(Evt* script, s32 isInitialCall) { API_CALLABLE(EnableIdleScript) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 actorID = evt_get_variable(script, *args++); s32 actorID = evt_get_variable(script, *args++);
s32 var1; s32 var1;
@ -995,7 +995,7 @@ ApiStatus EnableIdleScript(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus BindHandleEvent(Evt* script, s32 isInitialCall) { API_CALLABLE(BindHandleEvent) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 actorID = evt_get_variable(script, *args++); s32 actorID = evt_get_variable(script, *args++);
EvtScript* src; EvtScript* src;
@ -1009,7 +1009,7 @@ ApiStatus BindHandleEvent(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus BindHandlePhase(Evt* script, s32 isInitialCall) { API_CALLABLE(BindHandlePhase) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 actorID = evt_get_variable(script, *args++); s32 actorID = evt_get_variable(script, *args++);
EvtScript* src; EvtScript* src;
@ -1023,7 +1023,7 @@ ApiStatus BindHandlePhase(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus JumpToGoal(Evt* script, s32 isInitialCall) { API_CALLABLE(JumpToGoal) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
Actor* actor; Actor* actor;
ActorState* actorState; ActorState* actorState;
@ -1132,7 +1132,7 @@ ApiStatus JumpToGoal(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE1; return ApiStatus_DONE1;
} }
ApiStatus IdleJumpToGoal(Evt* script, s32 isInitialCall) { API_CALLABLE(IdleJumpToGoal) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
Actor* actor; Actor* actor;
ActorMovement* movement; ActorMovement* movement;
@ -1220,7 +1220,7 @@ ApiStatus IdleJumpToGoal(Evt* script, s32 isInitialCall) {
return ApiStatus_BLOCK; return ApiStatus_BLOCK;
} }
ApiStatus JumpToGoalSimple2(Evt* script, s32 isInitialCall) { API_CALLABLE(JumpToGoalSimple2) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
ActorState* state; ActorState* state;
f32 posX, posY, posZ; f32 posX, posY, posZ;
@ -1306,7 +1306,7 @@ ApiStatus JumpToGoalSimple2(Evt* script, s32 isInitialCall) {
return ApiStatus_BLOCK; return ApiStatus_BLOCK;
} }
ApiStatus JumpWithBounce(Evt* script, s32 isInitialCall) { API_CALLABLE(JumpWithBounce) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
Actor* actor; Actor* actor;
ActorState* actorState; ActorState* actorState;
@ -1408,7 +1408,7 @@ ApiStatus JumpWithBounce(Evt* script, s32 isInitialCall) {
return ApiStatus_BLOCK; return ApiStatus_BLOCK;
} }
ApiStatus LandJump(Evt* script, s32 isInitialCall) { API_CALLABLE(LandJump) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
Actor* actor; Actor* actor;
@ -1449,7 +1449,7 @@ ApiStatus LandJump(Evt* script, s32 isInitialCall) {
return ApiStatus_BLOCK; return ApiStatus_BLOCK;
} }
ApiStatus FallToGoal(Evt* script, s32 isInitialCall) { API_CALLABLE(FallToGoal) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
Actor* actor; Actor* actor;
ActorState* state; ActorState* state;
@ -1526,7 +1526,7 @@ ApiStatus FallToGoal(Evt* script, s32 isInitialCall) {
} }
} }
ApiStatus RunToGoal(Evt* script, s32 isInitialCall) { API_CALLABLE(RunToGoal) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
Actor* actor; Actor* actor;
ActorState* actorState; ActorState* actorState;
@ -1651,7 +1651,7 @@ ApiStatus RunToGoal(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE1; return ApiStatus_DONE1;
} }
ApiStatus IdleRunToGoal(Evt* script, s32 isInitialCall) { API_CALLABLE(IdleRunToGoal) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
Actor* actor; Actor* actor;
ActorMovement* movement; ActorMovement* movement;
@ -1736,7 +1736,7 @@ ApiStatus IdleRunToGoal(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE1; return ApiStatus_DONE1;
} }
ApiStatus JumpPartTo(Evt* script, s32 isInitialCall) { API_CALLABLE(JumpPartTo) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
Actor* actor; Actor* actor;
ActorPart* part; ActorPart* part;
@ -1830,7 +1830,7 @@ ApiStatus JumpPartTo(Evt* script, s32 isInitialCall) {
} }
} }
ApiStatus FallPartTo(Evt* script, s32 isInitialCall) { API_CALLABLE(FallPartTo) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
Actor* actor; Actor* actor;
ActorPart* part; ActorPart* part;
@ -1919,7 +1919,7 @@ ApiStatus FallPartTo(Evt* script, s32 isInitialCall) {
} }
} }
ApiStatus LandJumpPart(Evt* script, s32 isInitialCall) { API_CALLABLE(LandJumpPart) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
Actor* actor; Actor* actor;
ActorPart* part; ActorPart* part;
@ -1966,7 +1966,7 @@ ApiStatus LandJumpPart(Evt* script, s32 isInitialCall) {
return ApiStatus_BLOCK; return ApiStatus_BLOCK;
} }
ApiStatus RunPartTo(Evt* script, s32 isInitialCall) { API_CALLABLE(RunPartTo) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
Actor* actor; Actor* actor;
ActorPart* part; ActorPart* part;
@ -2157,7 +2157,7 @@ f32 update_lerp_battle(s32 easing, f32 start, f32 end, s32 elapsed, s32 duration
return 0.0f; return 0.0f;
} }
ApiStatus FlyToGoal(Evt* script, s32 isInitialCall) { API_CALLABLE(FlyToGoal) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
Actor* actor; Actor* actor;
ActorState* actorState; ActorState* actorState;
@ -2312,7 +2312,7 @@ ApiStatus FlyToGoal(Evt* script, s32 isInitialCall) {
return ApiStatus_BLOCK; return ApiStatus_BLOCK;
} }
ApiStatus IdleFlyToGoal(Evt* script, s32 isInitialCall) { API_CALLABLE(IdleFlyToGoal) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
Actor* actor; Actor* actor;
ActorMovement* movement; ActorMovement* movement;
@ -2413,7 +2413,7 @@ ApiStatus IdleFlyToGoal(Evt* script, s32 isInitialCall) {
return ApiStatus_BLOCK; return ApiStatus_BLOCK;
} }
ApiStatus FlyPartTo(Evt* script, s32 isInitialCall) { API_CALLABLE(FlyPartTo) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
Actor* actor; Actor* actor;
ActorPart* part; ActorPart* part;
@ -2570,7 +2570,7 @@ ApiStatus FlyPartTo(Evt* script, s32 isInitialCall) {
return ApiStatus_BLOCK; return ApiStatus_BLOCK;
} }
ApiStatus GetLastEvent(Evt* script, s32 isInitialCall) { API_CALLABLE(GetLastEvent) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 actorID = evt_get_variable(script, *args++); s32 actorID = evt_get_variable(script, *args++);
s32 outVar; s32 outVar;
@ -2584,7 +2584,7 @@ ApiStatus GetLastEvent(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus SetTargetActor(Evt* script, s32 isInitialCall) { API_CALLABLE(SetTargetActor) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 actorID = evt_get_variable(script, *args++); s32 actorID = evt_get_variable(script, *args++);
s32 targetActorID; s32 targetActorID;
@ -2601,7 +2601,7 @@ ApiStatus SetTargetActor(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus SetEnemyHP(Evt* script, s32 isInitialCall) { API_CALLABLE(SetEnemyHP) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 actorID = evt_get_variable(script, *args++); s32 actorID = evt_get_variable(script, *args++);
s8 newHP; s8 newHP;
@ -2624,7 +2624,7 @@ ApiStatus SetEnemyHP(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus GetActorHP(Evt* script, s32 isInitialCall) { API_CALLABLE(GetActorHP) {
PlayerData* playerData = &gPlayerData; PlayerData* playerData = &gPlayerData;
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 actorID = evt_get_variable(script, *args++); s32 actorID = evt_get_variable(script, *args++);
@ -2655,7 +2655,7 @@ ApiStatus GetActorHP(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus GetEnemyMaxHP(Evt* script, s32 isInitialCall) { API_CALLABLE(GetEnemyMaxHP) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 actorID = evt_get_variable(script, *args++); s32 actorID = evt_get_variable(script, *args++);
s32 outVar; s32 outVar;
@ -2669,7 +2669,7 @@ ApiStatus GetEnemyMaxHP(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus RemoveActor(Evt* script, s32 isInitialCall) { API_CALLABLE(RemoveActor) {
BattleStatus* battleStatus = &gBattleStatus; BattleStatus* battleStatus = &gBattleStatus;
EncounterStatus* currentEncounter = &gCurrentEncounter; EncounterStatus* currentEncounter = &gCurrentEncounter;
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
@ -2701,7 +2701,7 @@ ApiStatus RemoveActor(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus DropStarPoints(Evt* script, s32 isInitialCall) { API_CALLABLE(DropStarPoints) {
BattleStatus* battleStatus = &gBattleStatus; BattleStatus* battleStatus = &gBattleStatus;
PlayerData* playerData = &gPlayerData; PlayerData* playerData = &gPlayerData;
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
@ -2758,7 +2758,7 @@ ApiStatus DropStarPoints(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus SetDefenseTable(Evt* script, s32 isInitialCall) { API_CALLABLE(SetDefenseTable) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 actorID = evt_get_variable(script, *args++); s32 actorID = evt_get_variable(script, *args++);
s32 partID; s32 partID;
@ -2774,7 +2774,7 @@ ApiStatus SetDefenseTable(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus SetStatusTable(Evt* script, s32 isInitialCall) { API_CALLABLE(SetStatusTable) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 actorID = evt_get_variable(script, *args++); s32 actorID = evt_get_variable(script, *args++);
u32* table; u32* table;
@ -2788,7 +2788,7 @@ ApiStatus SetStatusTable(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus SetIdleAnimations(Evt* script, s32 isInitialCall) { API_CALLABLE(SetIdleAnimations) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 actorID = evt_get_variable(script, *args++); s32 actorID = evt_get_variable(script, *args++);
s32 partID; s32 partID;
@ -2804,7 +2804,7 @@ ApiStatus SetIdleAnimations(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus func_8027CC10(Evt* script, s32 isInitialCall) { API_CALLABLE(func_8027CC10) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 actorID = evt_get_variable(script, *args++); s32 actorID = evt_get_variable(script, *args++);
s32 partID; s32 partID;
@ -2823,7 +2823,7 @@ ApiStatus func_8027CC10(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus EnemyDamageTarget(Evt* script, s32 isInitialCall) { API_CALLABLE(EnemyDamageTarget) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
BattleStatus* battleStatus = &gBattleStatus; BattleStatus* battleStatus = &gBattleStatus;
s32 actorID = evt_get_variable(script, *args++); s32 actorID = evt_get_variable(script, *args++);
@ -2897,7 +2897,7 @@ ApiStatus EnemyDamageTarget(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus EnemyFollowupAfflictTarget(Evt* script, s32 isInitialCall) { API_CALLABLE(EnemyFollowupAfflictTarget) {
BattleStatus* battleStatus = &gBattleStatus; BattleStatus* battleStatus = &gBattleStatus;
BattleStatus* anotherBattleStatus = &gBattleStatus; BattleStatus* anotherBattleStatus = &gBattleStatus;
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
@ -2935,7 +2935,7 @@ ApiStatus EnemyFollowupAfflictTarget(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus EnemyTestTarget(Evt* script, s32 isInitialCall) { API_CALLABLE(EnemyTestTarget) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
BattleStatus* battleStatus = &gBattleStatus; BattleStatus* battleStatus = &gBattleStatus;
s32 actorID = evt_get_variable(script, *args++); s32 actorID = evt_get_variable(script, *args++);
@ -3007,7 +3007,7 @@ ApiStatus EnemyTestTarget(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus DispatchDamageEvent(Evt* script, s32 isInitialCall) { API_CALLABLE(DispatchDamageEvent) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 actorID = evt_get_variable(script, *args++); s32 actorID = evt_get_variable(script, *args++);
Actor* actor; Actor* actor;
@ -3033,7 +3033,7 @@ ApiStatus DispatchDamageEvent(Evt* script, s32 isInitialCall) {
} }
} }
ApiStatus DispatchEvent(Evt* script, s32 isInitialCall) { API_CALLABLE(DispatchEvent) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 actorID = evt_get_variable(script, *args++); s32 actorID = evt_get_variable(script, *args++);
@ -3045,7 +3045,7 @@ ApiStatus DispatchEvent(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus ShowHealthBar(Evt* script, s32 isInitialCall) { API_CALLABLE(ShowHealthBar) {
s32 actorID = evt_get_variable(script, *script->ptrReadPos); s32 actorID = evt_get_variable(script, *script->ptrReadPos);
if (actorID == ACTOR_SELF) { if (actorID == ACTOR_SELF) {
@ -3056,7 +3056,7 @@ ApiStatus ShowHealthBar(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus HideHealthBar(Evt* script, s32 isInitialCall) { API_CALLABLE(HideHealthBar) {
s32 actorID = evt_get_variable(script, *script->ptrReadPos); s32 actorID = evt_get_variable(script, *script->ptrReadPos);
if (actorID == ACTOR_SELF) { if (actorID == ACTOR_SELF) {
@ -3067,7 +3067,7 @@ ApiStatus HideHealthBar(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus SetTargetOffset(Evt* script, s32 isInitialCall) { API_CALLABLE(SetTargetOffset) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 actorID = evt_get_variable(script, *args++); s32 actorID = evt_get_variable(script, *args++);
s32 partID; s32 partID;
@ -3091,7 +3091,7 @@ ApiStatus SetTargetOffset(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus func_8027D434(Evt* script, s32 isInitialCall) { API_CALLABLE(func_8027D434) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 actorID = evt_get_variable(script, *args++); s32 actorID = evt_get_variable(script, *args++);
s32 partID; s32 partID;
@ -3107,7 +3107,7 @@ ApiStatus func_8027D434(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus SetProjectileTargetOffset(Evt* script, s32 isInitialCall) { API_CALLABLE(SetProjectileTargetOffset) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 actorID = evt_get_variable(script, *args++); s32 actorID = evt_get_variable(script, *args++);
s32 partID; s32 partID;
@ -3131,7 +3131,7 @@ ApiStatus SetProjectileTargetOffset(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus EnableActorBlur(Evt* script, s32 isInitialCall) { API_CALLABLE(EnableActorBlur) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 actorID = evt_get_variable(script, *args++); s32 actorID = evt_get_variable(script, *args++);
s32 enable = evt_get_variable(script, *args++); s32 enable = evt_get_variable(script, *args++);
@ -3153,7 +3153,7 @@ ApiStatus EnableActorBlur(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus ForceDisableActorBlur(Evt* script, s32 isInitialCall) { API_CALLABLE(ForceDisableActorBlur) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 actorID = evt_get_variable(script, *args++); s32 actorID = evt_get_variable(script, *args++);
Actor* actor; Actor* actor;
@ -3167,7 +3167,7 @@ ApiStatus ForceDisableActorBlur(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus AfflictActor(Evt* script, s32 isInitialCall) { API_CALLABLE(AfflictActor) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 actorID = evt_get_variable(script, *args++); s32 actorID = evt_get_variable(script, *args++);
Actor* actor; Actor* actor;
@ -3206,7 +3206,7 @@ ApiStatus AfflictActor(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus GetInstigatorValue(Evt* script, s32 isInitialCall) { API_CALLABLE(GetInstigatorValue) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 actorID = evt_get_variable(script, *args++); s32 actorID = evt_get_variable(script, *args++);
s32 outVar = *args++; s32 outVar = *args++;
@ -3219,17 +3219,17 @@ ApiStatus GetInstigatorValue(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus GetEncounterTrigger(Evt* script, s32 isInitialCall) { API_CALLABLE(GetEncounterTrigger) {
evt_set_variable(script, *script->ptrReadPos, gCurrentEncounter.hitType); evt_set_variable(script, *script->ptrReadPos, gCurrentEncounter.hitType);
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus YieldTurn(Evt* script, s32 isInitialCall) { API_CALLABLE(YieldTurn) {
gBattleStatus.flags1 |= BS_FLAGS1_YIELD_TURN; gBattleStatus.flags1 |= BS_FLAGS1_YIELD_TURN;
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus SetActorSize(Evt* script, s32 isInitialCall) { API_CALLABLE(SetActorSize) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 actorID = evt_get_variable(script, *args++); s32 actorID = evt_get_variable(script, *args++);
s32 y = evt_get_variable(script, *args++); s32 y = evt_get_variable(script, *args++);
@ -3253,7 +3253,7 @@ ApiStatus SetActorSize(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus GetActorSize(Evt* script, s32 isInitialCall) { API_CALLABLE(GetActorSize) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 actorID = evt_get_variable(script, *args++); s32 actorID = evt_get_variable(script, *args++);
s32 outY = *args++; s32 outY = *args++;
@ -3270,7 +3270,7 @@ ApiStatus GetActorSize(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus SetPartSize(Evt* script, s32 isInitialCall) { API_CALLABLE(SetPartSize) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 actorID = evt_get_variable(script, *args++); s32 actorID = evt_get_variable(script, *args++);
s32 partID = evt_get_variable(script, *args++); s32 partID = evt_get_variable(script, *args++);
@ -3297,7 +3297,7 @@ ApiStatus SetPartSize(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus GetOriginalActorType(Evt* script, s32 isInitialCall) { API_CALLABLE(GetOriginalActorType) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 actorID = evt_get_variable(script, *args++); s32 actorID = evt_get_variable(script, *args++);
s32 outVar = *args++; s32 outVar = *args++;
@ -3310,7 +3310,7 @@ ApiStatus GetOriginalActorType(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus GetCurrentActorType(Evt* script, s32 isInitialCall) { API_CALLABLE(GetCurrentActorType) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 actorID = evt_get_variable(script, *args++); s32 actorID = evt_get_variable(script, *args++);
s32 outVar = *args++; s32 outVar = *args++;
@ -3323,7 +3323,7 @@ ApiStatus GetCurrentActorType(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus GetLastDamage(Evt* script, s32 isInitialCall) { API_CALLABLE(GetLastDamage) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 actorID = evt_get_variable(script, *args++); s32 actorID = evt_get_variable(script, *args++);
s32 outVar; s32 outVar;
@ -3337,7 +3337,7 @@ ApiStatus GetLastDamage(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus EnableActorGlow(Evt* script, s32 isInitialCall) { API_CALLABLE(EnableActorGlow) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 actorID = evt_get_variable(script, *args++); s32 actorID = evt_get_variable(script, *args++);
s32 flag; s32 flag;
@ -3366,7 +3366,7 @@ ApiStatus EnableActorGlow(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus WasStatusInflicted(Evt* script, s32 isInitialCall) { API_CALLABLE(WasStatusInflicted) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
BattleStatus* battleStatus = &gBattleStatus; BattleStatus* battleStatus = &gBattleStatus;
s32 outVal; s32 outVal;
@ -3383,7 +3383,7 @@ ApiStatus WasStatusInflicted(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus CopyStatusEffects(Evt* script, s32 isInitialCall) { API_CALLABLE(CopyStatusEffects) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 actorIDTo; s32 actorIDTo;
s32 actorIDFrom; s32 actorIDFrom;
@ -3414,7 +3414,7 @@ ApiStatus CopyStatusEffects(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus ClearStatusEffects(Evt* script, s32 isInitialCall) { API_CALLABLE(ClearStatusEffects) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 actorID = evt_get_variable(script, *args++); s32 actorID = evt_get_variable(script, *args++);
s32 flag; s32 flag;

File diff suppressed because it is too large Load Diff

View File

@ -2452,12 +2452,12 @@ void btl_state_update_defeat(void) {
void btl_state_draw_defeat(void) { void btl_state_draw_defeat(void) {
} }
ApiStatus EnablePartnerBlur(Evt* script, s32 isInitialCall) { API_CALLABLE(EnablePartnerBlur) {
enable_partner_blur(); enable_partner_blur();
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus DisablePartnerBlur(Evt* script, s32 isInitialCall) { API_CALLABLE(DisablePartnerBlur) {
disable_partner_blur(); disable_partner_blur();
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }

View File

@ -138,7 +138,7 @@ EvtScript EVS_OnBattleInit = {
EVT_END EVT_END
}; };
ApiStatus CamPresetUpdate_B(Evt* script, s32 isInitialCall) { API_CALLABLE(CamPresetUpdate_B) {
BattleCam_DoneMoving = TRUE; BattleCam_DoneMoving = TRUE;
return ApiStatus_BLOCK; return ApiStatus_BLOCK;
} }
@ -1006,7 +1006,7 @@ s32 CamPresetUpdate_H(Evt* script, s32 isInitialCall) {
return ApiStatus_BLOCK; return ApiStatus_BLOCK;
} }
ApiStatus CamPresetUpdate_N(Evt* script, s32 isInitialCall) { API_CALLABLE(CamPresetUpdate_N) {
Camera* camera = &gCameras[CAM_BATTLE]; Camera* camera = &gCameras[CAM_BATTLE];
f32 alpha; f32 alpha;
f32 x, y, z; f32 x, y, z;
@ -1113,7 +1113,7 @@ API_CALLABLE(BattleCamImpl_Default) {
return ApiStatus_BLOCK; return ApiStatus_BLOCK;
} }
ApiStatus CamPresetUpdate_D(Evt* script, s32 isInitialCall) { API_CALLABLE(CamPresetUpdate_D) {
Camera* camera = &gCameras[CAM_BATTLE]; Camera* camera = &gCameras[CAM_BATTLE];
f32 alpha; f32 alpha;
f32 x, y, z; f32 x, y, z;
@ -1165,7 +1165,7 @@ ApiStatus CamPresetUpdate_D(Evt* script, s32 isInitialCall) {
return ApiStatus_BLOCK; return ApiStatus_BLOCK;
} }
ApiStatus CamPresetUpdate_E(Evt* script, s32 isInitialCall) { API_CALLABLE(CamPresetUpdate_E) {
Camera* camera = &gCameras[CAM_BATTLE]; Camera* camera = &gCameras[CAM_BATTLE];
f32 alpha; f32 alpha;
f32 x, y, z; f32 x, y, z;
@ -1219,7 +1219,7 @@ ApiStatus CamPresetUpdate_E(Evt* script, s32 isInitialCall) {
return ApiStatus_BLOCK; return ApiStatus_BLOCK;
} }
ApiStatus CamPresetUpdate_J(Evt* script, s32 isInitialCall) { API_CALLABLE(CamPresetUpdate_J) {
Camera* camera = &gCameras[CAM_BATTLE]; Camera* camera = &gCameras[CAM_BATTLE];
f32 alpha; f32 alpha;
f32 x, y, z; f32 x, y, z;
@ -1270,7 +1270,7 @@ ApiStatus CamPresetUpdate_J(Evt* script, s32 isInitialCall) {
return ApiStatus_BLOCK; return ApiStatus_BLOCK;
} }
ApiStatus CamPresetUpdate_K(Evt* script, s32 isInitialCall) { API_CALLABLE(CamPresetUpdate_K) {
Camera* camera = &gCameras[CAM_BATTLE]; Camera* camera = &gCameras[CAM_BATTLE];
BattleStatus* battleStatus = &gBattleStatus; BattleStatus* battleStatus = &gBattleStatus;
PlayerStatus* playerStatus = &gPlayerStatus; PlayerStatus* playerStatus = &gPlayerStatus;
@ -1336,7 +1336,7 @@ ApiStatus CamPresetUpdate_K(Evt* script, s32 isInitialCall) {
return ApiStatus_BLOCK; return ApiStatus_BLOCK;
} }
ApiStatus CamPresetUpdate_L(Evt* script, s32 isInitialCall) { API_CALLABLE(CamPresetUpdate_L) {
Camera* camera = &gCameras[CAM_BATTLE]; Camera* camera = &gCameras[CAM_BATTLE];
BattleStatus* battleStatus = &gBattleStatus; BattleStatus* battleStatus = &gBattleStatus;
PlayerStatus* playerStatus = &gPlayerStatus; PlayerStatus* playerStatus = &gPlayerStatus;
@ -1432,7 +1432,7 @@ ApiStatus CamPresetUpdate_L(Evt* script, s32 isInitialCall) {
return ApiStatus_BLOCK; return ApiStatus_BLOCK;
} }
ApiStatus func_8024CE9C(Evt* script, s32 isInitialCall) { API_CALLABLE(func_8024CE9C) {
Camera* camera = &gCameras[CAM_BATTLE]; Camera* camera = &gCameras[CAM_BATTLE];
BattleCam_BoomPitch = 8; BattleCam_BoomPitch = 8;
@ -2283,7 +2283,7 @@ void func_8024E60C(void) {
D_8029F2A6 = FALSE; D_8029F2A6 = FALSE;
} }
ApiStatus UseBattleCamPreset(Evt* script, s32 isInitialCall) { API_CALLABLE(UseBattleCamPreset) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 preset; s32 preset;
@ -2298,7 +2298,7 @@ ApiStatus UseBattleCamPreset(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus UseBattleCamPresetImmediately(Evt* script, s32 isInitialCall) { API_CALLABLE(UseBattleCamPresetImmediately) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 preset; s32 preset;
@ -2313,7 +2313,7 @@ ApiStatus UseBattleCamPresetImmediately(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus UseBattleCamPresetWait(Evt* script, s32 isInitialCall) { API_CALLABLE(UseBattleCamPresetWait) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
if (BattleCam_IsFrozen) { if (BattleCam_IsFrozen) {
@ -2338,7 +2338,7 @@ ApiStatus UseBattleCamPresetWait(Evt* script, s32 isInitialCall) {
return ApiStatus_BLOCK; return ApiStatus_BLOCK;
} }
ApiStatus SetBattleCamParam(Evt* script, s32 isInitialCall) { API_CALLABLE(SetBattleCamParam) {
Camera* camera = &gCameras[CAM_BATTLE]; Camera* camera = &gCameras[CAM_BATTLE];
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 mode; s32 mode;
@ -2380,7 +2380,7 @@ ApiStatus SetBattleCamParam(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus SetBattleCamParams(Evt* script, s32 isInitialCall) { API_CALLABLE(SetBattleCamParams) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
Camera* camera = &gCameras[CAM_BATTLE]; Camera* camera = &gCameras[CAM_BATTLE];
@ -2400,7 +2400,7 @@ ApiStatus SetBattleCamParams(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus SetBattleCamTarget(Evt* script, s32 isInitialCall) { API_CALLABLE(SetBattleCamTarget) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
if (BattleCam_IsFrozen) { if (BattleCam_IsFrozen) {
@ -2413,7 +2413,7 @@ ApiStatus SetBattleCamTarget(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus SetBattleCamPos(Evt* script, s32 isInitialCall) { API_CALLABLE(SetBattleCamPos) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
Camera* camera = &gCameras[CAM_BATTLE]; Camera* camera = &gCameras[CAM_BATTLE];
@ -2428,7 +2428,7 @@ ApiStatus SetBattleCamPos(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus SetBattleCamOffsetZ(Evt* script, s32 isInitialCall) { API_CALLABLE(SetBattleCamOffsetZ) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
if (BattleCam_IsFrozen) { if (BattleCam_IsFrozen) {
@ -2439,7 +2439,7 @@ ApiStatus SetBattleCamOffsetZ(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus AddBattleCamOffsetZ(Evt* script, s32 isInitialCall) { API_CALLABLE(AddBattleCamOffsetZ) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
if (BattleCam_IsFrozen) { if (BattleCam_IsFrozen) {
@ -2450,7 +2450,7 @@ ApiStatus AddBattleCamOffsetZ(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus SetBattleCamYaw(Evt* script, s32 isInitialCall) { API_CALLABLE(SetBattleCamYaw) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
if (BattleCam_IsFrozen) { if (BattleCam_IsFrozen) {
@ -2461,7 +2461,7 @@ ApiStatus SetBattleCamYaw(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus BattleCamTargetActor(Evt* script, s32 isInitialCall) { API_CALLABLE(BattleCamTargetActor) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 actorID; s32 actorID;
@ -2480,7 +2480,7 @@ ApiStatus BattleCamTargetActor(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus BattleCamTargetActorPart(Evt* script, s32 isInitialCall) { API_CALLABLE(BattleCamTargetActorPart) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 actorID; s32 actorID;
@ -2499,7 +2499,7 @@ ApiStatus BattleCamTargetActorPart(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus MoveBattleCamOver(Evt* script, s32 isInitialCall) { API_CALLABLE(MoveBattleCamOver) {
BattleStatus* battleStatus = &gBattleStatus; BattleStatus* battleStatus = &gBattleStatus;
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
@ -2517,7 +2517,7 @@ ApiStatus MoveBattleCamOver(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus SetBattleCamZoom(Evt* script, s32 isInitialCall) { API_CALLABLE(SetBattleCamZoom) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
if (BattleCam_IsFrozen) { if (BattleCam_IsFrozen) {
@ -2528,7 +2528,7 @@ ApiStatus SetBattleCamZoom(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus AddBattleCamZoom(Evt* script, s32 isInitialCall) { API_CALLABLE(AddBattleCamZoom) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
if (BattleCam_IsFrozen) { if (BattleCam_IsFrozen) {
@ -2539,7 +2539,7 @@ ApiStatus AddBattleCamZoom(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus func_8024ECF8(Evt* script, s32 isInitialCall) { API_CALLABLE(func_8024ECF8) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
if (BattleCam_IsFrozen) { if (BattleCam_IsFrozen) {
@ -2552,12 +2552,12 @@ ApiStatus func_8024ECF8(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus FreezeBattleCam(Evt* script, s32 isInitialCall) { API_CALLABLE(FreezeBattleCam) {
BattleCam_IsFrozen = evt_get_variable(script, *script->ptrReadPos); BattleCam_IsFrozen = evt_get_variable(script, *script->ptrReadPos);
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus func_8024EDA4(Evt* script, s32 isInitialCall) { API_CALLABLE(func_8024EDA4) {
D_8029F2A6 = FALSE; D_8029F2A6 = FALSE;
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }

View File

@ -531,7 +531,7 @@ HitResult calc_item_damage_enemy(void) {
return hitResult; return hitResult;
} }
ApiStatus ItemDamageEnemy(Evt* script, s32 isInitialCall) { API_CALLABLE(ItemDamageEnemy) {
BattleStatus* battleStatus = &gBattleStatus; BattleStatus* battleStatus = &gBattleStatus;
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 hitResultVarOut = *args++; s32 hitResultVarOut = *args++;
@ -601,7 +601,7 @@ ApiStatus ItemDamageEnemy(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus ItemSpookEnemy(Evt* script, s32 isInitialCall) { API_CALLABLE(ItemSpookEnemy) {
BattleStatus* battleStatus = &gBattleStatus; BattleStatus* battleStatus = &gBattleStatus;
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 hitResultVarOut = *args++; s32 hitResultVarOut = *args++;
@ -671,7 +671,7 @@ ApiStatus ItemSpookEnemy(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus ItemAfflictEnemy(Evt* script, s32 isInitialCall) { API_CALLABLE(ItemAfflictEnemy) {
BattleStatus* battleStatus = &gBattleStatus; BattleStatus* battleStatus = &gBattleStatus;
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 hitResultVarOut = *args++; s32 hitResultVarOut = *args++;
@ -740,7 +740,7 @@ ApiStatus ItemAfflictEnemy(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus ItemCheckHit(Evt* script, s32 isInitialCall) { API_CALLABLE(ItemCheckHit) {
BattleStatus* battleStatus = &gBattleStatus; BattleStatus* battleStatus = &gBattleStatus;
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 hitResultVarOut = *args++; s32 hitResultVarOut = *args++;

View File

@ -979,7 +979,7 @@ s32 dispatch_damage_event_partner_1(s32 damageAmount, s32 event) {
return dispatch_damage_event_partner(damageAmount, event, TRUE); return dispatch_damage_event_partner(damageAmount, event, TRUE);
} }
ApiStatus MakeOwnerTargetIndex(Evt* script, s32 isInitialCall) { API_CALLABLE(MakeOwnerTargetIndex) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
Actor* actor = get_actor(script->owner1.actorID); Actor* actor = get_actor(script->owner1.actorID);
s32 numTargets = actor->targetListLength; s32 numTargets = actor->targetListLength;
@ -1009,7 +1009,7 @@ ApiStatus MakeOwnerTargetIndex(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus func_8027FC90(Evt* script, s32 isInitialCall) { API_CALLABLE(func_8027FC90) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
BattleStatus* battleStatus = &gBattleStatus; BattleStatus* battleStatus = &gBattleStatus;
s32 hitResult; s32 hitResult;
@ -1033,7 +1033,7 @@ ApiStatus func_8027FC90(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus GetActorLevel(Evt* script, s32 isInitialCall) { API_CALLABLE(GetActorLevel) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 actorID = evt_get_variable(script, *args++); s32 actorID = evt_get_variable(script, *args++);
Bytecode outVar; Bytecode outVar;
@ -1048,7 +1048,7 @@ ApiStatus GetActorLevel(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus PartnerDamageEnemy(Evt* script, s32 isInitialCall) { API_CALLABLE(PartnerDamageEnemy) {
BattleStatus* battleStatus = &gBattleStatus; BattleStatus* battleStatus = &gBattleStatus;
PlayerStatus* playerStatus = &gPlayerStatus; PlayerStatus* playerStatus = &gPlayerStatus;
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
@ -1128,7 +1128,7 @@ ApiStatus PartnerDamageEnemy(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus PartnerAfflictEnemy(Evt* script, s32 isInitialCall) { API_CALLABLE(PartnerAfflictEnemy) {
BattleStatus* battleStatus = &gBattleStatus; BattleStatus* battleStatus = &gBattleStatus;
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
Actor* actor = get_actor(script->owner1.enemyID); Actor* actor = get_actor(script->owner1.enemyID);
@ -1205,7 +1205,7 @@ ApiStatus PartnerAfflictEnemy(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus PartnerPowerBounceEnemy(Evt* script, s32 isInitialCall) { API_CALLABLE(PartnerPowerBounceEnemy) {
BattleStatus* battleStatus = &gBattleStatus; BattleStatus* battleStatus = &gBattleStatus;
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
Actor* actor = get_actor(script->owner1.enemyID); Actor* actor = get_actor(script->owner1.enemyID);
@ -1281,7 +1281,7 @@ ApiStatus PartnerPowerBounceEnemy(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus PartnerTestEnemy(Evt* script, s32 isInitialCall) { API_CALLABLE(PartnerTestEnemy) {
BattleStatus* battleStatus = &gBattleStatus; BattleStatus* battleStatus = &gBattleStatus;
PlayerStatus* playerStatus = &gPlayerStatus; PlayerStatus* playerStatus = &gPlayerStatus;
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
@ -1358,7 +1358,7 @@ ApiStatus PartnerTestEnemy(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus func_8028070C(Evt* script, s32 isInitialCall) { API_CALLABLE(func_8028070C) {
BattleStatus* battleStatus = &gBattleStatus; BattleStatus* battleStatus = &gBattleStatus;
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
Actor* actor = get_actor(script->owner1.actorID); Actor* actor = get_actor(script->owner1.actorID);
@ -1375,14 +1375,14 @@ ApiStatus func_8028070C(Evt* script, s32 isInitialCall) {
return ApiStatus_BLOCK; return ApiStatus_BLOCK;
} }
ApiStatus DeletePartner(Evt* script, s32 isInitialCall) { API_CALLABLE(DeletePartner) {
BattleStatus* battleStatus = &gBattleStatus; BattleStatus* battleStatus = &gBattleStatus;
btl_delete_actor(battleStatus->partnerActor); btl_delete_actor(battleStatus->partnerActor);
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus GetPartnerActionSuccess(Evt* script, s32 isInitialCall) { API_CALLABLE(GetPartnerActionSuccess) {
BattleStatus* battleStatus = &gBattleStatus; BattleStatus* battleStatus = &gBattleStatus;
s32 var = *script->ptrReadPos; s32 var = *script->ptrReadPos;
s32 actionSuccess = battleStatus->actionSuccess; s32 actionSuccess = battleStatus->actionSuccess;
@ -1401,7 +1401,7 @@ ApiStatus GetPartnerActionSuccess(Evt* script, s32 isInitialCall) {
} }
/// Seems to be the same functionality as YieldTurn in 1A5830.c /// Seems to be the same functionality as YieldTurn in 1A5830.c
ApiStatus PartnerYieldTurn(Evt* script, s32 isInitialCall) { API_CALLABLE(PartnerYieldTurn) {
gBattleStatus.flags1 |= BS_FLAGS1_YIELD_TURN; gBattleStatus.flags1 |= BS_FLAGS1_YIELD_TURN;
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }

View File

@ -7,17 +7,17 @@
b32 dispatch_damage_event_player(s32 damageAmount, s32 event, b32 noHitSound); b32 dispatch_damage_event_player(s32 damageAmount, s32 event, b32 noHitSound);
b32 dispatch_hazard_event_player(s32 damageAmount, s32 event); b32 dispatch_hazard_event_player(s32 damageAmount, s32 event);
ApiStatus PlaySleepHitFX(Evt* script, s32 isInitialCall) { API_CALLABLE(PlaySleepHitFX) {
fx_debuff(0, script->varTable[0], script->varTable[1], script->varTable[2]); fx_debuff(0, script->varTable[0], script->varTable[1], script->varTable[2]);
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus PlayDizzyHitFX(Evt* script, s32 isInitialCall) { API_CALLABLE(PlayDizzyHitFX) {
fx_debuff(1, script->varTable[0], script->varTable[1], script->varTable[2]); fx_debuff(1, script->varTable[0], script->varTable[1], script->varTable[2]);
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus PlayParalyzeHitFX(Evt* script, s32 isInitialCall) { API_CALLABLE(PlayParalyzeHitFX) {
EffectInstance* debuffEffect = fx_debuff(2, script->varTable[0], script->varTable[1], script->varTable[2]); EffectInstance* debuffEffect = fx_debuff(2, script->varTable[0], script->varTable[1], script->varTable[2]);
debuffEffect->data.debuff->primCol.r = 200; debuffEffect->data.debuff->primCol.r = 200;
@ -29,7 +29,7 @@ ApiStatus PlayParalyzeHitFX(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus PlayPoisonHitFX(Evt* script, s32 isInitialCall) { API_CALLABLE(PlayPoisonHitFX) {
EffectInstance* debuffEffect = fx_debuff(2, script->varTable[0], script->varTable[1], script->varTable[2]); EffectInstance* debuffEffect = fx_debuff(2, script->varTable[0], script->varTable[1], script->varTable[2]);
debuffEffect->data.debuff->primCol.r = 60; debuffEffect->data.debuff->primCol.r = 60;
@ -41,7 +41,7 @@ ApiStatus PlayPoisonHitFX(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus PlayStopHitFX(Evt* script, s32 isInitialCall) { API_CALLABLE(PlayStopHitFX) {
EffectInstance* debuffEffect = fx_debuff(2, script->varTable[0], script->varTable[1], script->varTable[2]); EffectInstance* debuffEffect = fx_debuff(2, script->varTable[0], script->varTable[1], script->varTable[2]);
debuffEffect->data.debuff->primCol.r = 205; debuffEffect->data.debuff->primCol.r = 205;
@ -53,12 +53,12 @@ ApiStatus PlayStopHitFX(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus PlayFreezeHitSnowflakeFX(Evt* script, s32 isInitialCall) { API_CALLABLE(PlayFreezeHitSnowflakeFX) {
fx_big_snowflakes(0, script->varTable[0], script->varTable[1], script->varTable[2]); fx_big_snowflakes(0, script->varTable[0], script->varTable[1], script->varTable[2]);
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus PlayFreezeHitParticleFX(Evt* script, s32 isInitialCall) { API_CALLABLE(PlayFreezeHitParticleFX) {
Actor* actor = (Actor*)script->varTable[3]; Actor* actor = (Actor*)script->varTable[3];
f32 temp1 = actor->size.y; f32 temp1 = actor->size.y;
f32 temp2 = actor->size.x / 2; f32 temp2 = actor->size.x / 2;
@ -68,7 +68,7 @@ ApiStatus PlayFreezeHitParticleFX(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus PlayShrinkHitFX(Evt* script, s32 isInitialCall) { API_CALLABLE(PlayShrinkHitFX) {
s32 i; s32 i;
for (i = 0; i < 20; i++) { for (i = 0; i < 20; i++) {
@ -1132,7 +1132,7 @@ b32 dispatch_hazard_event_player(s32 damageAmount, s32 event) {
return dispatch_damage_event_player(damageAmount, event, TRUE); return dispatch_damage_event_player(damageAmount, event, TRUE);
} }
ApiStatus GetMenuSelection(Evt* script, s32 isInitialCall) { API_CALLABLE(GetMenuSelection) {
BattleStatus* battleStatus = &gBattleStatus; BattleStatus* battleStatus = &gBattleStatus;
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 outVar1 = *args++; s32 outVar1 = *args++;
@ -1146,7 +1146,7 @@ ApiStatus GetMenuSelection(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus func_80273444(Evt* script, s32 isInitialCall) { API_CALLABLE(func_80273444) {
BattleStatus* battleStatus = &gBattleStatus; BattleStatus* battleStatus = &gBattleStatus;
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
Actor* player = battleStatus->playerActor; Actor* player = battleStatus->playerActor;
@ -1248,7 +1248,7 @@ ApiStatus func_80273444(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE1; return ApiStatus_DONE1;
} }
ApiStatus PlayerFallToGoal(Evt* script, s32 isInitialCall) { API_CALLABLE(PlayerFallToGoal) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
Actor* player = gBattleStatus.playerActor; Actor* player = gBattleStatus.playerActor;
ActorState* state = &player->state; ActorState* state = &player->state;
@ -1316,7 +1316,7 @@ ApiStatus PlayerFallToGoal(Evt* script, s32 isInitialCall) {
return ApiStatus_BLOCK; return ApiStatus_BLOCK;
} }
ApiStatus PlayerLandJump(Evt* script, s32 isInitialCall) { API_CALLABLE(PlayerLandJump) {
Actor* player = gBattleStatus.playerActor; Actor* player = gBattleStatus.playerActor;
ActorState* walkMovement = &player->state; ActorState* walkMovement = &player->state;
@ -1364,7 +1364,7 @@ ApiStatus PlayerLandJump(Evt* script, s32 isInitialCall) {
return ApiStatus_BLOCK; return ApiStatus_BLOCK;
} }
ApiStatus PlayerRunToGoal(Evt* script, s32 isInitialCall) { API_CALLABLE(PlayerRunToGoal) {
BattleStatus* battleStatus = &gBattleStatus; BattleStatus* battleStatus = &gBattleStatus;
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
Actor* player = battleStatus->playerActor; Actor* player = battleStatus->playerActor;
@ -1434,7 +1434,7 @@ ApiStatus PlayerRunToGoal(Evt* script, s32 isInitialCall) {
return ApiStatus_BLOCK; return ApiStatus_BLOCK;
} }
ApiStatus CancelablePlayerRunToGoal(Evt* script, s32 isInitialCall) { API_CALLABLE(CancelablePlayerRunToGoal) {
BattleStatus* battleStatus = &gBattleStatus; BattleStatus* battleStatus = &gBattleStatus;
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
Actor* player = battleStatus->playerActor; Actor* player = battleStatus->playerActor;
@ -1527,12 +1527,12 @@ ApiStatus CancelablePlayerRunToGoal(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus GetPlayerHP(Evt* script, s32 isInitialCall) { API_CALLABLE(GetPlayerHP) {
evt_set_variable(script, *script->ptrReadPos, gPlayerData.curHP); evt_set_variable(script, *script->ptrReadPos, gPlayerData.curHP);
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus PlayerDamageEnemy(Evt* script, s32 isInitialCall) { API_CALLABLE(PlayerDamageEnemy) {
BattleStatus* battleStatus = &gBattleStatus; BattleStatus* battleStatus = &gBattleStatus;
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 hitResultOutVar = *args++; s32 hitResultOutVar = *args++;
@ -1604,7 +1604,7 @@ ApiStatus PlayerDamageEnemy(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus PlayerPowerBounceEnemy(Evt* script, s32 isInitialCall) { API_CALLABLE(PlayerPowerBounceEnemy) {
BattleStatus* battleStatus = &gBattleStatus; BattleStatus* battleStatus = &gBattleStatus;
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 hitResultOutVar = *args++; s32 hitResultOutVar = *args++;
@ -1675,7 +1675,7 @@ ApiStatus PlayerPowerBounceEnemy(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus PlayerTestEnemy(Evt* script, s32 isInitialCall) { API_CALLABLE(PlayerTestEnemy) {
BattleStatus* battleStatus = &gBattleStatus; BattleStatus* battleStatus = &gBattleStatus;
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 hitResultOutVar = *args++; s32 hitResultOutVar = *args++;
@ -1741,7 +1741,7 @@ ApiStatus PlayerTestEnemy(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus DispatchDamagePlayerEvent(Evt* script, s32 isInitialCall) { API_CALLABLE(DispatchDamagePlayerEvent) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 damageAmount = evt_get_variable(script, *args++); s32 damageAmount = evt_get_variable(script, *args++);
@ -1756,7 +1756,7 @@ ApiStatus DispatchDamagePlayerEvent(Evt* script, s32 isInitialCall) {
return ApiStatus_BLOCK; return ApiStatus_BLOCK;
} }
ApiStatus EnablePlayerBlur(Evt* script, s32 isInitialCall) { API_CALLABLE(EnablePlayerBlur) {
s32 setting = evt_get_variable(script, *script->ptrReadPos); s32 setting = evt_get_variable(script, *script->ptrReadPos);
if (setting == ACTOR_BLUR_DISABLE) { if (setting == ACTOR_BLUR_DISABLE) {
@ -1770,17 +1770,17 @@ ApiStatus EnablePlayerBlur(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus ForceDisablePlayerBlur(Evt* script, s32 isInitialCall) { API_CALLABLE(ForceDisablePlayerBlur) {
force_disable_player_blur(); force_disable_player_blur();
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus ForceDisablePlayerBlurImmediately(Evt* script, s32 isInitialCall) { API_CALLABLE(ForceDisablePlayerBlurImmediately) {
force_disable_player_blur_immediately(); force_disable_player_blur_immediately();
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus func_80274A18(Evt* script, s32 isInitialCall) { API_CALLABLE(func_80274A18) {
BattleStatus* battleStatus = &gBattleStatus; BattleStatus* battleStatus = &gBattleStatus;
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
Actor* player = battleStatus->playerActor; Actor* player = battleStatus->playerActor;
@ -1944,7 +1944,7 @@ ApiStatus func_80274A18(Evt* script, s32 isInitialCall) {
return ApiStatus_BLOCK; return ApiStatus_BLOCK;
} }
ApiStatus func_802752AC(Evt* script, s32 isInitialCall) { API_CALLABLE(func_802752AC) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
Actor* player = gBattleStatus.playerActor; Actor* player = gBattleStatus.playerActor;
ActorState* playerState = &player->state; ActorState* playerState = &player->state;
@ -2186,7 +2186,7 @@ ApiStatus func_802752AC(Evt* script, s32 isInitialCall) {
return ApiStatus_BLOCK; return ApiStatus_BLOCK;
} }
ApiStatus func_80275F00(Evt* script, s32 isInitialCall) { API_CALLABLE(func_80275F00) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
Actor* player = gBattleStatus.playerActor; Actor* player = gBattleStatus.playerActor;
ActorState* playerState = &player->state; ActorState* playerState = &player->state;
@ -2477,7 +2477,7 @@ ApiStatus func_80275F00(Evt* script, s32 isInitialCall) {
return ApiStatus_BLOCK; return ApiStatus_BLOCK;
} }
ApiStatus GetPlayerActionSuccess(Evt* script, s32 isInitialCall) { API_CALLABLE(GetPlayerActionSuccess) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 outVar = *args++; s32 outVar = *args++;
s32 actionSuccess = gBattleStatus.actionSuccess; s32 actionSuccess = gBattleStatus.actionSuccess;
@ -2495,12 +2495,12 @@ ApiStatus GetPlayerActionSuccess(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus PlayerYieldTurn(Evt* script, s32 isInitialCall) { API_CALLABLE(PlayerYieldTurn) {
gBattleStatus.flags1 |= BS_FLAGS1_YIELD_TURN; gBattleStatus.flags1 |= BS_FLAGS1_YIELD_TURN;
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus DispatchEventPlayer(Evt* script, s32 isInitialCall) { API_CALLABLE(DispatchEventPlayer) {
dispatch_event_player(evt_get_variable(script, *script->ptrReadPos)); dispatch_event_player(evt_get_variable(script, *script->ptrReadPos));
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }

View File

@ -515,7 +515,7 @@ void btl_bonk_cleanup(void) {
} }
} }
ApiStatus ShowImmuneBonk(Evt* script, s32 isInitialCall) { API_CALLABLE(ShowImmuneBonk) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 x = evt_get_variable(script, *args++); s32 x = evt_get_variable(script, *args++);
s32 y = evt_get_variable(script, *args++); s32 y = evt_get_variable(script, *args++);
@ -528,7 +528,7 @@ ApiStatus ShowImmuneBonk(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus ForceImmuneBonkCleanup(Evt* script, s32 isInitialCall) { API_CALLABLE(ForceImmuneBonkCleanup) {
btl_bonk_cleanup(); btl_bonk_cleanup();
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
@ -1631,7 +1631,7 @@ void btl_show_message_popup(void* data) {
} }
} }
ApiStatus ShowMessageBox(Evt* script, s32 isInitialCall) { API_CALLABLE(ShowMessageBox) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 messageIndex = evt_get_variable(script, *args++); s32 messageIndex = evt_get_variable(script, *args++);
s32 duration = evt_get_variable(script, *args++); s32 duration = evt_get_variable(script, *args++);
@ -1640,7 +1640,7 @@ ApiStatus ShowMessageBox(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus ShowVariableMessageBox(Evt* script, s32 isInitialCall) { API_CALLABLE(ShowVariableMessageBox) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 messageIndex = evt_get_variable(script, *args++); s32 messageIndex = evt_get_variable(script, *args++);
s32 duration = evt_get_variable(script, *args++); s32 duration = evt_get_variable(script, *args++);
@ -1650,7 +1650,7 @@ ApiStatus ShowVariableMessageBox(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus IsMessageBoxDisplayed(Evt* script, s32 isInitialCall) { API_CALLABLE(IsMessageBoxDisplayed) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 outVar = *args++; s32 outVar = *args++;
@ -1658,28 +1658,28 @@ ApiStatus IsMessageBoxDisplayed(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus WaitForMessageBoxDone(Evt* script, s32 isInitialCall) { API_CALLABLE(WaitForMessageBoxDone) {
return !btl_is_popup_displayed() * ApiStatus_DONE2; return !btl_is_popup_displayed() * ApiStatus_DONE2;
} }
ApiStatus ForceCloseMessageBox(Evt* script, s32 isInitialCall) { API_CALLABLE(ForceCloseMessageBox) {
if (bPopupMessage != NULL) { if (bPopupMessage != NULL) {
bPopupMessage->duration = 0; bPopupMessage->duration = 0;
} }
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus SetMessageBoxDuration(Evt* script, s32 isInitialCall) { API_CALLABLE(SetMessageBoxDuration) {
btl_set_popup_duration(evt_get_variable(script, *script->ptrReadPos)); btl_set_popup_duration(evt_get_variable(script, *script->ptrReadPos));
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus LockMessageBoxPosition(Evt* script, s32 isInitialCall) { API_CALLABLE(LockMessageBoxPosition) {
btl_message_lock_box_pos(); btl_message_lock_box_pos();
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus UnlockMessageBoxPosition(Evt* script, s32 isInitialCall) { API_CALLABLE(UnlockMessageBoxPosition) {
btl_message_unlock_box_pos(); btl_message_unlock_box_pos();
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }

View File

@ -51,7 +51,7 @@ Gfx D_800758A0[] = {
Gfx TheaterWallShadowsGfx[] = { Gfx TheaterWallShadowsGfx[] = {
gsDPPipeSync(), gsDPPipeSync(),
gsDPSetRenderMode(G_RM_PASS, G_RM_CLD_SURF2), gsDPSetRenderMode(G_RM_PASS, G_RM_CLD_SURF2),
gsDPSetCombineMode(G_CC_MODULATEIA, PM_CC_16), gsDPSetCombineMode(G_CC_MODULATEIA, PM_CC2_MULTIPLY_PRIM),
gsSPDisplayList(D_80075730), gsSPDisplayList(D_80075730),
gsSPVertex(theater_wall_shadows_vtx, 8, 0), gsSPVertex(theater_wall_shadows_vtx, 8, 0),
gsSP2Triangles(0, 1, 2, 0, 0, 2, 3, 0), gsSP2Triangles(0, 1, 2, 0, 0, 2, 3, 0),
@ -62,7 +62,7 @@ Gfx TheaterWallShadowsGfx[] = {
Gfx TheaterCurtainGfx[] = { Gfx TheaterCurtainGfx[] = {
gsDPPipeSync(), gsDPPipeSync(),
gsDPSetRenderMode(G_RM_PASS, G_RM_XLU_SURF2), gsDPSetRenderMode(G_RM_PASS, G_RM_XLU_SURF2),
gsDPSetCombineMode(G_CC_MODULATEIDECALA, PM_CC_16), gsDPSetCombineMode(G_CC_MODULATEIDECALA, PM_CC2_MULTIPLY_PRIM),
gsSPDisplayList(D_80075730), gsSPDisplayList(D_80075730),
gsSPVertex(theater_curtain_vtx, 31, 0), gsSPVertex(theater_curtain_vtx, 31, 0),
gsSP2Triangles(0, 1, 2, 0, 0, 2, 3, 0), gsSP2Triangles(0, 1, 2, 0, 0, 2, 3, 0),
@ -81,7 +81,7 @@ Gfx TheaterCurtainGfx[] = {
Gfx TheaterInsetShadowsGfx[] = { Gfx TheaterInsetShadowsGfx[] = {
gsDPPipeSync(), gsDPPipeSync(),
gsDPSetRenderMode(G_RM_PASS, G_RM_XLU_SURF2), gsDPSetRenderMode(G_RM_PASS, G_RM_XLU_SURF2),
gsDPSetCombineMode(G_CC_SHADE, PM_CC_16), gsDPSetCombineMode(G_CC_SHADE, PM_CC2_MULTIPLY_PRIM),
gsSPTexture(0x0080, 0x0080, 0, G_TX_RENDERTILE, G_OFF), gsSPTexture(0x0080, 0x0080, 0, G_TX_RENDERTILE, G_OFF),
gsSPVertex(theater_left_inset_shadow_vtx, 4, 0), gsSPVertex(theater_left_inset_shadow_vtx, 4, 0),
gsSP2Triangles(0, 1, 2, 0, 0, 2, 3, 0), gsSP2Triangles(0, 1, 2, 0, 0, 2, 3, 0),
@ -94,7 +94,7 @@ Gfx TheaterFloorGfx[] = {
gsDPPipeSync(), gsDPPipeSync(),
gsDPSetRenderMode(CVG_DST_FULL | ZMODE_OPA | FORCE_BL | G_RM_PASS, CVG_DST_FULL | ZMODE_OPA | FORCE_BL | gsDPSetRenderMode(CVG_DST_FULL | ZMODE_OPA | FORCE_BL | G_RM_PASS, CVG_DST_FULL | ZMODE_OPA | FORCE_BL |
GBL_c2(G_BL_CLR_IN, G_BL_0, G_BL_CLR_IN, G_BL_1)), GBL_c2(G_BL_CLR_IN, G_BL_0, G_BL_CLR_IN, G_BL_1)),
gsDPSetCombineMode(G_CC_MODULATEIA, PM_CC_16), gsDPSetCombineMode(G_CC_MODULATEIA, PM_CC2_MULTIPLY_PRIM),
gsSPDisplayList(D_800746E0), gsSPDisplayList(D_800746E0),
gsSPVertex(theater_floor_vtx, 25, 0), gsSPVertex(theater_floor_vtx, 25, 0),
gsSP2Triangles(0, 1, 2, 0, 0, 2, 3, 0), gsSP2Triangles(0, 1, 2, 0, 0, 2, 3, 0),
@ -116,7 +116,7 @@ Gfx TheaterRightWallGfx[] = {
gsDPPipeSync(), gsDPPipeSync(),
gsDPSetRenderMode(CVG_DST_FULL | ZMODE_OPA | FORCE_BL | G_RM_PASS, CVG_DST_FULL | ZMODE_OPA | FORCE_BL | gsDPSetRenderMode(CVG_DST_FULL | ZMODE_OPA | FORCE_BL | G_RM_PASS, CVG_DST_FULL | ZMODE_OPA | FORCE_BL |
GBL_c2(G_BL_CLR_IN, G_BL_0, G_BL_CLR_IN, G_BL_1)), GBL_c2(G_BL_CLR_IN, G_BL_0, G_BL_CLR_IN, G_BL_1)),
gsDPSetCombineMode(G_CC_MODULATEIA, PM_CC_16), gsDPSetCombineMode(G_CC_MODULATEIA, PM_CC2_MULTIPLY_PRIM),
gsSPDisplayList(D_800758A0), gsSPDisplayList(D_800758A0),
gsSPVertex(theater_right_wall_vtx, 6, 0), gsSPVertex(theater_right_wall_vtx, 6, 0),
gsSP2Triangles(0, 1, 2, 0, 0, 2, 3, 0), gsSP2Triangles(0, 1, 2, 0, 0, 2, 3, 0),
@ -128,7 +128,7 @@ Gfx TheaterLeftWallGfx[] = {
gsDPPipeSync(), gsDPPipeSync(),
gsDPSetRenderMode(CVG_DST_FULL | ZMODE_OPA | FORCE_BL | G_RM_PASS, CVG_DST_FULL | ZMODE_OPA | FORCE_BL | gsDPSetRenderMode(CVG_DST_FULL | ZMODE_OPA | FORCE_BL | G_RM_PASS, CVG_DST_FULL | ZMODE_OPA | FORCE_BL |
GBL_c2(G_BL_CLR_IN, G_BL_0, G_BL_CLR_IN, G_BL_1)), GBL_c2(G_BL_CLR_IN, G_BL_0, G_BL_CLR_IN, G_BL_1)),
gsDPSetCombineMode(G_CC_MODULATEIA, PM_CC_16), gsDPSetCombineMode(G_CC_MODULATEIA, PM_CC2_MULTIPLY_PRIM),
gsSPDisplayList(D_800758A0), gsSPDisplayList(D_800758A0),
gsSPVertex(theater_left_wall_vtx, 6, 0), gsSPVertex(theater_left_wall_vtx, 6, 0),
gsSP2Triangles(0, 1, 2, 0, 0, 2, 3, 0), gsSP2Triangles(0, 1, 2, 0, 0, 2, 3, 0),

View File

@ -437,7 +437,7 @@ s32 draw_box(s32 flags, WindowStyle windowStyle, s32 posX, s32 posY, s32 posZ, s
gDPSetCycleType(gMainGfxPos++, G_CYC_2CYCLE); gDPSetCycleType(gMainGfxPos++, G_CYC_2CYCLE);
gDPSetBlendColor(gMainGfxPos++, 0, 0, 0, 0); gDPSetBlendColor(gMainGfxPos++, 0, 0, 0, 0);
gDPSetFogColor(gMainGfxPos++, 0, 0, 0, darkening); gDPSetFogColor(gMainGfxPos++, 0, 0, 0, darkening);
gDPSetRenderMode(gMainGfxPos++, PM_RM_TILEMODE_B, G_RM_XLU_SURF2); gDPSetRenderMode(gMainGfxPos++, PM_RM_SHROUD, G_RM_XLU_SURF2);
if (!(flags & DRAW_FLAG_NO_CLIP)) { if (!(flags & DRAW_FLAG_NO_CLIP)) {
gDPSetScissor(gMainGfxPos++, G_SC_NON_INTERLACE, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT); gDPSetScissor(gMainGfxPos++, G_SC_NON_INTERLACE, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT);
} }

View File

@ -121,7 +121,7 @@ void quizmo_stage_appendGfx(void* effect) {
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gDPSetPrimColor(gMainGfxPos++, 0, 0, microphoneRaiseAmt, microphoneRaiseAmt, microphoneRaiseAmt, 255); gDPSetPrimColor(gMainGfxPos++, 0, 0, microphoneRaiseAmt, microphoneRaiseAmt, microphoneRaiseAmt, 255);
gDPSetCombineMode(gMainGfxPos++, G_CC_MODULATEIA, PM_CC_16); gDPSetCombineMode(gMainGfxPos++, G_CC_MODULATEIA, PM_CC2_MULTIPLY_PRIM);
gSPDisplayList(gMainGfxPos++, D_09007230_39FDF0); gSPDisplayList(gMainGfxPos++, D_09007230_39FDF0);
if (data->unk_3C != 255) { if (data->unk_3C != 255) {

View File

@ -9,14 +9,14 @@
#include "sprite/player.h" #include "sprite/player.h"
#include "model.h" #include "model.h"
ApiStatus ShowMerleeCoinMessage(Evt* script, s32 isInitialCall); API_CALLABLE(ShowMerleeCoinMessage);
ApiStatus ShowMerleeRanOutMessage(Evt* script, s32 isInitialCall); API_CALLABLE(ShowMerleeRanOutMessage);
ApiStatus FadeInMerlee(Evt* script, s32 isInitialCall); API_CALLABLE(FadeInMerlee);
ApiStatus FadeOutMerlee(Evt* script, s32 isInitialCall); API_CALLABLE(FadeOutMerlee);
ApiStatus MerleeUpdateFX(Evt* script, s32 isInitialCall); API_CALLABLE(MerleeUpdateFX);
ApiStatus MerleeStopFX(Evt* script, s32 isInitialCall); API_CALLABLE(MerleeStopFX);
ApiStatus PlayMerleeGatherFX(Evt* script, s32 isInitialCall); API_CALLABLE(PlayMerleeGatherFX);
ApiStatus PlayMerleeOrbFX(Evt* script, s32 isInitialCall); API_CALLABLE(PlayMerleeOrbFX);
s32 D_80077C40 = 0; s32 D_80077C40 = 0;
@ -216,7 +216,7 @@ void set_defeated(s32 mapID, s32 encounterID) {
currentEncounter->defeatFlags[mapID][encounterIdx] |= (1 << encounterShift);*/ currentEncounter->defeatFlags[mapID][encounterIdx] |= (1 << encounterShift);*/
} }
ApiStatus ShowMerleeCoinMessage(Evt* script, s32 isInitialCall) { API_CALLABLE(ShowMerleeCoinMessage) {
if (isInitialCall) { if (isInitialCall) {
show_merlee_message(0, 60); show_merlee_message(0, 60);
} }
@ -228,7 +228,7 @@ ApiStatus ShowMerleeCoinMessage(Evt* script, s32 isInitialCall) {
} }
} }
ApiStatus ShowMerleeRanOutMessage(Evt* script, s32 isInitialCall) { API_CALLABLE(ShowMerleeRanOutMessage) {
if (isInitialCall) { if (isInitialCall) {
show_merlee_message(1, 60); show_merlee_message(1, 60);
} }
@ -240,7 +240,7 @@ ApiStatus ShowMerleeRanOutMessage(Evt* script, s32 isInitialCall) {
} }
} }
ApiStatus FadeBackgroundDarken(Evt* script, s32 isInitialCall) { API_CALLABLE(FadeBackgroundDarken) {
if (isInitialCall) { if (isInitialCall) {
mdl_set_all_tint_type(ENV_TINT_SHROUD); mdl_set_all_tint_type(ENV_TINT_SHROUD);
*gBackgroundTintModePtr = ENV_TINT_SHROUD; *gBackgroundTintModePtr = ENV_TINT_SHROUD;
@ -258,7 +258,7 @@ ApiStatus FadeBackgroundDarken(Evt* script, s32 isInitialCall) {
} }
} }
ApiStatus FadeBackgroundLighten(Evt* script, s32 isInitialCall) { API_CALLABLE(FadeBackgroundLighten) {
if (isInitialCall) { if (isInitialCall) {
script->functionTemp[0] = 25; script->functionTemp[0] = 25;
} }
@ -274,7 +274,7 @@ ApiStatus FadeBackgroundLighten(Evt* script, s32 isInitialCall) {
} }
} }
ApiStatus FadeInMerlee(Evt* script, s32 isInitialCall) { API_CALLABLE(FadeInMerlee) {
Npc* npc = get_npc_unsafe(NPC_BTL_MERLEE); Npc* npc = get_npc_unsafe(NPC_BTL_MERLEE);
if (isInitialCall) { if (isInitialCall) {
@ -292,7 +292,7 @@ ApiStatus FadeInMerlee(Evt* script, s32 isInitialCall) {
} }
} }
ApiStatus FadeOutMerlee(Evt* script, s32 isInitialCall) { API_CALLABLE(FadeOutMerlee) {
Npc* npc = get_npc_unsafe(NPC_BTL_MERLEE); Npc* npc = get_npc_unsafe(NPC_BTL_MERLEE);
npc->alpha -= 17; npc->alpha -= 17;
@ -305,7 +305,7 @@ ApiStatus FadeOutMerlee(Evt* script, s32 isInitialCall) {
} }
// same as BattleMerleeUpdateFX aside from syms // same as BattleMerleeUpdateFX aside from syms
ApiStatus MerleeUpdateFX(Evt* script, s32 isInitialCall) { API_CALLABLE(MerleeUpdateFX) {
Npc* merlee = get_npc_unsafe(NPC_BTL_MERLEE); Npc* merlee = get_npc_unsafe(NPC_BTL_MERLEE);
EnergyOrbWaveFXData* effectData; EnergyOrbWaveFXData* effectData;
@ -362,12 +362,12 @@ ApiStatus MerleeUpdateFX(Evt* script, s32 isInitialCall) {
return ApiStatus_BLOCK; return ApiStatus_BLOCK;
} }
ApiStatus MerleeStopFX(Evt* script, s32 isInitialCall) { API_CALLABLE(MerleeStopFX) {
D_800A0BB8 = 1; D_800A0BB8 = 1;
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus GetCamLookAtObjVector(Evt* script, s32 isInitialCall) { API_CALLABLE(GetCamLookAtObjVector) {
script->varTable[0] = gCameras[gCurrentCameraID].lookAt_obj.x; script->varTable[0] = gCameras[gCurrentCameraID].lookAt_obj.x;
script->varTable[1] = gCameras[gCurrentCameraID].lookAt_obj.y; script->varTable[1] = gCameras[gCurrentCameraID].lookAt_obj.y;
script->varTable[2] = gCameras[gCurrentCameraID].lookAt_obj.z; script->varTable[2] = gCameras[gCurrentCameraID].lookAt_obj.z;
@ -375,7 +375,7 @@ ApiStatus GetCamLookAtObjVector(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus HasMerleeCasts(Evt* script, s32 isInitialCall) { API_CALLABLE(HasMerleeCasts) {
script->varTable[0] = FALSE; script->varTable[0] = FALSE;
if (gPlayerData.merleeCastsLeft > 0) { if (gPlayerData.merleeCastsLeft > 0) {
script->varTable[0] = TRUE; script->varTable[0] = TRUE;
@ -384,7 +384,7 @@ ApiStatus HasMerleeCasts(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus PlayMerleeGatherFX(Evt* script, s32 isInitialCall) { API_CALLABLE(PlayMerleeGatherFX) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 var0 = evt_get_variable(script, *args++); s32 var0 = evt_get_variable(script, *args++);
s32 var1 = evt_get_variable(script, *args++); s32 var1 = evt_get_variable(script, *args++);
@ -394,7 +394,7 @@ ApiStatus PlayMerleeGatherFX(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus PlayMerleeOrbFX(Evt* script, s32 isInitialCall) { API_CALLABLE(PlayMerleeOrbFX) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 var0 = evt_get_variable(script, *args++); s32 var0 = evt_get_variable(script, *args++);
s32 var1 = evt_get_variable(script, *args++); s32 var1 = evt_get_variable(script, *args++);
@ -404,7 +404,7 @@ ApiStatus PlayMerleeOrbFX(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus OnDefeatEnemy(Evt* script, s32 isInitialCall) { API_CALLABLE(OnDefeatEnemy) {
Enemy* enemy = script->owner1.enemy; Enemy* enemy = script->owner1.enemy;
Npc* npc = get_npc_unsafe(enemy->npcID); Npc* npc = get_npc_unsafe(enemy->npcID);
s32 temp1; s32 temp1;
@ -442,7 +442,7 @@ ApiStatus OnDefeatEnemy(Evt* script, s32 isInitialCall) {
return ApiStatus_BLOCK; return ApiStatus_BLOCK;
} }
ApiStatus OnFleeBattleDrops(Evt* script, s32 isInitialCall) { API_CALLABLE(OnFleeBattleDrops) {
PlayerStatus* playerStatus = &gPlayerStatus; PlayerStatus* playerStatus = &gPlayerStatus;
PlayerData* playerData = &gPlayerData; PlayerData* playerData = &gPlayerData;

View File

@ -3,7 +3,7 @@
#include "effects.h" #include "effects.h"
#include "battle/battle.h" #include "battle/battle.h"
ApiStatus SetEncounterStatusFlags(Evt* script, s32 isInitialCall) { API_CALLABLE(SetEncounterStatusFlags) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
EncounterStatus* currentEncounter = &gCurrentEncounter; EncounterStatus* currentEncounter = &gCurrentEncounter;
s32 flagBits = *args++; s32 flagBits = *args++;
@ -17,7 +17,7 @@ ApiStatus SetEncounterStatusFlags(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus IsStartingConversation(Evt* script, s32 isInitialCall) { API_CALLABLE(IsStartingConversation) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 outVar = *args++; s32 outVar = *args++;
@ -25,25 +25,25 @@ ApiStatus IsStartingConversation(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus func_80044238(Evt* script, s32 isInitialCall) { API_CALLABLE(func_80044238) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
func_80072BCC(evt_get_variable(script, *args++)); func_80072BCC(evt_get_variable(script, *args++));
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus LoadDemoBattle(Evt* script, s32 isInitialCall) { API_CALLABLE(LoadDemoBattle) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
load_demo_battle(evt_get_variable(script, *args++)); load_demo_battle(evt_get_variable(script, *args++));
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus func_80044290(Evt* script, s32 isInitialCall) { API_CALLABLE(func_80044290) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus MakeNpcs(Evt* script, s32 isInitialCall) { API_CALLABLE(MakeNpcs) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
if (isInitialCall) { if (isInitialCall) {
@ -64,7 +64,7 @@ ApiStatus MakeNpcs(Evt* script, s32 isInitialCall) {
return ApiStatus_BLOCK; return ApiStatus_BLOCK;
} }
ApiStatus RemoveNpc(Evt* script, s32 isInitialCall) { API_CALLABLE(RemoveNpc) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
Enemy* enemy = script->owner1.enemy; Enemy* enemy = script->owner1.enemy;
ApiStatus ret = ApiStatus_DONE1; ApiStatus ret = ApiStatus_DONE1;
@ -116,7 +116,7 @@ ApiStatus RemoveNpc(Evt* script, s32 isInitialCall) {
return ret; return ret;
} }
ApiStatus RemoveEncounter(Evt* script, s32 isInitialCall) { API_CALLABLE(RemoveEncounter) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
Enemy* enemy = script->owner1.enemy; Enemy* enemy = script->owner1.enemy;
s32 id = evt_get_variable(script, *args++); s32 id = evt_get_variable(script, *args++);
@ -148,35 +148,35 @@ ApiStatus RemoveEncounter(Evt* script, s32 isInitialCall) {
return ret; return ret;
} }
ApiStatus GetBattleOutcome(Evt* script, s32 isInitialCall) { API_CALLABLE(GetBattleOutcome) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
evt_set_variable(script, *args++, gCurrentEncounter.battleOutcome); evt_set_variable(script, *args++, gCurrentEncounter.battleOutcome);
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus func_800445A8(Evt* script, s32 isInitialCall) { API_CALLABLE(func_800445A8) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
evt_set_variable(script, *args++, script->owner1.enemy->unk_C4); evt_set_variable(script, *args++, script->owner1.enemy->unk_C4);
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus func_800445D4(Evt* script, s32 isInitialCall) { API_CALLABLE(func_800445D4) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
evt_set_variable(script, *args++, script->owner1.enemy->unk_C8); evt_set_variable(script, *args++, script->owner1.enemy->unk_C8);
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus GetOwnerEncounterTrigger(Evt* script, s32 isInitialCall) { API_CALLABLE(GetOwnerEncounterTrigger) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
evt_set_variable(script, *args++, script->owner1.enemy->encountered); evt_set_variable(script, *args++, script->owner1.enemy->encountered);
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus DoNpcDefeat(Evt* script, s32 isInitialCall) { API_CALLABLE(DoNpcDefeat) {
Enemy* owner = script->owner1.enemy; Enemy* owner = script->owner1.enemy;
Npc* npc = get_npc_unsafe(owner->npcID); Npc* npc = get_npc_unsafe(owner->npcID);
Evt* newScript; Evt* newScript;
@ -250,19 +250,19 @@ void start_battle(Evt* script, s32 songID) {
gEncounterSubState = ENCOUNTER_SUBSTATE_PRE_BATTLE_INIT; gEncounterSubState = ENCOUNTER_SUBSTATE_PRE_BATTLE_INIT;
} }
ApiStatus StartBattle(Evt* script, s32 isInitialCall) { API_CALLABLE(StartBattle) {
start_battle(script, -1); start_battle(script, -1);
return ApiStatus_DONE1; return ApiStatus_DONE1;
} }
ApiStatus StartBattleWith(Evt* script, s32 isInitialCall) { API_CALLABLE(StartBattleWith) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
start_battle(script, evt_get_variable(script, *args++)); start_battle(script, evt_get_variable(script, *args++));
return ApiStatus_DONE1; return ApiStatus_DONE1;
} }
ApiStatus StartBossBattle(Evt* script, s32 isInitialCall) { API_CALLABLE(StartBossBattle) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
EncounterStatus* currentEncounter = &gCurrentEncounter; EncounterStatus* currentEncounter = &gCurrentEncounter;
Enemy* enemy = script->owner1.enemy; Enemy* enemy = script->owner1.enemy;
@ -321,7 +321,7 @@ ApiStatus StartBossBattle(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE1; return ApiStatus_DONE1;
} }
ApiStatus SetBattleMusic(Evt* script, s32 isInitialCall) { API_CALLABLE(SetBattleMusic) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
Bytecode songID = evt_get_variable(script, *args++); Bytecode songID = evt_get_variable(script, *args++);
EncounterStatus* currentEncounter = &gCurrentEncounter; EncounterStatus* currentEncounter = &gCurrentEncounter;
@ -332,7 +332,7 @@ ApiStatus SetBattleMusic(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus BindNpcAI(Evt* script, s32 isInitialCall) { API_CALLABLE(BindNpcAI) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
Enemy* enemy = script->owner1.enemy; Enemy* enemy = script->owner1.enemy;
s32 id = evt_get_variable(script, *args++); s32 id = evt_get_variable(script, *args++);
@ -385,7 +385,7 @@ ApiStatus BindNpcAI(Evt* script, s32 isInitialCall) {
return ret; return ret;
} }
ApiStatus BindNpcIdle(Evt* script, s32 isInitialCall) { API_CALLABLE(BindNpcIdle) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
Enemy* owner = script->owner1.enemy; Enemy* owner = script->owner1.enemy;
s32 npcID = evt_get_variable(script, *args++); s32 npcID = evt_get_variable(script, *args++);
@ -401,7 +401,7 @@ ApiStatus BindNpcIdle(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus RestartNpcAI(Evt* script, s32 isInitialCall) { API_CALLABLE(RestartNpcAI) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
Enemy* enemy = script->owner1.enemy; Enemy* enemy = script->owner1.enemy;
s32 npcID = evt_get_variable(script, *args++); s32 npcID = evt_get_variable(script, *args++);
@ -438,7 +438,7 @@ ApiStatus RestartNpcAI(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus EnableNpcAI(Evt* script, s32 isInitialCall) { API_CALLABLE(EnableNpcAI) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
Enemy* npc = script->owner1.enemy; Enemy* npc = script->owner1.enemy;
s32 npcID = evt_get_variable(script, *args++); s32 npcID = evt_get_variable(script, *args++);
@ -461,7 +461,7 @@ ApiStatus EnableNpcAI(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus SetNpcAux(Evt* script, s32 isInitialCall) { API_CALLABLE(SetNpcAux) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
Enemy* enemy = script->owner1.enemy; Enemy* enemy = script->owner1.enemy;
s32 id = evt_get_variable(script, *args++); s32 id = evt_get_variable(script, *args++);
@ -506,7 +506,7 @@ ApiStatus SetNpcAux(Evt* script, s32 isInitialCall) {
return ret; return ret;
} }
ApiStatus BindNpcAux(Evt* script, s32 isInitialCall) { API_CALLABLE(BindNpcAux) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
Enemy* npc = script->owner1.enemy; Enemy* npc = script->owner1.enemy;
s32 npcID = evt_get_variable(script, *args++); s32 npcID = evt_get_variable(script, *args++);
@ -522,7 +522,7 @@ ApiStatus BindNpcAux(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus RestartNpcAux(Evt* script, s32 isInitialCall) { API_CALLABLE(RestartNpcAux) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
Enemy* enemy = script->owner1.enemy; Enemy* enemy = script->owner1.enemy;
s32 npcID = evt_get_variable(script, *args++); s32 npcID = evt_get_variable(script, *args++);
@ -558,7 +558,7 @@ ApiStatus RestartNpcAux(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus EnableNpcAux(Evt* script, s32 isInitialCall) { API_CALLABLE(EnableNpcAux) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
Enemy* npc = script->owner1.enemy; Enemy* npc = script->owner1.enemy;
s32 npcID = evt_get_variable(script, *args++); s32 npcID = evt_get_variable(script, *args++);
@ -581,7 +581,7 @@ ApiStatus EnableNpcAux(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus BindNpcInteract(Evt* script, s32 isInitialCall) { API_CALLABLE(BindNpcInteract) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
Enemy* npc = script->owner1.enemy; Enemy* npc = script->owner1.enemy;
s32 npcID = evt_get_variable(script, *args++); s32 npcID = evt_get_variable(script, *args++);
@ -601,7 +601,7 @@ ApiStatus BindNpcInteract(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus BindNpcHit(Evt* script, s32 isInitialCall) { API_CALLABLE(BindNpcHit) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
Enemy* npc = script->owner1.enemy; Enemy* npc = script->owner1.enemy;
s32 npcID = evt_get_variable(script, *args++); s32 npcID = evt_get_variable(script, *args++);
@ -621,7 +621,7 @@ ApiStatus BindNpcHit(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus BindNpcDefeat(Evt* script, s32 isInitialCall) { API_CALLABLE(BindNpcDefeat) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
Enemy* npc = script->owner1.enemy; Enemy* npc = script->owner1.enemy;
s32 npcID = evt_get_variable(script, *args++); s32 npcID = evt_get_variable(script, *args++);
@ -637,7 +637,7 @@ ApiStatus BindNpcDefeat(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus SetSelfVar(Evt* script, s32 isInitialCall) { API_CALLABLE(SetSelfVar) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
Enemy* owner = script->owner1.enemy; Enemy* owner = script->owner1.enemy;
s32 index = evt_get_variable(script, *args++); s32 index = evt_get_variable(script, *args++);
@ -647,7 +647,7 @@ ApiStatus SetSelfVar(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus GetSelfVar(Evt* script, s32 isInitialCall) { API_CALLABLE(GetSelfVar) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
Enemy* owner = script->owner1.enemy; Enemy* owner = script->owner1.enemy;
s32 var1 = evt_get_variable(script, *args++); s32 var1 = evt_get_variable(script, *args++);
@ -657,7 +657,7 @@ ApiStatus GetSelfVar(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus SetNpcVar(Evt* script, s32 isInitialCall) { API_CALLABLE(SetNpcVar) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
Enemy* npc = script->owner1.enemy; Enemy* npc = script->owner1.enemy;
s32 npcID = evt_get_variable(script, *args++); s32 npcID = evt_get_variable(script, *args++);
@ -674,7 +674,7 @@ ApiStatus SetNpcVar(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus GetNpcVar(Evt* script, s32 isInitialCall) { API_CALLABLE(GetNpcVar) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
Enemy* npc = script->owner1.enemy; Enemy* npc = script->owner1.enemy;
s32 npcID = evt_get_variable(script, *args++); s32 npcID = evt_get_variable(script, *args++);
@ -691,7 +691,7 @@ ApiStatus GetNpcVar(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus SetSelfRotation(Evt* script, s32 isInitialCall) { API_CALLABLE(SetSelfRotation) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
Npc* self = get_npc_unsafe(script->owner2.npcID); Npc* self = get_npc_unsafe(script->owner2.npcID);
s32 rotX = evt_get_variable(script, *args++); s32 rotX = evt_get_variable(script, *args++);
@ -705,13 +705,13 @@ ApiStatus SetSelfRotation(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus SetSelfEnemyFlags(Evt* script, s32 isInitialCall) { API_CALLABLE(SetSelfEnemyFlags) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
script->owner1.enemy->flags = *args++; script->owner1.enemy->flags = *args++;
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus SetSelfEnemyFlagBits(Evt* script, s32 isInitialCall) { API_CALLABLE(SetSelfEnemyFlagBits) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
Enemy* owner = script->owner1.enemy; Enemy* owner = script->owner1.enemy;
s32 bits = *args++; s32 bits = *args++;
@ -725,7 +725,7 @@ ApiStatus SetSelfEnemyFlagBits(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus SelfEnemyOverrideSyncPos(Evt* script, s32 isInitialCall) { API_CALLABLE(SelfEnemyOverrideSyncPos) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
Enemy* owner = script->owner1.enemy; Enemy* owner = script->owner1.enemy;
Npc* npc = get_npc_unsafe(script->owner2.npcID); Npc* npc = get_npc_unsafe(script->owner2.npcID);
@ -738,14 +738,14 @@ ApiStatus SelfEnemyOverrideSyncPos(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus GetSelfNpcID(Evt* script, s32 isInitialCall) { API_CALLABLE(GetSelfNpcID) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
evt_set_variable(script, *args++, script->owner1.enemy->npcID); evt_set_variable(script, *args++, script->owner1.enemy->npcID);
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus ClearDefeatedEnemies(Evt* script, s32 isInitialCall) { API_CALLABLE(ClearDefeatedEnemies) {
EncounterStatus* currentEncounter = &gCurrentEncounter; EncounterStatus* currentEncounter = &gCurrentEncounter;
s32 i; s32 i;
s32 j; s32 j;
@ -758,7 +758,7 @@ ApiStatus ClearDefeatedEnemies(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus SetEnemyFlagBits(Evt* script, s32 isInitialCall) { API_CALLABLE(SetEnemyFlagBits) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
Enemy* npc = script->owner1.enemy; Enemy* npc = script->owner1.enemy;
s32 npcID = evt_get_variable(script, *args++); s32 npcID = evt_get_variable(script, *args++);
@ -780,11 +780,11 @@ ApiStatus SetEnemyFlagBits(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus func_8004572C(Evt* script, s32 isInitialCall) { API_CALLABLE(func_8004572C) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus GetSelfAnimationFromTable(Evt* script, s32 isInitialCall) { API_CALLABLE(GetSelfAnimationFromTable) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
Enemy* owner = script->owner1.enemy; Enemy* owner = script->owner1.enemy;
s32 animIdx = evt_get_variable(script, *args++); s32 animIdx = evt_get_variable(script, *args++);
@ -793,14 +793,14 @@ ApiStatus GetSelfAnimationFromTable(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus func_80045798(Evt* script, s32 isInitialCall) { API_CALLABLE(func_80045798) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
gPartnerStatus.unk_358 = evt_get_variable(script, *args++); gPartnerStatus.unk_358 = evt_get_variable(script, *args++);
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus SetOwnerInstigatorValue(Evt* script, s32 isInitialCall) { API_CALLABLE(SetOwnerInstigatorValue) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
Enemy* enemy = script->owner1.enemy; Enemy* enemy = script->owner1.enemy;
@ -808,19 +808,19 @@ ApiStatus SetOwnerInstigatorValue(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus SetBattleAsScripted(Evt* script, s32 isInitialCall) { API_CALLABLE(SetBattleAsScripted) {
gCurrentEncounter.scriptedBattle = TRUE; gCurrentEncounter.scriptedBattle = TRUE;
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus GetEncounterTriggerHitTier(Evt* script, s32 isInitialCall) { API_CALLABLE(GetEncounterTriggerHitTier) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
evt_set_variable(script, *args++, gCurrentEncounter.hitTier); evt_set_variable(script, *args++, gCurrentEncounter.hitTier);
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus func_80045838(Evt* script, s32 isInitialCall) { API_CALLABLE(func_80045838) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 npcID = evt_get_variable(script, *args++); s32 npcID = evt_get_variable(script, *args++);
s32 soundID = evt_get_variable(script, *args++); s32 soundID = evt_get_variable(script, *args++);
@ -835,14 +835,14 @@ ApiStatus func_80045838(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus func_800458CC(Evt* script, s32 isInitialCall) { API_CALLABLE(func_800458CC) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
evt_set_variable(script, *args++, script->owner1.enemy->npcSettings->actionFlags & AI_ACTION_08); evt_set_variable(script, *args++, script->owner1.enemy->npcSettings->actionFlags & AI_ACTION_08);
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus OnPlayerFled(Evt* script, s32 isInitialCall) { API_CALLABLE(OnPlayerFled) {
Enemy* enemy = script->owner1.enemy; Enemy* enemy = script->owner1.enemy;
Npc* npc = get_npc_unsafe(enemy->npcID); Npc* npc = get_npc_unsafe(enemy->npcID);
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
@ -877,7 +877,7 @@ ApiStatus OnPlayerFled(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus SetTattleMessage(Evt* script, s32 isInitialCall) { API_CALLABLE(SetTattleMessage) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 enemyId = evt_get_variable(script, *args++); s32 enemyId = evt_get_variable(script, *args++);
u32 tattleMsg = evt_get_variable(script, *args++); u32 tattleMsg = evt_get_variable(script, *args++);

View File

@ -1346,7 +1346,7 @@ s32 create_shadow_from_data(ShadowBlueprint* bp, f32 x, f32 y, f32 z) {
return shadow->listIndex; return shadow->listIndex;
} }
ApiStatus MakeEntity(Evt* script, s32 isInitialCall) { API_CALLABLE(MakeEntity) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
EntityBlueprint* entityData; EntityBlueprint* entityData;
s32 x, y, z; s32 x, y, z;
@ -1386,7 +1386,7 @@ ApiStatus MakeEntity(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus SetEntityCullMode(Evt* script, s32 isInitialCall) { API_CALLABLE(SetEntityCullMode) {
Entity* entity = get_entity_by_index(gLastCreatedEntityIndex); Entity* entity = get_entity_by_index(gLastCreatedEntityIndex);
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 mode = evt_get_variable(script, *args++); s32 mode = evt_get_variable(script, *args++);
@ -1404,7 +1404,7 @@ ApiStatus SetEntityCullMode(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus UseDynamicShadow(Evt* script, s32 isInitialCall) { API_CALLABLE(UseDynamicShadow) {
Entity* entity = get_entity_by_index(gLastCreatedEntityIndex); Entity* entity = get_entity_by_index(gLastCreatedEntityIndex);
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
@ -1421,7 +1421,7 @@ ApiStatus UseDynamicShadow(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus AssignScript(Evt* script, s32 isInitialCall) { API_CALLABLE(AssignScript) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
if (isInitialCall == TRUE) { if (isInitialCall == TRUE) {
@ -1434,7 +1434,7 @@ ApiStatus AssignScript(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE1; return ApiStatus_DONE1;
} }
ApiStatus AssignSwitchFlag(Evt* script, s32 isInitialCall) { API_CALLABLE(AssignSwitchFlag) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
if (isInitialCall == TRUE) { if (isInitialCall == TRUE) {
@ -1452,7 +1452,7 @@ ApiStatus AssignSwitchFlag(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE1; return ApiStatus_DONE1;
} }
ApiStatus AssignBlockFlag(Evt* script, s32 isInitialCall) { API_CALLABLE(AssignBlockFlag) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
if (isInitialCall == TRUE) { if (isInitialCall == TRUE) {
@ -1467,7 +1467,7 @@ ApiStatus AssignBlockFlag(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE1; return ApiStatus_DONE1;
} }
ApiStatus AssignChestFlag(Evt* script, s32 isInitialCall) { API_CALLABLE(AssignChestFlag) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
if (isInitialCall == TRUE) { if (isInitialCall == TRUE) {
@ -1480,7 +1480,7 @@ ApiStatus AssignChestFlag(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE1; return ApiStatus_DONE1;
} }
ApiStatus AssignPanelFlag(Evt* script, s32 isInitialCall) { API_CALLABLE(AssignPanelFlag) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
if (isInitialCall == TRUE) { if (isInitialCall == TRUE) {
@ -1493,7 +1493,7 @@ ApiStatus AssignPanelFlag(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE1; return ApiStatus_DONE1;
} }
ApiStatus AssignCrateFlag(Evt* script, s32 isInitialCall) { API_CALLABLE(AssignCrateFlag) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
if (isInitialCall == TRUE) { if (isInitialCall == TRUE) {

View File

@ -60,12 +60,12 @@ void entity_ItemBlock_spawn_item(Entity* entity) {
BlockData* data = entity->dataBuf.block; BlockData* data = entity->dataBuf.block;
s32 angle; s32 angle;
if (data->item == 0 || (entity->flags & ENTITY_FLAG_100000)) { if (data->item == ITEM_NONE || (entity->flags & ENTITY_FLAG_USED)) {
return; return;
} }
angle = player_get_camera_facing_angle(); angle = player_get_camera_facing_angle();
entity->flags |= ENTITY_FLAG_100000; entity->flags |= ENTITY_FLAG_USED;
if (data->item == ITEM_COIN) { if (data->item == ITEM_COIN) {
make_item_entity(ITEM_COIN, entity->pos.x, entity->pos.y + 28.0, entity->pos.z, make_item_entity(ITEM_COIN, entity->pos.x, entity->pos.y + 28.0, entity->pos.z,

View File

@ -86,7 +86,7 @@ void entity_Padlock_idle(Entity* entity) {
switch (data->state) { switch (data->state) {
case 0: case 0:
entity_Padlock_push_player(entity); entity_Padlock_push_player(entity);
if (entity->flags & ENTITY_FLAG_100000) { if (entity->flags & ENTITY_FLAG_USED) {
data->state++; data->state++;
sfx_play_sound(SOUND_USE_KEY); sfx_play_sound(SOUND_USE_KEY);
} }

View File

@ -346,7 +346,7 @@ void appendGfx_entity_model(EntityModel* model) {
if (!entity_fog_enabled || (model->flags & ENTITY_MODEL_FLAG_FOG_DISABLED)) { if (!entity_fog_enabled || (model->flags & ENTITY_MODEL_FLAG_FOG_DISABLED)) {
gDPSetCombineMode(gMainGfxPos++, G_CC_MODULATEIA, G_CC_MODULATEIA); gDPSetCombineMode(gMainGfxPos++, G_CC_MODULATEIA, G_CC_MODULATEIA);
} else { } else {
gDPSetCombineMode(gMainGfxPos++, PM_CC_42, PM_CC_18); gDPSetCombineMode(gMainGfxPos++, PM_CC_42, PM_CC2_MULTIPLY_SHADE);
} }
} }
if (model->vertexArray != NULL) { if (model->vertexArray != NULL) {
@ -660,7 +660,7 @@ void draw_entity_model_E(s32 modelIdx, Mtx* transformMtx) {
if (!entity_fog_enabled || (model->flags & ENTITY_MODEL_FLAG_FOG_DISABLED)) { if (!entity_fog_enabled || (model->flags & ENTITY_MODEL_FLAG_FOG_DISABLED)) {
gDPSetCombineMode(gMainGfxPos++, G_CC_MODULATEIA, G_CC_MODULATEIA); gDPSetCombineMode(gMainGfxPos++, G_CC_MODULATEIA, G_CC_MODULATEIA);
} else { } else {
gDPSetCombineMode(gMainGfxPos++, PM_CC_42, PM_CC_18); gDPSetCombineMode(gMainGfxPos++, PM_CC_42, PM_CC2_MULTIPLY_SHADE);
} }
if (model->vertexArray != NULL) { if (model->vertexArray != NULL) {
gSPSegment(gMainGfxPos++, D_80154374, VIRTUAL_TO_PHYSICAL(model->vertexArray)); gSPSegment(gMainGfxPos++, D_80154374, VIRTUAL_TO_PHYSICAL(model->vertexArray));

View File

@ -1,6 +1,6 @@
#include "common.h" #include "common.h"
ApiStatus PollMusicEvents(Evt* script, s32 isInitialCall); API_CALLABLE(PollMusicEvents);
extern MusicEvent* MusicEventList; extern MusicEvent* MusicEventList;
extern Evt* RunningMusicEvents[10]; extern Evt* RunningMusicEvents[10];
@ -14,7 +14,7 @@ static EvtScript EVS_MusicEventMonitor = {
EVT_END EVT_END
}; };
ApiStatus PollMusicEvents(Evt* script, s32 isInitialCall) { API_CALLABLE(PollMusicEvents) {
MusicEventTrigger* list; MusicEventTrigger* list;
s32 musicEventID, scriptSelector; s32 musicEventID, scriptSelector;
u32 count; u32 count;
@ -51,7 +51,7 @@ ApiStatus PollMusicEvents(Evt* script, s32 isInitialCall) {
return ApiStatus_BLOCK; return ApiStatus_BLOCK;
} }
ApiStatus RegisterMusicEvents(Evt* script, s32 isInitialCall) { API_CALLABLE(RegisterMusicEvents) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 i; s32 i;
@ -67,7 +67,7 @@ ApiStatus RegisterMusicEvents(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus FadeOutMusic(Evt* script, s32 isInitialCall) { API_CALLABLE(FadeOutMusic) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 musicPlayer = evt_get_variable(script, *args++); s32 musicPlayer = evt_get_variable(script, *args++);
s32 fadeTime = evt_get_variable(script, *args++); s32 fadeTime = evt_get_variable(script, *args++);
@ -79,7 +79,7 @@ ApiStatus FadeOutMusic(Evt* script, s32 isInitialCall) {
} }
} }
ApiStatus SetMusicTrack(Evt* script, s32 isInitialCall) { API_CALLABLE(SetMusicTrack) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 musicPlayer = evt_get_variable(script, *args++); s32 musicPlayer = evt_get_variable(script, *args++);
s32 songID = evt_get_variable(script, *args++); s32 songID = evt_get_variable(script, *args++);
@ -93,7 +93,7 @@ ApiStatus SetMusicTrack(Evt* script, s32 isInitialCall) {
} }
} }
ApiStatus FadeInMusic(Evt* script, s32 isInitialCall) { API_CALLABLE(FadeInMusic) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 musicPlayer = evt_get_variable(script, *args++); s32 musicPlayer = evt_get_variable(script, *args++);
s32 songID = evt_get_variable(script, *args++); s32 songID = evt_get_variable(script, *args++);
@ -109,7 +109,7 @@ ApiStatus FadeInMusic(Evt* script, s32 isInitialCall) {
} }
} }
ApiStatus EnableMusicProximityMix(Evt* script, s32 isInitialCall) { API_CALLABLE(EnableMusicProximityMix) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 playerIndex = evt_get_variable(script, *args++); s32 playerIndex = evt_get_variable(script, *args++);
@ -117,7 +117,7 @@ ApiStatus EnableMusicProximityMix(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus AdjustMusicProximityMix(Evt* script, s32 isInitialCall) { API_CALLABLE(AdjustMusicProximityMix) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 playerIndex = evt_get_variable(script, *args++); s32 playerIndex = evt_get_variable(script, *args++);
s32 mix = evt_get_variable(script, *args++); s32 mix = evt_get_variable(script, *args++);
@ -127,7 +127,7 @@ ApiStatus AdjustMusicProximityMix(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus SetMusicTrackVolumes(Evt* script, s32 isInitialCall) { API_CALLABLE(SetMusicTrackVolumes) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s16 trackVolSet = evt_get_variable(script, *args++); s16 trackVolSet = evt_get_variable(script, *args++);
@ -135,12 +135,12 @@ ApiStatus SetMusicTrackVolumes(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus PopSong(Evt* script, s32 isInitialCall) { API_CALLABLE(PopSong) {
bgm_pop_song(); bgm_pop_song();
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus PushSong(Evt* script, s32 isInitialCall) { API_CALLABLE(PushSong) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 songID = evt_get_variable(script, *args++); s32 songID = evt_get_variable(script, *args++);
s32 variation = evt_get_variable(script, *args++); s32 variation = evt_get_variable(script, *args++);
@ -149,17 +149,17 @@ ApiStatus PushSong(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus PopBattleSong(Evt* script, s32 isInitialCall) { API_CALLABLE(PopBattleSong) {
bgm_pop_battle_song(); bgm_pop_battle_song();
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus PushBattleSong(Evt* script, s32 isInitialCall) { API_CALLABLE(PushBattleSong) {
bgm_push_battle_song(); bgm_push_battle_song();
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus SetBattleSong(Evt* script, s32 isInitialCall) { API_CALLABLE(SetBattleSong) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 songID = evt_get_variable(script, *args++); s32 songID = evt_get_variable(script, *args++);
s32 variation = evt_get_variable(script, *args++); s32 variation = evt_get_variable(script, *args++);
@ -168,7 +168,7 @@ ApiStatus SetBattleSong(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus ClearAmbientSounds(Evt* script, s32 isInitialCall) { API_CALLABLE(ClearAmbientSounds) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 time = evt_get_variable(script, *args++); s32 time = evt_get_variable(script, *args++);
@ -179,7 +179,7 @@ ApiStatus ClearAmbientSounds(Evt* script, s32 isInitialCall) {
} }
} }
ApiStatus PlayAmbientSounds(Evt* script, s32 isInitialCall) { API_CALLABLE(PlayAmbientSounds) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 soundID = evt_get_variable(script, *args++); s32 soundID = evt_get_variable(script, *args++);
@ -190,7 +190,7 @@ ApiStatus PlayAmbientSounds(Evt* script, s32 isInitialCall) {
} }
} }
ApiStatus PlaySound(Evt* script, s32 isInitialCall) { API_CALLABLE(PlaySound) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 soundID = evt_get_variable(script, *args++); s32 soundID = evt_get_variable(script, *args++);
@ -198,7 +198,7 @@ ApiStatus PlaySound(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus PlaySoundWithVolume(Evt* script, s32 isInitialCall) { API_CALLABLE(PlaySoundWithVolume) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 soundID = evt_get_variable(script, *args++); s32 soundID = evt_get_variable(script, *args++);
s32 volume = evt_get_variable(script, *args++); s32 volume = evt_get_variable(script, *args++);
@ -207,7 +207,7 @@ ApiStatus PlaySoundWithVolume(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus PlaySoundAt(Evt* script, s32 isInitialCall) { API_CALLABLE(PlaySoundAt) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 soundID = evt_get_variable(script, *args++); s32 soundID = evt_get_variable(script, *args++);
s32 flags = evt_get_variable(script, *args++); s32 flags = evt_get_variable(script, *args++);
@ -219,7 +219,7 @@ ApiStatus PlaySoundAt(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus StopSound(Evt* script, s32 isInitialCall) { API_CALLABLE(StopSound) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 soundID = evt_get_variable(script, *args++); s32 soundID = evt_get_variable(script, *args++);
@ -227,7 +227,7 @@ ApiStatus StopSound(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus StopTrackingSoundPos(Evt* script, s32 isInitialCall) { API_CALLABLE(StopTrackingSoundPos) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 soundID = evt_get_variable(script, *args++); s32 soundID = evt_get_variable(script, *args++);
@ -235,21 +235,21 @@ ApiStatus StopTrackingSoundPos(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus UseDoorSounds(Evt* script, s32 isInitialCall) { API_CALLABLE(UseDoorSounds) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
gCurrentDoorSounds = evt_get_variable(script, *args++); gCurrentDoorSounds = evt_get_variable(script, *args++);
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus UseRoomDoorSounds(Evt* script, s32 isInitialCall) { API_CALLABLE(UseRoomDoorSounds) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
gCurrentRoomDoorSounds = evt_get_variable(script, *args++); gCurrentRoomDoorSounds = evt_get_variable(script, *args++);
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus PlaySoundAtF(Evt* script, s32 isInitialCall) { API_CALLABLE(PlaySoundAtF) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
Bytecode soundID = *args++; Bytecode soundID = *args++;
u16 spatializationFlags = evt_get_variable(script, *args++); u16 spatializationFlags = evt_get_variable(script, *args++);

View File

@ -15,7 +15,7 @@ EvtScript ShakeCamX = {
EVT_END EVT_END
}; };
ApiStatus SetCamEnabled(Evt* script, s32 isInitialCall) { API_CALLABLE(SetCamEnabled) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 id = evt_get_variable(script, *args++); s32 id = evt_get_variable(script, *args++);
s32 enabled = evt_get_variable(script, *args++); s32 enabled = evt_get_variable(script, *args++);
@ -28,7 +28,7 @@ ApiStatus SetCamEnabled(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus SetCamNoDraw(Evt* script, s32 isInitialCall) { API_CALLABLE(SetCamNoDraw) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 id = evt_get_variable(script, *args++); s32 id = evt_get_variable(script, *args++);
s32 enabled = evt_get_variable(script, *args++); s32 enabled = evt_get_variable(script, *args++);
@ -41,7 +41,7 @@ ApiStatus SetCamNoDraw(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus SetCamPerspective(Evt* script, s32 isInitialCall) { API_CALLABLE(SetCamPerspective) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 id = evt_get_variable(script, *args++); s32 id = evt_get_variable(script, *args++);
s16 mode = evt_get_variable(script, *args++); s16 mode = evt_get_variable(script, *args++);
@ -60,7 +60,7 @@ ApiStatus SetCamPerspective(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus func_802CA90C(Evt* script, s32 isInitialCall) { API_CALLABLE(func_802CA90C) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 id = evt_get_variable(script, *args++); s32 id = evt_get_variable(script, *args++);
s16 mode = evt_get_variable(script, *args++); s16 mode = evt_get_variable(script, *args++);
@ -71,7 +71,7 @@ ApiStatus func_802CA90C(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus func_802CA988(Evt* script, s32 isInitialCall) { API_CALLABLE(func_802CA988) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
Bytecode id = evt_get_variable(script, *args++); Bytecode id = evt_get_variable(script, *args++);
Bytecode outVar1 = *args++; Bytecode outVar1 = *args++;
@ -102,7 +102,7 @@ ApiStatus func_802CA988(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus SetCamViewport(Evt* script, s32 isInitialCall) { API_CALLABLE(SetCamViewport) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 id = evt_get_variable(script, *args++); s32 id = evt_get_variable(script, *args++);
s32 x = evt_get_variable(script, *args++); s32 x = evt_get_variable(script, *args++);
@ -114,7 +114,7 @@ ApiStatus SetCamViewport(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus func_802CABE8(Evt* script, s32 isInitialCall) { API_CALLABLE(func_802CABE8) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 id = evt_get_variable(script, *args++); s32 id = evt_get_variable(script, *args++);
s16 pitch = evt_get_variable(script, *args++); s16 pitch = evt_get_variable(script, *args++);
@ -130,7 +130,7 @@ ApiStatus func_802CABE8(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus func_802CACC0(Evt* script, s32 isInitialCall) { API_CALLABLE(func_802CACC0) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 id = evt_get_variable(script, *args++); s32 id = evt_get_variable(script, *args++);
s16 value1 = evt_get_variable(script, *args++); s16 value1 = evt_get_variable(script, *args++);
@ -146,7 +146,7 @@ ApiStatus func_802CACC0(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus SetCamBGColor(Evt* script, s32 isInitialCall) { API_CALLABLE(SetCamBGColor) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 id = evt_get_variable(script, *args++); s32 id = evt_get_variable(script, *args++);
s16 r = evt_get_variable(script, *args++); s16 r = evt_get_variable(script, *args++);
@ -160,7 +160,7 @@ ApiStatus SetCamBGColor(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus func_802CAE50(Evt* script, s32 isInitialCall) { API_CALLABLE(func_802CAE50) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 id = evt_get_variable(script, *args++); s32 id = evt_get_variable(script, *args++);
s32 x = evt_get_variable(script, *args++); s32 x = evt_get_variable(script, *args++);
@ -174,7 +174,7 @@ ApiStatus func_802CAE50(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus SetCamTarget(Evt* script, s32 isInitialCall) { API_CALLABLE(SetCamTarget) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 id = evt_get_variable(script, *args++); s32 id = evt_get_variable(script, *args++);
s32 x = evt_get_variable(script, *args++); s32 x = evt_get_variable(script, *args++);
@ -188,7 +188,7 @@ ApiStatus SetCamTarget(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus InterpCamTargetPos(Evt* script, s32 isInitialCall) { API_CALLABLE(InterpCamTargetPos) {
typedef struct CamInterpData { typedef struct CamInterpData {
/* 0x00 */ Camera* cam; /* 0x00 */ Camera* cam;
/* 0x04 */ s32 useTarget; /* 0x04 */ s32 useTarget;
@ -253,7 +253,7 @@ ApiStatus InterpCamTargetPos(Evt* script, s32 isInitialCall) {
return ApiStatus_BLOCK; return ApiStatus_BLOCK;
} }
ApiStatus ShakeCam(Evt* script, s32 isInitialCall) { API_CALLABLE(ShakeCam) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 camIndex = evt_get_variable(script, *args++); s32 camIndex = evt_get_variable(script, *args++);
s32 shakeMode = evt_get_variable(script, *args++); s32 shakeMode = evt_get_variable(script, *args++);
@ -345,7 +345,7 @@ void exec_ShakeCamX(s32 camID, s32 mode, s32 duration, f32 magnitude) {
evt_set_float_variable(script, LVar3, magnitude); evt_set_float_variable(script, LVar3, magnitude);
} }
ApiStatus SetCamLeadPlayer(Evt* script, s32 isInitialCall) { API_CALLABLE(SetCamLeadPlayer) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 id = evt_get_variable(script, *args++); s32 id = evt_get_variable(script, *args++);
s32 enabled = evt_get_variable(script, *args++); s32 enabled = evt_get_variable(script, *args++);
@ -359,7 +359,7 @@ ApiStatus SetCamLeadPlayer(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus func_802CB710(Evt* script, s32 isInitialCall) { API_CALLABLE(func_802CB710) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 id = evt_get_variable(script, *args++); s32 id = evt_get_variable(script, *args++);
f32 value = evt_get_variable(script, *args++); f32 value = evt_get_variable(script, *args++);
@ -369,7 +369,7 @@ ApiStatus func_802CB710(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus PanToTarget(Evt* script, s32 isInitialCall) { API_CALLABLE(PanToTarget) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 id = evt_get_variable(script, *args++); s32 id = evt_get_variable(script, *args++);
f32 panPhase = evt_get_float_variable(script, *args++); f32 panPhase = evt_get_float_variable(script, *args++);
@ -388,7 +388,7 @@ ApiStatus PanToTarget(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus UseSettingsFrom(Evt* script, s32 isInitialCall) { API_CALLABLE(UseSettingsFrom) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 id = evt_get_variable(script, *args++); s32 id = evt_get_variable(script, *args++);
Camera* camera = &gCameras[id]; Camera* camera = &gCameras[id];
@ -407,7 +407,7 @@ ApiStatus UseSettingsFrom(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus LoadSettings(Evt* script, s32 isInitialCall) { API_CALLABLE(LoadSettings) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 id = evt_get_variable(script, *args++); s32 id = evt_get_variable(script, *args++);
Camera* camera = &gCameras[id]; Camera* camera = &gCameras[id];
@ -417,7 +417,7 @@ ApiStatus LoadSettings(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus SetCamType(Evt* script, s32 isInitialCall) { API_CALLABLE(SetCamType) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 id = evt_get_variable(script, *args++); s32 id = evt_get_variable(script, *args++);
Camera* camera = &gCameras[id]; Camera* camera = &gCameras[id];
@ -429,7 +429,7 @@ ApiStatus SetCamType(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus SetCamPitch(Evt* script, s32 isInitialCall) { API_CALLABLE(SetCamPitch) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 id = evt_get_variable(script, *args++); s32 id = evt_get_variable(script, *args++);
Camera* camera = &gCameras[id]; Camera* camera = &gCameras[id];
@ -441,7 +441,7 @@ ApiStatus SetCamPitch(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus SetCamDistance(Evt* script, s32 isInitialCall) { API_CALLABLE(SetCamDistance) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 id = evt_get_variable(script, *args++); s32 id = evt_get_variable(script, *args++);
Camera* camera = &gCameras[id]; Camera* camera = &gCameras[id];
@ -451,7 +451,7 @@ ApiStatus SetCamDistance(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus SetCamPosA(Evt* script, s32 isInitialCall) { API_CALLABLE(SetCamPosA) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 id = evt_get_variable(script, *args++); s32 id = evt_get_variable(script, *args++);
Camera* camera = &gCameras[id]; Camera* camera = &gCameras[id];
@ -463,7 +463,7 @@ ApiStatus SetCamPosA(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus SetCamPosB(Evt* script, s32 isInitialCall) { API_CALLABLE(SetCamPosB) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 id = evt_get_variable(script, *args++); s32 id = evt_get_variable(script, *args++);
Camera* camera = &gCameras[id]; Camera* camera = &gCameras[id];
@ -475,7 +475,7 @@ ApiStatus SetCamPosB(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus SetCamPosC(Evt* script, s32 isInitialCall) { API_CALLABLE(SetCamPosC) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 id = evt_get_variable(script, *args++); s32 id = evt_get_variable(script, *args++);
Camera* camera = &gCameras[id]; Camera* camera = &gCameras[id];
@ -487,7 +487,7 @@ ApiStatus SetCamPosC(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus SetPanTarget(Evt* script, s32 isInitialCall) { API_CALLABLE(SetPanTarget) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 id = evt_get_variable(script, *args++); s32 id = evt_get_variable(script, *args++);
Camera* camera = &gCameras[id]; Camera* camera = &gCameras[id];
@ -502,7 +502,7 @@ ApiStatus SetPanTarget(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus SetCamSpeed(Evt* script, s32 isInitialCall) { API_CALLABLE(SetCamSpeed) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 id = evt_get_variable(script, *args++); s32 id = evt_get_variable(script, *args++);
f32 speed = evt_get_float_variable(script, *args++); f32 speed = evt_get_float_variable(script, *args++);
@ -512,7 +512,7 @@ ApiStatus SetCamSpeed(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus GetCamType(Evt* script, s32 isInitialCall) { API_CALLABLE(GetCamType) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 id = evt_get_variable(script, *args++); s32 id = evt_get_variable(script, *args++);
Bytecode outVar1 = *args++; Bytecode outVar1 = *args++;
@ -524,7 +524,7 @@ ApiStatus GetCamType(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus GetCamPitch(Evt* script, s32 isInitialCall) { API_CALLABLE(GetCamPitch) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 id = evt_get_variable(script, *args++); s32 id = evt_get_variable(script, *args++);
Bytecode outVar1 = *args++; Bytecode outVar1 = *args++;
@ -536,7 +536,7 @@ ApiStatus GetCamPitch(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus GetCamDistance(Evt* script, s32 isInitialCall) { API_CALLABLE(GetCamDistance) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 id = evt_get_variable(script, *args++); s32 id = evt_get_variable(script, *args++);
Bytecode outVar1 = *args++; Bytecode outVar1 = *args++;
@ -546,7 +546,7 @@ ApiStatus GetCamDistance(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus GetCamPosA(Evt* script, s32 isInitialCall) { API_CALLABLE(GetCamPosA) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 id = evt_get_variable(script, *args++); s32 id = evt_get_variable(script, *args++);
Bytecode outVar1 = *args++; Bytecode outVar1 = *args++;
@ -558,7 +558,7 @@ ApiStatus GetCamPosA(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus GetCamPosB(Evt* script, s32 isInitialCall) { API_CALLABLE(GetCamPosB) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 id = evt_get_variable(script, *args++); s32 id = evt_get_variable(script, *args++);
Bytecode outVar1 = *args++; Bytecode outVar1 = *args++;
@ -570,7 +570,7 @@ ApiStatus GetCamPosB(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus GetCamPosC(Evt* script, s32 isInitialCall) { API_CALLABLE(GetCamPosC) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 id = evt_get_variable(script, *args++); s32 id = evt_get_variable(script, *args++);
Bytecode outVar1 = *args++; Bytecode outVar1 = *args++;
@ -582,7 +582,7 @@ ApiStatus GetCamPosC(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus GetCamPosition(Evt* script, s32 isInitialCall) { API_CALLABLE(GetCamPosition) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 id = evt_get_variable(script, *args++); s32 id = evt_get_variable(script, *args++);
Bytecode outVar1 = *args++; Bytecode outVar1 = *args++;
@ -596,7 +596,7 @@ ApiStatus GetCamPosition(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus WaitForCam(Evt* script, s32 isInitialCall) { API_CALLABLE(WaitForCam) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 id = evt_get_variable(script, args[0]); s32 id = evt_get_variable(script, args[0]);
f32 endInterpValue = evt_get_float_variable(script, args[1]); f32 endInterpValue = evt_get_float_variable(script, args[1]);
@ -608,7 +608,7 @@ ApiStatus WaitForCam(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus SetCamProperties(Evt* script, s32 isInitialCall) { API_CALLABLE(SetCamProperties) {
f32 hitX, hitY, hitZ, hitDepth, nX, nY, nZ; f32 hitX, hitY, hitZ, hitDepth, nX, nY, nZ;
s32 zoneID; s32 zoneID;
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
@ -648,7 +648,7 @@ ApiStatus SetCamProperties(Evt* script, s32 isInitialCall) {
} }
} }
ApiStatus AdjustCam(Evt* script, s32 isInitialCall) { API_CALLABLE(AdjustCam) {
f32 hitX, hitY, hitZ, hitDepth, nX, nY, nZ; f32 hitX, hitY, hitZ, hitDepth, nX, nY, nZ;
f32 posX, posY, posZ; f32 posX, posY, posZ;
s32 zoneID; s32 zoneID;
@ -691,7 +691,7 @@ ApiStatus AdjustCam(Evt* script, s32 isInitialCall) {
} }
} }
ApiStatus ResetCam(Evt* script, s32 isInitialCall) { API_CALLABLE(ResetCam) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 id = evt_get_variable(script, *args++); s32 id = evt_get_variable(script, *args++);
Camera* camera = &gCameras[id]; Camera* camera = &gCameras[id];

View File

@ -11,7 +11,7 @@ extern u8 gSpriteShadingData[0x100];
extern Addr sprite_shading_profiles_data_ROM_START; extern Addr sprite_shading_profiles_data_ROM_START;
ApiStatus SetSpriteShading(Evt* script, s32 isInitialCall) { API_CALLABLE(SetSpriteShading) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 profileID = evt_get_variable(script, *args++); s32 profileID = evt_get_variable(script, *args++);
s32 shadingGroupOffset = (profileID >> 0x10) * 8; s32 shadingGroupOffset = (profileID >> 0x10) * 8;
@ -66,40 +66,40 @@ ApiStatus SetSpriteShading(Evt* script, s32 isInitialCall) {
source->falloff = *(f32*)&falloff; source->falloff = *(f32*)&falloff;
source->unk_14 = gSpriteShadingData[6 + 16 * i + 14]; source->unk_14 = gSpriteShadingData[6 + 16 * i + 14];
} }
gSpriteShadingProfile->flags |= 1; gSpriteShadingProfile->flags |= SPR_SHADING_FLAG_ENABLED;
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus EnableSpriteShading(Evt* script, s32 isInitialCall) { API_CALLABLE(EnableSpriteShading) {
if (evt_get_variable(script, *script->ptrReadPos) != 0) { if (evt_get_variable(script, *script->ptrReadPos) != 0) {
gSpriteShadingProfile->flags |= 1; gSpriteShadingProfile->flags |= SPR_SHADING_FLAG_ENABLED;
} else { } else {
gSpriteShadingProfile->flags &= ~1; gSpriteShadingProfile->flags &= ~SPR_SHADING_FLAG_ENABLED;
} }
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus GetDemoState(Evt* script, s32 isInitialCall) { API_CALLABLE(GetDemoState) {
evt_set_variable(script, *script->ptrReadPos, gGameStatusPtr->demoState); evt_set_variable(script, *script->ptrReadPos, gGameStatusPtr->demoState);
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus DemoPressButton(Evt* script, s32 isInitialCall) { API_CALLABLE(DemoPressButton) {
gGameStatusPtr->demoButtonInput |= evt_get_variable(script, *script->ptrReadPos); gGameStatusPtr->demoButtonInput |= evt_get_variable(script, *script->ptrReadPos);
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus DemoReleaseButton(Evt* script, s32 isInitialCall) { API_CALLABLE(DemoReleaseButton) {
gGameStatusPtr->demoButtonInput &= ~evt_get_variable(script, *script->ptrReadPos); gGameStatusPtr->demoButtonInput &= ~evt_get_variable(script, *script->ptrReadPos);
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus DemoSetButtons(Evt* script, s32 isInitialCall) { API_CALLABLE(DemoSetButtons) {
gGameStatusPtr->demoButtonInput = evt_get_variable(script, *script->ptrReadPos); gGameStatusPtr->demoButtonInput = evt_get_variable(script, *script->ptrReadPos);
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus DemoJoystickRadial(Evt* script, s32 isInitialCall) { API_CALLABLE(DemoJoystickRadial) {
GameStatus** gameStatus = &gGameStatusPtr; GameStatus** gameStatus = &gGameStatusPtr;
f32 a; f32 a;
f32 b; f32 b;
@ -114,7 +114,7 @@ ApiStatus DemoJoystickRadial(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus DemoJoystickXY(Evt* script, s32 isInitialCall) { API_CALLABLE(DemoJoystickXY) {
GameStatus** gameStatus = &gGameStatusPtr; GameStatus** gameStatus = &gGameStatusPtr;
f32 x; f32 x;
f32 y; f32 y;

View File

@ -1047,7 +1047,7 @@ ApiStatus evt_handle_bind(Evt* script) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus DeleteTrigger(Evt* script, s32 isInitialCall) { API_CALLABLE(DeleteTrigger) {
delete_trigger((Trigger*)evt_get_variable(script, *script->ptrReadPos)); delete_trigger((Trigger*)evt_get_variable(script, *script->ptrReadPos));
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }

View File

@ -2,7 +2,7 @@
#include "game_modes.h" #include "game_modes.h"
// args: start, end, duration, EasingType // args: start, end, duration, EasingType
ApiStatus MakeLerp(Evt* script, s32 isInitialCall) { API_CALLABLE(MakeLerp) {
Bytecode* ptrReadPos = script->ptrReadPos; Bytecode* ptrReadPos = script->ptrReadPos;
script->varTable[0xC] = evt_get_variable(script, *ptrReadPos++); // start script->varTable[0xC] = evt_get_variable(script, *ptrReadPos++); // start
@ -14,7 +14,7 @@ ApiStatus MakeLerp(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus UpdateLerp(Evt* script, s32 isInitialCall) { API_CALLABLE(UpdateLerp) {
script->varTable[0x0] = (s32) update_lerp( script->varTable[0x0] = (s32) update_lerp(
script->varTable[0xB], script->varTable[0xB],
script->varTable[0xC], script->varTable[0xC],
@ -33,7 +33,7 @@ ApiStatus UpdateLerp(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus RandInt(Evt* script, s32 isInitialCall) { API_CALLABLE(RandInt) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 max = evt_get_variable(script, *args++); s32 max = evt_get_variable(script, *args++);
@ -44,7 +44,7 @@ ApiStatus RandInt(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus GetAngleBetweenNPCs(Evt* script, s32 isInitialCall) { API_CALLABLE(GetAngleBetweenNPCs) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 aID = evt_get_variable(script, *args++); s32 aID = evt_get_variable(script, *args++);
@ -58,7 +58,7 @@ ApiStatus GetAngleBetweenNPCs(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus GetAngleToNPC(Evt* script, s32 isInitialCall) { API_CALLABLE(GetAngleToNPC) {
PlayerStatus* playerStatus = &gPlayerStatus; PlayerStatus* playerStatus = &gPlayerStatus;
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
@ -71,7 +71,7 @@ ApiStatus GetAngleToNPC(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus GetAngleToPlayer(Evt* script, s32 isInitialCall) { API_CALLABLE(GetAngleToPlayer) {
PlayerStatus* playerStatus = &gPlayerStatus; PlayerStatus* playerStatus = &gPlayerStatus;
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
@ -84,7 +84,7 @@ ApiStatus GetAngleToPlayer(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus AwaitPlayerApproach(Evt* script, s32 isInitialCall) { API_CALLABLE(AwaitPlayerApproach) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
PlayerStatus* playerStatus = &gPlayerStatus; PlayerStatus* playerStatus = &gPlayerStatus;
@ -112,7 +112,7 @@ ApiStatus AwaitPlayerApproach(Evt* script, s32 isInitialCall) {
} }
} }
ApiStatus IsPlayerWithin(Evt* script, s32 isInitialCall) { API_CALLABLE(IsPlayerWithin) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
PlayerStatus* playerStatus = &gPlayerStatus; PlayerStatus* playerStatus = &gPlayerStatus;
@ -143,7 +143,7 @@ ApiStatus IsPlayerWithin(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus AwaitPlayerLeave(Evt* script, s32 isInitialCall) { API_CALLABLE(AwaitPlayerLeave) {
Bytecode* ptrReadPos = script->ptrReadPos; Bytecode* ptrReadPos = script->ptrReadPos;
PlayerStatus* playerStatus = &gPlayerStatus; PlayerStatus* playerStatus = &gPlayerStatus;
@ -171,7 +171,7 @@ ApiStatus AwaitPlayerLeave(Evt* script, s32 isInitialCall) {
} }
} }
ApiStatus AddVectorPolar(Evt* script, s32 isInitialCall) { API_CALLABLE(AddVectorPolar) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
Bytecode xVar = *args++; Bytecode xVar = *args++;
@ -190,7 +190,7 @@ ApiStatus AddVectorPolar(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus func_802D4BDC(Evt* script, s32 isInitialCall) { API_CALLABLE(func_802D4BDC) {
s32* ready = &script->functionTemp[0]; s32* ready = &script->functionTemp[0];
s32* progress = &script->functionTemp[1]; s32* progress = &script->functionTemp[1];
s32 t1v; s32 t1v;
@ -219,7 +219,7 @@ ApiStatus func_802D4BDC(Evt* script, s32 isInitialCall) {
return ApiStatus_BLOCK; return ApiStatus_BLOCK;
} }
ApiStatus func_802D4C4C(Evt* script, s32 isInitialCall) { API_CALLABLE(func_802D4C4C) {
s32* ready = &script->functionTemp[0]; s32* ready = &script->functionTemp[0];
s32* progress = &script->functionTemp[1]; s32* progress = &script->functionTemp[1];
s32 t1v; s32 t1v;
@ -247,7 +247,7 @@ ApiStatus func_802D4C4C(Evt* script, s32 isInitialCall) {
return ApiStatus_BLOCK; return ApiStatus_BLOCK;
} }
ApiStatus func_802D4CC4(Evt* script, s32 isInitialCall) { API_CALLABLE(func_802D4CC4) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 value = evt_get_variable(script, *args++); s32 value = evt_get_variable(script, *args++);
@ -260,7 +260,7 @@ ApiStatus func_802D4CC4(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus func_802D4D14(Evt* script, s32 isInitialCall) { API_CALLABLE(func_802D4D14) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 value = evt_get_float_variable(script, *args++); s32 value = evt_get_float_variable(script, *args++);
@ -271,7 +271,7 @@ ApiStatus func_802D4D14(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus func_802D4D88(Evt* script, s32 isInitialCall) { API_CALLABLE(func_802D4D88) {
set_screen_overlay_params_front(OVERLAY_BLUR, 0); set_screen_overlay_params_front(OVERLAY_BLUR, 0);
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
@ -385,7 +385,7 @@ void get_path_position(f32 alpha, Vec3f* outPos, s32 numVectors, f32* normalized
outPos->z = ((az + bz) * curProgress) + pathPoints[i].z; outPos->z = ((az + bz) * curProgress) + pathPoints[i].z;
} }
ApiStatus LoadPath(Evt* script, s32 isInitialCall) { API_CALLABLE(LoadPath) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 time = evt_get_variable(script, *args++); s32 time = evt_get_variable(script, *args++);
Vec3f* vectorList = (Vec3f*) evt_get_variable(script, *args++); Vec3f* vectorList = (Vec3f*) evt_get_variable(script, *args++);
@ -407,7 +407,7 @@ ApiStatus LoadPath(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus GetNextPathPos(Evt* script, s32 isInitialCall) { API_CALLABLE(GetNextPathPos) {
Path* path = script->varTablePtr[0xF]; Path* path = script->varTablePtr[0xF];
Vec3f pos; Vec3f pos;
f32 alpha; f32 alpha;
@ -450,7 +450,7 @@ ApiStatus GetNextPathPos(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus GetDist2D(Evt* script, s32 isInitialCall) { API_CALLABLE(GetDist2D) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
Bytecode outVar = *args++; Bytecode outVar = *args++;
f32 ax = evt_get_float_variable(script, *args++); f32 ax = evt_get_float_variable(script, *args++);
@ -465,14 +465,14 @@ ApiStatus GetDist2D(Evt* script, s32 isInitialCall) {
//TODO code split? math_api from ??? //TODO code split? math_api from ???
ApiStatus SetTimeFreezeMode(Evt* script, s32 initialCall) { API_CALLABLE(SetTimeFreezeMode) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
set_time_freeze_mode(evt_get_variable(script, *args++)); set_time_freeze_mode(evt_get_variable(script, *args++));
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus ModifyGlobalOverrideFlags(Evt* script, s32 initialCall) { API_CALLABLE(ModifyGlobalOverrideFlags) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 setMode = evt_get_variable(script, *args++); s32 setMode = evt_get_variable(script, *args++);
s32 flags = evt_get_variable(script, *args++); s32 flags = evt_get_variable(script, *args++);
@ -486,7 +486,7 @@ ApiStatus ModifyGlobalOverrideFlags(Evt* script, s32 initialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus SetValueByRef(Evt* script, s32 isInitialCall) { API_CALLABLE(SetValueByRef) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 dest = evt_get_variable(script, *args++); /* Reference */ s32 dest = evt_get_variable(script, *args++); /* Reference */
@ -496,7 +496,7 @@ ApiStatus SetValueByRef(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus GetValueByRef(Evt* script, s32 isInitialCall) { API_CALLABLE(GetValueByRef) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 src = evt_get_variable(script, *args++); /* Reference */ s32 src = evt_get_variable(script, *args++); /* Reference */
Bytecode dest = *args++; Bytecode dest = *args++;
@ -506,7 +506,7 @@ ApiStatus GetValueByRef(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus EnableWorldStatusBar(Evt* script, s32 isInitialCall) { API_CALLABLE(EnableWorldStatusBar) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
b32 shouldEnable = evt_get_variable(script, *args++); b32 shouldEnable = evt_get_variable(script, *args++);
@ -519,7 +519,7 @@ ApiStatus EnableWorldStatusBar(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus ShowWorldStatusBar(Evt* script, s32 isInitialCall) { API_CALLABLE(ShowWorldStatusBar) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
b32 shouldShow = evt_get_variable(script, *args++); b32 shouldShow = evt_get_variable(script, *args++);
@ -533,7 +533,7 @@ ApiStatus ShowWorldStatusBar(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus SetGameMode(Evt* script, s32 isInitialCall) { API_CALLABLE(SetGameMode) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s16 mode = evt_get_variable(script, *args++); s16 mode = evt_get_variable(script, *args++);
@ -542,7 +542,7 @@ ApiStatus SetGameMode(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus ClampAngleInt(Evt* script, s32 isInitialCall) { API_CALLABLE(ClampAngleInt) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 angle = evt_get_variable(script, *args); s32 angle = evt_get_variable(script, *args);
@ -551,7 +551,7 @@ ApiStatus ClampAngleInt(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus ClampAngleFloat(Evt* script, s32 isInitialCall) { API_CALLABLE(ClampAngleFloat) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
f32 angle = evt_get_float_variable(script, *args); f32 angle = evt_get_float_variable(script, *args);
@ -561,7 +561,7 @@ ApiStatus ClampAngleFloat(Evt* script, s32 isInitialCall) {
} }
#if VERSION_PAL #if VERSION_PAL
ApiStatus GetLanguage(Evt* script, s32 isInitialCall) { API_CALLABLE(GetLanguage) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
evt_set_variable(script, *args++, gCurrentLanguage); evt_set_variable(script, *args++, gCurrentLanguage);

View File

@ -9,7 +9,7 @@ void show_recovery_shimmer(f32 x, f32 y, f32 z, s32 amt) {
fx_stars_shimmer(2, x, y, z, amt + 30, amt + 30, (amt / 2) + 10, 30); fx_stars_shimmer(2, x, y, z, amt + 30, amt + 30, (amt / 2) + 10, 30);
} }
ApiStatus ShowStartRecoveryShimmer(Evt* script, s32 isInitialCall) { API_CALLABLE(ShowStartRecoveryShimmer) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
f32 x = evt_get_float_variable(script, *args++); f32 x = evt_get_float_variable(script, *args++);
f32 y = evt_get_float_variable(script, *args++); f32 y = evt_get_float_variable(script, *args++);
@ -20,7 +20,7 @@ ApiStatus ShowStartRecoveryShimmer(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus ShowRecoveryShimmer(Evt* script, s32 isInitialCall) { API_CALLABLE(ShowRecoveryShimmer) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
f32 x = evt_get_float_variable(script, *args++); f32 x = evt_get_float_variable(script, *args++);
f32 y = evt_get_float_variable(script, *args++); f32 y = evt_get_float_variable(script, *args++);
@ -31,7 +31,7 @@ ApiStatus ShowRecoveryShimmer(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus func_802D7690(Evt* script, s32 isInitialCall) { API_CALLABLE(func_802D7690) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
f32 posX = evt_get_float_variable(script, *args++); f32 posX = evt_get_float_variable(script, *args++);
f32 posY = evt_get_float_variable(script, *args++); f32 posY = evt_get_float_variable(script, *args++);
@ -66,7 +66,7 @@ ApiStatus func_802D7690(Evt* script, s32 isInitialCall) {
} }
} }
ApiStatus ShowEmote(Evt* script, s32 isInitialCall) { API_CALLABLE(ShowEmote) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 npcID = evt_get_variable(script, *args++); s32 npcID = evt_get_variable(script, *args++);
s32 emoteType = evt_get_variable(script, *args++); s32 emoteType = evt_get_variable(script, *args++);
@ -116,14 +116,14 @@ ApiStatus ShowEmote(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus RemoveEffect(Evt* script, s32 isInitialCall) { API_CALLABLE(RemoveEffect) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
remove_effect((EffectInstance*)evt_get_variable(script, *args++)); remove_effect((EffectInstance*)evt_get_variable(script, *args++));
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus DismissEffect(Evt* script, s32 isInitialCall) { API_CALLABLE(DismissEffect) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
EffectInstance* effect = (EffectInstance*)evt_get_variable(script, *args++); EffectInstance* effect = (EffectInstance*)evt_get_variable(script, *args++);
@ -131,7 +131,7 @@ ApiStatus DismissEffect(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus DismissItemOutline(Evt* script, s32 isInitialCall) { API_CALLABLE(DismissItemOutline) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
EffectInstance* effect = (EffectInstance*)evt_get_variable(script, *args++); EffectInstance* effect = (EffectInstance*)evt_get_variable(script, *args++);
@ -139,7 +139,7 @@ ApiStatus DismissItemOutline(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus func_802D7B74(Evt* script, s32 isInitialCall) { API_CALLABLE(func_802D7B74) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
EffectInstance* effect = (EffectInstance*)evt_get_variable(script, *args++); EffectInstance* effect = (EffectInstance*)evt_get_variable(script, *args++);
@ -148,7 +148,7 @@ ApiStatus func_802D7B74(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus InterpMotionBlurParams(Evt* script, s32 isInitialCall) { API_CALLABLE(InterpMotionBlurParams) {
s32 centerX0 = script->varTable[1]; s32 centerX0 = script->varTable[1];
s32 centerY0 = script->varTable[2]; s32 centerY0 = script->varTable[2];
s32 centerX1 = script->varTable[3]; s32 centerX1 = script->varTable[3];
@ -186,7 +186,7 @@ EvtScript EVS_UpdateMotionBlurParams = {
EVT_END EVT_END
}; };
ApiStatus SetMotionBlurParams(Evt* script, s32 isInitialCall) { API_CALLABLE(SetMotionBlurParams) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 var0 = evt_get_variable(script, *args++); s32 var0 = evt_get_variable(script, *args++);
s32 centerX0 = evt_get_variable(script, *args++); s32 centerX0 = evt_get_variable(script, *args++);
@ -208,7 +208,7 @@ ApiStatus SetMotionBlurParams(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus ShowSweat(Evt* script, s32 isInitialCall) { API_CALLABLE(ShowSweat) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 npcID = evt_get_variable(script, *args++); s32 npcID = evt_get_variable(script, *args++);
s32 type = evt_get_variable(script, *args++); s32 type = evt_get_variable(script, *args++);
@ -252,7 +252,7 @@ ApiStatus ShowSweat(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus ShowSleepBubble(Evt* script, s32 isInitialCall) { API_CALLABLE(ShowSleepBubble) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 npcID = evt_get_variable(script, *args++); s32 npcID = evt_get_variable(script, *args++);
s32 type = evt_get_variable(script, *args++); s32 type = evt_get_variable(script, *args++);
@ -298,7 +298,7 @@ ApiStatus ShowSleepBubble(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus SetSleepBubbleTimeLeft(Evt* script, s32 isInitialCall) { API_CALLABLE(SetSleepBubbleTimeLeft) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
EffectInstance* effect = (EffectInstance*)evt_get_variable(script, *args++); EffectInstance* effect = (EffectInstance*)evt_get_variable(script, *args++);
s32 value = evt_get_variable(script, *args++); s32 value = evt_get_variable(script, *args++);
@ -307,7 +307,7 @@ ApiStatus SetSleepBubbleTimeLeft(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus PlayEffect(Evt* script, s32 isInitialCall) { API_CALLABLE(PlayEffect) {
Bytecode* intArgs = script->ptrReadPos; Bytecode* intArgs = script->ptrReadPos;
Bytecode* floatArgs = script->ptrReadPos; Bytecode* floatArgs = script->ptrReadPos;
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;

View File

@ -5,7 +5,7 @@
extern PopupMenu D_802DB830; extern PopupMenu D_802DB830;
ApiStatus ShowKeyChoicePopup(Evt* script, s32 isInitialCall) { API_CALLABLE(ShowKeyChoicePopup) {
PlayerData* playerData = &gPlayerData; PlayerData* playerData = &gPlayerData;
PopupMenu* menu = &D_802DB830; PopupMenu* menu = &D_802DB830;
Trigger* trigger = script->owner2.trigger; Trigger* trigger = script->owner2.trigger;
@ -96,7 +96,7 @@ ApiStatus ShowKeyChoicePopup(Evt* script, s32 isInitialCall) {
return ApiStatus_BLOCK; return ApiStatus_BLOCK;
} }
ApiStatus ShowConsumableChoicePopup(Evt* script, s32 isInitialCall) { API_CALLABLE(ShowConsumableChoicePopup) {
PlayerData* playerData = &gPlayerData; PlayerData* playerData = &gPlayerData;
PopupMenu* menu = &D_802DB830; PopupMenu* menu = &D_802DB830;
Trigger* trigger = script->owner2.trigger; Trigger* trigger = script->owner2.trigger;
@ -187,7 +187,7 @@ ApiStatus ShowConsumableChoicePopup(Evt* script, s32 isInitialCall) {
return ApiStatus_BLOCK; return ApiStatus_BLOCK;
} }
ApiStatus RemoveKeyItemAt(Evt* script, s32 isInitialCall) { API_CALLABLE(RemoveKeyItemAt) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 index = evt_get_variable(script, *args++); s32 index = evt_get_variable(script, *args++);
s16* ptrKeyItems = gPlayerData.keyItems; s16* ptrKeyItems = gPlayerData.keyItems;
@ -196,7 +196,7 @@ ApiStatus RemoveKeyItemAt(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus RemoveItemAt(Evt* script, s32 isInitialCall) { API_CALLABLE(RemoveItemAt) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 index = evt_get_variable(script, *args++); s32 index = evt_get_variable(script, *args++);
s16* ptrInvItems = gPlayerData.invItems; s16* ptrInvItems = gPlayerData.invItems;
@ -206,7 +206,7 @@ ApiStatus RemoveItemAt(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus AddKeyItem(Evt* script, s32 isInitialCall) { API_CALLABLE(AddKeyItem) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 value = *args++; s32 value = *args++;
PlayerData* playerData = &gPlayerData; PlayerData* playerData = &gPlayerData;
@ -230,7 +230,7 @@ ApiStatus AddKeyItem(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus CloseChoicePopup(Evt* script, s32 isInitialCall) { API_CALLABLE(CloseChoicePopup) {
enable_player_input(); enable_player_input();
enable_player_static_collisions(); enable_player_static_collisions();
partner_enable_input(); partner_enable_input();
@ -238,7 +238,7 @@ ApiStatus CloseChoicePopup(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus HasKeyItem(Evt* script, s32 isInitialCall) { API_CALLABLE(HasKeyItem) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 itemID = evt_get_variable(script, *args++); s32 itemID = evt_get_variable(script, *args++);
s32 value = *args++; s32 value = *args++;
@ -254,7 +254,7 @@ ApiStatus HasKeyItem(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus FindKeyItem(Evt* script, s32 isInitialCall) { API_CALLABLE(FindKeyItem) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 itemID = evt_get_variable(script, *args++); s32 itemID = evt_get_variable(script, *args++);
s32 value = *args++; s32 value = *args++;
@ -277,7 +277,7 @@ ApiStatus FindKeyItem(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus AddItem(Evt* script, s32 isInitialCall) { API_CALLABLE(AddItem) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 itemID = evt_get_variable(script, *args++); s32 itemID = evt_get_variable(script, *args++);
Bytecode outItemIdx = *args++; Bytecode outItemIdx = *args++;
@ -286,12 +286,12 @@ ApiStatus AddItem(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus ClearVariable(Evt* script, s32 isInitialCall) { API_CALLABLE(ClearVariable) {
evt_set_variable(script, *script->ptrReadPos, 0); evt_set_variable(script, *script->ptrReadPos, 0);
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus FindItem(Evt* script, s32 isInitialCall) { API_CALLABLE(FindItem) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 itemID = evt_get_variable(script, *args++); s32 itemID = evt_get_variable(script, *args++);
s32 value = *args++; s32 value = *args++;
@ -314,7 +314,7 @@ ApiStatus FindItem(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus RemoveItem(Evt* script, s32 isInitialCall) { API_CALLABLE(RemoveItem) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 itemID = evt_get_variable(script, *args++); s32 itemID = evt_get_variable(script, *args++);
s32 value = *args++; s32 value = *args++;
@ -344,21 +344,21 @@ ApiStatus RemoveItem(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus CountFortessKeys(Evt* script, s32 isInitialCall) { API_CALLABLE(CountFortessKeys) {
s32 outVar = *script->ptrReadPos; s32 outVar = *script->ptrReadPos;
evt_set_variable(script, outVar, get_fortress_key_count()); evt_set_variable(script, outVar, get_fortress_key_count());
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus RemoveFortressKeys(Evt* script, s32 isInitialCall) { API_CALLABLE(RemoveFortressKeys) {
s32 num = evt_get_variable(script, *script->ptrReadPos); s32 num = evt_get_variable(script, *script->ptrReadPos);
subtract_fortress_keys(num); subtract_fortress_keys(num);
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus MakeItemEntity(Evt* script, s32 isInitialCall) { API_CALLABLE(MakeItemEntity) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 itemID = evt_get_variable(script, *args++); s32 itemID = evt_get_variable(script, *args++);
s32 x = evt_get_variable(script, *args++); s32 x = evt_get_variable(script, *args++);
@ -371,7 +371,7 @@ ApiStatus MakeItemEntity(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus DropItemEntity(Evt* script, s32 isInitialCall) { API_CALLABLE(DropItemEntity) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 itemID = evt_get_variable(script, *args++); s32 itemID = evt_get_variable(script, *args++);
s32 x = evt_get_variable(script, *args++); s32 x = evt_get_variable(script, *args++);
@ -384,7 +384,7 @@ ApiStatus DropItemEntity(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus DropResizableItemEntity(Evt* script, s32 isInitialCall) { API_CALLABLE(DropResizableItemEntity) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 itemID = evt_get_variable(script, *args++); s32 itemID = evt_get_variable(script, *args++);
s32 x = evt_get_variable(script, *args++); s32 x = evt_get_variable(script, *args++);
@ -398,7 +398,7 @@ ApiStatus DropResizableItemEntity(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus RemoveItemEntity(Evt* script, s32 isInitialCall) { API_CALLABLE(RemoveItemEntity) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 itemEntityIndex = evt_get_variable(script, *args++); s32 itemEntityIndex = evt_get_variable(script, *args++);
@ -406,7 +406,7 @@ ApiStatus RemoveItemEntity(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus AddBadge(Evt* script, s32 isInitialCall) { API_CALLABLE(AddBadge) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 badgeID = evt_get_variable(script, *args++); s32 badgeID = evt_get_variable(script, *args++);
Bytecode outBadgeIdx = *args++; Bytecode outBadgeIdx = *args++;
@ -415,7 +415,7 @@ ApiStatus AddBadge(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus RemoveBadge(Evt* script, s32 isInitialCall) { API_CALLABLE(RemoveBadge) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
PlayerData* playerData = &gPlayerData; PlayerData* playerData = &gPlayerData;
s32 badge = evt_get_variable(script, *args++); s32 badge = evt_get_variable(script, *args++);
@ -435,7 +435,7 @@ ApiStatus RemoveBadge(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus SetItemPos(Evt* script, s32 isInitialCall) { API_CALLABLE(SetItemPos) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
ItemEntity* ptrItemEntity; ItemEntity* ptrItemEntity;
s32 itemEntityIndex; s32 itemEntityIndex;
@ -453,7 +453,7 @@ ApiStatus SetItemPos(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus SetItemFlags(Evt* script, s32 isInitialCall) { API_CALLABLE(SetItemFlags) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 itemEntityIndex = evt_get_variable(script, *args++); s32 itemEntityIndex = evt_get_variable(script, *args++);
s32 flagBits = *args++; s32 flagBits = *args++;
@ -468,7 +468,7 @@ ApiStatus SetItemFlags(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus SetItemAlpha(Evt* script, s32 isInitialCall) { API_CALLABLE(SetItemAlpha) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 itemEntityIndex = evt_get_variable(script, *args++); s32 itemEntityIndex = evt_get_variable(script, *args++);
s32 alpha = evt_get_variable(script, *args++); s32 alpha = evt_get_variable(script, *args++);
@ -478,22 +478,22 @@ ApiStatus SetItemAlpha(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus AddCoin(Evt* script, s32 isInitialCall) { API_CALLABLE(AddCoin) {
script->varTable[0] = add_coins(evt_get_variable(script, *script->ptrReadPos)); script->varTable[0] = add_coins(evt_get_variable(script, *script->ptrReadPos));
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus AddStarPoints(Evt* script, s32 isInitialCall) { API_CALLABLE(AddStarPoints) {
script->varTable[0] = add_star_points(evt_get_variable(script, *script->ptrReadPos)); script->varTable[0] = add_star_points(evt_get_variable(script, *script->ptrReadPos));
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus AddStarPieces(Evt* script, s32 isInitialCall) { API_CALLABLE(AddStarPieces) {
script->varTable[0] = add_star_pieces(evt_get_variable(script, *script->ptrReadPos)); script->varTable[0] = add_star_pieces(evt_get_variable(script, *script->ptrReadPos));
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus GetItemPower(Evt* script, s32 isInitialCall) { API_CALLABLE(GetItemPower) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 itemIdx = evt_get_variable(script, *args++); s32 itemIdx = evt_get_variable(script, *args++);
Bytecode out1 = *args++; Bytecode out1 = *args++;
@ -504,7 +504,7 @@ ApiStatus GetItemPower(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus ShowGotItem(Evt* script, s32 isInitialCall) { API_CALLABLE(ShowGotItem) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 itemID, category, pickupMsgFlags; s32 itemID, category, pickupMsgFlags;

View File

@ -7,7 +7,7 @@ extern LavaReset* gLavaResetList;
extern s32 LastSafeFloor; extern s32 LastSafeFloor;
extern ModelTreeInfoList* gCurrentModelTreeNodeInfo; extern ModelTreeInfoList* gCurrentModelTreeNodeInfo;
ApiStatus TranslateModel(Evt* script, s32 isInitialCall) { API_CALLABLE(TranslateModel) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 modelIndex = evt_get_variable(script, *args++); s32 modelIndex = evt_get_variable(script, *args++);
f32 x; f32 x;
@ -34,7 +34,7 @@ ApiStatus TranslateModel(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus RotateModel(Evt* script, s32 isInitialCall) { API_CALLABLE(RotateModel) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 var1 = evt_get_variable(script, *args++); s32 var1 = evt_get_variable(script, *args++);
s32 modelListIndex = get_model_list_index_from_tree_index(var1); s32 modelListIndex = get_model_list_index_from_tree_index(var1);
@ -57,7 +57,7 @@ ApiStatus RotateModel(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus ScaleModel(Evt* script, s32 isInitialCall) { API_CALLABLE(ScaleModel) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 modelIndex = evt_get_variable(script, *args++); s32 modelIndex = evt_get_variable(script, *args++);
f32 x; f32 x;
@ -84,7 +84,7 @@ ApiStatus ScaleModel(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus GetModelIndex(Evt* script, s32 isInitialCall) { API_CALLABLE(GetModelIndex) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
Bytecode modelID = evt_get_variable(script, *args++); Bytecode modelID = evt_get_variable(script, *args++);
Bytecode index = *args++; Bytecode index = *args++;
@ -93,7 +93,7 @@ ApiStatus GetModelIndex(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus InvalidateModelTransform(Evt* script, s32 isInitialCall) { API_CALLABLE(InvalidateModelTransform) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
Bytecode modelID = evt_get_variable(script, *args++); Bytecode modelID = evt_get_variable(script, *args++);
Model* model = get_model_from_list_index(get_model_list_index_from_tree_index(modelID)); Model* model = get_model_from_list_index(get_model_list_index_from_tree_index(modelID));
@ -102,7 +102,7 @@ ApiStatus InvalidateModelTransform(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus CloneModel(Evt* script, s32 isInitialCall) { API_CALLABLE(CloneModel) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
Bytecode srcModelID = evt_get_variable(script, *args++); Bytecode srcModelID = evt_get_variable(script, *args++);
Bytecode newModelID = evt_get_variable(script, *args++); Bytecode newModelID = evt_get_variable(script, *args++);
@ -111,7 +111,7 @@ ApiStatus CloneModel(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus GetModelCenter(Evt* script, s32 isInitialCall) { API_CALLABLE(GetModelCenter) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
f32 centerX; f32 centerX;
f32 centerY; f32 centerY;
@ -128,7 +128,7 @@ ApiStatus GetModelCenter(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus SetTexPanner(Evt* script, s32 isInitialCall) { API_CALLABLE(SetTexPanner) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 treeIndex = evt_get_variable(script, *args++); s32 treeIndex = evt_get_variable(script, *args++);
s32 var2 = evt_get_variable(script, *args++); s32 var2 = evt_get_variable(script, *args++);
@ -139,7 +139,7 @@ ApiStatus SetTexPanner(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus SetCustomGfxEnabled(Evt* script, s32 isInitialCall) { API_CALLABLE(SetCustomGfxEnabled) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
Bytecode treeIndex = evt_get_variable(script, *args++); Bytecode treeIndex = evt_get_variable(script, *args++);
Bytecode enable = evt_get_variable(script, *args++); Bytecode enable = evt_get_variable(script, *args++);
@ -153,7 +153,7 @@ ApiStatus SetCustomGfxEnabled(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus SetModelCustomGfx(Evt* script, s32 isInitialCall) { API_CALLABLE(SetModelCustomGfx) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 treeIndex = evt_get_variable(script, *args++); s32 treeIndex = evt_get_variable(script, *args++);
s32 customGfxUnit = evt_get_variable(script, *args++); s32 customGfxUnit = evt_get_variable(script, *args++);
@ -170,7 +170,7 @@ ApiStatus SetModelCustomGfx(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus SetModelTexVariant(Evt* script, s32 isInitialCall) { API_CALLABLE(SetModelTexVariant) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
Bytecode modelID = evt_get_variable(script, *args++); Bytecode modelID = evt_get_variable(script, *args++);
Bytecode variation = evt_get_variable(script, *args++); Bytecode variation = evt_get_variable(script, *args++);
@ -181,7 +181,7 @@ ApiStatus SetModelTexVariant(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus EnableTexPanning(Evt* script, s32 isInitialCall) { API_CALLABLE(EnableTexPanning) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 modelID = evt_get_variable(script, *args++); s32 modelID = evt_get_variable(script, *args++);
s32 flag = evt_get_variable(script, *args++); s32 flag = evt_get_variable(script, *args++);
@ -196,7 +196,7 @@ ApiStatus EnableTexPanning(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus EnableModel(Evt* script, s32 isInitialCall) { API_CALLABLE(EnableModel) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 modelIndex = get_model_list_index_from_tree_index(evt_get_variable(script, *args++)); s32 modelIndex = get_model_list_index_from_tree_index(evt_get_variable(script, *args++));
Bytecode enabled = evt_get_variable(script, *args++); Bytecode enabled = evt_get_variable(script, *args++);
@ -210,7 +210,7 @@ ApiStatus EnableModel(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus SetGroupVisibility(Evt* script, s32 isInitialCall) { API_CALLABLE(SetGroupVisibility) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
Bytecode groupModelID = evt_get_variable(script, *args++); Bytecode groupModelID = evt_get_variable(script, *args++);
Bytecode enabled = evt_get_variable(script, *args++); Bytecode enabled = evt_get_variable(script, *args++);
@ -219,7 +219,7 @@ ApiStatus SetGroupVisibility(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus SetTexPanOffset(Evt* script, s32 isInitialCall) { API_CALLABLE(SetTexPanOffset) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
Bytecode texPanner = evt_get_variable(script, *args++); Bytecode texPanner = evt_get_variable(script, *args++);
Bytecode tileSelect = evt_get_variable(script, *args++); Bytecode tileSelect = evt_get_variable(script, *args++);
@ -237,7 +237,7 @@ ApiStatus SetTexPanOffset(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus SetCustomGfx(Evt* script, s32 isInitialCall) { API_CALLABLE(SetCustomGfx) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 idx = evt_get_variable(script, *args++); s32 idx = evt_get_variable(script, *args++);
Gfx* pre = (Gfx*) evt_get_variable(script, *args++); Gfx* pre = (Gfx*) evt_get_variable(script, *args++);
@ -247,7 +247,7 @@ ApiStatus SetCustomGfx(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus SetCustomGfxBuilders(Evt* script, s32 isInitialCall) { API_CALLABLE(SetCustomGfxBuilders) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 index = evt_get_variable(script, *args++); s32 index = evt_get_variable(script, *args++);
ModelCustomGfxBuilderFunc pre = (ModelCustomGfxBuilderFunc) evt_get_variable(script, *args++); ModelCustomGfxBuilderFunc pre = (ModelCustomGfxBuilderFunc) evt_get_variable(script, *args++);
@ -257,7 +257,7 @@ ApiStatus SetCustomGfxBuilders(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus SetModelFlags(Evt* script, s32 isInitialCall) { API_CALLABLE(SetModelFlags) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 modelIndex; s32 modelIndex;
s32 a1; s32 a1;
@ -339,12 +339,12 @@ void apply_transform_to_children(ApiStatus (*apiFunc)(Evt*, s32), Evt* script) {
*argsPtr = originalArg; *argsPtr = originalArg;
} }
ApiStatus MakeTransformGroup(Evt* script, s32 isInitialCall) { API_CALLABLE(MakeTransformGroup) {
mdl_make_transform_group((u16)evt_get_variable(script, *script->ptrReadPos)); mdl_make_transform_group((u16)evt_get_variable(script, *script->ptrReadPos));
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus SetTransformGroupEnabled(Evt* script, s32 isInitialCall) { API_CALLABLE(SetTransformGroupEnabled) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
u16 var1 = evt_get_variable(script, *args++); u16 var1 = evt_get_variable(script, *args++);
s32 var2 = evt_get_variable(script, *args++); s32 var2 = evt_get_variable(script, *args++);
@ -357,7 +357,7 @@ ApiStatus SetTransformGroupEnabled(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus TranslateGroup(Evt* script, s32 isInitialCall) { API_CALLABLE(TranslateGroup) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 modelID = evt_get_variable(script, *args); s32 modelID = evt_get_variable(script, *args);
s32 index = get_transform_group_index(modelID); s32 index = get_transform_group_index(modelID);
@ -391,7 +391,7 @@ ApiStatus TranslateGroup(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus RotateGroup(Evt* script, s32 isInitialCall) { API_CALLABLE(RotateGroup) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 modelID = evt_get_variable(script, *args); s32 modelID = evt_get_variable(script, *args);
s32 index = get_transform_group_index(modelID); s32 index = get_transform_group_index(modelID);
@ -425,7 +425,7 @@ ApiStatus RotateGroup(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus ScaleGroup(Evt* script, s32 isInitialCall) { API_CALLABLE(ScaleGroup) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 modelID = evt_get_variable(script, *args); s32 modelID = evt_get_variable(script, *args);
s32 transformIndex = get_transform_group_index(modelID); s32 transformIndex = get_transform_group_index(modelID);
@ -459,7 +459,7 @@ ApiStatus ScaleGroup(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus GetTransformGroup(Evt* script, s32 isInitialCall) { API_CALLABLE(GetTransformGroup) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 modelID = evt_get_variable(script, *args++); s32 modelID = evt_get_variable(script, *args++);
Bytecode var2 = *args++; Bytecode var2 = *args++;
@ -468,7 +468,7 @@ ApiStatus GetTransformGroup(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus EnableGroup(Evt* script, s32 isInitialCall) { API_CALLABLE(EnableGroup) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 modelID = evt_get_variable(script, *args); s32 modelID = evt_get_variable(script, *args);
s32 index = get_transform_group_index(modelID); s32 index = get_transform_group_index(modelID);
@ -497,7 +497,7 @@ ApiStatus EnableGroup(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus MakeLocalVertexCopy(Evt* script, s32 isInitialCall) { API_CALLABLE(MakeLocalVertexCopy) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 copyIndex = evt_get_variable(script, *args++); s32 copyIndex = evt_get_variable(script, *args++);
u16 modelID = evt_get_variable(script, *args++); u16 modelID = evt_get_variable(script, *args++);
@ -536,7 +536,7 @@ void modify_collider_family_flags(s32 index, s32 flags, s32 mode) {
} }
} }
ApiStatus ModifyColliderFlags(Evt* script, s32 isInitialCall) { API_CALLABLE(ModifyColliderFlags) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 mode = evt_get_variable(script, *args++); s32 mode = evt_get_variable(script, *args++);
s32 index = evt_get_variable(script, *args++); s32 index = evt_get_variable(script, *args++);
@ -567,7 +567,7 @@ ApiStatus ModifyColliderFlags(Evt* script, s32 isInitialCall) {
} }
//TODO rename to MonitorLastSafeFloor //TODO rename to MonitorLastSafeFloor
ApiStatus ResetFromLava(Evt* script, s32 isInitialCall) { API_CALLABLE(ResetFromLava) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
CollisionStatus* collisionStatus = &gCollisionStatus; CollisionStatus* collisionStatus = &gCollisionStatus;
Collider* collider; Collider* collider;
@ -631,7 +631,7 @@ s32 get_lava_reset_pos(f32* outX, f32* outY, f32* outZ) {
return 0; return 0;
} }
ApiStatus GetColliderCenter(Evt* script, s32 isInitialCall) { API_CALLABLE(GetColliderCenter) {
f32 x, y, z; f32 x, y, z;
get_collider_center(evt_get_variable(script, *script->ptrReadPos), &x, &y, &z); get_collider_center(evt_get_variable(script, *script->ptrReadPos), &x, &y, &z);
@ -643,7 +643,7 @@ ApiStatus GetColliderCenter(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus ParentColliderToModel(Evt* script, s32 isInitialCall) { API_CALLABLE(ParentColliderToModel) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s16 colliderID = evt_get_variable(script, *args++); s16 colliderID = evt_get_variable(script, *args++);
s32 treeIndex = evt_get_variable(script, *args++); s32 treeIndex = evt_get_variable(script, *args++);
@ -653,7 +653,7 @@ ApiStatus ParentColliderToModel(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus UpdateColliderTransform(Evt* script, s32 isInitialCall) { API_CALLABLE(UpdateColliderTransform) {
update_collider_transform(evt_get_variable(script, *script->ptrReadPos)); update_collider_transform(evt_get_variable(script, *script->ptrReadPos));
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
@ -678,7 +678,7 @@ void set_zone_enabled(s32 zoneID, s32 enabled) {
} }
} }
ApiStatus SetZoneEnabled(Evt* script, s32 isInitialCall) { API_CALLABLE(SetZoneEnabled) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 zoneID = evt_get_variable(script, *args++); s32 zoneID = evt_get_variable(script, *args++);
s32 enabled = evt_get_variable(script, *args++); s32 enabled = evt_get_variable(script, *args++);
@ -725,37 +725,37 @@ void goto_map(Evt* script, s32 mode) {
set_game_mode(GAME_MODE_CHANGE_MAP); set_game_mode(GAME_MODE_CHANGE_MAP);
} }
ApiStatus GotoMap(Evt* script, s32 isInitialCall) { API_CALLABLE(GotoMap) {
goto_map(script, 0); goto_map(script, 0);
return ApiStatus_DONE1; return ApiStatus_DONE1;
} }
ApiStatus GotoMapSpecial(Evt* script, s32 isInitialCall) { API_CALLABLE(GotoMapSpecial) {
goto_map(script, 1); goto_map(script, 1);
return ApiStatus_DONE1; return ApiStatus_DONE1;
} }
ApiStatus GotoMapByID(Evt* script, s32 isInitialCall) { API_CALLABLE(GotoMapByID) {
goto_map(script, 2); goto_map(script, 2);
return ApiStatus_DONE1; return ApiStatus_DONE1;
} }
ApiStatus GetEntryID(Evt* script, s32 isInitialCall) { API_CALLABLE(GetEntryID) {
evt_set_variable(script, *script->ptrReadPos, gGameStatusPtr->entryID); evt_set_variable(script, *script->ptrReadPos, gGameStatusPtr->entryID);
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus GetMapID(Evt* script, s32 isInitialCall) { API_CALLABLE(GetMapID) {
evt_set_variable(script, *script->ptrReadPos, gGameStatusPtr->mapID); evt_set_variable(script, *script->ptrReadPos, gGameStatusPtr->mapID);
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus GetLoadType(Evt* script, s32 isInitialCall) { API_CALLABLE(GetLoadType) {
evt_set_variable(script, *script->ptrReadPos, gGameStatusPtr->loadType != 0); evt_set_variable(script, *script->ptrReadPos, gGameStatusPtr->loadType != 0);
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus SetRenderMode(Evt* script, s32 isInitialCall) { API_CALLABLE(SetRenderMode) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 treeIndex = evt_get_variable(script, *args++); s32 treeIndex = evt_get_variable(script, *args++);
s8 renderMode = evt_get_variable(script, *args++); s8 renderMode = evt_get_variable(script, *args++);
@ -765,7 +765,7 @@ ApiStatus SetRenderMode(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus PlaySoundAtModel(Evt* script, s32 isInitialCall) { API_CALLABLE(PlaySoundAtModel) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 modelID = evt_get_variable(script, *args++); s32 modelID = evt_get_variable(script, *args++);
s32 soundID = evt_get_variable(script, *args++); s32 soundID = evt_get_variable(script, *args++);
@ -779,7 +779,7 @@ ApiStatus PlaySoundAtModel(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus PlaySoundAtCollider(Evt* script, s32 isInitialCall) { API_CALLABLE(PlaySoundAtCollider) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 colliderID = evt_get_variable(script, *args++); s32 colliderID = evt_get_variable(script, *args++);
s32 soundID = evt_get_variable(script, *args++); s32 soundID = evt_get_variable(script, *args++);

View File

@ -49,7 +49,7 @@ void render_animated_models(void) {
// split here? // split here?
ApiStatus InitAnimatedModels(Evt* script, s32 isInitialCall) { API_CALLABLE(InitAnimatedModels) {
if (!gGameStatusPtr->isBattle) { if (!gGameStatusPtr->isBattle) {
gCurrentMeshAnimationListPtr = &gWorldMeshAnimationList; gCurrentMeshAnimationListPtr = &gWorldMeshAnimationList;
} else { } else {
@ -59,7 +59,7 @@ ApiStatus InitAnimatedModels(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus LoadAnimatedModel(Evt* script, s32 isInitialCall) { API_CALLABLE(LoadAnimatedModel) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 index = evt_get_variable(script, *args++); s32 index = evt_get_variable(script, *args++);
StaticAnimatorNode** var1 = (StaticAnimatorNode**) evt_get_variable(script, *args++); StaticAnimatorNode** var1 = (StaticAnimatorNode**) evt_get_variable(script, *args++);
@ -83,7 +83,7 @@ ApiStatus LoadAnimatedModel(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus LoadAnimatedMesh(Evt* script, s32 isInitialCall) { API_CALLABLE(LoadAnimatedMesh) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 index = evt_get_variable(script, *args++); s32 index = evt_get_variable(script, *args++);
StaticAnimatorNode** tree = (StaticAnimatorNode**) evt_get_variable(script, *args++); StaticAnimatorNode** tree = (StaticAnimatorNode**) evt_get_variable(script, *args++);
@ -107,7 +107,7 @@ ApiStatus LoadAnimatedMesh(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus PlayModelAnimation(Evt* script, s32 isInitialCall) { API_CALLABLE(PlayModelAnimation) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 index = evt_get_variable(script, *args++); s32 index = evt_get_variable(script, *args++);
s16* var2 = (s16*) evt_get_variable(script, *args++); s16* var2 = (s16*) evt_get_variable(script, *args++);
@ -119,7 +119,7 @@ ApiStatus PlayModelAnimation(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus PlayModelAnimationStartingFrom(Evt* script, s32 isInitialCall) { API_CALLABLE(PlayModelAnimationStartingFrom) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 index = evt_get_variable(script, *args++); s32 index = evt_get_variable(script, *args++);
s16* var2 = (s16*) evt_get_variable(script, *args++); s16* var2 = (s16*) evt_get_variable(script, *args++);
@ -132,7 +132,7 @@ ApiStatus PlayModelAnimationStartingFrom(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus ChangeModelAnimation(Evt* script, s32 isInitialCall) { API_CALLABLE(ChangeModelAnimation) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 index = evt_get_variable(script, *args++); s32 index = evt_get_variable(script, *args++);
s16* var2 = (s16*) evt_get_variable(script, *args++); s16* var2 = (s16*) evt_get_variable(script, *args++);
@ -147,7 +147,7 @@ ApiStatus ChangeModelAnimation(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus SetAnimatedModelRootPosition(Evt* script, s32 isInitialCall) { API_CALLABLE(SetAnimatedModelRootPosition) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 index = evt_get_variable(script, *args++); s32 index = evt_get_variable(script, *args++);
f32 x = evt_get_float_variable(script, *args++); f32 x = evt_get_float_variable(script, *args++);
@ -162,7 +162,7 @@ ApiStatus SetAnimatedModelRootPosition(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus GetAnimatedModelRootPosition(Evt* script, s32 isInitialCall) { API_CALLABLE(GetAnimatedModelRootPosition) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 index = evt_get_variable(script, *args++); s32 index = evt_get_variable(script, *args++);
s32 outX = *args++; s32 outX = *args++;
@ -177,7 +177,7 @@ ApiStatus GetAnimatedModelRootPosition(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus AddAnimatedModelRootPosition(Evt* script, s32 isInitialCall) { API_CALLABLE(AddAnimatedModelRootPosition) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 index = evt_get_variable(script, *args++); s32 index = evt_get_variable(script, *args++);
f32 x = evt_get_float_variable(script, *args++); f32 x = evt_get_float_variable(script, *args++);
@ -192,7 +192,7 @@ ApiStatus AddAnimatedModelRootPosition(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus SetAnimatedModelRootRotation(Evt* script, s32 isInitialCall) { API_CALLABLE(SetAnimatedModelRootRotation) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 index = evt_get_variable(script, *args++); s32 index = evt_get_variable(script, *args++);
f32 x = evt_get_float_variable(script, *args++); f32 x = evt_get_float_variable(script, *args++);
@ -207,7 +207,7 @@ ApiStatus SetAnimatedModelRootRotation(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus SetAnimatedModelRootScale(Evt* script, s32 isInitialCall) { API_CALLABLE(SetAnimatedModelRootScale) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 index = evt_get_variable(script, *args++); s32 index = evt_get_variable(script, *args++);
f32 x = evt_get_float_variable(script, *args++); f32 x = evt_get_float_variable(script, *args++);
@ -222,7 +222,7 @@ ApiStatus SetAnimatedModelRootScale(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus SetAnimatedModelRenderMode(Evt* script, s32 isInitialCall) { API_CALLABLE(SetAnimatedModelRenderMode) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 index = evt_get_variable(script, *args++); s32 index = evt_get_variable(script, *args++);
s32 renderMode = evt_get_float_variable(script, *args++); s32 renderMode = evt_get_float_variable(script, *args++);
@ -231,7 +231,7 @@ ApiStatus SetAnimatedModelRenderMode(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus DeleteAnimatedModel(Evt* script, s32 isInitialCall) { API_CALLABLE(DeleteAnimatedModel) {
AnimatedModel* model = (*gCurrentMeshAnimationListPtr)[evt_get_variable(script, *script->ptrReadPos)]; AnimatedModel* model = (*gCurrentMeshAnimationListPtr)[evt_get_variable(script, *script->ptrReadPos)];
delete_model_animator(get_animator_by_index(model->animModelID)); delete_model_animator(get_animator_by_index(model->animModelID));
@ -239,7 +239,7 @@ ApiStatus DeleteAnimatedModel(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus SetAnimatorFlags(Evt* script, s32 isInitialCall) { API_CALLABLE(SetAnimatorFlags) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 index = evt_get_variable(script, *args++); s32 index = evt_get_variable(script, *args++);
s32 a1 = *args++; s32 a1 = *args++;
@ -283,7 +283,7 @@ void init_model_animators(void) {
} }
} }
ApiStatus GetAnimatedNodePosition(Evt* script, s32 isInitialCall) { API_CALLABLE(GetAnimatedNodePosition) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 listIndex = evt_get_variable(script, *args++); s32 listIndex = evt_get_variable(script, *args++);
s32 treeIndex = evt_get_variable(script, *args++); s32 treeIndex = evt_get_variable(script, *args++);
@ -302,7 +302,7 @@ ApiStatus GetAnimatedNodePosition(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus GetAnimatedNodeRotation(Evt* script, s32 isInitialCall) { API_CALLABLE(GetAnimatedNodeRotation) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 listIndex = evt_get_variable(script, *args++); s32 listIndex = evt_get_variable(script, *args++);
s32 treeIndex = evt_get_variable(script, *args++); s32 treeIndex = evt_get_variable(script, *args++);
@ -319,7 +319,7 @@ ApiStatus GetAnimatedNodeRotation(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus GetAnimatedPositionByTreeIndex(Evt* script, s32 isInitialCall) { API_CALLABLE(GetAnimatedPositionByTreeIndex) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 listIndex = evt_get_variable(script, *args++); s32 listIndex = evt_get_variable(script, *args++);
s32 treeIndex = evt_get_variable(script, *args++); s32 treeIndex = evt_get_variable(script, *args++);
@ -338,7 +338,7 @@ ApiStatus GetAnimatedPositionByTreeIndex(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus GetAnimatedRotationByTreeIndex(Evt* script, s32 isInitialCall) { API_CALLABLE(GetAnimatedRotationByTreeIndex) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 listIndex = evt_get_variable(script, *args++); s32 listIndex = evt_get_variable(script, *args++);
s32 treeIndex = evt_get_variable(script, *args++); s32 treeIndex = evt_get_variable(script, *args++);
@ -355,7 +355,7 @@ ApiStatus GetAnimatedRotationByTreeIndex(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus SetAnimatedNodeFlags(Evt* script, s32 isInitialCall) { API_CALLABLE(SetAnimatedNodeFlags) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 listIndex = evt_get_variable(script, *args++); s32 listIndex = evt_get_variable(script, *args++);
s32 id = evt_get_variable(script, *args++); s32 id = evt_get_variable(script, *args++);

View File

@ -8,7 +8,7 @@ extern MessagePrintState* gCurrentPrintContext;
extern s32 D_802DB264; extern s32 D_802DB264;
extern MessagePrintState* D_802DB268; extern MessagePrintState* D_802DB268;
ApiStatus _show_message(Evt* script, s32 isInitialCall, s32 arg2); ApiStatus _show_message(Evt* script, s32 isInitialCall, s32 mode);
enum { enum {
SHOW_MESSAGE_SPEAK_TO_PLAYER = 0, SHOW_MESSAGE_SPEAK_TO_PLAYER = 0,
@ -17,19 +17,19 @@ enum {
SHOW_MESSAGE_SPEAK_TO_NPC = 3, SHOW_MESSAGE_SPEAK_TO_NPC = 3,
}; };
ApiStatus SpeakToPlayer(Evt* script, s32 isInitialCall) { API_CALLABLE(SpeakToPlayer) {
return _show_message(script, isInitialCall, SHOW_MESSAGE_SPEAK_TO_PLAYER); return _show_message(script, isInitialCall, SHOW_MESSAGE_SPEAK_TO_PLAYER);
} }
ApiStatus EndSpeech(Evt* script, s32 isInitialCall) { API_CALLABLE(EndSpeech) {
return _show_message(script, isInitialCall, SHOW_MESSAGE_END_SPEECH); return _show_message(script, isInitialCall, SHOW_MESSAGE_END_SPEECH);
} }
ApiStatus ContinueSpeech(Evt* script, s32 isInitialCall) { API_CALLABLE(ContinueSpeech) {
return _show_message(script, isInitialCall, SHOW_MESSAGE_CONTINUE_SPEECH); return _show_message(script, isInitialCall, SHOW_MESSAGE_CONTINUE_SPEECH);
} }
ApiStatus SpeakToNpc(Evt* script, s32 isInitialCall) { API_CALLABLE(SpeakToNpc) {
return _show_message(script, isInitialCall, SHOW_MESSAGE_SPEAK_TO_NPC); return _show_message(script, isInitialCall, SHOW_MESSAGE_SPEAK_TO_NPC);
} }
@ -186,7 +186,7 @@ s32 _show_message(Evt* script, s32 isInitialCall, s32 mode) {
return TRUE; return TRUE;
} }
ApiStatus ShowMessageAtScreenPos(Evt* script, s32 isInitialCall) { API_CALLABLE(ShowMessageAtScreenPos) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
if (isInitialCall) { if (isInitialCall) {
@ -212,7 +212,7 @@ ApiStatus ShowMessageAtScreenPos(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE1; return ApiStatus_DONE1;
} }
ApiStatus ShowMessageAtWorldPos(Evt* script, s32 isInitialCall) { API_CALLABLE(ShowMessageAtWorldPos) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
MessagePrintState** currentPrintContext; MessagePrintState** currentPrintContext;
s32* currentCameraID = &gCurrentCameraID; s32* currentCameraID = &gCurrentCameraID;
@ -246,7 +246,7 @@ ApiStatus ShowMessageAtWorldPos(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE1; return ApiStatus_DONE1;
} }
ApiStatus CloseMessage(Evt* script, s32 isInitialCall) { API_CALLABLE(CloseMessage) {
if (isInitialCall) { if (isInitialCall) {
close_message(gCurrentPrintContext); close_message(gCurrentPrintContext);
} }
@ -261,7 +261,7 @@ ApiStatus CloseMessage(Evt* script, s32 isInitialCall) {
} }
} }
ApiStatus SwitchMessage(Evt* script, s32 isInitialCall) { API_CALLABLE(SwitchMessage) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
if (isInitialCall) { if (isInitialCall) {
@ -278,7 +278,7 @@ ApiStatus SwitchMessage(Evt* script, s32 isInitialCall) {
} }
} }
ApiStatus ShowChoice(Evt* script, s32 isInitialCall) { API_CALLABLE(ShowChoice) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
MessagePrintState** temp802DB268; MessagePrintState** temp802DB268;
@ -299,12 +299,12 @@ ApiStatus ShowChoice(Evt* script, s32 isInitialCall) {
return script->functionTemp[1] == 1; return script->functionTemp[1] == 1;
} }
ApiStatus CloseChoice(Evt* script, s32 isInitialCall) { API_CALLABLE(CloseChoice) {
close_message(D_802DB268); close_message(D_802DB268);
return ApiStatus_DONE1; return ApiStatus_DONE1;
} }
ApiStatus CancelMessage(Evt* script, s32 isInitialCall) { API_CALLABLE(CancelMessage) {
cancel_message(gCurrentPrintContext); cancel_message(gCurrentPrintContext);
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
@ -314,14 +314,14 @@ s32 cancel_current_message(void) {
return 0; return 0;
} }
ApiStatus SetMessageImages(Evt* script, s32 isInitialCall) { API_CALLABLE(SetMessageImages) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
set_message_images((MessageImageData*) *args++); set_message_images((MessageImageData*) *args++);
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus func_802D0C94(Evt* script, s32 initialCall) { API_CALLABLE(func_802D0C94) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
if (evt_get_variable(script, *args++) == 0) { if (evt_get_variable(script, *args++) == 0) {
@ -332,7 +332,7 @@ ApiStatus func_802D0C94(Evt* script, s32 initialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus SetMessageText(Evt* script, s32 isInitialCall) { API_CALLABLE(SetMessageText) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 msg = evt_get_variable(script, *args++); s32 msg = evt_get_variable(script, *args++);
s32 index = evt_get_variable(script, *args++); s32 index = evt_get_variable(script, *args++);
@ -341,7 +341,7 @@ ApiStatus SetMessageText(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus SetMessageValue(Evt* script, s32 initialCall) { API_CALLABLE(SetMessageValue) {
Bytecode* ptrReadPos = script->ptrReadPos; Bytecode* ptrReadPos = script->ptrReadPos;
s32 value = evt_get_variable(script, *ptrReadPos++); s32 value = evt_get_variable(script, *ptrReadPos++);
s32 index = evt_get_variable(script, *ptrReadPos); s32 index = evt_get_variable(script, *ptrReadPos);

View File

@ -5,18 +5,18 @@
#define SpeakToPlayer(ARGS...) \ #define SpeakToPlayer(ARGS...) \
_EVT_CMD(EVT_OP_CALL, evt_SpeakToPlayer, ##ARGS), _EVT_CMD(EVT_OP_CALL, evt_SpeakToPlayer, ##ARGS),
ApiStatus evt_SpeakToPlayer(Evt* script, s32 isInitialCall); API_CALLABLE(evt_SpeakToPlayer);
#define EndSpeech(ARGS...) \ #define EndSpeech(ARGS...) \
_EVT_CMD(EVT_OP_CALL, evt_EndSpeech, ##ARGS), _EVT_CMD(EVT_OP_CALL, evt_EndSpeech, ##ARGS),
ApiStatus evt_EndSpeech(Evt* script, s32 isInitialCall); API_CALLABLE(evt_EndSpeech);
#define ContinueSpeech(ARGS...) \ #define ContinueSpeech(ARGS...) \
_EVT_CMD(EVT_OP_CALL, evt_ContinueSpeech, ##ARGS), _EVT_CMD(EVT_OP_CALL, evt_ContinueSpeech, ##ARGS),
ApiStatus evt_ContinueSpeech(Evt* script, s32 isInitialCall); API_CALLABLE(evt_ContinueSpeech);
#define SpeakToNpc(ARGS...) \ #define SpeakToNpc(ARGS...) \
_EVT_CMD(EVT_OP_CALL, evt_SpeakToNpc, ##ARGS), _EVT_CMD(EVT_OP_CALL, evt_SpeakToNpc, ##ARGS),
ApiStatus evt_SpeakToNpc(Evt* script, s32 isInitialCall); API_CALLABLE(evt_SpeakToNpc);
#endif #endif

View File

@ -27,7 +27,7 @@ void set_npc_animation(Npc* npc, u32 animID) {
} }
} }
ApiStatus CreateNpc(Evt* script, s32 isInitialCall) { API_CALLABLE(CreateNpc) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 npcID = evt_get_variable(script, *args++); s32 npcID = evt_get_variable(script, *args++);
s32 initialAnim = evt_get_variable(script, *args++); s32 initialAnim = evt_get_variable(script, *args++);
@ -45,7 +45,7 @@ ApiStatus CreateNpc(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus DeleteNpc(Evt* script, s32 isInitialCall) { API_CALLABLE(DeleteNpc) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
Npc* npc = get_npc_unsafe(evt_get_variable(script, *args++)); Npc* npc = get_npc_unsafe(evt_get_variable(script, *args++));
@ -57,7 +57,7 @@ ApiStatus DeleteNpc(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus GetNpcPointer(Evt* script, s32 isInitialCall) { API_CALLABLE(GetNpcPointer) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 npcID = evt_get_variable(script, *args++); s32 npcID = evt_get_variable(script, *args++);
Bytecode varNPC = *args++; Bytecode varNPC = *args++;
@ -66,7 +66,7 @@ ApiStatus GetNpcPointer(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus SetNpcPos(Evt* script, s32 isInitialCall) { API_CALLABLE(SetNpcPos) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 npcID = evt_get_variable(script, *args++); s32 npcID = evt_get_variable(script, *args++);
f32 x = evt_get_variable(script, *args++); f32 x = evt_get_variable(script, *args++);
@ -89,7 +89,7 @@ ApiStatus SetNpcPos(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus SetNpcRotation(Evt* script, s32 isInitialCall) { API_CALLABLE(SetNpcRotation) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 npcID = evt_get_variable(script, *args++); s32 npcID = evt_get_variable(script, *args++);
f32 rotX = evt_get_float_variable(script, *args++); f32 rotX = evt_get_float_variable(script, *args++);
@ -107,7 +107,7 @@ ApiStatus SetNpcRotation(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus SetNpcRotationPivot(Evt* script, s32 isInitialCall) { API_CALLABLE(SetNpcRotationPivot) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 npcId = evt_get_variable(script, *args++); s32 npcId = evt_get_variable(script, *args++);
f32 value = evt_get_float_variable(script, *args++); f32 value = evt_get_float_variable(script, *args++);
@ -122,7 +122,7 @@ ApiStatus SetNpcRotationPivot(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus SetNpcScale(Evt* script, s32 isInitialCall) { API_CALLABLE(SetNpcScale) {
Bytecode* ptrReadPos = script->ptrReadPos; Bytecode* ptrReadPos = script->ptrReadPos;
s32 npcID = evt_get_variable(script, *ptrReadPos++); s32 npcID = evt_get_variable(script, *ptrReadPos++);
f32 scaleX = evt_get_float_variable(script, *ptrReadPos++); f32 scaleX = evt_get_float_variable(script, *ptrReadPos++);
@ -140,7 +140,7 @@ ApiStatus SetNpcScale(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus SetNpcCollisionSize(Evt* script, s32 isInitialCall) { API_CALLABLE(SetNpcCollisionSize) {
Bytecode* ptrReadPos = script->ptrReadPos; Bytecode* ptrReadPos = script->ptrReadPos;
s32 npcID = evt_get_variable(script, *ptrReadPos++); s32 npcID = evt_get_variable(script, *ptrReadPos++);
s32 height = evt_get_variable(script, *ptrReadPos++); s32 height = evt_get_variable(script, *ptrReadPos++);
@ -156,7 +156,7 @@ ApiStatus SetNpcCollisionSize(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus SetNpcSpeed(Evt* script, s32 isInitialCall) { API_CALLABLE(SetNpcSpeed) {
Bytecode* ptrReadPos = script->ptrReadPos; Bytecode* ptrReadPos = script->ptrReadPos;
s32 npcID = evt_get_variable(script, *ptrReadPos++); s32 npcID = evt_get_variable(script, *ptrReadPos++);
f32 speed = evt_get_float_variable(script, *ptrReadPos); f32 speed = evt_get_float_variable(script, *ptrReadPos);
@ -170,7 +170,7 @@ ApiStatus SetNpcSpeed(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus SetNpcJumpscale(Evt* script, s32 isInitialCall) { API_CALLABLE(SetNpcJumpscale) {
Bytecode* ptrReadPos = script->ptrReadPos; Bytecode* ptrReadPos = script->ptrReadPos;
s32 npcID = evt_get_variable(script, *ptrReadPos++); s32 npcID = evt_get_variable(script, *ptrReadPos++);
f32 jumpScale = evt_get_float_variable(script, *ptrReadPos); f32 jumpScale = evt_get_float_variable(script, *ptrReadPos);
@ -184,7 +184,7 @@ ApiStatus SetNpcJumpscale(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus SetNpcAnimation(Evt* script, s32 isInitialCall) { API_CALLABLE(SetNpcAnimation) {
Bytecode* ptrReadPos = script->ptrReadPos; Bytecode* ptrReadPos = script->ptrReadPos;
s32 npcID = evt_get_variable(script, *ptrReadPos++); s32 npcID = evt_get_variable(script, *ptrReadPos++);
s32 animation = evt_get_variable(script, *ptrReadPos); s32 animation = evt_get_variable(script, *ptrReadPos);
@ -198,7 +198,7 @@ ApiStatus SetNpcAnimation(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus GetNpcAnimation(Evt* script, s32 isInitialCall) { API_CALLABLE(GetNpcAnimation) {
Bytecode* ptrReadPos = script->ptrReadPos; Bytecode* ptrReadPos = script->ptrReadPos;
s32 npcID = evt_get_variable(script, *ptrReadPos++); s32 npcID = evt_get_variable(script, *ptrReadPos++);
Bytecode outVar = *ptrReadPos++; Bytecode outVar = *ptrReadPos++;
@ -212,7 +212,7 @@ ApiStatus GetNpcAnimation(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus SetNpcAnimationSpeed(Evt* script, s32 isInitialCall) { API_CALLABLE(SetNpcAnimationSpeed) {
Bytecode* ptrReadPos = script->ptrReadPos; Bytecode* ptrReadPos = script->ptrReadPos;
s32 npcID = evt_get_variable(script, *ptrReadPos++); s32 npcID = evt_get_variable(script, *ptrReadPos++);
f32 animationSpeed = evt_get_float_variable(script, *ptrReadPos++); f32 animationSpeed = evt_get_float_variable(script, *ptrReadPos++);
@ -226,7 +226,7 @@ ApiStatus SetNpcAnimationSpeed(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus NpcMoveTo(Evt* script, s32 isInitialCall) { API_CALLABLE(NpcMoveTo) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
Npc* npc; Npc* npc;
f32 dist; f32 dist;
@ -357,15 +357,15 @@ ApiStatus _npc_jump_to(Evt* script, s32 isInitialCall, s32 snapYaw) {
return ApiStatus_BLOCK; return ApiStatus_BLOCK;
} }
ApiStatus NpcJump0(Evt* script, s32 isInitialCall) { API_CALLABLE(NpcJump0) {
return _npc_jump_to(script, isInitialCall, 0); return _npc_jump_to(script, isInitialCall, 0);
} }
ApiStatus NpcJump1(Evt* script, s32 isInitialCall) { API_CALLABLE(NpcJump1) {
return _npc_jump_to(script, isInitialCall, 1); return _npc_jump_to(script, isInitialCall, 1);
} }
ApiStatus NpcFlyTo(Evt* script, s32 isInitialCall) { API_CALLABLE(NpcFlyTo) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
f32* outX = (f32*)&script->varTable[3]; f32* outX = (f32*)&script->varTable[3];
f32* outY = (f32*)&script->varTable[4]; f32* outY = (f32*)&script->varTable[4];
@ -437,7 +437,7 @@ ApiStatus NpcFlyTo(Evt* script, s32 isInitialCall) {
return ApiStatus_BLOCK; return ApiStatus_BLOCK;
} }
ApiStatus GetNpcYaw(Evt* script, s32 isInitialCall) { API_CALLABLE(GetNpcYaw) {
Bytecode* ptrReadPos = script->ptrReadPos; Bytecode* ptrReadPos = script->ptrReadPos;
s32 npcID = evt_get_variable(script, *ptrReadPos++); s32 npcID = evt_get_variable(script, *ptrReadPos++);
Bytecode outVar = *ptrReadPos++; Bytecode outVar = *ptrReadPos++;
@ -451,7 +451,7 @@ ApiStatus GetNpcYaw(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus SetNpcYaw(Evt* script, s32 isInitialCall) { API_CALLABLE(SetNpcYaw) {
Bytecode* ptrReadPos = script->ptrReadPos; Bytecode* ptrReadPos = script->ptrReadPos;
s32 npcID = evt_get_variable(script, *ptrReadPos++); s32 npcID = evt_get_variable(script, *ptrReadPos++);
Npc* npc = resolve_npc(script, npcID); Npc* npc = resolve_npc(script, npcID);
@ -464,7 +464,7 @@ ApiStatus SetNpcYaw(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus InterpNpcYaw(Evt* script, s32 isInitialCall) { API_CALLABLE(InterpNpcYaw) {
PlayerStatus* playerStatus = &gPlayerStatus; PlayerStatus* playerStatus = &gPlayerStatus;
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
f32* initialYaw = &script->functionTempF[1]; f32* initialYaw = &script->functionTempF[1];
@ -512,7 +512,7 @@ ApiStatus InterpNpcYaw(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus NpcFacePlayer(Evt* script, s32 isInitialCall) { API_CALLABLE(NpcFacePlayer) {
PlayerStatus* playerStatus = &gPlayerStatus; PlayerStatus* playerStatus = &gPlayerStatus;
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
f32* initialYaw = &script->functionTempF[1]; f32* initialYaw = &script->functionTempF[1];
@ -554,7 +554,7 @@ ApiStatus NpcFacePlayer(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus NpcFaceNpc(Evt* script, s32 isInitialCall) { API_CALLABLE(NpcFaceNpc) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
f32* initialYaw = &script->functionTempF[1]; f32* initialYaw = &script->functionTempF[1];
f32* deltaYaw = &script->functionTempF[2]; f32* deltaYaw = &script->functionTempF[2];
@ -602,7 +602,7 @@ ApiStatus NpcFaceNpc(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus SetNpcFlagBits(Evt* script, s32 isInitialCall) { API_CALLABLE(SetNpcFlagBits) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 npcID = evt_get_variable(script, *args++); s32 npcID = evt_get_variable(script, *args++);
s32 bits = *args++; s32 bits = *args++;
@ -622,7 +622,7 @@ ApiStatus SetNpcFlagBits(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus GetNpcPos(Evt* script, s32 isInitialCall) { API_CALLABLE(GetNpcPos) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 npcID = evt_get_variable(script, *args++); s32 npcID = evt_get_variable(script, *args++);
s32 outX = *args++; s32 outX = *args++;
@ -640,7 +640,7 @@ ApiStatus GetNpcPos(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus SetNpcCollisionChannel(Evt* script, s32 isInitialCall) { API_CALLABLE(SetNpcCollisionChannel) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 npcID = evt_get_variable(script, *args++); s32 npcID = evt_get_variable(script, *args++);
Bytecode channel = *args; Bytecode channel = *args;
@ -654,7 +654,7 @@ ApiStatus SetNpcCollisionChannel(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus SetNpcSprite(Evt* script, s32 isInitialCall) { API_CALLABLE(SetNpcSprite) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 npcID = evt_get_variable(script, *args++); s32 npcID = evt_get_variable(script, *args++);
Bytecode animID = *args; Bytecode animID = *args;
@ -668,7 +668,7 @@ ApiStatus SetNpcSprite(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus EnableNpcShadow(Evt* script, s32 isInitialCall) { API_CALLABLE(EnableNpcShadow) {
Bytecode* ptrReadPos = script->ptrReadPos; Bytecode* ptrReadPos = script->ptrReadPos;
s32 npcID = evt_get_variable(script, *ptrReadPos++); s32 npcID = evt_get_variable(script, *ptrReadPos++);
s32 enableShadow = evt_get_variable(script, *ptrReadPos++); s32 enableShadow = evt_get_variable(script, *ptrReadPos++);
@ -686,7 +686,7 @@ ApiStatus EnableNpcShadow(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus EnableNpcBlur(Evt* script, s32 isInitialCall) { API_CALLABLE(EnableNpcBlur) {
Bytecode* ptrReadPos = script->ptrReadPos; Bytecode* ptrReadPos = script->ptrReadPos;
s32 npcID = evt_get_variable(script, *ptrReadPos++); s32 npcID = evt_get_variable(script, *ptrReadPos++);
s32 enableBlur = evt_get_variable(script, *ptrReadPos++); s32 enableBlur = evt_get_variable(script, *ptrReadPos++);
@ -704,7 +704,7 @@ ApiStatus EnableNpcBlur(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus ClearPartnerMoveHistory(Evt* script, s32 isInitialCall) { API_CALLABLE(ClearPartnerMoveHistory) {
Bytecode* ptrReadPos = script->ptrReadPos; Bytecode* ptrReadPos = script->ptrReadPos;
s32 npcID = evt_get_variable(script, *ptrReadPos++); s32 npcID = evt_get_variable(script, *ptrReadPos++);
Npc* npc = resolve_npc(script, npcID); Npc* npc = resolve_npc(script, npcID);
@ -717,7 +717,7 @@ ApiStatus ClearPartnerMoveHistory(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus NpcSetHomePosToCurrent(Evt* script, s32 isInitialCall) { API_CALLABLE(NpcSetHomePosToCurrent) {
Npc* npc = resolve_npc(script, evt_get_variable(script, *script->ptrReadPos)); Npc* npc = resolve_npc(script, evt_get_variable(script, *script->ptrReadPos));
if (npc == NULL) { if (npc == NULL) {
@ -730,7 +730,7 @@ ApiStatus NpcSetHomePosToCurrent(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus GetPartnerPos(Evt* script, s32 isInitialCall) { API_CALLABLE(GetPartnerPos) {
Bytecode* ptrReadPos = script->ptrReadPos; Bytecode* ptrReadPos = script->ptrReadPos;
Bytecode posX = *ptrReadPos++; Bytecode posX = *ptrReadPos++;
Bytecode posY = *ptrReadPos++; Bytecode posY = *ptrReadPos++;
@ -747,7 +747,7 @@ ApiStatus GetPartnerPos(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus DisablePartnerAI(Evt* script, s32 isInitialCall) { API_CALLABLE(DisablePartnerAI) {
Bytecode* ptrReadPos = script->ptrReadPos; Bytecode* ptrReadPos = script->ptrReadPos;
if (evt_get_variable(script, *ptrReadPos++) == 0) { if (evt_get_variable(script, *ptrReadPos++) == 0) {
@ -758,17 +758,17 @@ ApiStatus DisablePartnerAI(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus EnablePartnerAI(Evt* script, s32 isInitialCall) { API_CALLABLE(EnablePartnerAI) {
enable_partner_ai(); enable_partner_ai();
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus func_802CF54C(Evt* script, s32 isInitialCall) { API_CALLABLE(func_802CF54C) {
func_800EF43C(); func_800EF43C();
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus func_802CF56C(Evt* script, s32 isInitialCall) { API_CALLABLE(func_802CF56C) {
Bytecode* ptrReadPos = script->ptrReadPos; Bytecode* ptrReadPos = script->ptrReadPos;
s32 value = evt_get_variable(script, *ptrReadPos++); s32 value = evt_get_variable(script, *ptrReadPos++);
@ -780,7 +780,7 @@ ApiStatus func_802CF56C(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus BringPartnerOut(Evt* script, s32 isInitialCall) { API_CALLABLE(BringPartnerOut) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
NpcBlueprint bp; NpcBlueprint bp;
NpcBlueprint* bpPointer = &bp; NpcBlueprint* bpPointer = &bp;
@ -874,7 +874,7 @@ ApiStatus BringPartnerOut(Evt* script, s32 isInitialCall) {
return ApiStatus_BLOCK; return ApiStatus_BLOCK;
} }
ApiStatus PutPartnerAway(Evt* script, s32 isInitialCall) { API_CALLABLE(PutPartnerAway) {
Npc* partner = get_npc_unsafe(NPC_PARTNER); Npc* partner = get_npc_unsafe(NPC_PARTNER);
PlayerStatus* playerStatus = &gPlayerStatus; PlayerStatus* playerStatus = &gPlayerStatus;
f32 scale; f32 scale;
@ -946,26 +946,26 @@ ApiStatus PutPartnerAway(Evt* script, s32 isInitialCall) {
return ApiStatus_BLOCK; return ApiStatus_BLOCK;
} }
ApiStatus GetCurrentPartnerID(Evt* script, s32 isInitialCall) { API_CALLABLE(GetCurrentPartnerID) {
evt_set_variable(script, *script->ptrReadPos, gPlayerData.curPartner); evt_set_variable(script, *script->ptrReadPos, gPlayerData.curPartner);
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus PartnerCanUseAbility(Evt* script, s32 isInitialCall) { API_CALLABLE(PartnerCanUseAbility) {
Bytecode outVar = *script->ptrReadPos; Bytecode outVar = *script->ptrReadPos;
evt_set_variable(script, outVar, partner_can_use_ability()); evt_set_variable(script, outVar, partner_can_use_ability());
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus PartnerIsFlying(Evt* script, s32 isInitialCall) { API_CALLABLE(PartnerIsFlying) {
Bytecode outVar = *script->ptrReadPos; Bytecode outVar = *script->ptrReadPos;
evt_set_variable(script, outVar, partner_is_flying()); evt_set_variable(script, outVar, partner_is_flying());
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus SetNpcImgFXParams(Evt* script, s32 isInitialCall) { API_CALLABLE(SetNpcImgFXParams) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 npcId = evt_get_variable(script, *args++); s32 npcId = evt_get_variable(script, *args++);
Bytecode imgfxType = evt_get_variable(script, *args++); Bytecode imgfxType = evt_get_variable(script, *args++);
@ -983,7 +983,7 @@ ApiStatus SetNpcImgFXParams(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus SetNpcImgFXFlags(Evt* script, s32 isInitialCall) { API_CALLABLE(SetNpcImgFXFlags) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 npcId = evt_get_variable(script, *args++); s32 npcId = evt_get_variable(script, *args++);
Bytecode flags = *args; Bytecode flags = *args;
@ -997,7 +997,7 @@ ApiStatus SetNpcImgFXFlags(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus SetNpcPaletteSwapMode(Evt* script, s32 isInitialCall) { API_CALLABLE(SetNpcPaletteSwapMode) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 npcId = evt_get_variable(script, *args++); s32 npcId = evt_get_variable(script, *args++);
Bytecode palAdjustMode = evt_get_variable(script, *args++); Bytecode palAdjustMode = evt_get_variable(script, *args++);
@ -1011,7 +1011,7 @@ ApiStatus SetNpcPaletteSwapMode(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus SetNpcPaletteSwapLower(Evt* script, s32 isInitialCall) { API_CALLABLE(SetNpcPaletteSwapLower) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 npcId = evt_get_variable(script, *args++); s32 npcId = evt_get_variable(script, *args++);
Bytecode var1 = evt_get_variable(script, *args++); Bytecode var1 = evt_get_variable(script, *args++);
@ -1028,7 +1028,7 @@ ApiStatus SetNpcPaletteSwapLower(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus SetNpcPaletteSwapping(Evt* script, s32 isInitialCall) { API_CALLABLE(SetNpcPaletteSwapping) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 npcId = evt_get_variable(script, *args++); s32 npcId = evt_get_variable(script, *args++);
Bytecode var1 = evt_get_variable(script, *args++); Bytecode var1 = evt_get_variable(script, *args++);
@ -1050,7 +1050,7 @@ ApiStatus SetNpcPaletteSwapping(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus SetNpcDecoration(Evt* script, s32 isInitialCall) { API_CALLABLE(SetNpcDecoration) {
Bytecode* ptrReadPos = script->ptrReadPos; Bytecode* ptrReadPos = script->ptrReadPos;
s32 npcID = evt_get_variable(script, *ptrReadPos++); s32 npcID = evt_get_variable(script, *ptrReadPos++);
s32 value1 = evt_get_variable(script, *ptrReadPos++); s32 value1 = evt_get_variable(script, *ptrReadPos++);
@ -1065,7 +1065,7 @@ ApiStatus SetNpcDecoration(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus PlaySoundAtNpc(Evt* script, s32 isInitialCall) { API_CALLABLE(PlaySoundAtNpc) {
Bytecode* ptrReadPos = script->ptrReadPos; Bytecode* ptrReadPos = script->ptrReadPos;
s32 npcID = evt_get_variable(script, *ptrReadPos++); s32 npcID = evt_get_variable(script, *ptrReadPos++);
s32 soundID = evt_get_variable(script, *ptrReadPos++); s32 soundID = evt_get_variable(script, *ptrReadPos++);
@ -1080,7 +1080,7 @@ ApiStatus PlaySoundAtNpc(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus SetNpcRenderMode(Evt* script, s32 isInitialCall) { API_CALLABLE(SetNpcRenderMode) {
Bytecode* ptrReadPos = script->ptrReadPos; Bytecode* ptrReadPos = script->ptrReadPos;
s32 npcID = evt_get_variable(script, *ptrReadPos++); s32 npcID = evt_get_variable(script, *ptrReadPos++);
u8 renderMode = evt_get_variable(script, *ptrReadPos++); u8 renderMode = evt_get_variable(script, *ptrReadPos++);

View File

@ -13,7 +13,7 @@ extern s32 D_802DB5B4[3]; // unused
Npc* playerNpc = &playerNpcData; Npc* playerNpc = &playerNpcData;
ApiStatus HidePlayerShadow(Evt* script, s32 isInitialCall) { API_CALLABLE(HidePlayerShadow) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 hideShadow = evt_get_variable(script, *args++); s32 hideShadow = evt_get_variable(script, *args++);
@ -25,7 +25,7 @@ ApiStatus HidePlayerShadow(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus DisablePlayerPhysics(Evt* script, s32 isInitialCall) { API_CALLABLE(DisablePlayerPhysics) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 disable = evt_get_variable(script, *args++); s32 disable = evt_get_variable(script, *args++);
@ -37,7 +37,7 @@ ApiStatus DisablePlayerPhysics(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus DisablePlayerInput(Evt* script, s32 isInitialCall) { API_CALLABLE(DisablePlayerInput) {
PlayerStatus* playerStatus = &gPlayerStatus; PlayerStatus* playerStatus = &gPlayerStatus;
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 enable = evt_get_variable(script, *args++); s32 enable = evt_get_variable(script, *args++);
@ -61,7 +61,7 @@ ApiStatus DisablePlayerInput(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus SetPlayerPos(Evt* script, s32 isInitialCall) { API_CALLABLE(SetPlayerPos) {
PlayerStatus* playerStatus = &gPlayerStatus; PlayerStatus* playerStatus = &gPlayerStatus;
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
f32 x = evt_get_variable(script, *args++); f32 x = evt_get_variable(script, *args++);
@ -79,7 +79,7 @@ ApiStatus SetPlayerPos(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus SetPlayerCollisionSize(Evt* script, s32 isInitialCall) { API_CALLABLE(SetPlayerCollisionSize) {
PlayerStatus* playerStatus = &gPlayerStatus; PlayerStatus* playerStatus = &gPlayerStatus;
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 height = evt_get_variable(script, *args++); s32 height = evt_get_variable(script, *args++);
@ -94,21 +94,21 @@ ApiStatus SetPlayerCollisionSize(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus SetPlayerSpeed(Evt* script, s32 isInitialCall) { API_CALLABLE(SetPlayerSpeed) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
playerNpc->moveSpeed = evt_get_float_variable(script, *args++); playerNpc->moveSpeed = evt_get_float_variable(script, *args++);
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus SetPlayerJumpscale(Evt* script, s32 isInitialCall) { API_CALLABLE(SetPlayerJumpscale) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
playerNpc->jumpScale = evt_get_float_variable(script, *args++); playerNpc->jumpScale = evt_get_float_variable(script, *args++);
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus SetPlayerAnimation(Evt* script, s32 isInitialCall) { API_CALLABLE(SetPlayerAnimation) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
AnimID anim = evt_get_variable(script, *args++); AnimID anim = evt_get_variable(script, *args++);
@ -121,21 +121,21 @@ ApiStatus SetPlayerAnimation(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus SetPlayerActionState(Evt* script, s32 isInitialCall) { API_CALLABLE(SetPlayerActionState) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
set_action_state(evt_get_variable(script, *args++)); set_action_state(evt_get_variable(script, *args++));
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus SetPlayerAnimationSpeed(Evt* script, s32 isInitialCall) { API_CALLABLE(SetPlayerAnimationSpeed) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
playerNpc->animationSpeed = evt_get_float_variable(script, *args++); playerNpc->animationSpeed = evt_get_float_variable(script, *args++);
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus PlayerMoveTo(Evt* script, s32 isInitialCall) { API_CALLABLE(PlayerMoveTo) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
PlayerStatus* playerStatus = &gPlayerStatus; PlayerStatus* playerStatus = &gPlayerStatus;
@ -162,7 +162,7 @@ ApiStatus PlayerMoveTo(Evt* script, s32 isInitialCall) {
return script->functionTemp[0] < 0; return script->functionTemp[0] < 0;
} }
ApiStatus func_802D1270(Evt* script, s32 isInitialCall) { API_CALLABLE(func_802D1270) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
PlayerStatus* playerStatus = &gPlayerStatus; PlayerStatus* playerStatus = &gPlayerStatus;
@ -186,7 +186,7 @@ ApiStatus func_802D1270(Evt* script, s32 isInitialCall) {
return (script->functionTemp[0] < 0) * ApiStatus_DONE2; return (script->functionTemp[0] < 0) * ApiStatus_DONE2;
} }
ApiStatus func_802D1380(Evt* script, s32 isInitialCall) { API_CALLABLE(func_802D1380) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
PlayerStatus* playerStatus = &gPlayerStatus; PlayerStatus* playerStatus = &gPlayerStatus;
@ -337,19 +337,19 @@ ApiStatus player_jump(Evt* script, s32 isInitialCall, s32 mode) {
return ApiStatus_BLOCK; return ApiStatus_BLOCK;
} }
ApiStatus PlayerJump(Evt* script, s32 isInitialCall) { API_CALLABLE(PlayerJump) {
return player_jump(script, isInitialCall, 0); return player_jump(script, isInitialCall, 0);
} }
ApiStatus PlayerJump1(Evt* script, s32 isInitialCall) { API_CALLABLE(PlayerJump1) {
return player_jump(script, isInitialCall, 1); return player_jump(script, isInitialCall, 1);
} }
ApiStatus PlayerJump2(Evt* script, s32 isInitialCall) { API_CALLABLE(PlayerJump2) {
return player_jump(script, isInitialCall, 2); return player_jump(script, isInitialCall, 2);
} }
ApiStatus InterpPlayerYaw(Evt* script, s32 isInitialCall) { API_CALLABLE(InterpPlayerYaw) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
PlayerStatus* playerStatus = &gPlayerStatus; PlayerStatus* playerStatus = &gPlayerStatus;
f32* initialYaw = &script->functionTempF[1]; f32* initialYaw = &script->functionTempF[1];
@ -387,7 +387,7 @@ ApiStatus InterpPlayerYaw(Evt* script, s32 isInitialCall) {
} }
} }
ApiStatus PlayerFaceNpc(Evt* script, s32 isInitialCall) { API_CALLABLE(PlayerFaceNpc) {
PlayerStatus* playerStatus = &gPlayerStatus; PlayerStatus* playerStatus = &gPlayerStatus;
s32* args = script->ptrReadPos; s32* args = script->ptrReadPos;
f32* playerTargetYaw = &script->functionTempF[1]; f32* playerTargetYaw = &script->functionTempF[1];
@ -436,12 +436,12 @@ ApiStatus PlayerFaceNpc(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus GetPlayerTargetYaw(Evt* script, s32 isInitialCall) { API_CALLABLE(GetPlayerTargetYaw) {
evt_set_variable(script, *script->ptrReadPos, gPlayerStatus.targetYaw); evt_set_variable(script, *script->ptrReadPos, gPlayerStatus.targetYaw);
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus SetPlayerFlagBits(Evt* script, s32 isInitialCall) { API_CALLABLE(SetPlayerFlagBits) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
PlayerStatus* playerStatus = &gPlayerStatus; PlayerStatus* playerStatus = &gPlayerStatus;
Bytecode bits = *args++; Bytecode bits = *args++;
@ -456,13 +456,13 @@ ApiStatus SetPlayerFlagBits(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus GetPlayerActionState(Evt* script, s32 isInitialCall) { API_CALLABLE(GetPlayerActionState) {
Bytecode outVar = *script->ptrReadPos; Bytecode outVar = *script->ptrReadPos;
evt_set_variable(script, outVar, gPlayerStatus.actionState); evt_set_variable(script, outVar, gPlayerStatus.actionState);
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus GetPlayerPos(Evt* script, s32 isInitialCall) { API_CALLABLE(GetPlayerPos) {
PlayerStatus* playerStatus = &gPlayerStatus; PlayerStatus* playerStatus = &gPlayerStatus;
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
Bytecode outVar1 = *args++; Bytecode outVar1 = *args++;
@ -475,14 +475,14 @@ ApiStatus GetPlayerPos(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus GetPlayerAnimation(Evt* script, s32 isInitialCall) { API_CALLABLE(GetPlayerAnimation) {
Bytecode outVar = *script->ptrReadPos; Bytecode outVar = *script->ptrReadPos;
evt_set_variable(script, outVar, gPlayerStatus.anim); evt_set_variable(script, outVar, gPlayerStatus.anim);
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus FullyRestoreHPandFP(Evt* script, s32 isInitialCall) { API_CALLABLE(FullyRestoreHPandFP) {
PlayerData* playerData = &gPlayerData; PlayerData* playerData = &gPlayerData;
playerData->curHP = playerData->curMaxHP; playerData->curHP = playerData->curMaxHP;
@ -490,14 +490,14 @@ ApiStatus FullyRestoreHPandFP(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus FullyRestoreSP(Evt* script, s32 isInitialCall) { API_CALLABLE(FullyRestoreSP) {
PlayerData* playerData = &gPlayerData; PlayerData* playerData = &gPlayerData;
playerData->starPower = playerData->maxStarPower * SP_PER_BAR; playerData->starPower = playerData->maxStarPower * SP_PER_BAR;
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus EnablePartner(Evt* script, s32 isInitialCall) { API_CALLABLE(EnablePartner) {
s32 partnerIdx = evt_get_variable(script, *script->ptrReadPos) - 1; s32 partnerIdx = evt_get_variable(script, *script->ptrReadPos) - 1;
PartnerData* partner = &gPlayerData.partners[partnerIdx]; PartnerData* partner = &gPlayerData.partners[partnerIdx];
@ -505,7 +505,7 @@ ApiStatus EnablePartner(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus DisablePartner(Evt* script, s32 isInitialCall) { API_CALLABLE(DisablePartner) {
s32 partnerIdx = evt_get_variable(script, *script->ptrReadPos) - 1; s32 partnerIdx = evt_get_variable(script, *script->ptrReadPos) - 1;
PartnerData* partner = &gPlayerData.partners[partnerIdx]; PartnerData* partner = &gPlayerData.partners[partnerIdx];
@ -513,7 +513,7 @@ ApiStatus DisablePartner(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus UseEntryHeading(Evt* script, s32 isInitialCall) { API_CALLABLE(UseEntryHeading) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
MapSettings* mapSettings = get_current_map_settings(); MapSettings* mapSettings = get_current_map_settings();
s32 var1 = evt_get_variable(script, *args++); s32 var1 = evt_get_variable(script, *args++);
@ -537,12 +537,12 @@ ApiStatus UseEntryHeading(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus func_802D2148(Evt* script, s32 isInitialCall) { API_CALLABLE(func_802D2148) {
gPlayerStatus.flags &= ~PS_FLAG_CAMERA_DOESNT_FOLLOW; gPlayerStatus.flags &= ~PS_FLAG_CAMERA_DOESNT_FOLLOW;
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus UseExitHeading(Evt* script, s32 isInitialCall) { API_CALLABLE(UseExitHeading) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
PlayerStatus* playerStatus = &gPlayerStatus; PlayerStatus* playerStatus = &gPlayerStatus;
MapSettings* mapSettings = get_current_map_settings(); MapSettings* mapSettings = get_current_map_settings();
@ -591,7 +591,7 @@ s32 func_802D23F8(void) {
return FALSE; return FALSE;
} }
ApiStatus WaitForPlayerTouchingFloor(Evt* script, s32 isInitialCall) { API_CALLABLE(WaitForPlayerTouchingFloor) {
if ((gCollisionStatus.curFloor >= 0) && func_802D23F8()) { if ((gCollisionStatus.curFloor >= 0) && func_802D23F8()) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} else { } else {
@ -599,7 +599,7 @@ ApiStatus WaitForPlayerTouchingFloor(Evt* script, s32 isInitialCall) {
} }
} }
ApiStatus func_802D2484(Evt* script, s32 isInitialCall) { API_CALLABLE(func_802D2484) {
if (gCollisionStatus.curFloor >= 0) { if (gCollisionStatus.curFloor >= 0) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} else { } else {
@ -607,7 +607,7 @@ ApiStatus func_802D2484(Evt* script, s32 isInitialCall) {
} }
} }
ApiStatus IsPlayerOnValidFloor(Evt* script, s32 isInitialCall) { API_CALLABLE(IsPlayerOnValidFloor) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 result = FALSE; s32 result = FALSE;
@ -619,7 +619,7 @@ ApiStatus IsPlayerOnValidFloor(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus WaitForPlayerMoveToComplete(Evt* script, s32 isInitialCall) { API_CALLABLE(WaitForPlayerMoveToComplete) {
if (gPlayerStatus.moveFrames == 0) { if (gPlayerStatus.moveFrames == 0) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} else { } else {
@ -627,7 +627,7 @@ ApiStatus WaitForPlayerMoveToComplete(Evt* script, s32 isInitialCall) {
} }
} }
ApiStatus WaitForPlayerInputEnabled(Evt* script, s32 isInitialCall) { API_CALLABLE(WaitForPlayerInputEnabled) {
if (gPlayerStatus.flags & PS_FLAG_INPUT_DISABLED) { if (gPlayerStatus.flags & PS_FLAG_INPUT_DISABLED) {
return ApiStatus_BLOCK; return ApiStatus_BLOCK;
} else { } else {
@ -635,7 +635,7 @@ ApiStatus WaitForPlayerInputEnabled(Evt* script, s32 isInitialCall) {
} }
} }
ApiStatus UpdatePlayerImgFX(Evt* script, s32 isInitialCall) { API_CALLABLE(UpdatePlayerImgFX) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
PlayerStatus* playerStatus = &gPlayerStatus; PlayerStatus* playerStatus = &gPlayerStatus;
s32 a0 = *args++; s32 a0 = *args++;
@ -703,14 +703,14 @@ ApiStatus UpdatePlayerImgFX(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus SetPlayerImgFXFlags(Evt* script, s32 isInitialCall) { API_CALLABLE(SetPlayerImgFXFlags) {
s32 imgfxFlags = *script->ptrReadPos; s32 imgfxFlags = *script->ptrReadPos;
PlayerImgFXFlags = imgfxFlags; PlayerImgFXFlags = imgfxFlags;
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus FacePlayerTowardPoint(Evt* script, s32 isInitialCall) { API_CALLABLE(FacePlayerTowardPoint) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
PlayerStatus* playerStatus = &gPlayerStatus; PlayerStatus* playerStatus = &gPlayerStatus;
f32* initialYaw = &script->functionTempF[1]; f32* initialYaw = &script->functionTempF[1];
@ -758,7 +758,7 @@ ApiStatus FacePlayerTowardPoint(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus DisablePulseStone(Evt* script, s32 isInitialCall) { API_CALLABLE(DisablePulseStone) {
PlayerStatus* playerStatus = &gPlayerStatus; PlayerStatus* playerStatus = &gPlayerStatus;
if (evt_get_variable(script, *script->ptrReadPos)) { if (evt_get_variable(script, *script->ptrReadPos)) {
@ -771,7 +771,7 @@ ApiStatus DisablePulseStone(Evt* script, s32 isInitialCall) {
} }
// returns partnerID of current partner if using their ability, otherwise PARTNER_NONE // returns partnerID of current partner if using their ability, otherwise PARTNER_NONE
ApiStatus GetPartnerInUse(Evt* script, s32 isInitialCall) { API_CALLABLE(GetPartnerInUse) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
Bytecode outVar = *args++; Bytecode outVar = *args++;
PlayerData* playerData = &gPlayerData; PlayerData* playerData = &gPlayerData;
@ -785,21 +785,21 @@ ApiStatus GetPartnerInUse(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus ForceUsePartner(Evt* script, s32 isInitialCall) { API_CALLABLE(ForceUsePartner) {
PlayerStatus* playerStatus = &gPlayerStatus; PlayerStatus* playerStatus = &gPlayerStatus;
playerStatus->animFlags |= PA_FLAG_FORCE_USE_PARTNER; playerStatus->animFlags |= PA_FLAG_FORCE_USE_PARTNER;
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus InterruptUsePartner(Evt* script, s32 isInitialCall) { API_CALLABLE(InterruptUsePartner) {
PlayerStatus* playerStatus = &gPlayerStatus; PlayerStatus* playerStatus = &gPlayerStatus;
playerStatus->animFlags |= PA_FLAG_INTERRUPT_USE_PARTNER; playerStatus->animFlags |= PA_FLAG_INTERRUPT_USE_PARTNER;
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus Disable8bitMario(Evt* script, s32 isInitialCall) { API_CALLABLE(Disable8bitMario) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
PlayerStatus* playerStatus = &gPlayerStatus; PlayerStatus* playerStatus = &gPlayerStatus;
@ -818,14 +818,14 @@ ApiStatus Disable8bitMario(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus func_802D2C14(Evt* script, s32 isInitialCall) { API_CALLABLE(func_802D2C14) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
func_800EF3D4(evt_get_variable(script, *args++)); func_800EF3D4(evt_get_variable(script, *args++));
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus SetPlayerPushVelocity(Evt* script, s32 isInitialCall) { API_CALLABLE(SetPlayerPushVelocity) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
f32 x = evt_get_variable(script, *args++); f32 x = evt_get_variable(script, *args++);
f32 y; f32 y;
@ -838,7 +838,7 @@ ApiStatus SetPlayerPushVelocity(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus PlaySoundAtPlayer(Evt* script, s32 isInitialCall) { API_CALLABLE(PlaySoundAtPlayer) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 soundID = evt_get_variable(script, *args++); s32 soundID = evt_get_variable(script, *args++);
s32 flags = evt_get_variable(script, *args++); s32 flags = evt_get_variable(script, *args++);

View File

@ -118,7 +118,7 @@ void virtual_entity_list_render_UI(void) {
} }
} }
ApiStatus InitVirtualEntityList(Evt* script, s32 isInitialCall) { API_CALLABLE(InitVirtualEntityList) {
if (!gGameStatusPtr->isBattle) { if (!gGameStatusPtr->isBattle) {
gCurrentVirtualEntityListPtr = &wWorldVirtualEntityList; gCurrentVirtualEntityListPtr = &wWorldVirtualEntityList;
} else { } else {
@ -127,7 +127,7 @@ ApiStatus InitVirtualEntityList(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus CreateVirtualEntityAt(Evt* script, s32 isInitialCall) { API_CALLABLE(CreateVirtualEntityAt) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 index = evt_get_variable(script, *args++); s32 index = evt_get_variable(script, *args++);
EntityModelScript* cmdList = (EntityModelScript*) evt_get_variable(script, *args++); EntityModelScript* cmdList = (EntityModelScript*) evt_get_variable(script, *args++);
@ -148,7 +148,7 @@ ApiStatus CreateVirtualEntityAt(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus CreateVirtualEntity(Evt* script, s32 isInitialCall) { API_CALLABLE(CreateVirtualEntity) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 outVar = *args++; s32 outVar = *args++;
EntityModelScript* cmdList = (EntityModelScript*)evt_get_variable(script, *args++); EntityModelScript* cmdList = (EntityModelScript*)evt_get_variable(script, *args++);
@ -183,7 +183,7 @@ ApiStatus CreateVirtualEntity(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus CreateVirtualEntity_ALT(Evt* script, s32 isInitialCall) { API_CALLABLE(CreateVirtualEntity_ALT) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 outVar = *args++; s32 outVar = *args++;
EntityModelScript* cmdList = (EntityModelScript*) evt_get_variable(script, *args++); EntityModelScript* cmdList = (EntityModelScript*) evt_get_variable(script, *args++);
@ -218,7 +218,7 @@ ApiStatus CreateVirtualEntity_ALT(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus DeleteVirtualEntity(Evt* script, s32 isInitialCall) { API_CALLABLE(DeleteVirtualEntity) {
VirtualEntity* virtualEntity = (*gCurrentVirtualEntityListPtr)[evt_get_variable(script, *script->ptrReadPos)]; VirtualEntity* virtualEntity = (*gCurrentVirtualEntityListPtr)[evt_get_variable(script, *script->ptrReadPos)];
free_entity_model_by_index(virtualEntity->entityModelIndex); free_entity_model_by_index(virtualEntity->entityModelIndex);
@ -226,7 +226,7 @@ ApiStatus DeleteVirtualEntity(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus SetVirtualEntityRenderCommands(Evt* script, s32 isInitialCall) { API_CALLABLE(SetVirtualEntityRenderCommands) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 index = evt_get_variable(script, *args++); s32 index = evt_get_variable(script, *args++);
EntityModelScript* cmdList = (EntityModelScript*) evt_get_variable(script, *args++); EntityModelScript* cmdList = (EntityModelScript*) evt_get_variable(script, *args++);
@ -235,7 +235,7 @@ ApiStatus SetVirtualEntityRenderCommands(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus SetVirtualEntityPosition(Evt* script, s32 isInitialCall) { API_CALLABLE(SetVirtualEntityPosition) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 index = evt_get_variable(script, *args++); s32 index = evt_get_variable(script, *args++);
f32 x = evt_get_float_variable(script, *args++); f32 x = evt_get_float_variable(script, *args++);
@ -249,7 +249,7 @@ ApiStatus SetVirtualEntityPosition(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus GetVirtualEntityPosition(Evt* script, s32 isInitialCall) { API_CALLABLE(GetVirtualEntityPosition) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 index = evt_get_variable(script, *args++); s32 index = evt_get_variable(script, *args++);
VirtualEntity* virtualEntity = (*gCurrentVirtualEntityListPtr)[index]; VirtualEntity* virtualEntity = (*gCurrentVirtualEntityListPtr)[index];
@ -263,7 +263,7 @@ ApiStatus GetVirtualEntityPosition(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus SetVirtualEntityRotation(Evt* script, s32 isInitialCall) { API_CALLABLE(SetVirtualEntityRotation) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 index = evt_get_variable(script, *args++); s32 index = evt_get_variable(script, *args++);
f32 x = evt_get_float_variable(script, *args++); f32 x = evt_get_float_variable(script, *args++);
@ -277,7 +277,7 @@ ApiStatus SetVirtualEntityRotation(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus SetVirtualEntityScale(Evt* script, s32 isInitialCall) { API_CALLABLE(SetVirtualEntityScale) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 index = evt_get_variable(script, *args++); s32 index = evt_get_variable(script, *args++);
f32 x = evt_get_float_variable(script, *args++); f32 x = evt_get_float_variable(script, *args++);
@ -291,7 +291,7 @@ ApiStatus SetVirtualEntityScale(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus SetVirtualEntityMoveSpeed(Evt* script, s32 isInitialCall) { API_CALLABLE(SetVirtualEntityMoveSpeed) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 index = evt_get_variable(script, *args++); s32 index = evt_get_variable(script, *args++);
@ -299,7 +299,7 @@ ApiStatus SetVirtualEntityMoveSpeed(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus SetVirtualEntityJumpGravity(Evt* script, s32 isInitialCall) { API_CALLABLE(SetVirtualEntityJumpGravity) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 index = evt_get_variable(script, *args++); s32 index = evt_get_variable(script, *args++);
@ -307,7 +307,7 @@ ApiStatus SetVirtualEntityJumpGravity(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus VirtualEntityMoveTo(Evt* script, s32 isInitialCall) { API_CALLABLE(VirtualEntityMoveTo) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
VirtualEntity* virtualEntity; VirtualEntity* virtualEntity;
@ -363,7 +363,7 @@ ApiStatus VirtualEntityMoveTo(Evt* script, s32 isInitialCall) {
return ApiStatus_BLOCK; return ApiStatus_BLOCK;
} }
ApiStatus VirtualEntityJumpTo(Evt* script, s32 isInitialCall) { API_CALLABLE(VirtualEntityJumpTo) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
VirtualEntity* virtualEntity; VirtualEntity* virtualEntity;
s32 index; s32 index;
@ -434,7 +434,7 @@ ApiStatus VirtualEntityJumpTo(Evt* script, s32 isInitialCall) {
return ApiStatus_BLOCK; return ApiStatus_BLOCK;
} }
ApiStatus VirtualEntityLandJump(Evt* script, s32 isInitialCall) { API_CALLABLE(VirtualEntityLandJump) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
VirtualEntity* virtualEntity; VirtualEntity* virtualEntity;
@ -461,7 +461,7 @@ ApiStatus VirtualEntityLandJump(Evt* script, s32 isInitialCall) {
return ApiStatus_BLOCK; return ApiStatus_BLOCK;
} }
ApiStatus SetVirtualEntityFlags(Evt* script, s32 isInitialCall) { API_CALLABLE(SetVirtualEntityFlags) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 index = evt_get_variable(script, *args++); s32 index = evt_get_variable(script, *args++);
s32 flags = *args++; s32 flags = *args++;
@ -471,7 +471,7 @@ ApiStatus SetVirtualEntityFlags(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus SetVirtualEntityFlagBits(Evt* script, s32 isInitialCall) { API_CALLABLE(SetVirtualEntityFlagBits) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 index = evt_get_variable(script, *args++); s32 index = evt_get_variable(script, *args++);
s32 bits = *args++; s32 bits = *args++;
@ -487,7 +487,7 @@ ApiStatus SetVirtualEntityFlagBits(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus SetVirtualEntityRenderMode(Evt* script, s32 isInitialCall) { API_CALLABLE(SetVirtualEntityRenderMode) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 index = evt_get_variable(script, *args++); s32 index = evt_get_variable(script, *args++);
s32 mode = evt_get_variable(script, *args++); s32 mode = evt_get_variable(script, *args++);

View File

@ -1477,7 +1477,7 @@ void imgfx_appendGfx_mesh_basic(ImgFXState* state, Matrix4f mtx) {
s32 alpha2; s32 alpha2;
if (!(state->flags & IMGFX_FLAG_SKIP_TEX_SETUP)) { if (!(state->flags & IMGFX_FLAG_SKIP_TEX_SETUP)) {
if ((gSpriteShadingProfile->flags & 1) if ((gSpriteShadingProfile->flags & SPR_SHADING_FLAG_ENABLED)
&& (state->arrayIdx != 0) && (state->arrayIdx != 0)
&& (state->flags & someFlags) && (state->flags & someFlags)
&& ( state->renderType == IMGFX_RENDER_DEFAULT && ( state->renderType == IMGFX_RENDER_DEFAULT
@ -1513,7 +1513,10 @@ void imgfx_appendGfx_mesh_basic(ImgFXState* state, Matrix4f mtx) {
break; break;
} }
if ((gSpriteShadingProfile->flags & 2) && ((*ImgFXInstances)[0].arrayIdx != 0) && (state->flags & someFlags)) { if ((gSpriteShadingProfile->flags & SPR_SHADING_FLAG_SET_VIEWPORT)
&& ((*ImgFXInstances)[0].arrayIdx != 0)
&& (state->flags & someFlags)
) {
cam = &gCameras[gCurrentCamID]; cam = &gCameras[gCurrentCamID];
if (gGameStatusPtr->isBattle == 2) { if (gGameStatusPtr->isBattle == 2) {
@ -1548,7 +1551,10 @@ void imgfx_appendGfx_mesh_basic(ImgFXState* state, Matrix4f mtx) {
G_TX_NOLOD, G_TX_NOLOD, // shift, G_TX_NOLOD, G_TX_NOLOD, // shift,
0x100, 0x100); // scroll 0x100, 0x100); // scroll
if ((gSpriteShadingProfile->flags & 2) && state->arrayIdx != 0 && (state->flags & someFlags)) { if ((gSpriteShadingProfile->flags & SPR_SHADING_FLAG_SET_VIEWPORT)
&& state->arrayIdx != 0
&& (state->flags & someFlags)
) {
alpha2 = 255; alpha2 = 255;
cam = &gCameras[gCurrentCamID]; cam = &gCameras[gCurrentCamID];
@ -1602,7 +1608,10 @@ void imgfx_appendGfx_mesh_basic(ImgFXState* state, Matrix4f mtx) {
} }
} }
if ((gSpriteShadingProfile->flags & 2) && (*ImgFXInstances)[0].arrayIdx != 0 && (state->flags & someFlags)) { if ((gSpriteShadingProfile->flags & SPR_SHADING_FLAG_SET_VIEWPORT)
&& (*ImgFXInstances)[0].arrayIdx != 0
&& (state->flags & someFlags)
) {
cam = &gCameras[gCurrentCamID]; cam = &gCameras[gCurrentCamID];
if (gGameStatusPtr->isBattle == 2) { if (gGameStatusPtr->isBattle == 2) {
gSPViewport(gMainGfxPos++, &D_8014EE40); gSPViewport(gMainGfxPos++, &D_8014EE40);
@ -1641,12 +1650,13 @@ void imgfx_appendGfx_mesh_grid(ImgFXState* state, Matrix4f mtx) {
s32 llIdx = firstVtxIdx + (i + 1) * (state->subdivX + 1) + j; s32 llIdx = firstVtxIdx + (i + 1) * (state->subdivX + 1) + j;
s32 lrIdx = firstVtxIdx + (i + 1) * (state->subdivX + 1) + j + 1; s32 lrIdx = firstVtxIdx + (i + 1) * (state->subdivX + 1) + j + 1;
if (!(state->flags & IMGFX_FLAG_SKIP_TEX_SETUP)) { if (!(state->flags & IMGFX_FLAG_SKIP_TEX_SETUP)) {
if ((gSpriteShadingProfile->flags & 1) && if ((gSpriteShadingProfile->flags & SPR_SHADING_FLAG_ENABLED)
(*ImgFXInstances)[0].arrayIdx != 0 && && (*ImgFXInstances)[0].arrayIdx != 0
(state->flags & (IMGFX_FLAG_100000 | IMGFX_FLAG_80000)) && && (state->flags & (IMGFX_FLAG_100000 | IMGFX_FLAG_80000))
(state->renderType == IMGFX_RENDER_DEFAULT && (state->renderType == IMGFX_RENDER_DEFAULT
|| state->renderType == IMGFX_RENDER_MULTIPLY_ALPHA || state->renderType == IMGFX_RENDER_MULTIPLY_ALPHA
|| state->renderType == IMGFX_RENDER_MULTIPLY_SHADE_ALPHA)) { || state->renderType == IMGFX_RENDER_MULTIPLY_SHADE_ALPHA)
) {
s32 alpha = 255; s32 alpha = 255;
gDPScrollMultiTile2_4b(gMainGfxPos++, gDPScrollMultiTile2_4b(gMainGfxPos++,
ImgFXCurrentTexturePtr->tex.raster, G_IM_FMT_CI, ImgFXCurrentTexturePtr->tex.raster, G_IM_FMT_CI,
@ -1710,7 +1720,7 @@ void imgfx_appendGfx_mesh_anim(ImgFXState* state, Matrix4f mtx) {
if (!(state->flags & IMGFX_FLAG_SKIP_TEX_SETUP)) { if (!(state->flags & IMGFX_FLAG_SKIP_TEX_SETUP)) {
gDPSetTextureLUT(gMainGfxPos++, G_TT_RGBA16); gDPSetTextureLUT(gMainGfxPos++, G_TT_RGBA16);
gDPLoadTLUT_pal16(gMainGfxPos++, 0, ImgFXCurrentTexturePtr->tex.palette); gDPLoadTLUT_pal16(gMainGfxPos++, 0, ImgFXCurrentTexturePtr->tex.palette);
if ((gSpriteShadingProfile->flags & 1) if ((gSpriteShadingProfile->flags & SPR_SHADING_FLAG_ENABLED)
&& (state->flags & (IMGFX_FLAG_100000 | IMGFX_FLAG_80000)) && (state->flags & (IMGFX_FLAG_100000 | IMGFX_FLAG_80000))
&& (state->renderType == IMGFX_RENDER_DEFAULT && (state->renderType == IMGFX_RENDER_DEFAULT
|| state->renderType == IMGFX_RENDER_MULTIPLY_ALPHA || state->renderType == IMGFX_RENDER_MULTIPLY_ALPHA

View File

@ -1249,7 +1249,7 @@ void hide_coin_counter_immediately(void) {
} }
} }
ApiStatus ShowCoinCounter(Evt* script, s32 isInitialCall) { API_CALLABLE(ShowCoinCounter) {
if (evt_get_variable(script, *script->ptrReadPos)) { if (evt_get_variable(script, *script->ptrReadPos)) {
show_coin_counter(); show_coin_counter();
} else { } else {

View File

@ -1207,7 +1207,7 @@ void render_item_entities(void) {
gSPDisplayList(gMainGfxPos++, D_8014C678); gSPDisplayList(gMainGfxPos++, D_8014C678);
} else { } else {
gDPLoadTLUT_pal16(gMainGfxPos++, 0, gHudElementCacheTablePalette[item->lookupPaletteIndex].data); 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, 16, gHudElementCacheTableRaster[item->lookupRasterIndex].data); gDPSetTextureImage(gMainGfxPos++, G_IM_FMT_CI, G_IM_SIZ_8b, 16, 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); 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++); gDPLoadSync(gMainGfxPos++);

View File

@ -26,10 +26,11 @@ enum {
}; };
// supported values for auxCombineSubType // supported values for auxCombineSubType
// different subtypes are only supported for textures with EXTRA_TILE_NONE
enum { enum {
AUX_COMBINE_SUB_0 = 0, AUX_COMBINE_SUB_0 = 0, // multiply TEX * SHADE for color, use TEX for alpha
AUX_COMBINE_SUB_1 = 1, AUX_COMBINE_SUB_1 = 1, // lerp from TEX to SHADE based on TEX alpha
AUX_COMBINE_SUB_2 = 2, AUX_COMBINE_SUB_2 = 2, // TEX only, shade is ignored
AUX_COMBINE_SUB_COUNT = 3, AUX_COMBINE_SUB_COUNT = 3,
}; };
@ -238,8 +239,8 @@ Gfx SolidCombineModes[][5] = {
[TINT_COMBINE_NONE] gsDPSetCombineMode(G_CC_SHADE, G_CC_SHADE), [TINT_COMBINE_NONE] gsDPSetCombineMode(G_CC_SHADE, G_CC_SHADE),
[TINT_COMBINE_FOG] gsDPSetCombineMode(G_CC_SHADE, G_CC_PASS2), [TINT_COMBINE_FOG] gsDPSetCombineMode(G_CC_SHADE, G_CC_PASS2),
[TINT_COMBINE_SHROUD] gsDPSetCombineMode(G_CC_SHADE, G_CC_PASS2), [TINT_COMBINE_SHROUD] gsDPSetCombineMode(G_CC_SHADE, G_CC_PASS2),
[TINT_COMBINE_DEPTH] gsDPSetCombineMode(PM_CC_NOTEX_TINT_FOG, G_CC_PASS2), [TINT_COMBINE_DEPTH] gsDPSetCombineMode(PM_CC_TINT_DEPTH_NOTEX, G_CC_PASS2),
[TINT_COMBINE_REMAP] gsDPSetCombineMode(PM_CC_NOTEX_TINT_REMAP, G_CC_PASS2), [TINT_COMBINE_REMAP] gsDPSetCombineMode(PM_CC_TINT_REMAP_NOTEX, G_CC_PASS2),
}, },
[TEX_COMBINE_MAIN_ONLY_0] { [TEX_COMBINE_MAIN_ONLY_0] {
@ -247,90 +248,93 @@ Gfx SolidCombineModes[][5] = {
[TINT_COMBINE_FOG] gsDPSetCombineMode(G_CC_MODULATEIDECALA, G_CC_PASS2), [TINT_COMBINE_FOG] gsDPSetCombineMode(G_CC_MODULATEIDECALA, G_CC_PASS2),
[TINT_COMBINE_SHROUD] gsDPSetCombineMode(G_CC_MODULATEIA, G_CC_PASS2), [TINT_COMBINE_SHROUD] gsDPSetCombineMode(G_CC_MODULATEIA, G_CC_PASS2),
[TINT_COMBINE_DEPTH] gsDPSetCombineMode(G_CC_MODULATEIDECALA, PM_CC_20), [TINT_COMBINE_DEPTH] gsDPSetCombineMode(G_CC_MODULATEIDECALA, PM_CC_20),
[TINT_COMBINE_REMAP] gsDPSetCombineMode(G_CC_MODULATEIA, PM_CC_17), [TINT_COMBINE_REMAP] gsDPSetCombineMode(G_CC_MODULATEIA, PM_CC_TINT_REMAP_NO_SHADE),
}, },
[TEX_COMBINE_MAIN_ONLY_1] { [TEX_COMBINE_MAIN_ONLY_1] {
[TINT_COMBINE_NONE] gsDPSetCombineMode(G_CC_BLENDRGBA, G_CC_BLENDRGBA), [TINT_COMBINE_NONE] gsDPSetCombineMode(G_CC_BLENDRGBA, G_CC_BLENDRGBA),
[TINT_COMBINE_FOG] gsDPSetCombineMode(G_CC_BLENDRGBA, G_CC_PASS2), [TINT_COMBINE_FOG] gsDPSetCombineMode(G_CC_BLENDRGBA, G_CC_PASS2),
[TINT_COMBINE_SHROUD] gsDPSetCombineMode(G_CC_BLENDRGBA, G_CC_PASS2), [TINT_COMBINE_SHROUD] gsDPSetCombineMode(G_CC_BLENDRGBA, G_CC_PASS2),
[TINT_COMBINE_DEPTH] gsDPSetCombineMode(G_CC_BLENDRGBDECALA, PM_CC_21), [TINT_COMBINE_DEPTH] gsDPSetCombineMode(G_CC_BLENDRGBDECALA, PM_CC_TINT_DEPTH_NO_SHADE),
[TINT_COMBINE_REMAP] gsDPSetCombineMode(G_CC_BLENDRGBA, PM_CC_17), [TINT_COMBINE_REMAP] gsDPSetCombineMode(G_CC_BLENDRGBA, PM_CC_TINT_REMAP_NO_SHADE),
}, },
[TEX_COMBINE_MAIN_ONLY_2] { [TEX_COMBINE_MAIN_ONLY_2] {
[TINT_COMBINE_NONE] gsDPSetCombineMode(G_CC_DECALRGBA, G_CC_DECALRGBA), [TINT_COMBINE_NONE] gsDPSetCombineMode(G_CC_DECALRGBA, G_CC_DECALRGBA),
[TINT_COMBINE_FOG] gsDPSetCombineMode(G_CC_DECALRGBA, G_CC_PASS2), [TINT_COMBINE_FOG] gsDPSetCombineMode(G_CC_DECALRGBA, G_CC_PASS2),
[TINT_COMBINE_SHROUD] gsDPSetCombineMode(G_CC_DECALRGBA, G_CC_PASS2), [TINT_COMBINE_SHROUD] gsDPSetCombineMode(G_CC_DECALRGBA, G_CC_PASS2),
[TINT_COMBINE_DEPTH] gsDPSetCombineMode(PM_CC_1A, G_CC_PASS2), [TINT_COMBINE_DEPTH] gsDPSetCombineMode(PM_CC_1A, G_CC_PASS2),
[TINT_COMBINE_REMAP] gsDPSetCombineMode(G_CC_DECALRGBA, PM_CC_17), [TINT_COMBINE_REMAP] gsDPSetCombineMode(G_CC_DECALRGBA, PM_CC_TINT_REMAP_NO_SHADE),
}, },
// blend LODs in first cycle, tint in second cycle // blend LODs in first cycle, tint in second cycle
// all three sub-types are identical
[TEX_COMBINE_MIPMAPS_0] { [TEX_COMBINE_MIPMAPS_0] {
[TINT_COMBINE_NONE] gsDPSetCombineMode(G_CC_TRILERP, G_CC_MODULATEIA2), [TINT_COMBINE_NONE] gsDPSetCombineMode(G_CC_TRILERP, G_CC_MODULATEIA2),
[TINT_COMBINE_FOG] gsDPSetCombineMode(G_CC_TRILERP, PM_CC_18), [TINT_COMBINE_FOG] gsDPSetCombineMode(G_CC_TRILERP, PM_CC2_MULTIPLY_SHADE),
[TINT_COMBINE_SHROUD] gsDPSetCombineMode(G_CC_TRILERP, G_CC_MODULATEIA2), [TINT_COMBINE_SHROUD] gsDPSetCombineMode(G_CC_TRILERP, G_CC_MODULATEIA2),
[TINT_COMBINE_DEPTH] gsDPSetCombineMode(G_CC_TRILERP, PM_CC_19), [TINT_COMBINE_DEPTH] gsDPSetCombineMode(G_CC_TRILERP, PM_CC_TINT_DEPTH_MIPMAPS),
[TINT_COMBINE_REMAP] gsDPSetCombineMode(G_CC_TRILERP, PM_CC_17), [TINT_COMBINE_REMAP] gsDPSetCombineMode(G_CC_TRILERP, PM_CC_TINT_REMAP_NO_SHADE),
}, },
[TEX_COMBINE_MIPMAPS_1] { [TEX_COMBINE_MIPMAPS_1] {
[TINT_COMBINE_NONE] gsDPSetCombineMode(G_CC_TRILERP, G_CC_MODULATEIA2), [TINT_COMBINE_NONE] gsDPSetCombineMode(G_CC_TRILERP, G_CC_MODULATEIA2),
[TINT_COMBINE_FOG] gsDPSetCombineMode(G_CC_TRILERP, PM_CC_18), [TINT_COMBINE_FOG] gsDPSetCombineMode(G_CC_TRILERP, PM_CC2_MULTIPLY_SHADE),
[TINT_COMBINE_SHROUD] gsDPSetCombineMode(G_CC_TRILERP, G_CC_MODULATEIA2), [TINT_COMBINE_SHROUD] gsDPSetCombineMode(G_CC_TRILERP, G_CC_MODULATEIA2),
[TINT_COMBINE_DEPTH] gsDPSetCombineMode(G_CC_TRILERP, PM_CC_19), [TINT_COMBINE_DEPTH] gsDPSetCombineMode(G_CC_TRILERP, PM_CC_TINT_DEPTH_MIPMAPS),
[TINT_COMBINE_REMAP] gsDPSetCombineMode(G_CC_TRILERP, PM_CC_17), [TINT_COMBINE_REMAP] gsDPSetCombineMode(G_CC_TRILERP, PM_CC_TINT_REMAP_NO_SHADE),
}, },
[TEX_COMBINE_MIPMAPS_2] { [TEX_COMBINE_MIPMAPS_2] {
[TINT_COMBINE_NONE] gsDPSetCombineMode(G_CC_TRILERP, G_CC_MODULATEIA2), [TINT_COMBINE_NONE] gsDPSetCombineMode(G_CC_TRILERP, G_CC_MODULATEIA2),
[TINT_COMBINE_FOG] gsDPSetCombineMode(G_CC_TRILERP, PM_CC_18), [TINT_COMBINE_FOG] gsDPSetCombineMode(G_CC_TRILERP, PM_CC2_MULTIPLY_SHADE),
[TINT_COMBINE_SHROUD] gsDPSetCombineMode(G_CC_TRILERP, G_CC_MODULATEIA2), [TINT_COMBINE_SHROUD] gsDPSetCombineMode(G_CC_TRILERP, G_CC_MODULATEIA2),
[TINT_COMBINE_DEPTH] gsDPSetCombineMode(G_CC_TRILERP, PM_CC_19), [TINT_COMBINE_DEPTH] gsDPSetCombineMode(G_CC_TRILERP, PM_CC_TINT_DEPTH_MIPMAPS),
[TINT_COMBINE_REMAP] gsDPSetCombineMode(G_CC_TRILERP, PM_CC_17), [TINT_COMBINE_REMAP] gsDPSetCombineMode(G_CC_TRILERP, PM_CC_TINT_REMAP_NO_SHADE),
}, },
// blend main/aux textures in first cycle, tint in second cycle // blend main/aux textures in first cycle, tint in second cycle
// all three sub-types are identical
[TEX_COMBINE_AUX_SHARED_0] { [TEX_COMBINE_AUX_SHARED_0] {
[TINT_COMBINE_NONE] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, G_CC_MODULATEIA2), [TINT_COMBINE_NONE] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, G_CC_MODULATEIA2),
[TINT_COMBINE_FOG] gsDPSetCombineMode(G_CC_INTERFERENCE, PM_CC_18), [TINT_COMBINE_FOG] gsDPSetCombineMode(G_CC_INTERFERENCE, PM_CC2_MULTIPLY_SHADE),
[TINT_COMBINE_SHROUD] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, G_CC_MODULATEIA2), [TINT_COMBINE_SHROUD] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, G_CC_MODULATEIA2),
[TINT_COMBINE_DEPTH] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, G_CC_MODULATEIA2), [TINT_COMBINE_DEPTH] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, G_CC_MODULATEIA2),
[TINT_COMBINE_REMAP] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, PM_CC_1B), [TINT_COMBINE_REMAP] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, PM_CC_TINT_REMAP_SHADE_ALPHA),
}, },
[TEX_COMBINE_AUX_SHARED_1] { [TEX_COMBINE_AUX_SHARED_1] {
[TINT_COMBINE_NONE] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, G_CC_MODULATEIA2), [TINT_COMBINE_NONE] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, G_CC_MODULATEIA2),
[TINT_COMBINE_FOG] gsDPSetCombineMode(G_CC_INTERFERENCE, PM_CC_18), [TINT_COMBINE_FOG] gsDPSetCombineMode(G_CC_INTERFERENCE, PM_CC2_MULTIPLY_SHADE),
[TINT_COMBINE_SHROUD] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, G_CC_MODULATEIA2), [TINT_COMBINE_SHROUD] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, G_CC_MODULATEIA2),
[TINT_COMBINE_DEPTH] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, G_CC_MODULATEIA2), [TINT_COMBINE_DEPTH] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, G_CC_MODULATEIA2),
[TINT_COMBINE_REMAP] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, PM_CC_1B), [TINT_COMBINE_REMAP] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, PM_CC_TINT_REMAP_SHADE_ALPHA),
}, },
[TEX_COMBINE_AUX_SHARED_2] { [TEX_COMBINE_AUX_SHARED_2] {
[TINT_COMBINE_NONE] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, G_CC_MODULATEIA2), [TINT_COMBINE_NONE] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, G_CC_MODULATEIA2),
[TINT_COMBINE_FOG] gsDPSetCombineMode(G_CC_INTERFERENCE, PM_CC_18), [TINT_COMBINE_FOG] gsDPSetCombineMode(G_CC_INTERFERENCE, PM_CC2_MULTIPLY_SHADE),
[TINT_COMBINE_SHROUD] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, G_CC_MODULATEIA2), [TINT_COMBINE_SHROUD] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, G_CC_MODULATEIA2),
[TINT_COMBINE_DEPTH] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, G_CC_MODULATEIA2), [TINT_COMBINE_DEPTH] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, G_CC_MODULATEIA2),
[TINT_COMBINE_REMAP] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, PM_CC_1B), [TINT_COMBINE_REMAP] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, PM_CC_TINT_REMAP_SHADE_ALPHA),
}, },
// blend main/aux textures in first cycle, tint in second cycle // blend main/aux textures in first cycle, tint in second cycle
// all three sub-types are identical
[TEX_COMBINE_AUX_IND_0] { [TEX_COMBINE_AUX_IND_0] {
[TINT_COMBINE_NONE] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, G_CC_MODULATEIA2), [TINT_COMBINE_NONE] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, G_CC_MODULATEIA2),
[TINT_COMBINE_FOG] gsDPSetCombineMode(G_CC_INTERFERENCE, PM_CC_18), [TINT_COMBINE_FOG] gsDPSetCombineMode(G_CC_INTERFERENCE, PM_CC2_MULTIPLY_SHADE),
[TINT_COMBINE_SHROUD] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, G_CC_MODULATEIA2), [TINT_COMBINE_SHROUD] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, G_CC_MODULATEIA2),
[TINT_COMBINE_DEPTH] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, G_CC_MODULATEIA2), [TINT_COMBINE_DEPTH] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, G_CC_MODULATEIA2),
[TINT_COMBINE_REMAP] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, PM_CC_1B), [TINT_COMBINE_REMAP] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, PM_CC_TINT_REMAP_SHADE_ALPHA),
}, },
[TEX_COMBINE_AUX_IND_1] { [TEX_COMBINE_AUX_IND_1] {
[TINT_COMBINE_NONE] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, G_CC_MODULATEIA2), [TINT_COMBINE_NONE] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, G_CC_MODULATEIA2),
[TINT_COMBINE_FOG] gsDPSetCombineMode(G_CC_INTERFERENCE, PM_CC_18), [TINT_COMBINE_FOG] gsDPSetCombineMode(G_CC_INTERFERENCE, PM_CC2_MULTIPLY_SHADE),
[TINT_COMBINE_SHROUD] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, G_CC_MODULATEIA2), [TINT_COMBINE_SHROUD] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, G_CC_MODULATEIA2),
[TINT_COMBINE_DEPTH] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, G_CC_MODULATEIA2), [TINT_COMBINE_DEPTH] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, G_CC_MODULATEIA2),
[TINT_COMBINE_REMAP] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, PM_CC_1B), [TINT_COMBINE_REMAP] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, PM_CC_TINT_REMAP_SHADE_ALPHA),
}, },
[TEX_COMBINE_AUX_IND_2] { [TEX_COMBINE_AUX_IND_2] {
[TINT_COMBINE_NONE] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, G_CC_MODULATEIA2), [TINT_COMBINE_NONE] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, G_CC_MODULATEIA2),
[TINT_COMBINE_FOG] gsDPSetCombineMode(G_CC_INTERFERENCE, PM_CC_18), [TINT_COMBINE_FOG] gsDPSetCombineMode(G_CC_INTERFERENCE, PM_CC2_MULTIPLY_SHADE),
[TINT_COMBINE_SHROUD] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, G_CC_MODULATEIA2), [TINT_COMBINE_SHROUD] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, G_CC_MODULATEIA2),
[TINT_COMBINE_DEPTH] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, G_CC_MODULATEIA2), [TINT_COMBINE_DEPTH] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, G_CC_MODULATEIA2),
[TINT_COMBINE_REMAP] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, PM_CC_1B), [TINT_COMBINE_REMAP] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, PM_CC_TINT_REMAP_SHADE_ALPHA),
}, },
// shaded color multiplied main/aux textures for alpha // shaded color multiplied main/aux textures for alpha
@ -347,7 +351,7 @@ Gfx SolidCombineModes[][5] = {
[TINT_COMBINE_FOG] gsDPSetCombineMode(PM_CC_22, G_CC_PASS2), [TINT_COMBINE_FOG] gsDPSetCombineMode(PM_CC_22, G_CC_PASS2),
[TINT_COMBINE_SHROUD] gsDPSetCombineMode(PM_CC_22, G_CC_PASS2), [TINT_COMBINE_SHROUD] gsDPSetCombineMode(PM_CC_22, G_CC_PASS2),
[TINT_COMBINE_DEPTH] gsDPSetCombineMode(PM_CC_22, G_CC_PASS2), [TINT_COMBINE_DEPTH] gsDPSetCombineMode(PM_CC_22, G_CC_PASS2),
[TINT_COMBINE_REMAP] gsDPSetCombineMode(PM_CC_22, PM_CC_17), [TINT_COMBINE_REMAP] gsDPSetCombineMode(PM_CC_22, PM_CC_TINT_REMAP_NO_SHADE),
}, },
[TEX_COMBINE_5] { [TEX_COMBINE_5] {
[TINT_COMBINE_NONE] gsDPSetCombineMode(PM_CC1_24, PM_CC2_24), [TINT_COMBINE_NONE] gsDPSetCombineMode(PM_CC1_24, PM_CC2_24),
@ -361,7 +365,7 @@ Gfx SolidCombineModes[][5] = {
[TINT_COMBINE_FOG] gsDPSetCombineMode(PM_CC_23, G_CC_PASS2), [TINT_COMBINE_FOG] gsDPSetCombineMode(PM_CC_23, G_CC_PASS2),
[TINT_COMBINE_SHROUD] gsDPSetCombineMode(PM_CC_23, G_CC_PASS2), [TINT_COMBINE_SHROUD] gsDPSetCombineMode(PM_CC_23, G_CC_PASS2),
[TINT_COMBINE_DEPTH] gsDPSetCombineMode(PM_CC_23, G_CC_PASS2), [TINT_COMBINE_DEPTH] gsDPSetCombineMode(PM_CC_23, G_CC_PASS2),
[TINT_COMBINE_REMAP] gsDPSetCombineMode(PM_CC_23, PM_CC_17), [TINT_COMBINE_REMAP] gsDPSetCombineMode(PM_CC_23, PM_CC_TINT_REMAP_NO_SHADE),
}, },
[TEX_COMBINE_7] { [TEX_COMBINE_7] {
[TINT_COMBINE_NONE] gsDPSetCombineMode(PM_CC1_29, PM_CC2_29), [TINT_COMBINE_NONE] gsDPSetCombineMode(PM_CC1_29, PM_CC2_29),
@ -398,8 +402,8 @@ Gfx AlphaTestCombineModes[][5] = {
[TINT_COMBINE_NONE] gsDPSetCombineMode(G_CC_SHADE, G_CC_SHADE), [TINT_COMBINE_NONE] gsDPSetCombineMode(G_CC_SHADE, G_CC_SHADE),
[TINT_COMBINE_FOG] gsDPSetCombineMode(G_CC_SHADE, G_CC_PASS2), [TINT_COMBINE_FOG] gsDPSetCombineMode(G_CC_SHADE, G_CC_PASS2),
[TINT_COMBINE_SHROUD] gsDPSetCombineMode(G_CC_SHADE, G_CC_PASS2), [TINT_COMBINE_SHROUD] gsDPSetCombineMode(G_CC_SHADE, G_CC_PASS2),
[TINT_COMBINE_DEPTH] gsDPSetCombineMode(PM_CC_NOTEX_TINT_FOG, G_CC_PASS2), [TINT_COMBINE_DEPTH] gsDPSetCombineMode(PM_CC_TINT_DEPTH_NOTEX, G_CC_PASS2),
[TINT_COMBINE_REMAP] gsDPSetCombineMode(PM_CC_NOTEX_TINT_REMAP, G_CC_PASS2), [TINT_COMBINE_REMAP] gsDPSetCombineMode(PM_CC_TINT_REMAP_NOTEX, G_CC_PASS2),
}, },
[TEX_COMBINE_MAIN_ONLY_0] { [TEX_COMBINE_MAIN_ONLY_0] {
@ -407,90 +411,90 @@ Gfx AlphaTestCombineModes[][5] = {
[TINT_COMBINE_FOG] gsDPSetCombineMode(G_CC_MODULATEIDECALA, G_CC_PASS2), [TINT_COMBINE_FOG] gsDPSetCombineMode(G_CC_MODULATEIDECALA, G_CC_PASS2),
[TINT_COMBINE_SHROUD] gsDPSetCombineMode(G_CC_MODULATEIDECALA, G_CC_PASS2), [TINT_COMBINE_SHROUD] gsDPSetCombineMode(G_CC_MODULATEIDECALA, G_CC_PASS2),
[TINT_COMBINE_DEPTH] gsDPSetCombineMode(G_CC_MODULATEIDECALA, PM_CC_20), [TINT_COMBINE_DEPTH] gsDPSetCombineMode(G_CC_MODULATEIDECALA, PM_CC_20),
[TINT_COMBINE_REMAP] gsDPSetCombineMode(G_CC_MODULATEIDECALA, PM_CC_17), [TINT_COMBINE_REMAP] gsDPSetCombineMode(G_CC_MODULATEIDECALA, PM_CC_TINT_REMAP_NO_SHADE),
}, },
[TEX_COMBINE_MAIN_ONLY_1] { [TEX_COMBINE_MAIN_ONLY_1] {
[TINT_COMBINE_NONE] gsDPSetCombineMode(G_CC_BLENDRGBA, G_CC_BLENDRGBA), [TINT_COMBINE_NONE] gsDPSetCombineMode(G_CC_BLENDRGBA, G_CC_BLENDRGBA),
[TINT_COMBINE_FOG] gsDPSetCombineMode(G_CC_BLENDRGBA, G_CC_PASS2), [TINT_COMBINE_FOG] gsDPSetCombineMode(G_CC_BLENDRGBA, G_CC_PASS2),
[TINT_COMBINE_SHROUD] gsDPSetCombineMode(G_CC_BLENDRGBA, G_CC_PASS2), [TINT_COMBINE_SHROUD] gsDPSetCombineMode(G_CC_BLENDRGBA, G_CC_PASS2),
[TINT_COMBINE_DEPTH] gsDPSetCombineMode(G_CC_BLENDRGBDECALA, PM_CC_21), [TINT_COMBINE_DEPTH] gsDPSetCombineMode(G_CC_BLENDRGBDECALA, PM_CC_TINT_DEPTH_NO_SHADE),
[TINT_COMBINE_REMAP] gsDPSetCombineMode(G_CC_BLENDRGBA, PM_CC_17), [TINT_COMBINE_REMAP] gsDPSetCombineMode(G_CC_BLENDRGBA, PM_CC_TINT_REMAP_NO_SHADE),
}, },
[TEX_COMBINE_MAIN_ONLY_2] { [TEX_COMBINE_MAIN_ONLY_2] {
[TINT_COMBINE_NONE] gsDPSetCombineMode(G_CC_DECALRGBA, G_CC_DECALRGBA), [TINT_COMBINE_NONE] gsDPSetCombineMode(G_CC_DECALRGBA, G_CC_DECALRGBA),
[TINT_COMBINE_FOG] gsDPSetCombineMode(G_CC_DECALRGBA, G_CC_PASS2), [TINT_COMBINE_FOG] gsDPSetCombineMode(G_CC_DECALRGBA, G_CC_PASS2),
[TINT_COMBINE_SHROUD] gsDPSetCombineMode(G_CC_DECALRGBA, G_CC_PASS2), [TINT_COMBINE_SHROUD] gsDPSetCombineMode(G_CC_DECALRGBA, G_CC_PASS2),
[TINT_COMBINE_DEPTH] gsDPSetCombineMode(PM_CC_1A, G_CC_PASS2), [TINT_COMBINE_DEPTH] gsDPSetCombineMode(PM_CC_1A, G_CC_PASS2),
[TINT_COMBINE_REMAP] gsDPSetCombineMode(G_CC_DECALRGBA, PM_CC_17), [TINT_COMBINE_REMAP] gsDPSetCombineMode(G_CC_DECALRGBA, PM_CC_TINT_REMAP_NO_SHADE),
}, },
// blend LODs in first cycle, tint in second cycle // blend LODs in first cycle, tint in second cycle
[TEX_COMBINE_MIPMAPS_0] { [TEX_COMBINE_MIPMAPS_0] {
[TINT_COMBINE_NONE] gsDPSetCombineMode(G_CC_TRILERP, G_CC_MODULATEI2), [TINT_COMBINE_NONE] gsDPSetCombineMode(G_CC_TRILERP, G_CC_MODULATEI2),
[TINT_COMBINE_FOG] gsDPSetCombineMode(G_CC_TRILERP, PM_CC_18), [TINT_COMBINE_FOG] gsDPSetCombineMode(G_CC_TRILERP, PM_CC2_MULTIPLY_SHADE),
[TINT_COMBINE_SHROUD] gsDPSetCombineMode(G_CC_TRILERP, G_CC_MODULATEI2), [TINT_COMBINE_SHROUD] gsDPSetCombineMode(G_CC_TRILERP, G_CC_MODULATEI2),
[TINT_COMBINE_DEPTH] gsDPSetCombineMode(G_CC_TRILERP, PM_CC_19), [TINT_COMBINE_DEPTH] gsDPSetCombineMode(G_CC_TRILERP, PM_CC_TINT_DEPTH_MIPMAPS),
[TINT_COMBINE_REMAP] gsDPSetCombineMode(G_CC_TRILERP, PM_CC_17), [TINT_COMBINE_REMAP] gsDPSetCombineMode(G_CC_TRILERP, PM_CC_TINT_REMAP_NO_SHADE),
}, },
[TEX_COMBINE_MIPMAPS_1] { [TEX_COMBINE_MIPMAPS_1] {
[TINT_COMBINE_NONE] gsDPSetCombineMode(G_CC_TRILERP, G_CC_MODULATEIA2), [TINT_COMBINE_NONE] gsDPSetCombineMode(G_CC_TRILERP, G_CC_MODULATEIA2),
[TINT_COMBINE_FOG] gsDPSetCombineMode(G_CC_TRILERP, PM_CC_18), [TINT_COMBINE_FOG] gsDPSetCombineMode(G_CC_TRILERP, PM_CC2_MULTIPLY_SHADE),
[TINT_COMBINE_SHROUD] gsDPSetCombineMode(G_CC_TRILERP, G_CC_MODULATEIA2), [TINT_COMBINE_SHROUD] gsDPSetCombineMode(G_CC_TRILERP, G_CC_MODULATEIA2),
[TINT_COMBINE_DEPTH] gsDPSetCombineMode(G_CC_TRILERP, PM_CC_19), [TINT_COMBINE_DEPTH] gsDPSetCombineMode(G_CC_TRILERP, PM_CC_TINT_DEPTH_MIPMAPS),
[TINT_COMBINE_REMAP] gsDPSetCombineMode(G_CC_TRILERP, PM_CC_17), [TINT_COMBINE_REMAP] gsDPSetCombineMode(G_CC_TRILERP, PM_CC_TINT_REMAP_NO_SHADE),
}, },
[TEX_COMBINE_MIPMAPS_2] { [TEX_COMBINE_MIPMAPS_2] {
[TINT_COMBINE_NONE] gsDPSetCombineMode(G_CC_TRILERP, G_CC_MODULATEIA2), [TINT_COMBINE_NONE] gsDPSetCombineMode(G_CC_TRILERP, G_CC_MODULATEIA2),
[TINT_COMBINE_FOG] gsDPSetCombineMode(G_CC_TRILERP, PM_CC_18), [TINT_COMBINE_FOG] gsDPSetCombineMode(G_CC_TRILERP, PM_CC2_MULTIPLY_SHADE),
[TINT_COMBINE_SHROUD] gsDPSetCombineMode(G_CC_TRILERP, G_CC_MODULATEIA2), [TINT_COMBINE_SHROUD] gsDPSetCombineMode(G_CC_TRILERP, G_CC_MODULATEIA2),
[TINT_COMBINE_DEPTH] gsDPSetCombineMode(G_CC_TRILERP, PM_CC_19), [TINT_COMBINE_DEPTH] gsDPSetCombineMode(G_CC_TRILERP, PM_CC_TINT_DEPTH_MIPMAPS),
[TINT_COMBINE_REMAP] gsDPSetCombineMode(G_CC_TRILERP, PM_CC_17), [TINT_COMBINE_REMAP] gsDPSetCombineMode(G_CC_TRILERP, PM_CC_TINT_REMAP_NO_SHADE),
}, },
// blend main/aux textures in first cycle, tint in second cycle // blend main/aux textures in first cycle, tint in second cycle
[TEX_COMBINE_AUX_SHARED_0] { [TEX_COMBINE_AUX_SHARED_0] {
[TINT_COMBINE_NONE] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, PM_CC_18), [TINT_COMBINE_NONE] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, PM_CC2_MULTIPLY_SHADE),
[TINT_COMBINE_FOG] gsDPSetCombineMode(G_CC_INTERFERENCE, PM_CC_18), [TINT_COMBINE_FOG] gsDPSetCombineMode(G_CC_INTERFERENCE, PM_CC2_MULTIPLY_SHADE),
[TINT_COMBINE_SHROUD] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, PM_CC_18), [TINT_COMBINE_SHROUD] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, PM_CC2_MULTIPLY_SHADE),
[TINT_COMBINE_DEPTH] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, PM_CC_18), [TINT_COMBINE_DEPTH] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, PM_CC2_MULTIPLY_SHADE),
[TINT_COMBINE_REMAP] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, PM_CC_1B), [TINT_COMBINE_REMAP] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, PM_CC_TINT_REMAP_SHADE_ALPHA),
}, },
[TEX_COMBINE_AUX_SHARED_1] { [TEX_COMBINE_AUX_SHARED_1] {
[TINT_COMBINE_NONE] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, PM_CC_18), [TINT_COMBINE_NONE] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, PM_CC2_MULTIPLY_SHADE),
[TINT_COMBINE_FOG] gsDPSetCombineMode(G_CC_INTERFERENCE, PM_CC_18), [TINT_COMBINE_FOG] gsDPSetCombineMode(G_CC_INTERFERENCE, PM_CC2_MULTIPLY_SHADE),
[TINT_COMBINE_SHROUD] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, PM_CC_18), [TINT_COMBINE_SHROUD] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, PM_CC2_MULTIPLY_SHADE),
[TINT_COMBINE_DEPTH] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, PM_CC_18), [TINT_COMBINE_DEPTH] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, PM_CC2_MULTIPLY_SHADE),
[TINT_COMBINE_REMAP] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, PM_CC_17), [TINT_COMBINE_REMAP] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, PM_CC_TINT_REMAP_NO_SHADE),
}, },
[TEX_COMBINE_AUX_SHARED_2] { [TEX_COMBINE_AUX_SHARED_2] {
[TINT_COMBINE_NONE] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, PM_CC_18), [TINT_COMBINE_NONE] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, PM_CC2_MULTIPLY_SHADE),
[TINT_COMBINE_FOG] gsDPSetCombineMode(G_CC_INTERFERENCE, PM_CC_18), [TINT_COMBINE_FOG] gsDPSetCombineMode(G_CC_INTERFERENCE, PM_CC2_MULTIPLY_SHADE),
[TINT_COMBINE_SHROUD] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, PM_CC_18), [TINT_COMBINE_SHROUD] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, PM_CC2_MULTIPLY_SHADE),
[TINT_COMBINE_DEPTH] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, PM_CC_18), [TINT_COMBINE_DEPTH] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, PM_CC2_MULTIPLY_SHADE),
[TINT_COMBINE_REMAP] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, PM_CC_17), [TINT_COMBINE_REMAP] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, PM_CC_TINT_REMAP_NO_SHADE),
}, },
// blend main/aux textures in first cycle, tint in second cycle // blend main/aux textures in first cycle, tint in second cycle
[TEX_COMBINE_AUX_IND_0] { [TEX_COMBINE_AUX_IND_0] {
[TINT_COMBINE_NONE] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, PM_CC_18), [TINT_COMBINE_NONE] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, PM_CC2_MULTIPLY_SHADE),
[TINT_COMBINE_FOG] gsDPSetCombineMode(G_CC_INTERFERENCE, PM_CC_18), [TINT_COMBINE_FOG] gsDPSetCombineMode(G_CC_INTERFERENCE, PM_CC2_MULTIPLY_SHADE),
[TINT_COMBINE_SHROUD] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, PM_CC_18), [TINT_COMBINE_SHROUD] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, PM_CC2_MULTIPLY_SHADE),
[TINT_COMBINE_DEPTH] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, PM_CC_18), [TINT_COMBINE_DEPTH] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, PM_CC2_MULTIPLY_SHADE),
[TINT_COMBINE_REMAP] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, PM_CC_17), [TINT_COMBINE_REMAP] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, PM_CC_TINT_REMAP_NO_SHADE),
}, },
[TEX_COMBINE_AUX_IND_1] { [TEX_COMBINE_AUX_IND_1] {
[TINT_COMBINE_NONE] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, PM_CC_18), [TINT_COMBINE_NONE] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, PM_CC2_MULTIPLY_SHADE),
[TINT_COMBINE_FOG] gsDPSetCombineMode(G_CC_INTERFERENCE, PM_CC_18), [TINT_COMBINE_FOG] gsDPSetCombineMode(G_CC_INTERFERENCE, PM_CC2_MULTIPLY_SHADE),
[TINT_COMBINE_SHROUD] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, PM_CC_18), [TINT_COMBINE_SHROUD] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, PM_CC2_MULTIPLY_SHADE),
[TINT_COMBINE_DEPTH] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, PM_CC_18), [TINT_COMBINE_DEPTH] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, PM_CC2_MULTIPLY_SHADE),
[TINT_COMBINE_REMAP] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, PM_CC_17), [TINT_COMBINE_REMAP] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, PM_CC_TINT_REMAP_NO_SHADE),
}, },
[TEX_COMBINE_AUX_IND_2] { [TEX_COMBINE_AUX_IND_2] {
[TINT_COMBINE_NONE] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, PM_CC_18), [TINT_COMBINE_NONE] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, PM_CC2_MULTIPLY_SHADE),
[TINT_COMBINE_FOG] gsDPSetCombineMode(G_CC_INTERFERENCE, PM_CC_18), [TINT_COMBINE_FOG] gsDPSetCombineMode(G_CC_INTERFERENCE, PM_CC2_MULTIPLY_SHADE),
[TINT_COMBINE_SHROUD] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, PM_CC_18), [TINT_COMBINE_SHROUD] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, PM_CC2_MULTIPLY_SHADE),
[TINT_COMBINE_DEPTH] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, PM_CC_18), [TINT_COMBINE_DEPTH] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, PM_CC2_MULTIPLY_SHADE),
[TINT_COMBINE_REMAP] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, PM_CC_17), [TINT_COMBINE_REMAP] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, PM_CC_TINT_REMAP_NO_SHADE),
}, },
[TEX_COMBINE_3] { [TEX_COMBINE_3] {
@ -505,7 +509,7 @@ Gfx AlphaTestCombineModes[][5] = {
[TINT_COMBINE_FOG] gsDPSetCombineMode(PM_CC_22, G_CC_PASS2), [TINT_COMBINE_FOG] gsDPSetCombineMode(PM_CC_22, G_CC_PASS2),
[TINT_COMBINE_SHROUD] gsDPSetCombineMode(PM_CC_22, G_CC_PASS2), [TINT_COMBINE_SHROUD] gsDPSetCombineMode(PM_CC_22, G_CC_PASS2),
[TINT_COMBINE_DEPTH] gsDPSetCombineMode(PM_CC_22, G_CC_PASS2), [TINT_COMBINE_DEPTH] gsDPSetCombineMode(PM_CC_22, G_CC_PASS2),
[TINT_COMBINE_REMAP] gsDPSetCombineMode(PM_CC_22, PM_CC_17), [TINT_COMBINE_REMAP] gsDPSetCombineMode(PM_CC_22, PM_CC_TINT_REMAP_NO_SHADE),
}, },
[TEX_COMBINE_5] { [TEX_COMBINE_5] {
[TINT_COMBINE_NONE] gsDPSetCombineMode(PM_CC1_24, PM_CC2_24), [TINT_COMBINE_NONE] gsDPSetCombineMode(PM_CC1_24, PM_CC2_24),
@ -519,7 +523,7 @@ Gfx AlphaTestCombineModes[][5] = {
[TINT_COMBINE_FOG] gsDPSetCombineMode(PM_CC_23, G_CC_PASS2), [TINT_COMBINE_FOG] gsDPSetCombineMode(PM_CC_23, G_CC_PASS2),
[TINT_COMBINE_SHROUD] gsDPSetCombineMode(PM_CC_23, G_CC_PASS2), [TINT_COMBINE_SHROUD] gsDPSetCombineMode(PM_CC_23, G_CC_PASS2),
[TINT_COMBINE_DEPTH] gsDPSetCombineMode(PM_CC_23, G_CC_PASS2), [TINT_COMBINE_DEPTH] gsDPSetCombineMode(PM_CC_23, G_CC_PASS2),
[TINT_COMBINE_REMAP] gsDPSetCombineMode(PM_CC_23, PM_CC_17), [TINT_COMBINE_REMAP] gsDPSetCombineMode(PM_CC_23, PM_CC_TINT_REMAP_NO_SHADE),
}, },
[TEX_COMBINE_7] { [TEX_COMBINE_7] {
[TINT_COMBINE_NONE] gsDPSetCombineMode(PM_CC1_29, PM_CC2_29), [TINT_COMBINE_NONE] gsDPSetCombineMode(PM_CC1_29, PM_CC2_29),
@ -1752,61 +1756,61 @@ void appendGfx_model(void* data) {
gSPDisplayList((*gfxPos)++, ModelRenderModes[RENDER_MODE_IDX_10]); gSPDisplayList((*gfxPos)++, ModelRenderModes[RENDER_MODE_IDX_10]);
switch (renderMode) { switch (renderMode) {
case RENDER_MODE_SURFACE_OPA: case RENDER_MODE_SURFACE_OPA:
gDPSetRenderMode(gMainGfxPos++, PM_RM_TILEMODE_B, G_RM_AA_ZB_OPA_SURF2); gDPSetRenderMode(gMainGfxPos++, PM_RM_SHROUD, G_RM_AA_ZB_OPA_SURF2);
break; break;
case RENDER_MODE_SURFACE_OPA_NO_AA: case RENDER_MODE_SURFACE_OPA_NO_AA:
gDPSetRenderMode(gMainGfxPos++, PM_RM_TILEMODE_B, G_RM_ZB_OPA_SURF2); gDPSetRenderMode(gMainGfxPos++, PM_RM_SHROUD, G_RM_ZB_OPA_SURF2);
break; break;
case RENDER_MODE_DECAL_OPA: case RENDER_MODE_DECAL_OPA:
gDPSetRenderMode(gMainGfxPos++, PM_RM_TILEMODE_B, G_RM_AA_ZB_OPA_DECAL2); gDPSetRenderMode(gMainGfxPos++, PM_RM_SHROUD, G_RM_AA_ZB_OPA_DECAL2);
break; break;
case RENDER_MODE_DECAL_OPA_NO_AA: case RENDER_MODE_DECAL_OPA_NO_AA:
gDPSetRenderMode(gMainGfxPos++, PM_RM_TILEMODE_B, G_RM_ZB_OPA_DECAL2); gDPSetRenderMode(gMainGfxPos++, PM_RM_SHROUD, G_RM_ZB_OPA_DECAL2);
break; break;
case RENDER_MODE_INTERSECTING_OPA: case RENDER_MODE_INTERSECTING_OPA:
gDPSetRenderMode(gMainGfxPos++, PM_RM_TILEMODE_B, G_RM_AA_ZB_OPA_INTER2); gDPSetRenderMode(gMainGfxPos++, PM_RM_SHROUD, G_RM_AA_ZB_OPA_INTER2);
break; break;
case RENDER_MODE_ALPHATEST: case RENDER_MODE_ALPHATEST:
gDPSetRenderMode(gMainGfxPos++, PM_RM_TILEMODE_B, G_RM_AA_ZB_TEX_EDGE2); gDPSetRenderMode(gMainGfxPos++, PM_RM_SHROUD, G_RM_AA_ZB_TEX_EDGE2);
break; break;
case RENDER_MODE_ALPHATEST_ONESIDED: case RENDER_MODE_ALPHATEST_ONESIDED:
gDPSetRenderMode(gMainGfxPos++, PM_RM_TILEMODE_B, G_RM_AA_ZB_TEX_EDGE2); gDPSetRenderMode(gMainGfxPos++, PM_RM_SHROUD, G_RM_AA_ZB_TEX_EDGE2);
break; break;
case RENDER_MODE_SURFACE_XLU_LAYER1: case RENDER_MODE_SURFACE_XLU_LAYER1:
gDPSetRenderMode(gMainGfxPos++, PM_RM_TILEMODE_B, G_RM_AA_ZB_XLU_SURF2); gDPSetRenderMode(gMainGfxPos++, PM_RM_SHROUD, G_RM_AA_ZB_XLU_SURF2);
break; break;
case RENDER_MODE_SURFACE_XLU_LAYER2: case RENDER_MODE_SURFACE_XLU_LAYER2:
gDPSetRenderMode(gMainGfxPos++, PM_RM_TILEMODE_B, G_RM_AA_ZB_XLU_SURF2); gDPSetRenderMode(gMainGfxPos++, PM_RM_SHROUD, G_RM_AA_ZB_XLU_SURF2);
break; break;
case RENDER_MODE_SURFACE_XLU_LAYER3: case RENDER_MODE_SURFACE_XLU_LAYER3:
gDPSetRenderMode(gMainGfxPos++, PM_RM_TILEMODE_B, G_RM_AA_ZB_XLU_SURF2); gDPSetRenderMode(gMainGfxPos++, PM_RM_SHROUD, G_RM_AA_ZB_XLU_SURF2);
break; break;
case RENDER_MODE_SURFACE_XLU_NO_AA: case RENDER_MODE_SURFACE_XLU_NO_AA:
gDPSetRenderMode(gMainGfxPos++, PM_RM_TILEMODE_B, G_RM_ZB_XLU_SURF2); gDPSetRenderMode(gMainGfxPos++, PM_RM_SHROUD, G_RM_ZB_XLU_SURF2);
break; break;
case RENDER_MODE_DECAL_XLU: case RENDER_MODE_DECAL_XLU:
gDPSetRenderMode(gMainGfxPos++, PM_RM_TILEMODE_B, G_RM_AA_ZB_XLU_DECAL2); gDPSetRenderMode(gMainGfxPos++, PM_RM_SHROUD, G_RM_AA_ZB_XLU_DECAL2);
break; break;
case RENDER_MODE_DECAL_XLU_NO_AA: case RENDER_MODE_DECAL_XLU_NO_AA:
gDPSetRenderMode(gMainGfxPos++, PM_RM_TILEMODE_B, G_RM_AA_ZB_XLU_DECAL2); gDPSetRenderMode(gMainGfxPos++, PM_RM_SHROUD, G_RM_AA_ZB_XLU_DECAL2);
break; break;
case RENDER_MODE_INTERSECTING_XLU: case RENDER_MODE_INTERSECTING_XLU:
gDPSetRenderMode(gMainGfxPos++, PM_RM_TILEMODE_B, G_RM_AA_ZB_XLU_INTER2); gDPSetRenderMode(gMainGfxPos++, PM_RM_SHROUD, G_RM_AA_ZB_XLU_INTER2);
break; break;
case RENDER_MODE_SURFACE_OPA_NO_ZB: case RENDER_MODE_SURFACE_OPA_NO_ZB:
gDPSetRenderMode(gMainGfxPos++, PM_RM_TILEMODE_B, G_RM_AA_OPA_SURF2); gDPSetRenderMode(gMainGfxPos++, PM_RM_SHROUD, G_RM_AA_OPA_SURF2);
break; break;
case RENDER_MODE_ALPHATEST_NO_ZB: case RENDER_MODE_ALPHATEST_NO_ZB:
gDPSetRenderMode(gMainGfxPos++, PM_RM_TILEMODE_B, G_RM_AA_TEX_EDGE2); gDPSetRenderMode(gMainGfxPos++, PM_RM_SHROUD, G_RM_AA_TEX_EDGE2);
break; break;
case RENDER_MODE_SURFACE_XLU_NO_ZB: case RENDER_MODE_SURFACE_XLU_NO_ZB:
gDPSetRenderMode(gMainGfxPos++, PM_RM_TILEMODE_B, G_RM_AA_XLU_SURF2); gDPSetRenderMode(gMainGfxPos++, PM_RM_SHROUD, G_RM_AA_XLU_SURF2);
break; break;
case RENDER_MODE_CLOUD: case RENDER_MODE_CLOUD:
gDPSetRenderMode(gMainGfxPos++, PM_RM_TILEMODE_B, G_RM_ZB_CLD_SURF2); gDPSetRenderMode(gMainGfxPos++, PM_RM_SHROUD, G_RM_ZB_CLD_SURF2);
break; break;
case RENDER_MODE_CLOUD_NO_ZB: case RENDER_MODE_CLOUD_NO_ZB:
gDPSetRenderMode(gMainGfxPos++, PM_RM_TILEMODE_B, G_RM_CLD_SURF2); gDPSetRenderMode(gMainGfxPos++, PM_RM_SHROUD, G_RM_CLD_SURF2);
break; break;
} }
gDPSetFogColor((*gfxPos)++, gFogSettings->color.r, gFogSettings->color.g, gFogSettings->color.b, ShroudTintAmt); gDPSetFogColor((*gfxPos)++, gFogSettings->color.r, gFogSettings->color.g, gFogSettings->color.b, ShroudTintAmt);

View File

@ -72,7 +72,7 @@ Gfx D_8014C2D8[] = {
gsDPSetTextureFilter(G_TF_AVERAGE), gsDPSetTextureFilter(G_TF_AVERAGE),
gsDPSetRenderMode(IM_RD | CVG_DST_SAVE | ZMODE_XLU | FORCE_BL | G_RM_PASS, IM_RD | CVG_DST_SAVE | ZMODE_XLU | gsDPSetRenderMode(IM_RD | CVG_DST_SAVE | ZMODE_XLU | FORCE_BL | G_RM_PASS, IM_RD | CVG_DST_SAVE | ZMODE_XLU |
FORCE_BL | GBL_c2(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_1MA)), FORCE_BL | GBL_c2(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_1MA)),
gsDPSetCombineMode(PM_CC_13, G_CC_PASS2), gsDPSetCombineMode(PM_CC_MSG_UP_ARROW, G_CC_PASS2),
gsSPEndDisplayList(), gsSPEndDisplayList(),
}; };

View File

@ -88,7 +88,7 @@ Gfx D_8014E8F0[] = {
gsDPSetDepthSource(G_ZS_PRIM), gsDPSetDepthSource(G_ZS_PRIM),
gsDPSetPrimDepth(0, 0), gsDPSetPrimDepth(0, 0),
gsDPSetRenderMode(Z_UPD | IM_RD | CVG_DST_SAVE | ZMODE_OPA | FORCE_BL | GBL_c1(G_BL_CLR_MEM, G_BL_A_IN, G_BL_CLR_MEM, G_BL_1MA), Z_UPD | IM_RD | CVG_DST_SAVE | ZMODE_OPA | FORCE_BL | GBL_c2(G_BL_CLR_MEM, G_BL_A_IN, G_BL_CLR_MEM, G_BL_1MA)), gsDPSetRenderMode(Z_UPD | IM_RD | CVG_DST_SAVE | ZMODE_OPA | FORCE_BL | GBL_c1(G_BL_CLR_MEM, G_BL_A_IN, G_BL_CLR_MEM, G_BL_1MA), Z_UPD | IM_RD | CVG_DST_SAVE | ZMODE_OPA | FORCE_BL | GBL_c2(G_BL_CLR_MEM, G_BL_A_IN, G_BL_CLR_MEM, G_BL_1MA)),
gsDPSetCombineMode(PM_CC_3B, PM_CC_3B), gsDPSetCombineMode(PM_CC_SCREEN_OVERLAY, PM_CC_SCREEN_OVERLAY),
gsDPSetTexturePersp(G_TP_PERSP), gsDPSetTexturePersp(G_TP_PERSP),
gsDPSetTextureDetail(G_TD_CLAMP), gsDPSetTextureDetail(G_TD_CLAMP),
gsDPSetTextureLOD(G_TL_TILE), gsDPSetTextureLOD(G_TL_TILE),
@ -112,7 +112,7 @@ Gfx D_8014E9A8[] = {
gsDPSetDepthSource(G_ZS_PRIM), gsDPSetDepthSource(G_ZS_PRIM),
gsDPSetPrimDepth(20, 0), gsDPSetPrimDepth(20, 0),
gsDPSetRenderMode(G_RM_ZB_XLU_SURF, G_RM_ZB_XLU_SURF2), gsDPSetRenderMode(G_RM_ZB_XLU_SURF, G_RM_ZB_XLU_SURF2),
gsDPSetCombineMode(PM_CC_3B, PM_CC_3B), gsDPSetCombineMode(PM_CC_SCREEN_OVERLAY, PM_CC_SCREEN_OVERLAY),
gsSPClearGeometryMode(G_CULL_BOTH | G_LIGHTING | G_SHADING_SMOOTH), gsSPClearGeometryMode(G_CULL_BOTH | G_LIGHTING | G_SHADING_SMOOTH),
gsSPSetGeometryMode(G_ZBUFFER | G_SHADE), gsSPSetGeometryMode(G_ZBUFFER | G_SHADE),
gsDPSetColorDither(G_CD_MAGICSQ), gsDPSetColorDither(G_CD_MAGICSQ),

View File

@ -1,6 +1,8 @@
#include "sprite.h" #include "sprite.h"
#include "sprite/player.h" #include "sprite/player.h"
#define MAX_SPRITE_ID 0xEA // todo generate this
extern HeapNode heap_generalHead; extern HeapNode heap_generalHead;
extern HeapNode heap_spriteHead; extern HeapNode heap_spriteHead;
@ -17,8 +19,8 @@ BSS s32 spr_playerMaxComponents;
BSS s32 D_802DF584; // unused? BSS s32 D_802DF584; // unused?
BSS PlayerCurrentAnimInfo spr_playerCurrentAnimInfo[3]; BSS PlayerCurrentAnimInfo spr_playerCurrentAnimInfo[3];
BSS s32 D_802DF5AC; // unused? BSS s32 D_802DF5AC; // unused?
BSS SpriteAnimData* NpcSpriteData[234]; BSS SpriteAnimData* NpcSpriteData[MAX_SPRITE_ID];
BSS u8 NpcSpriteInstanceCount[234]; BSS u8 NpcSpriteInstanceCount[MAX_SPRITE_ID];
BSS s32 D_802DFA44; // unused? BSS s32 D_802DFA44; // unused?
BSS SpriteInstance SpriteInstances[51]; BSS SpriteInstance SpriteInstances[51];
BSS Quad* D_802DFE44; BSS Quad* D_802DFE44;
@ -230,14 +232,14 @@ void spr_appendGfx_component_flat(
s32 alpha s32 alpha
) { ) {
gDPLoadTLUT_pal16(gMainGfxPos++, 0, palette); gDPLoadTLUT_pal16(gMainGfxPos++, 0, palette);
if (gSpriteShadingProfile->flags & 1) { if (gSpriteShadingProfile->flags & SPR_SHADING_FLAG_ENABLED) {
gDPScrollMultiTile2_4b(gMainGfxPos++, raster, G_IM_FMT_CI, width, height, gDPScrollMultiTile2_4b(gMainGfxPos++, raster, G_IM_FMT_CI, width, height,
0, 0, width - 1, height - 1, 0, 0, 0, width - 1, height - 1, 0,
G_TX_CLAMP, G_TX_CLAMP, 8, 8, G_TX_NOLOD, G_TX_NOLOD, G_TX_CLAMP, G_TX_CLAMP, 8, 8, G_TX_NOLOD, G_TX_NOLOD,
256, 256); 256, 256);
gDPSetTile(gMainGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 4, 0x0100, 2, 0, G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD, G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD); gDPSetTile(gMainGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 4, 0x0100, 2, 0, G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD, G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD);
gDPSetTileSize(gMainGfxPos++, 2, 0, 0, 63 << 2, 0); gDPSetTileSize(gMainGfxPos++, 2, 0, 0, 63 << 2, 0);
if (gSpriteShadingProfile->flags & 2) { if (gSpriteShadingProfile->flags & SPR_SHADING_FLAG_SET_VIEWPORT) {
Camera* camera = &gCameras[gCurrentCamID]; Camera* camera = &gCameras[gCurrentCamID];
if (gGameStatusPtr->isBattle == 2) { if (gGameStatusPtr->isBattle == 2) {
gSPViewport(gMainGfxPos++, &SprPauseVpAlt); gSPViewport(gMainGfxPos++, &SprPauseVpAlt);
@ -264,7 +266,7 @@ void spr_appendGfx_component_flat(
gDPScrollTextureBlock_4b(gMainGfxPos++, raster, G_IM_FMT_CI, width, height, 0, gDPScrollTextureBlock_4b(gMainGfxPos++, raster, G_IM_FMT_CI, width, height, 0,
G_TX_CLAMP, G_TX_CLAMP, 8, 8, G_TX_NOLOD, G_TX_NOLOD, G_TX_CLAMP, G_TX_CLAMP, 8, 8, G_TX_NOLOD, G_TX_NOLOD,
256, 256); 256, 256);
if (gSpriteShadingProfile->flags & 2) { if (gSpriteShadingProfile->flags & SPR_SHADING_FLAG_SET_VIEWPORT) {
Camera* camera = &gCameras[gCurrentCamID]; Camera* camera = &gCameras[gCurrentCamID];
if (gGameStatusPtr->isBattle == 2) { if (gGameStatusPtr->isBattle == 2) {
gSPViewport(gMainGfxPos++, &SprPauseVpAlt); gSPViewport(gMainGfxPos++, &SprPauseVpAlt);
@ -299,7 +301,7 @@ void spr_appendGfx_component_flat(
} }
} }
if (gSpriteShadingProfile->flags & 2) { if (gSpriteShadingProfile->flags & SPR_SHADING_FLAG_SET_VIEWPORT) {
Camera* camera = &gCameras[gCurrentCamID]; Camera* camera = &gCameras[gCurrentCamID];
if (gGameStatusPtr->isBattle == 2) { if (gGameStatusPtr->isBattle == 2) {
@ -356,7 +358,7 @@ void spr_appendGfx_component(
gSPMatrix(gMainGfxPos++, VIRTUAL_TO_PHYSICAL(&gDisplayContext->matrixStack[gMatrixListPos++]), gSPMatrix(gMainGfxPos++, VIRTUAL_TO_PHYSICAL(&gDisplayContext->matrixStack[gMatrixListPos++]),
G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW); G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
if (gSpriteShadingProfile->flags & 1) { if (gSpriteShadingProfile->flags & SPR_SHADING_FLAG_ENABLED) {
if ((u8) opacity == 255) { if ((u8) opacity == 255) {
gSPDisplayList(gMainGfxPos++, D_802DF460); gSPDisplayList(gMainGfxPos++, D_802DF460);
} else { } else {

View File

@ -2,7 +2,7 @@
#include "ld_addrs.h" #include "ld_addrs.h"
#include "sprite/player.h" #include "sprite/player.h"
ApiStatus N(LoadSmashBridgesGraphics)(void) { API_CALLABLE(N(LoadSmashBridgesGraphics)) {
DMA_COPY_SEGMENT(dgb_01_smash_bridges); DMA_COPY_SEGMENT(dgb_01_smash_bridges);
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }

View File

@ -1,7 +1,7 @@
#include "common.h" #include "common.h"
#include "npc.h" #include "npc.h"
ApiStatus N(ApproachPlayer100Units)(Evt* script, s32 isInitialCall) { API_CALLABLE(N(ApproachPlayer100Units)) {
PlayerStatus* playerStatus = &gPlayerStatus; PlayerStatus* playerStatus = &gPlayerStatus;
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 npcID = evt_get_variable(script, *args++); s32 npcID = evt_get_variable(script, *args++);

View File

@ -212,7 +212,7 @@ API_CALLABLE(N(SetFireplaceAlpha)) {
void N(setup_gfx_fireplace)(void) { void N(setup_gfx_fireplace)(void) {
gDPSetCycleType(gMainGfxPos++, G_CYC_2CYCLE); gDPSetCycleType(gMainGfxPos++, G_CYC_2CYCLE);
gDPSetRenderMode(gMainGfxPos++, G_RM_PASS, G_RM_AA_ZB_XLU_SURF2); gDPSetRenderMode(gMainGfxPos++, G_RM_PASS, G_RM_AA_ZB_XLU_SURF2);
gDPSetCombineMode(gMainGfxPos++, G_CC_INTERFERENCE, PM_CC_3E); gDPSetCombineMode(gMainGfxPos++, G_CC_INTERFERENCE, PM_CC_KKJ14_FIRE);
gDPSetPrimColor(gMainGfxPos++, 0, 0, 0, 0, 0, N(FireplaceAlpha)); gDPSetPrimColor(gMainGfxPos++, 0, 0, 0, 0, 0, N(FireplaceAlpha));
} }

View File

@ -92,7 +92,7 @@ API_CALLABLE(N(InterpSpriteShadingColor)) {
script->varTable[4] = shadingProfile->ambientColor.g; script->varTable[4] = shadingProfile->ambientColor.g;
script->varTable[5] = shadingProfile->ambientColor.b; script->varTable[5] = shadingProfile->ambientColor.b;
script->varTable[6] = 0; script->varTable[6] = 0;
gSpriteShadingProfile->flags |= 1; gSpriteShadingProfile->flags |= SPR_SHADING_FLAG_ENABLED;
} }
script->varTable[6]++; script->varTable[6]++;
@ -102,7 +102,7 @@ API_CALLABLE(N(InterpSpriteShadingColor)) {
if (script->varTable[6] == 20) { if (script->varTable[6] == 20) {
if (script->varTable[0] == 255) { if (script->varTable[0] == 255) {
gSpriteShadingProfile->flags &= ~1; gSpriteShadingProfile->flags &= ~SPR_SHADING_FLAG_ENABLED;
} }
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }

View File

@ -22,12 +22,12 @@ MapSettings N(settings) = {
#include "world/common/todo/SpawnSunEffect.inc.c" #include "world/common/todo/SpawnSunEffect.inc.c"
ApiStatus N(StartOasisSongVariation)(void) { API_CALLABLE(N(StartOasisSongVariation)) {
bgm_set_variation(0, 1); bgm_set_variation(0, 1);
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus N(StopOasisSongVariation)(void) { API_CALLABLE(N(StopOasisSongVariation)) {
bgm_set_variation(0, 0); bgm_set_variation(0, 0);
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }

View File

@ -1,7 +1,7 @@
#include "common.h" #include "common.h"
#include "effects.h" #include "effects.h"
ApiStatus N(CreateWhaleGeyser)(Evt* script, s32 isInitialStatus) { API_CALLABLE(N(CreateWhaleGeyser)) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 var1 = evt_get_variable(script, *args++); s32 var1 = evt_get_variable(script, *args++);
f32 var2 = evt_get_float_variable(script, *args++); f32 var2 = evt_get_float_variable(script, *args++);
@ -31,7 +31,7 @@ API_CALLABLE(N(SetWhaleGeyserPos)) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus N(DisposeWhaleGeyser)(Evt* script, s32 isInitialCall) { API_CALLABLE(N(DisposeWhaleGeyser)) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
EffectInstance* effect = (EffectInstance*) evt_get_variable(script, *args++); EffectInstance* effect = (EffectInstance*) evt_get_variable(script, *args++);

View File

@ -54,7 +54,7 @@ void N(gfx_build_knocked_down_player)(void) {
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
} }
ApiStatus N(KnockdownCreate)(Evt* script) { API_CALLABLE(N(KnockdownCreate)) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 spriteIndex = evt_get_variable(script, *args++); s32 spriteIndex = evt_get_variable(script, *args++);
s32 rasterIndex = evt_get_variable(script, *args++); s32 rasterIndex = evt_get_variable(script, *args++);

View File

@ -80,7 +80,7 @@ void N(SpearGuyAI_Loiter)(Evt* script, MobileAISettings* aiSettings, EnemyDetect
// prerequisites // prerequisites
#include "world/common/enemy/ai/WanderMeleeAI.inc.c" #include "world/common/enemy/ai/WanderMeleeAI.inc.c"
ApiStatus N(SpearGuyAI_Main)(Evt* script, s32 isInitialCall) { API_CALLABLE(N(SpearGuyAI_Main)) {
Enemy* enemy = script->owner1.enemy; Enemy* enemy = script->owner1.enemy;
Npc *npc = get_npc_unsafe(enemy->npcID); Npc *npc = get_npc_unsafe(enemy->npcID);
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;

View File

@ -208,7 +208,7 @@ void N(PatrolAI_ChaseInit)(Evt* script, MobileAISettings* aiSettings, EnemyDetec
script->functionTemp[0] = 13; script->functionTemp[0] = 13;
} }
ApiStatus N(PatrolAI_Chase)(Evt* script, MobileAISettings* aiSettings, EnemyDetectVolume* territory) { void N(PatrolAI_Chase)(Evt* script, MobileAISettings* aiSettings, EnemyDetectVolume* territory) {
Enemy* enemy = script->owner1.enemy; Enemy* enemy = script->owner1.enemy;
Npc* npc = get_npc_unsafe(enemy->npcID); Npc* npc = get_npc_unsafe(enemy->npcID);
EffectInstance* emoteTemp; EffectInstance* emoteTemp;

View File

@ -13,7 +13,7 @@
// prerequisites // prerequisites
#include "world/common/enemy/ai/MeleeHitbox.inc.c" #include "world/common/enemy/ai/MeleeHitbox.inc.c"
ApiStatus N(WanderMeleeAI_Main)(Evt* script, s32 isInitialCall) { API_CALLABLE(N(WanderMeleeAI_Main)) {
Enemy* enemy = script->owner1.enemy; Enemy* enemy = script->owner1.enemy;
Npc *npc = get_npc_unsafe(enemy->npcID); Npc *npc = get_npc_unsafe(enemy->npcID);
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;

View File

@ -4,6 +4,6 @@
API_CALLABLE(N(RemovePadlock)) { API_CALLABLE(N(RemovePadlock)) {
Entity* entity = get_entity_by_index(script->varTable[0]); Entity* entity = get_entity_by_index(script->varTable[0]);
entity->flags |= ENTITY_FLAG_100000; entity->flags |= ENTITY_FLAG_USED;
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }

View File

@ -1046,7 +1046,7 @@ void partner_reset_data(void) {
wCurrentPartnerId = currentPartner; wCurrentPartnerId = currentPartner;
if (gGameStatusPtr->keepUsingPartnerOnMapChange) { if (gGameStatusPtr->keepUsingPartnerOnMapChange) {
gPartnerStatus.partnerActionState = 1; gPartnerStatus.partnerActionState = PARTNER_ACTION_USE;
gGameStatusPtr->keepUsingPartnerOnMapChange = FALSE; gGameStatusPtr->keepUsingPartnerOnMapChange = FALSE;
} }

View File

@ -3,7 +3,7 @@
#include "script_api/battle.h" #include "script_api/battle.h"
#include "sprite/player.h" #include "sprite/player.h"
ApiStatus WorldItem_ShowUseSparkles(Evt* script, s32 isInitialCall) { API_CALLABLE(WorldItem_ShowUseSparkles) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 x = evt_get_variable(script, *args++); s32 x = evt_get_variable(script, *args++);
s32 y = evt_get_variable(script, *args++); s32 y = evt_get_variable(script, *args++);
@ -13,7 +13,7 @@ ApiStatus WorldItem_ShowUseSparkles(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus WorldItem_ShowHPGain(Evt* script, s32 isInitialCall) { API_CALLABLE(WorldItem_ShowHPGain) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 x = evt_get_variable(script, *args++); s32 x = evt_get_variable(script, *args++);
s32 y = evt_get_variable(script, *args++); s32 y = evt_get_variable(script, *args++);
@ -24,7 +24,7 @@ ApiStatus WorldItem_ShowHPGain(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus WorldItem_ShowFPGain(Evt* script, s32 isInitialCall) { API_CALLABLE(WorldItem_ShowFPGain) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 x = evt_get_variable(script, *args++); s32 x = evt_get_variable(script, *args++);
s32 y = evt_get_variable(script, *args++); s32 y = evt_get_variable(script, *args++);
@ -35,7 +35,7 @@ ApiStatus WorldItem_ShowFPGain(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus WorldItem_RestoreHP(Evt* script, s32 isInitialCall) { API_CALLABLE(WorldItem_RestoreHP) {
PlayerData* playerData = &gPlayerData; PlayerData* playerData = &gPlayerData;
s32 newHP = playerData->curHP + evt_get_variable(script, *script->ptrReadPos); s32 newHP = playerData->curHP + evt_get_variable(script, *script->ptrReadPos);
@ -51,7 +51,7 @@ ApiStatus WorldItem_RestoreHP(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus WorldItem_RestoreFP(Evt* script, s32 isInitialCall) { API_CALLABLE(WorldItem_RestoreFP) {
PlayerData* playerData = &gPlayerData; PlayerData* playerData = &gPlayerData;
s32 newFP = playerData->curFP + evt_get_variable(script, *script->ptrReadPos); s32 newFP = playerData->curFP + evt_get_variable(script, *script->ptrReadPos);
@ -67,19 +67,19 @@ ApiStatus WorldItem_RestoreFP(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus WorldItem_PauseTime(Evt* script, s32 isInitialCall) { API_CALLABLE(WorldItem_PauseTime) {
set_time_freeze_mode(TIME_FREEZE_FULL); set_time_freeze_mode(TIME_FREEZE_FULL);
gOverrideFlags |= GLOBAL_OVERRIDES_CANT_PICK_UP_ITEMS; gOverrideFlags |= GLOBAL_OVERRIDES_CANT_PICK_UP_ITEMS;
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus WorldItem_UnpauseTime(Evt* script, s32 isInitialCall) { API_CALLABLE(WorldItem_UnpauseTime) {
set_time_freeze_mode(TIME_FREEZE_NORMAL); set_time_freeze_mode(TIME_FREEZE_NORMAL);
gOverrideFlags &= ~GLOBAL_OVERRIDES_CANT_PICK_UP_ITEMS; gOverrideFlags &= ~GLOBAL_OVERRIDES_CANT_PICK_UP_ITEMS;
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus WorldItem_GetItemProperties(Evt* script, s32 isInitialCall) { API_CALLABLE(WorldItem_GetItemProperties) {
s32 itemIdx = evt_get_variable(script, *script->ptrReadPos); s32 itemIdx = evt_get_variable(script, *script->ptrReadPos);
s32 var15; s32 var15;
@ -100,7 +100,7 @@ ApiStatus WorldItem_GetItemProperties(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus WorldItem_ConsumeItem(Evt* script, s32 isInitialCall) { API_CALLABLE(WorldItem_ConsumeItem) {
remove_consumable(); remove_consumable();
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }