mirror of
https://github.com/pmret/papermario.git
synced 2024-09-08 02:29:49 +02:00
API_CALLABLE + misc minor cleanup (#1150)
* leftover work * remaining API_CALLABLE --------- Co-authored-by: HailSanta <Hail2Santa@gmail.com>
This commit is contained in:
parent
b2cf91c8ca
commit
1589a30e26
@ -2633,7 +2633,7 @@ enum EntityFlags {
|
||||
ENTITY_FLAG_PARTNER_COLLISION = 0x00020000,
|
||||
ENTITY_FLAG_DRAW_IF_CLOSE_HIDE_MODE2 = 0x00040000,
|
||||
ENTITY_FLAG_IGNORE_DISTANCE_CULLING = 0x00080000,
|
||||
ENTITY_FLAG_100000 = 0x00100000,
|
||||
ENTITY_FLAG_USED = 0x00100000,
|
||||
ENTITY_FLAG_200000 = 0x00200000,
|
||||
ENTITY_FLAG_SHADOW_POS_DIRTY = 0x00400000,
|
||||
ENTITY_FLAG_DARK_SHADOW = 0x00800000,
|
||||
@ -5044,13 +5044,6 @@ enum ModelTransformGroupFlags {
|
||||
};
|
||||
|
||||
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,
|
||||
};
|
||||
|
||||
@ -5168,6 +5161,11 @@ enum SpriteCompImgFXFlags {
|
||||
SPR_IMGFX_FLAG_ALL = 0xF0000000,
|
||||
};
|
||||
|
||||
enum SpriteShadingFlags {
|
||||
SPR_SHADING_FLAG_ENABLED = 1,
|
||||
SPR_SHADING_FLAG_SET_VIEWPORT = 2, // never set
|
||||
};
|
||||
|
||||
enum MoveType {
|
||||
MOVE_TYPE_NONE = 0,
|
||||
MOVE_TYPE_HAMMER = 1,
|
||||
|
@ -276,7 +276,7 @@
|
||||
|
||||
#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_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_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_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_0C 0, 0, 0, 0, 0, 0, 0, COMBINED
|
||||
|
||||
#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_10 0, 0, 0, TEXEL0, 0, 0, 0, PRIMITIVE
|
||||
#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_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_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
|
||||
#define PM_CC_17 COMBINED, 0, PRIMITIVE, ENVIRONMENT, 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
|
||||
// multiply the combined color from cycle1 with SHADE color; SHADE alpha is ignored
|
||||
#define PM_CC2_MULTIPLY_SHADE COMBINED, 0, SHADE, 0, 0, 0, 0, COMBINED
|
||||
|
||||
#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
|
||||
|
||||
// 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
|
||||
// alpha = SHADE
|
||||
#define PM_CC_NOTEX_TINT_FOG \
|
||||
SHADE, 0, PRIMITIVE_ALPHA, PRIMITIVE, 0, 0, 0, SHADE
|
||||
#define PM_CC_TINT_DEPTH_NOTEX \
|
||||
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
|
||||
// color = SHADE * PRIM + ENV
|
||||
// alpha = SHADE
|
||||
#define PM_CC_NOTEX_TINT_REMAP \
|
||||
SHADE, 0, PRIMITIVE, ENVIRONMENT, 0, 0, 0, SHADE
|
||||
#define PM_CC_TINT_REMAP_NOTEX \
|
||||
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_23 1, TEXEL0, PRIMITIVE, TEXEL0, 0, 0, 0, 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_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_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_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_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
|
||||
|
||||
// animated tiles spreading over the screen when the game is reset
|
||||
@ -386,6 +426,10 @@
|
||||
// alpha = PRIM
|
||||
#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
|
||||
// alpha = PRIMITIVE * TEXEL0
|
||||
#define PM_CC_DAMAGE_INDICATOR 1, 0, SHADE, PRIMITIVE, PRIMITIVE, 0, TEXEL0, 0
|
||||
|
@ -9,315 +9,315 @@
|
||||
|
||||
#include "effects.h"
|
||||
|
||||
ApiStatus EnablePartnerBlur(Evt* script, s32 isInitialCall);
|
||||
ApiStatus DisablePartnerBlur(Evt* script, s32 isInitialCall);
|
||||
ApiStatus UseBattleCamPreset(Evt* script, s32 isInitialCall);
|
||||
ApiStatus SetBattleCamTarget(Evt* script, s32 isInitialCall);
|
||||
ApiStatus SetBattleCamOffsetZ(Evt* script, s32 isInitialCall);
|
||||
ApiStatus AddBattleCamOffsetZ(Evt* script, s32 isInitialCall);
|
||||
ApiStatus SetBattleCamYaw(Evt* script, s32 isInitialCall);
|
||||
ApiStatus BattleCamTargetActor(Evt* script, s32 isInitialCall);
|
||||
ApiStatus MoveBattleCamOver(Evt* script, s32 isInitialCall);
|
||||
ApiStatus SetBattleCamZoom(Evt* script, s32 isInitialCall);
|
||||
ApiStatus AddBattleCamZoom(Evt* script, s32 isInitialCall);
|
||||
ApiStatus FreezeBattleCam(Evt* script, s32 isInitialCall);
|
||||
ApiStatus func_8024EDA4(Evt* script, s32 isInitialCall);
|
||||
ApiStatus ShowMessageBox(Evt* script, s32 isInitialCall);
|
||||
ApiStatus ShowVariableMessageBox(Evt* script, s32 isInitialCall);
|
||||
ApiStatus IsMessageBoxDisplayed(Evt* script, s32 isInitialCall);
|
||||
ApiStatus WaitForMessageBoxDone(Evt* script, s32 isInitialCall);
|
||||
ApiStatus ForceCloseMessageBox(Evt* script, s32 isInitialCall);
|
||||
ApiStatus SetMessageBoxDuration(Evt* script, s32 isInitialCall);
|
||||
ApiStatus ItemDamageEnemy(Evt* script, s32 isInitialCall);
|
||||
ApiStatus ItemAfflictEnemy(Evt* script, s32 isInitialCall);
|
||||
ApiStatus ItemSpookEnemy(Evt* script, s32 isInitialCall);
|
||||
ApiStatus ItemCheckHit(Evt* script, s32 isInitialCall);
|
||||
ApiStatus ActorSpeak(Evt* script, s32 isInitialCall);
|
||||
ApiStatus EndActorSpeech(Evt* script, s32 isInitialCall);
|
||||
ApiStatus ShowBattleChoice(Evt* script, s32 isInitialCall);
|
||||
ApiStatus OverrideBattleDmaDest(Evt* script, s32 isInitialCall);
|
||||
ApiStatus LoadBattleDmaData(Evt* script, s32 isInitialCall);
|
||||
ApiStatus EnableBattleFloorReflections(Evt* script, s32 isInitialCall);
|
||||
ApiStatus SetDarknessMode(Evt* script, s32 isInitialCall);
|
||||
ApiStatus PlaySoundAtActor(Evt* script, s32 isInitialCall);
|
||||
ApiStatus PlaySoundAtPart(Evt* script, s32 isInitialCall);
|
||||
ApiStatus SetForegroundModelsVisibleUnchecked(Evt* script, s32 isInitialCall);
|
||||
ApiStatus SetForegroundModelsVisible(Evt* script, s32 isInitialCall);
|
||||
ApiStatus MakeStatusField(Evt* script, s32 isInitialCall);
|
||||
ApiStatus MultiplyByActorScale(Evt* script, s32 isInitialCall);
|
||||
ApiStatus MultiplyVec2ByActorScale(Evt* script, s32 isInitialCall);
|
||||
ApiStatus MultiplyVec3ByActorScale(Evt* script, s32 isInitialCall);
|
||||
ApiStatus ApplyShrinkFromOwner(Evt* script, s32 isInitialCall);
|
||||
ApiStatus StartRumble(Evt* script, s32 isInitialCall);
|
||||
ApiStatus HasMerleeCastsLeft(Evt* script, s32 isInitialCall);
|
||||
ApiStatus SpawnRecoverHeartFX(Evt* script, s32 isInitialCall);
|
||||
ApiStatus SpawnRecoverFlowerFX(Evt* script, s32 isInitialCall);
|
||||
ApiStatus IncrementPlayerHP(Evt* script, s32 isInitialCall);
|
||||
ApiStatus IncrementPlayerFP(Evt* script, s32 isInitialCall);
|
||||
ApiStatus StartRumbleWithParams(Evt* script, s32 isInitialCall);
|
||||
ApiStatus LoadItemScript(Evt* script, s32 isInitialCall);
|
||||
ApiStatus LoadMoveScript(Evt* script, s32 isInitialCall);
|
||||
ApiStatus LoadBattleSection(Evt* script, s32 isInitialCall);
|
||||
ApiStatus GetBattlePhase(Evt* script, s32 isInitialCall);
|
||||
ApiStatus GetLastElement(Evt* script, s32 isInitialCall);
|
||||
ApiStatus SetDamageSource(Evt* script, s32 isInitialCall);
|
||||
ApiStatus GetDamageSource(Evt* script, s32 isInitialCall);
|
||||
ApiStatus SetGoalToHome(Evt* script, s32 isInitialCall);
|
||||
ApiStatus SetIdleGoalToHome(Evt* script, s32 isInitialCall);
|
||||
ApiStatus SetGoalToIndex(Evt* script, s32 isInitialCall);
|
||||
ApiStatus GetIndexFromPos(Evt* script, s32 isInitialCall);
|
||||
ApiStatus GetIndexFromHome(Evt* script, s32 isInitialCall);
|
||||
ApiStatus CountTargets(Evt* script, s32 isInitialCall);
|
||||
ApiStatus ForceHomePos(Evt* script, s32 isInitialCall);
|
||||
ApiStatus SetHomePos(Evt* script, s32 isInitialCall);
|
||||
ApiStatus SetGoalToTarget(Evt* script, s32 isInitialCall);
|
||||
ApiStatus SetPartGoalToTarget(Evt* script, s32 isInitialCall);
|
||||
ApiStatus SetGoalToFirstTarget(Evt* script, s32 isInitialCall);
|
||||
ApiStatus SetGoalPos(Evt* script, s32 isInitialCall);
|
||||
ApiStatus SetIdleGoal(Evt* script, s32 isInitialCall);
|
||||
ApiStatus AddGoalPos(Evt* script, s32 isInitialCall);
|
||||
ApiStatus GetGoalPos(Evt* script, s32 isInitialCall);
|
||||
ApiStatus GetIdleGoal(Evt* script, s32 isInitialCall);
|
||||
ApiStatus GetPartTarget(Evt* script, s32 isInitialCall);
|
||||
ApiStatus GetActorPos(Evt* script, s32 isInitialCall);
|
||||
ApiStatus GetPartOffset(Evt* script, s32 isInitialCall);
|
||||
ApiStatus GetPartPos(Evt* script, s32 isInitialCall);
|
||||
ApiStatus GetHomePos(Evt* script, s32 isInitialCall);
|
||||
ApiStatus SetActorPos(Evt* script, s32 isInitialCall);
|
||||
ApiStatus SetPartPos(Evt* script, s32 isInitialCall);
|
||||
ApiStatus SetEnemyTargetOffset(Evt* script, s32 isInitialCall);
|
||||
ApiStatus SetAnimation(Evt* script, s32 isInitialCall);
|
||||
ApiStatus GetAnimation(Evt* script, s32 isInitialCall);
|
||||
ApiStatus SetAnimationRate(Evt* script, s32 isInitialCall);
|
||||
ApiStatus SetActorYaw(Evt* script, s32 isInitialCall);
|
||||
ApiStatus GetActorYaw(Evt* script, s32 isInitialCall);
|
||||
ApiStatus SetPartYaw(Evt* script, s32 isInitialCall);
|
||||
ApiStatus GetPartYaw(Evt* script, s32 isInitialCall);
|
||||
ApiStatus SetActorJumpGravity(Evt* script, s32 isInitialCall);
|
||||
ApiStatus SetActorIdleJumpGravity(Evt* script, s32 isInitialCall);
|
||||
ApiStatus SetActorSpeed(Evt* script, s32 isInitialCall);
|
||||
ApiStatus SetActorIdleSpeed(Evt* script, s32 isInitialCall);
|
||||
ApiStatus SetPartJumpGravity(Evt* script, s32 isInitialCall);
|
||||
ApiStatus SetPartMoveSpeed(Evt* script, s32 isInitialCall);
|
||||
ApiStatus SetJumpAnimations(Evt* script, s32 isInitialCall);
|
||||
ApiStatus AddActorPos(Evt* script, s32 isInitialCall);
|
||||
ApiStatus SetActorDispOffset(Evt* script, s32 isInitialCall);
|
||||
ApiStatus GetPartDispOffset(Evt* script, s32 isInitialCall);
|
||||
ApiStatus SetPartDispOffset(Evt* script, s32 isInitialCall);
|
||||
ApiStatus AddPartDispOffset(Evt* script, s32 isInitialCall);
|
||||
ApiStatus FreezeBattleState(Evt* script, s32 isInitialCall);
|
||||
ApiStatus GetActorVar(Evt* script, s32 isInitialCall);
|
||||
ApiStatus SetActorVar(Evt* script, s32 isInitialCall);
|
||||
ApiStatus AddActorVar(Evt* script, s32 isInitialCall);
|
||||
ApiStatus GetPartMovementVar(Evt* script, s32 isInitialCall);
|
||||
ApiStatus SetPartMovementVar(Evt* script, s32 isInitialCall);
|
||||
ApiStatus AddPartMovementVar(Evt* script, s32 isInitialCall);
|
||||
ApiStatus SetActorRotation(Evt* script, s32 isInitialCall);
|
||||
ApiStatus SetActorRotationOffset(Evt* script, s32 isInitialCall);
|
||||
ApiStatus GetActorRotation(Evt* script, s32 isInitialCall);
|
||||
ApiStatus SetPartRotation(Evt* script, s32 isInitialCall);
|
||||
ApiStatus SetPartRotationOffset(Evt* script, s32 isInitialCall);
|
||||
ApiStatus GetPartRotation(Evt* script, s32 isInitialCall);
|
||||
ApiStatus SetActorScale(Evt* script, s32 isInitialCall);
|
||||
ApiStatus SetActorScaleModifier(Evt* script, s32 isInitialCall);
|
||||
ApiStatus GetActorScale(Evt* script, s32 isInitialCall);
|
||||
ApiStatus SetPartScale(Evt* script, s32 isInitialCall);
|
||||
ApiStatus GetPartScale(Evt* script, s32 isInitialCall);
|
||||
ApiStatus GetBattleFlags(Evt* script, s32 isInitialCall);
|
||||
ApiStatus SetBattleFlagBits(Evt* script, s32 isInitialCall);
|
||||
ApiStatus GetBattleFlags2(Evt* script, s32 isInitialCall);
|
||||
ApiStatus SetBattleFlagBits2(Evt* script, s32 isInitialCall);
|
||||
ApiStatus SetActorFlags(Evt* script, s32 isInitialCall);
|
||||
ApiStatus SetActorFlagBits(Evt* script, s32 isInitialCall);
|
||||
ApiStatus GetActorFlags(Evt* script, s32 isInitialCall);
|
||||
ApiStatus SetPartFlags(Evt* script, s32 isInitialCall);
|
||||
ApiStatus SetPartFlagBits(Evt* script, s32 isInitialCall);
|
||||
ApiStatus SetPartTargetFlags(Evt* script, s32 isInitialCall);
|
||||
ApiStatus SetPartTargetFlagBits(Evt* script, s32 isInitialCall);
|
||||
ApiStatus GetPartFlags(Evt* script, s32 isInitialCall);
|
||||
ApiStatus GetPartTargetFlags(Evt* script, s32 isInitialCall);
|
||||
ApiStatus SetPartEventFlags(Evt* script, s32 isInitialCall);
|
||||
ApiStatus SetPartEventBits(Evt* script, s32 isInitialCall);
|
||||
ApiStatus GetPartEventFlags(Evt* script, s32 isInitialCall);
|
||||
ApiStatus HPBarToHome(Evt* script, s32 isInitialCall);
|
||||
ApiStatus HPBarToCurrent(Evt* script, s32 isInitialCall);
|
||||
ApiStatus SetHPBarOffset(Evt* script, s32 isInitialCall);
|
||||
ApiStatus SetActorStatusOffsets(Evt* script, s32 isInitialCall);
|
||||
ApiStatus SummonEnemy(Evt* script, s32 isInitialCall);
|
||||
ApiStatus GetOwnerID(Evt* script, s32 isInitialCall);
|
||||
ApiStatus SetOwnerID(Evt* script, s32 isInitialCall);
|
||||
ApiStatus ActorExists(Evt* script, s32 isInitialCall);
|
||||
ApiStatus SetEnabledStarPowers(Evt* script, s32 isInitialCall);
|
||||
ApiStatus SetBattleInputMask(Evt* script, s32 isInitialCall);
|
||||
ApiStatus SetBattleInputButtons(Evt* script, s32 isInitialCall);
|
||||
ApiStatus CheckButtonPress(Evt* script, s32 isInitialCall);
|
||||
ApiStatus CheckButtonHeld(Evt* script, s32 isInitialCall);
|
||||
ApiStatus CheckButtonDown(Evt* script, s32 isInitialCall);
|
||||
ApiStatus GetBattleState(Evt* script, s32 isInitialCall);
|
||||
ApiStatus CreateCurrentPosTargetList(Evt* script, s32 isInitialCall);
|
||||
ApiStatus CreateHomeTargetList(Evt* script, s32 isInitialCall);
|
||||
ApiStatus InitTargetIterator(Evt* script, s32 isInitialCall);
|
||||
ApiStatus SetOwnerTarget(Evt* script, s32 isInitialCall);
|
||||
ApiStatus ChooseNextTarget(Evt* script, s32 isInitialCall);
|
||||
ApiStatus GetTargetListLength(Evt* script, s32 isInitialCall);
|
||||
ApiStatus GetOwnerTarget(Evt* script, s32 isInitialCall);
|
||||
ApiStatus func_8026E914(Evt* script, s32 isInitialCall);
|
||||
ApiStatus GetPlayerActorID(Evt* script, s32 isInitialCall);
|
||||
ApiStatus GetDistanceToGoal(Evt* script, s32 isInitialCall);
|
||||
ApiStatus SetActorPaletteEffect(Evt* script, s32 isInitialCall);
|
||||
ApiStatus AddActorDecoration(Evt* script, s32 isInitialCall);
|
||||
ApiStatus RemoveActorDecoration(Evt* script, s32 isInitialCall);
|
||||
ApiStatus ModifyActorDecoration(Evt* script, s32 isInitialCall);
|
||||
ApiStatus UseIdleAnimation(Evt* script, s32 isInitialCall);
|
||||
ApiStatus GetStatusFlags(Evt* script, s32 isInitialCall);
|
||||
ApiStatus RemovePlayerBuffs(Evt* script, s32 isInitialCall);
|
||||
ApiStatus SetPartAlpha(Evt* script, s32 isInitialCall);
|
||||
ApiStatus CreatePartShadow(Evt* script, s32 isInitialCall);
|
||||
ApiStatus RemovePartShadow(Evt* script, s32 isInitialCall);
|
||||
ApiStatus SetEndBattleFadeOutRate(Evt* script, s32 isInitialCall);
|
||||
ApiStatus SetBattleVar(Evt* script, s32 isInitialCall);
|
||||
ApiStatus GetBattleVar(Evt* script, s32 isInitialCall);
|
||||
ApiStatus ResetAllActorSounds(Evt* script, s32 isInitialCall);
|
||||
ApiStatus SetActorSounds(Evt* script, s32 isInitialCall);
|
||||
ApiStatus ResetActorSounds(Evt* script, s32 isInitialCall);
|
||||
ApiStatus SetPartSounds(Evt* script, s32 isInitialCall);
|
||||
ApiStatus SetActorType(Evt* script, s32 isInitialCall);
|
||||
ApiStatus ShowShockEffect(Evt* script, s32 isInitialCall);
|
||||
ApiStatus GetActorAttackBoost(Evt* script, s32 isInitialCall);
|
||||
ApiStatus GetActorDefenseBoost(Evt* script, s32 isInitialCall);
|
||||
ApiStatus BoostAttack(Evt* script, s32 isInitialCall);
|
||||
ApiStatus BoostDefense(Evt* script, s32 isInitialCall);
|
||||
ApiStatus VanishActor(Evt* script, s32 isInitialCall);
|
||||
ApiStatus ElectrifyActor(Evt* script, s32 isInitialCall);
|
||||
ApiStatus HealActor(Evt* script, s32 isInitialCall);
|
||||
ApiStatus WaitForBuffDone(Evt* script, s32 isInitialCall);
|
||||
ApiStatus CopyBuffs(Evt* script, s32 isInitialCall);
|
||||
ApiStatus GetMenuSelection(Evt* script, s32 isInitialCall);
|
||||
ApiStatus PlayerFallToGoal(Evt* script, s32 isInitialCall);
|
||||
ApiStatus PlayerLandJump(Evt* script, s32 isInitialCall);
|
||||
ApiStatus PlayerRunToGoal(Evt* script, s32 isInitialCall);
|
||||
ApiStatus CancelablePlayerRunToGoal(Evt* script, s32 isInitialCall);
|
||||
ApiStatus GetPlayerHP(Evt* script, s32 isInitialCall);
|
||||
ApiStatus PlayerDamageEnemy(Evt* script, s32 isInitialCall);
|
||||
ApiStatus PlayerPowerBounceEnemy(Evt* script, s32 isInitialCall);
|
||||
ApiStatus PlayerTestEnemy(Evt* script, s32 isInitialCall);
|
||||
ApiStatus DispatchDamagePlayerEvent(Evt* script, s32 isInitialCall);
|
||||
ApiStatus EnablePlayerBlur(Evt* script, s32 isInitialCall);
|
||||
ApiStatus func_80274A18(Evt* script, s32 isInitialCall);
|
||||
ApiStatus func_802752AC(Evt* script, s32 isInitialCall);
|
||||
ApiStatus func_80275F00(Evt* script, s32 isInitialCall);
|
||||
ApiStatus GetPlayerActionSuccess(Evt* script, s32 isInitialCall);
|
||||
ApiStatus BindTakeTurn(Evt* script, s32 isInitialCall);
|
||||
ApiStatus PauseTakeTurn(Evt* script, s32 isInitialCall);
|
||||
ApiStatus ResumeTakeTurn(Evt* script, s32 isInitialCall);
|
||||
ApiStatus BindIdle(Evt* script, s32 isInitialCall);
|
||||
ApiStatus EnableIdleScript(Evt* script, s32 isInitialCall);
|
||||
ApiStatus BindHandleEvent(Evt* script, s32 isInitialCall);
|
||||
ApiStatus BindHandlePhase(Evt* script, s32 isInitialCall);
|
||||
ApiStatus JumpToGoal(Evt* script, s32 isInitialCall);
|
||||
ApiStatus IdleJumpToGoal(Evt* script, s32 isInitialCall);
|
||||
ApiStatus JumpWithBounce(Evt* script, s32 isInitialCall);
|
||||
ApiStatus LandJump(Evt* script, s32 isInitialCall);
|
||||
ApiStatus FallToGoal(Evt* script, s32 isInitialCall);
|
||||
ApiStatus RunToGoal(Evt* script, s32 isInitialCall);
|
||||
ApiStatus IdleRunToGoal(Evt* script, s32 isInitialCall);
|
||||
ApiStatus JumpPartTo(Evt* script, s32 isInitialCall);
|
||||
ApiStatus FallPartTo(Evt* script, s32 isInitialCall);
|
||||
ApiStatus LandJumpPart(Evt* script, s32 isInitialCall);
|
||||
ApiStatus RunPartTo(Evt* script, s32 isInitialCall);
|
||||
ApiStatus FlyToGoal(Evt* script, s32 isInitialCall);
|
||||
ApiStatus IdleFlyToGoal(Evt* script, s32 isInitialCall);
|
||||
ApiStatus FlyPartTo(Evt* script, s32 isInitialCall);
|
||||
ApiStatus GetLastEvent(Evt* script, s32 isInitialCall);
|
||||
ApiStatus SetTargetActor(Evt* script, s32 isInitialCall);
|
||||
ApiStatus SetEnemyHP(Evt* script, s32 isInitialCall);
|
||||
ApiStatus GetActorHP(Evt* script, s32 isInitialCall);
|
||||
ApiStatus GetEnemyMaxHP(Evt* script, s32 isInitialCall);
|
||||
ApiStatus RemoveActor(Evt* script, s32 isInitialCall);
|
||||
ApiStatus DropStarPoints(Evt* script, s32 isInitialCall);
|
||||
ApiStatus SetDefenseTable(Evt* script, s32 isInitialCall);
|
||||
ApiStatus SetStatusTable(Evt* script, s32 isInitialCall);
|
||||
ApiStatus SetIdleAnimations(Evt* script, s32 isInitialCall);
|
||||
ApiStatus EnemyDamageTarget(Evt* script, s32 isInitialCall);
|
||||
ApiStatus EnemyFollowupAfflictTarget(Evt* script, s32 isInitialCall);
|
||||
ApiStatus EnemyTestTarget(Evt* script, s32 isInitialCall);
|
||||
ApiStatus DispatchDamageEvent(Evt* script, s32 isInitialCall);
|
||||
ApiStatus DispatchEvent(Evt* script, s32 isInitialCall);
|
||||
ApiStatus ShowHealthBar(Evt* script, s32 isInitialCall);
|
||||
ApiStatus SetTargetOffset(Evt* script, s32 isInitialCall);
|
||||
ApiStatus SetProjectileTargetOffset(Evt* script, s32 isInitialCall);
|
||||
ApiStatus EnableActorBlur(Evt* script, s32 isInitialCall);
|
||||
ApiStatus AfflictActor(Evt* script, s32 isInitialCall);
|
||||
ApiStatus GetInstigatorValue(Evt* script, s32 isInitialCall);
|
||||
ApiStatus GetEncounterTrigger(Evt* script, s32 isInitialCall);
|
||||
ApiStatus YieldTurn(Evt* script, s32 isInitialCall);
|
||||
ApiStatus SetActorSize(Evt* script, s32 isInitialCall);
|
||||
ApiStatus GetActorSize(Evt* script, s32 isInitialCall);
|
||||
ApiStatus SetPartSize(Evt* script, s32 isInitialCall);
|
||||
ApiStatus GetOriginalActorType(Evt* script, s32 isInitialCall);
|
||||
ApiStatus GetCurrentActorType(Evt* script, s32 isInitialCall);
|
||||
ApiStatus GetLastDamage(Evt* script, s32 isInitialCall);
|
||||
ApiStatus EnableActorGlow(Evt* script, s32 isInitialCall);
|
||||
ApiStatus WasStatusInflicted(Evt* script, s32 isInitialCall);
|
||||
ApiStatus CopyStatusEffects(Evt* script, s32 isInitialCall);
|
||||
ApiStatus ClearStatusEffects(Evt* script, s32 isInitialCall);
|
||||
ApiStatus MakeOwnerTargetIndex(Evt* script, s32 isInitialCall);
|
||||
ApiStatus GetActorLevel(Evt* script, s32 isInitialCall);
|
||||
ApiStatus PartnerDamageEnemy(Evt* script, s32 isInitialCall);
|
||||
ApiStatus PartnerAfflictEnemy(Evt* script, s32 isInitialCall);
|
||||
ApiStatus PartnerPowerBounceEnemy(Evt* script, s32 isInitialCall);
|
||||
ApiStatus PartnerTestEnemy(Evt* script, s32 isInitialCall);
|
||||
ApiStatus DeletePartner(Evt* script, s32 isInitialCall);
|
||||
ApiStatus GetDamageIntensity(Evt* script, s32 isInitialCall);
|
||||
ApiStatus AddEffectOffset(Evt* script, s32 isInitialCall);
|
||||
ApiStatus LoadStarPowerScript(Evt* script, s32 isInitialCall);
|
||||
ApiStatus CamPresetUpdate_B(Evt* script, s32 isInitialCall);
|
||||
ApiStatus CamPresetUpdate_F(Evt* script, s32 isInitialCall);
|
||||
ApiStatus CamPresetUpdate_M(Evt* script, s32 isInitialCall);
|
||||
ApiStatus CamPresetUpdate_G(Evt* script, s32 isInitialCall);
|
||||
ApiStatus CamPresetUpdate_I(Evt* script, s32 isInitialCall);
|
||||
ApiStatus CamPresetUpdate_H(Evt* script, s32 isInitialCall);
|
||||
ApiStatus CamPresetUpdate_N(Evt* script, s32 isInitialCall);
|
||||
ApiStatus BattleCamImpl_Default(Evt* script, s32 isInitialCall);
|
||||
ApiStatus CamPresetUpdate_D(Evt* script, s32 isInitialCall);
|
||||
ApiStatus CamPresetUpdate_E(Evt* script, s32 isInitialCall);
|
||||
ApiStatus CamPresetUpdate_J(Evt* script, s32 isInitialCall);
|
||||
ApiStatus CamPresetUpdate_K(Evt* script, s32 isInitialCall);
|
||||
ApiStatus CamPresetUpdate_L(Evt* script, s32 isInitialCall);
|
||||
ApiStatus SetBattleCamPos(Evt* script, s32 isInitialCall);
|
||||
ApiStatus SetBattleCamParam(Evt* script, s32 isInitialCall);
|
||||
ApiStatus GetPartAnimNotify(Evt* script, s32 isInitialCall);
|
||||
ApiStatus InitAnimatedModels(Evt* script, s32 isInitialCall);
|
||||
ApiStatus func_8024CE9C(Evt* script, s32 isInitialCall);
|
||||
ApiStatus func_802CAE50(Evt* script, s32 isInitialCall);
|
||||
ApiStatus func_802807D0(Evt* script, s32 isInitialCall);
|
||||
ApiStatus PartnerYieldTurn(Evt* script, s32 isInitialCall); ///< YieldTurn copy
|
||||
ApiStatus func_8024ECF8(Evt* script, s32 isInitialCall);
|
||||
ApiStatus UseBattleCamPresetImmediately(Evt* script, s32 isInitialCall);
|
||||
ApiStatus UseBattleCamPresetWait(Evt* script, s32 isInitialCall);
|
||||
ApiStatus HideHealthBar(Evt* script, s32 isInitialCall);
|
||||
ApiStatus GetPartnerActionSuccess(Evt* script, s32 isInitialCall);
|
||||
ApiStatus CreateNpc(Evt* script, s32 isInitialCall);
|
||||
ApiStatus EnableBattleStatusBar(Evt* script, s32 isInitialCall);
|
||||
ApiStatus PlayerYieldTurn(Evt* script, s32 isInitialCall);
|
||||
ApiStatus ShowStartRecoveryShimmer(Evt* script, s32 isInitialCall);
|
||||
ApiStatus ShowRecoveryShimmer(Evt* script, s32 isInitialCall);
|
||||
ApiStatus func_80273444(Evt* script, s32 isInitialCall);
|
||||
ApiStatus WaitForState(Evt* script, s32 isInitialCall);
|
||||
ApiStatus SetBattleMenuEnabledFlags(Evt* script, s32 isInitialCall);
|
||||
ApiStatus SetBattleState(Evt* script, s32 isInitialCall);
|
||||
ApiStatus func_8027D434(Evt* script, s32 isInitialCall);
|
||||
ApiStatus func_8026F1A0(Evt* script, s32 isInitialCall);
|
||||
ApiStatus PlayLoopingSoundAtActor(Evt* script, s32 isInitialCall);
|
||||
ApiStatus StopLoopingSoundAtActor(Evt* script, s32 isInitialCall);
|
||||
ApiStatus EnableActorPaletteEffects(Evt* script, s32 isInitialCall);
|
||||
ApiStatus SetActorPaletteSwapParams(Evt* script, s32 isInitialCall);
|
||||
ApiStatus BattleCamTargetActorPart(Evt* script, s32 isInitialCall);
|
||||
ApiStatus GetDarknessStatus(Evt* script, s32 isInitialCall);
|
||||
ApiStatus CancelEnemyTurn(Evt* script, s32 isInitialCall);
|
||||
ApiStatus GetAnimatedNodeRotation(Evt* script, s32 isInitialCall);
|
||||
ApiStatus GetAnimatedNodePosition(Evt* script, s32 isInitialCall);
|
||||
ApiStatus DispatchEventPlayer(Evt* script, s32 isInitialCall);
|
||||
API_CALLABLE(EnablePartnerBlur);
|
||||
API_CALLABLE(DisablePartnerBlur);
|
||||
API_CALLABLE(UseBattleCamPreset);
|
||||
API_CALLABLE(SetBattleCamTarget);
|
||||
API_CALLABLE(SetBattleCamOffsetZ);
|
||||
API_CALLABLE(AddBattleCamOffsetZ);
|
||||
API_CALLABLE(SetBattleCamYaw);
|
||||
API_CALLABLE(BattleCamTargetActor);
|
||||
API_CALLABLE(MoveBattleCamOver);
|
||||
API_CALLABLE(SetBattleCamZoom);
|
||||
API_CALLABLE(AddBattleCamZoom);
|
||||
API_CALLABLE(FreezeBattleCam);
|
||||
API_CALLABLE(func_8024EDA4);
|
||||
API_CALLABLE(ShowMessageBox);
|
||||
API_CALLABLE(ShowVariableMessageBox);
|
||||
API_CALLABLE(IsMessageBoxDisplayed);
|
||||
API_CALLABLE(WaitForMessageBoxDone);
|
||||
API_CALLABLE(ForceCloseMessageBox);
|
||||
API_CALLABLE(SetMessageBoxDuration);
|
||||
API_CALLABLE(ItemDamageEnemy);
|
||||
API_CALLABLE(ItemAfflictEnemy);
|
||||
API_CALLABLE(ItemSpookEnemy);
|
||||
API_CALLABLE(ItemCheckHit);
|
||||
API_CALLABLE(ActorSpeak);
|
||||
API_CALLABLE(EndActorSpeech);
|
||||
API_CALLABLE(ShowBattleChoice);
|
||||
API_CALLABLE(OverrideBattleDmaDest);
|
||||
API_CALLABLE(LoadBattleDmaData);
|
||||
API_CALLABLE(EnableBattleFloorReflections);
|
||||
API_CALLABLE(SetDarknessMode);
|
||||
API_CALLABLE(PlaySoundAtActor);
|
||||
API_CALLABLE(PlaySoundAtPart);
|
||||
API_CALLABLE(SetForegroundModelsVisibleUnchecked);
|
||||
API_CALLABLE(SetForegroundModelsVisible);
|
||||
API_CALLABLE(MakeStatusField);
|
||||
API_CALLABLE(MultiplyByActorScale);
|
||||
API_CALLABLE(MultiplyVec2ByActorScale);
|
||||
API_CALLABLE(MultiplyVec3ByActorScale);
|
||||
API_CALLABLE(ApplyShrinkFromOwner);
|
||||
API_CALLABLE(StartRumble);
|
||||
API_CALLABLE(HasMerleeCastsLeft);
|
||||
API_CALLABLE(SpawnRecoverHeartFX);
|
||||
API_CALLABLE(SpawnRecoverFlowerFX);
|
||||
API_CALLABLE(IncrementPlayerHP);
|
||||
API_CALLABLE(IncrementPlayerFP);
|
||||
API_CALLABLE(StartRumbleWithParams);
|
||||
API_CALLABLE(LoadItemScript);
|
||||
API_CALLABLE(LoadMoveScript);
|
||||
API_CALLABLE(LoadBattleSection);
|
||||
API_CALLABLE(GetBattlePhase);
|
||||
API_CALLABLE(GetLastElement);
|
||||
API_CALLABLE(SetDamageSource);
|
||||
API_CALLABLE(GetDamageSource);
|
||||
API_CALLABLE(SetGoalToHome);
|
||||
API_CALLABLE(SetIdleGoalToHome);
|
||||
API_CALLABLE(SetGoalToIndex);
|
||||
API_CALLABLE(GetIndexFromPos);
|
||||
API_CALLABLE(GetIndexFromHome);
|
||||
API_CALLABLE(CountTargets);
|
||||
API_CALLABLE(ForceHomePos);
|
||||
API_CALLABLE(SetHomePos);
|
||||
API_CALLABLE(SetGoalToTarget);
|
||||
API_CALLABLE(SetPartGoalToTarget);
|
||||
API_CALLABLE(SetGoalToFirstTarget);
|
||||
API_CALLABLE(SetGoalPos);
|
||||
API_CALLABLE(SetIdleGoal);
|
||||
API_CALLABLE(AddGoalPos);
|
||||
API_CALLABLE(GetGoalPos);
|
||||
API_CALLABLE(GetIdleGoal);
|
||||
API_CALLABLE(GetPartTarget);
|
||||
API_CALLABLE(GetActorPos);
|
||||
API_CALLABLE(GetPartOffset);
|
||||
API_CALLABLE(GetPartPos);
|
||||
API_CALLABLE(GetHomePos);
|
||||
API_CALLABLE(SetActorPos);
|
||||
API_CALLABLE(SetPartPos);
|
||||
API_CALLABLE(SetEnemyTargetOffset);
|
||||
API_CALLABLE(SetAnimation);
|
||||
API_CALLABLE(GetAnimation);
|
||||
API_CALLABLE(SetAnimationRate);
|
||||
API_CALLABLE(SetActorYaw);
|
||||
API_CALLABLE(GetActorYaw);
|
||||
API_CALLABLE(SetPartYaw);
|
||||
API_CALLABLE(GetPartYaw);
|
||||
API_CALLABLE(SetActorJumpGravity);
|
||||
API_CALLABLE(SetActorIdleJumpGravity);
|
||||
API_CALLABLE(SetActorSpeed);
|
||||
API_CALLABLE(SetActorIdleSpeed);
|
||||
API_CALLABLE(SetPartJumpGravity);
|
||||
API_CALLABLE(SetPartMoveSpeed);
|
||||
API_CALLABLE(SetJumpAnimations);
|
||||
API_CALLABLE(AddActorPos);
|
||||
API_CALLABLE(SetActorDispOffset);
|
||||
API_CALLABLE(GetPartDispOffset);
|
||||
API_CALLABLE(SetPartDispOffset);
|
||||
API_CALLABLE(AddPartDispOffset);
|
||||
API_CALLABLE(FreezeBattleState);
|
||||
API_CALLABLE(GetActorVar);
|
||||
API_CALLABLE(SetActorVar);
|
||||
API_CALLABLE(AddActorVar);
|
||||
API_CALLABLE(GetPartMovementVar);
|
||||
API_CALLABLE(SetPartMovementVar);
|
||||
API_CALLABLE(AddPartMovementVar);
|
||||
API_CALLABLE(SetActorRotation);
|
||||
API_CALLABLE(SetActorRotationOffset);
|
||||
API_CALLABLE(GetActorRotation);
|
||||
API_CALLABLE(SetPartRotation);
|
||||
API_CALLABLE(SetPartRotationOffset);
|
||||
API_CALLABLE(GetPartRotation);
|
||||
API_CALLABLE(SetActorScale);
|
||||
API_CALLABLE(SetActorScaleModifier);
|
||||
API_CALLABLE(GetActorScale);
|
||||
API_CALLABLE(SetPartScale);
|
||||
API_CALLABLE(GetPartScale);
|
||||
API_CALLABLE(GetBattleFlags);
|
||||
API_CALLABLE(SetBattleFlagBits);
|
||||
API_CALLABLE(GetBattleFlags2);
|
||||
API_CALLABLE(SetBattleFlagBits2);
|
||||
API_CALLABLE(SetActorFlags);
|
||||
API_CALLABLE(SetActorFlagBits);
|
||||
API_CALLABLE(GetActorFlags);
|
||||
API_CALLABLE(SetPartFlags);
|
||||
API_CALLABLE(SetPartFlagBits);
|
||||
API_CALLABLE(SetPartTargetFlags);
|
||||
API_CALLABLE(SetPartTargetFlagBits);
|
||||
API_CALLABLE(GetPartFlags);
|
||||
API_CALLABLE(GetPartTargetFlags);
|
||||
API_CALLABLE(SetPartEventFlags);
|
||||
API_CALLABLE(SetPartEventBits);
|
||||
API_CALLABLE(GetPartEventFlags);
|
||||
API_CALLABLE(HPBarToHome);
|
||||
API_CALLABLE(HPBarToCurrent);
|
||||
API_CALLABLE(SetHPBarOffset);
|
||||
API_CALLABLE(SetActorStatusOffsets);
|
||||
API_CALLABLE(SummonEnemy);
|
||||
API_CALLABLE(GetOwnerID);
|
||||
API_CALLABLE(SetOwnerID);
|
||||
API_CALLABLE(ActorExists);
|
||||
API_CALLABLE(SetEnabledStarPowers);
|
||||
API_CALLABLE(SetBattleInputMask);
|
||||
API_CALLABLE(SetBattleInputButtons);
|
||||
API_CALLABLE(CheckButtonPress);
|
||||
API_CALLABLE(CheckButtonHeld);
|
||||
API_CALLABLE(CheckButtonDown);
|
||||
API_CALLABLE(GetBattleState);
|
||||
API_CALLABLE(CreateCurrentPosTargetList);
|
||||
API_CALLABLE(CreateHomeTargetList);
|
||||
API_CALLABLE(InitTargetIterator);
|
||||
API_CALLABLE(SetOwnerTarget);
|
||||
API_CALLABLE(ChooseNextTarget);
|
||||
API_CALLABLE(GetTargetListLength);
|
||||
API_CALLABLE(GetOwnerTarget);
|
||||
API_CALLABLE(func_8026E914);
|
||||
API_CALLABLE(GetPlayerActorID);
|
||||
API_CALLABLE(GetDistanceToGoal);
|
||||
API_CALLABLE(SetActorPaletteEffect);
|
||||
API_CALLABLE(AddActorDecoration);
|
||||
API_CALLABLE(RemoveActorDecoration);
|
||||
API_CALLABLE(ModifyActorDecoration);
|
||||
API_CALLABLE(UseIdleAnimation);
|
||||
API_CALLABLE(GetStatusFlags);
|
||||
API_CALLABLE(RemovePlayerBuffs);
|
||||
API_CALLABLE(SetPartAlpha);
|
||||
API_CALLABLE(CreatePartShadow);
|
||||
API_CALLABLE(RemovePartShadow);
|
||||
API_CALLABLE(SetEndBattleFadeOutRate);
|
||||
API_CALLABLE(SetBattleVar);
|
||||
API_CALLABLE(GetBattleVar);
|
||||
API_CALLABLE(ResetAllActorSounds);
|
||||
API_CALLABLE(SetActorSounds);
|
||||
API_CALLABLE(ResetActorSounds);
|
||||
API_CALLABLE(SetPartSounds);
|
||||
API_CALLABLE(SetActorType);
|
||||
API_CALLABLE(ShowShockEffect);
|
||||
API_CALLABLE(GetActorAttackBoost);
|
||||
API_CALLABLE(GetActorDefenseBoost);
|
||||
API_CALLABLE(BoostAttack);
|
||||
API_CALLABLE(BoostDefense);
|
||||
API_CALLABLE(VanishActor);
|
||||
API_CALLABLE(ElectrifyActor);
|
||||
API_CALLABLE(HealActor);
|
||||
API_CALLABLE(WaitForBuffDone);
|
||||
API_CALLABLE(CopyBuffs);
|
||||
API_CALLABLE(GetMenuSelection);
|
||||
API_CALLABLE(PlayerFallToGoal);
|
||||
API_CALLABLE(PlayerLandJump);
|
||||
API_CALLABLE(PlayerRunToGoal);
|
||||
API_CALLABLE(CancelablePlayerRunToGoal);
|
||||
API_CALLABLE(GetPlayerHP);
|
||||
API_CALLABLE(PlayerDamageEnemy);
|
||||
API_CALLABLE(PlayerPowerBounceEnemy);
|
||||
API_CALLABLE(PlayerTestEnemy);
|
||||
API_CALLABLE(DispatchDamagePlayerEvent);
|
||||
API_CALLABLE(EnablePlayerBlur);
|
||||
API_CALLABLE(func_80274A18);
|
||||
API_CALLABLE(func_802752AC);
|
||||
API_CALLABLE(func_80275F00);
|
||||
API_CALLABLE(GetPlayerActionSuccess);
|
||||
API_CALLABLE(BindTakeTurn);
|
||||
API_CALLABLE(PauseTakeTurn);
|
||||
API_CALLABLE(ResumeTakeTurn);
|
||||
API_CALLABLE(BindIdle);
|
||||
API_CALLABLE(EnableIdleScript);
|
||||
API_CALLABLE(BindHandleEvent);
|
||||
API_CALLABLE(BindHandlePhase);
|
||||
API_CALLABLE(JumpToGoal);
|
||||
API_CALLABLE(IdleJumpToGoal);
|
||||
API_CALLABLE(JumpWithBounce);
|
||||
API_CALLABLE(LandJump);
|
||||
API_CALLABLE(FallToGoal);
|
||||
API_CALLABLE(RunToGoal);
|
||||
API_CALLABLE(IdleRunToGoal);
|
||||
API_CALLABLE(JumpPartTo);
|
||||
API_CALLABLE(FallPartTo);
|
||||
API_CALLABLE(LandJumpPart);
|
||||
API_CALLABLE(RunPartTo);
|
||||
API_CALLABLE(FlyToGoal);
|
||||
API_CALLABLE(IdleFlyToGoal);
|
||||
API_CALLABLE(FlyPartTo);
|
||||
API_CALLABLE(GetLastEvent);
|
||||
API_CALLABLE(SetTargetActor);
|
||||
API_CALLABLE(SetEnemyHP);
|
||||
API_CALLABLE(GetActorHP);
|
||||
API_CALLABLE(GetEnemyMaxHP);
|
||||
API_CALLABLE(RemoveActor);
|
||||
API_CALLABLE(DropStarPoints);
|
||||
API_CALLABLE(SetDefenseTable);
|
||||
API_CALLABLE(SetStatusTable);
|
||||
API_CALLABLE(SetIdleAnimations);
|
||||
API_CALLABLE(EnemyDamageTarget);
|
||||
API_CALLABLE(EnemyFollowupAfflictTarget);
|
||||
API_CALLABLE(EnemyTestTarget);
|
||||
API_CALLABLE(DispatchDamageEvent);
|
||||
API_CALLABLE(DispatchEvent);
|
||||
API_CALLABLE(ShowHealthBar);
|
||||
API_CALLABLE(SetTargetOffset);
|
||||
API_CALLABLE(SetProjectileTargetOffset);
|
||||
API_CALLABLE(EnableActorBlur);
|
||||
API_CALLABLE(AfflictActor);
|
||||
API_CALLABLE(GetInstigatorValue);
|
||||
API_CALLABLE(GetEncounterTrigger);
|
||||
API_CALLABLE(YieldTurn);
|
||||
API_CALLABLE(SetActorSize);
|
||||
API_CALLABLE(GetActorSize);
|
||||
API_CALLABLE(SetPartSize);
|
||||
API_CALLABLE(GetOriginalActorType);
|
||||
API_CALLABLE(GetCurrentActorType);
|
||||
API_CALLABLE(GetLastDamage);
|
||||
API_CALLABLE(EnableActorGlow);
|
||||
API_CALLABLE(WasStatusInflicted);
|
||||
API_CALLABLE(CopyStatusEffects);
|
||||
API_CALLABLE(ClearStatusEffects);
|
||||
API_CALLABLE(MakeOwnerTargetIndex);
|
||||
API_CALLABLE(GetActorLevel);
|
||||
API_CALLABLE(PartnerDamageEnemy);
|
||||
API_CALLABLE(PartnerAfflictEnemy);
|
||||
API_CALLABLE(PartnerPowerBounceEnemy);
|
||||
API_CALLABLE(PartnerTestEnemy);
|
||||
API_CALLABLE(DeletePartner);
|
||||
API_CALLABLE(GetDamageIntensity);
|
||||
API_CALLABLE(AddEffectOffset);
|
||||
API_CALLABLE(LoadStarPowerScript);
|
||||
API_CALLABLE(CamPresetUpdate_B);
|
||||
API_CALLABLE(CamPresetUpdate_F);
|
||||
API_CALLABLE(CamPresetUpdate_M);
|
||||
API_CALLABLE(CamPresetUpdate_G);
|
||||
API_CALLABLE(CamPresetUpdate_I);
|
||||
API_CALLABLE(CamPresetUpdate_H);
|
||||
API_CALLABLE(CamPresetUpdate_N);
|
||||
API_CALLABLE(BattleCamImpl_Default);
|
||||
API_CALLABLE(CamPresetUpdate_D);
|
||||
API_CALLABLE(CamPresetUpdate_E);
|
||||
API_CALLABLE(CamPresetUpdate_J);
|
||||
API_CALLABLE(CamPresetUpdate_K);
|
||||
API_CALLABLE(CamPresetUpdate_L);
|
||||
API_CALLABLE(SetBattleCamPos);
|
||||
API_CALLABLE(SetBattleCamParam);
|
||||
API_CALLABLE(GetPartAnimNotify);
|
||||
API_CALLABLE(InitAnimatedModels);
|
||||
API_CALLABLE(func_8024CE9C);
|
||||
API_CALLABLE(func_802CAE50);
|
||||
API_CALLABLE(func_802807D0);
|
||||
API_CALLABLE(PartnerYieldTurn); ///< YieldTurn copy
|
||||
API_CALLABLE(func_8024ECF8);
|
||||
API_CALLABLE(UseBattleCamPresetImmediately);
|
||||
API_CALLABLE(UseBattleCamPresetWait);
|
||||
API_CALLABLE(HideHealthBar);
|
||||
API_CALLABLE(GetPartnerActionSuccess);
|
||||
API_CALLABLE(CreateNpc);
|
||||
API_CALLABLE(EnableBattleStatusBar);
|
||||
API_CALLABLE(PlayerYieldTurn);
|
||||
API_CALLABLE(ShowStartRecoveryShimmer);
|
||||
API_CALLABLE(ShowRecoveryShimmer);
|
||||
API_CALLABLE(func_80273444);
|
||||
API_CALLABLE(WaitForState);
|
||||
API_CALLABLE(SetBattleMenuEnabledFlags);
|
||||
API_CALLABLE(SetBattleState);
|
||||
API_CALLABLE(func_8027D434);
|
||||
API_CALLABLE(func_8026F1A0);
|
||||
API_CALLABLE(PlayLoopingSoundAtActor);
|
||||
API_CALLABLE(StopLoopingSoundAtActor);
|
||||
API_CALLABLE(EnableActorPaletteEffects);
|
||||
API_CALLABLE(SetActorPaletteSwapParams);
|
||||
API_CALLABLE(BattleCamTargetActorPart);
|
||||
API_CALLABLE(GetDarknessStatus);
|
||||
API_CALLABLE(CancelEnemyTurn);
|
||||
API_CALLABLE(GetAnimatedNodeRotation);
|
||||
API_CALLABLE(GetAnimatedNodePosition);
|
||||
API_CALLABLE(DispatchEventPlayer);
|
||||
|
||||
extern EvtScript EVS_Mario_HandlePhase;
|
||||
extern EvtScript EVS_Peach_HandlePhase;
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -578,7 +578,7 @@
|
||||
///
|
||||
/// 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:
|
||||
///
|
||||
|
@ -6,19 +6,19 @@
|
||||
|
||||
#include "script_api/common.h"
|
||||
|
||||
ApiStatus MakeNpcs(Evt* script, s32 isInitialCall);
|
||||
ApiStatus BasicAI_Main(Evt* script, s32 isInitialCall);
|
||||
ApiStatus ResetFromLava(Evt* script, s32 isInitialCall);
|
||||
ApiStatus MakeShop(Evt* script, s32 isInitialCall);
|
||||
ApiStatus MakeShopOwner(Evt* script, s32 isInitialCall);
|
||||
ApiStatus CreateMapRoom(Evt* script, s32 isInitialCall);
|
||||
ApiStatus CheckActionState(Evt* script, s32 isInitialCall);
|
||||
ApiStatus CreatePushBlockGrid(Evt* script, s32 isInitialCall);
|
||||
ApiStatus SetPushBlock(Evt* script, s32 isInitialCall);
|
||||
ApiStatus GetPushBlock(Evt* script, s32 isInitialCall);
|
||||
ApiStatus GetGridIndexFromPos(Evt* script, s32 isInitialCall);
|
||||
ApiStatus SetPushBlockFallEffect(Evt* script, s32 isInitialCall);
|
||||
ApiStatus TeleportPartnerToPlayer(Evt* script, s32 isInitialCall);
|
||||
API_CALLABLE(MakeNpcs);
|
||||
API_CALLABLE(BasicAI_Main);
|
||||
API_CALLABLE(ResetFromLava);
|
||||
API_CALLABLE(MakeShop);
|
||||
API_CALLABLE(MakeShopOwner);
|
||||
API_CALLABLE(CreateMapRoom);
|
||||
API_CALLABLE(CheckActionState);
|
||||
API_CALLABLE(CreatePushBlockGrid);
|
||||
API_CALLABLE(SetPushBlock);
|
||||
API_CALLABLE(GetPushBlock);
|
||||
API_CALLABLE(GetGridIndexFromPos);
|
||||
API_CALLABLE(SetPushBlockFallEffect);
|
||||
API_CALLABLE(TeleportPartnerToPlayer);
|
||||
|
||||
extern EvtScript EnterWalk;
|
||||
extern EvtScript EnterWalkShort;
|
||||
|
@ -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;
|
||||
Npc* npc = get_npc_unsafe(enemy->npcID);
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
|
12
src/38F00.c
12
src/38F00.c
@ -1,8 +1,8 @@
|
||||
#include "common.h"
|
||||
|
||||
ApiStatus func_8005DB00(Evt* script, s32 isInitialCall);
|
||||
ApiStatus func_8005DD54(Evt* script, s32 isInitialCall);
|
||||
ApiStatus func_8005DDF0(Evt* script, s32 isInitialCall);
|
||||
API_CALLABLE(func_8005DB00);
|
||||
API_CALLABLE(func_8005DD54);
|
||||
API_CALLABLE(func_8005DDF0);
|
||||
|
||||
EvtScript EVS_800936C0 = {
|
||||
EVT_CALL(func_8005DB00)
|
||||
@ -85,7 +85,7 @@ EvtScript D_800939B4 = {
|
||||
EVT_END
|
||||
};
|
||||
|
||||
ApiStatus func_8005DB00(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(func_8005DB00) {
|
||||
Npc* npc;
|
||||
f32 targetDir, npcYaw;
|
||||
PlayerStatus* playerStatus;
|
||||
@ -143,7 +143,7 @@ ApiStatus func_8005DB00(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_BLOCK;
|
||||
}
|
||||
|
||||
ApiStatus func_8005DD54(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(func_8005DD54) {
|
||||
f32 angle = clamp_angle(script->varTable[0]);
|
||||
|
||||
script->varTable[0] = angle;
|
||||
@ -157,7 +157,7 @@ ApiStatus func_8005DD54(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus func_8005DDF0(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(func_8005DDF0) {
|
||||
if (gCurrentEncounter.unk_08 != -1) {
|
||||
return ApiStatus_DONE1;
|
||||
} else {
|
||||
|
@ -874,7 +874,7 @@ void appendGfx_animator_node(ModelAnimator* animator, AnimatorNode* node, Matrix
|
||||
if (!gAnimModelFogEnabled) {
|
||||
gDPSetCombineMode(gMainGfxPos++, G_CC_DECALRGBA, G_CC_DECALRGBA);
|
||||
} else {
|
||||
gDPSetCombineMode(gMainGfxPos++, PM_CC_42, PM_CC_18);
|
||||
gDPSetCombineMode(gMainGfxPos++, PM_CC_42, PM_CC2_MULTIPLY_SHADE);
|
||||
}
|
||||
gDPPipeSync(gMainGfxPos++);
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
ApiStatus BindTakeTurn(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(BindTakeTurn) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 actorID = evt_get_variable(script, *args++);
|
||||
EvtScript* takeTurnScript;
|
||||
@ -911,7 +911,7 @@ ApiStatus BindTakeTurn(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus PauseTakeTurn(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(PauseTakeTurn) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 actorID = evt_get_variable(script, *args++);
|
||||
|
||||
@ -924,7 +924,7 @@ ApiStatus PauseTakeTurn(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus ResumeTakeTurn(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(ResumeTakeTurn) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 actorID = evt_get_variable(script, *args++);
|
||||
|
||||
@ -937,7 +937,7 @@ ApiStatus ResumeTakeTurn(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus BindIdle(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(BindIdle) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 actorID = evt_get_variable(script, *args++);
|
||||
EvtScript* idleCode;
|
||||
@ -964,7 +964,7 @@ ApiStatus BindIdle(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus EnableIdleScript(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(EnableIdleScript) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 actorID = evt_get_variable(script, *args++);
|
||||
s32 var1;
|
||||
@ -995,7 +995,7 @@ ApiStatus EnableIdleScript(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus BindHandleEvent(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(BindHandleEvent) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 actorID = evt_get_variable(script, *args++);
|
||||
EvtScript* src;
|
||||
@ -1009,7 +1009,7 @@ ApiStatus BindHandleEvent(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus BindHandlePhase(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(BindHandlePhase) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 actorID = evt_get_variable(script, *args++);
|
||||
EvtScript* src;
|
||||
@ -1023,7 +1023,7 @@ ApiStatus BindHandlePhase(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus JumpToGoal(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(JumpToGoal) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
Actor* actor;
|
||||
ActorState* actorState;
|
||||
@ -1132,7 +1132,7 @@ ApiStatus JumpToGoal(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE1;
|
||||
}
|
||||
|
||||
ApiStatus IdleJumpToGoal(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(IdleJumpToGoal) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
Actor* actor;
|
||||
ActorMovement* movement;
|
||||
@ -1220,7 +1220,7 @@ ApiStatus IdleJumpToGoal(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_BLOCK;
|
||||
}
|
||||
|
||||
ApiStatus JumpToGoalSimple2(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(JumpToGoalSimple2) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
ActorState* state;
|
||||
f32 posX, posY, posZ;
|
||||
@ -1306,7 +1306,7 @@ ApiStatus JumpToGoalSimple2(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_BLOCK;
|
||||
}
|
||||
|
||||
ApiStatus JumpWithBounce(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(JumpWithBounce) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
Actor* actor;
|
||||
ActorState* actorState;
|
||||
@ -1408,7 +1408,7 @@ ApiStatus JumpWithBounce(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_BLOCK;
|
||||
}
|
||||
|
||||
ApiStatus LandJump(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(LandJump) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
Actor* actor;
|
||||
|
||||
@ -1449,7 +1449,7 @@ ApiStatus LandJump(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_BLOCK;
|
||||
}
|
||||
|
||||
ApiStatus FallToGoal(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(FallToGoal) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
Actor* actor;
|
||||
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;
|
||||
Actor* actor;
|
||||
ActorState* actorState;
|
||||
@ -1651,7 +1651,7 @@ ApiStatus RunToGoal(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE1;
|
||||
}
|
||||
|
||||
ApiStatus IdleRunToGoal(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(IdleRunToGoal) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
Actor* actor;
|
||||
ActorMovement* movement;
|
||||
@ -1736,7 +1736,7 @@ ApiStatus IdleRunToGoal(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE1;
|
||||
}
|
||||
|
||||
ApiStatus JumpPartTo(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(JumpPartTo) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
Actor* actor;
|
||||
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;
|
||||
Actor* actor;
|
||||
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;
|
||||
Actor* actor;
|
||||
ActorPart* part;
|
||||
@ -1966,7 +1966,7 @@ ApiStatus LandJumpPart(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_BLOCK;
|
||||
}
|
||||
|
||||
ApiStatus RunPartTo(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(RunPartTo) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
Actor* actor;
|
||||
ActorPart* part;
|
||||
@ -2157,7 +2157,7 @@ f32 update_lerp_battle(s32 easing, f32 start, f32 end, s32 elapsed, s32 duration
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
ApiStatus FlyToGoal(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(FlyToGoal) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
Actor* actor;
|
||||
ActorState* actorState;
|
||||
@ -2312,7 +2312,7 @@ ApiStatus FlyToGoal(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_BLOCK;
|
||||
}
|
||||
|
||||
ApiStatus IdleFlyToGoal(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(IdleFlyToGoal) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
Actor* actor;
|
||||
ActorMovement* movement;
|
||||
@ -2413,7 +2413,7 @@ ApiStatus IdleFlyToGoal(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_BLOCK;
|
||||
}
|
||||
|
||||
ApiStatus FlyPartTo(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(FlyPartTo) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
Actor* actor;
|
||||
ActorPart* part;
|
||||
@ -2570,7 +2570,7 @@ ApiStatus FlyPartTo(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_BLOCK;
|
||||
}
|
||||
|
||||
ApiStatus GetLastEvent(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(GetLastEvent) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 actorID = evt_get_variable(script, *args++);
|
||||
s32 outVar;
|
||||
@ -2584,7 +2584,7 @@ ApiStatus GetLastEvent(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus SetTargetActor(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(SetTargetActor) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 actorID = evt_get_variable(script, *args++);
|
||||
s32 targetActorID;
|
||||
@ -2601,7 +2601,7 @@ ApiStatus SetTargetActor(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus SetEnemyHP(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(SetEnemyHP) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 actorID = evt_get_variable(script, *args++);
|
||||
s8 newHP;
|
||||
@ -2624,7 +2624,7 @@ ApiStatus SetEnemyHP(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus GetActorHP(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(GetActorHP) {
|
||||
PlayerData* playerData = &gPlayerData;
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 actorID = evt_get_variable(script, *args++);
|
||||
@ -2655,7 +2655,7 @@ ApiStatus GetActorHP(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus GetEnemyMaxHP(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(GetEnemyMaxHP) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 actorID = evt_get_variable(script, *args++);
|
||||
s32 outVar;
|
||||
@ -2669,7 +2669,7 @@ ApiStatus GetEnemyMaxHP(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus RemoveActor(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(RemoveActor) {
|
||||
BattleStatus* battleStatus = &gBattleStatus;
|
||||
EncounterStatus* currentEncounter = &gCurrentEncounter;
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
@ -2701,7 +2701,7 @@ ApiStatus RemoveActor(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus DropStarPoints(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(DropStarPoints) {
|
||||
BattleStatus* battleStatus = &gBattleStatus;
|
||||
PlayerData* playerData = &gPlayerData;
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
@ -2758,7 +2758,7 @@ ApiStatus DropStarPoints(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus SetDefenseTable(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(SetDefenseTable) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 actorID = evt_get_variable(script, *args++);
|
||||
s32 partID;
|
||||
@ -2774,7 +2774,7 @@ ApiStatus SetDefenseTable(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus SetStatusTable(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(SetStatusTable) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 actorID = evt_get_variable(script, *args++);
|
||||
u32* table;
|
||||
@ -2788,7 +2788,7 @@ ApiStatus SetStatusTable(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus SetIdleAnimations(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(SetIdleAnimations) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 actorID = evt_get_variable(script, *args++);
|
||||
s32 partID;
|
||||
@ -2804,7 +2804,7 @@ ApiStatus SetIdleAnimations(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus func_8027CC10(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(func_8027CC10) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 actorID = evt_get_variable(script, *args++);
|
||||
s32 partID;
|
||||
@ -2823,7 +2823,7 @@ ApiStatus func_8027CC10(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus EnemyDamageTarget(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(EnemyDamageTarget) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
BattleStatus* battleStatus = &gBattleStatus;
|
||||
s32 actorID = evt_get_variable(script, *args++);
|
||||
@ -2897,7 +2897,7 @@ ApiStatus EnemyDamageTarget(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus EnemyFollowupAfflictTarget(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(EnemyFollowupAfflictTarget) {
|
||||
BattleStatus* battleStatus = &gBattleStatus;
|
||||
BattleStatus* anotherBattleStatus = &gBattleStatus;
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
@ -2935,7 +2935,7 @@ ApiStatus EnemyFollowupAfflictTarget(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus EnemyTestTarget(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(EnemyTestTarget) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
BattleStatus* battleStatus = &gBattleStatus;
|
||||
s32 actorID = evt_get_variable(script, *args++);
|
||||
@ -3007,7 +3007,7 @@ ApiStatus EnemyTestTarget(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus DispatchDamageEvent(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(DispatchDamageEvent) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 actorID = evt_get_variable(script, *args++);
|
||||
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;
|
||||
s32 actorID = evt_get_variable(script, *args++);
|
||||
|
||||
@ -3045,7 +3045,7 @@ ApiStatus DispatchEvent(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus ShowHealthBar(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(ShowHealthBar) {
|
||||
s32 actorID = evt_get_variable(script, *script->ptrReadPos);
|
||||
|
||||
if (actorID == ACTOR_SELF) {
|
||||
@ -3056,7 +3056,7 @@ ApiStatus ShowHealthBar(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus HideHealthBar(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(HideHealthBar) {
|
||||
s32 actorID = evt_get_variable(script, *script->ptrReadPos);
|
||||
|
||||
if (actorID == ACTOR_SELF) {
|
||||
@ -3067,7 +3067,7 @@ ApiStatus HideHealthBar(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus SetTargetOffset(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(SetTargetOffset) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 actorID = evt_get_variable(script, *args++);
|
||||
s32 partID;
|
||||
@ -3091,7 +3091,7 @@ ApiStatus SetTargetOffset(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus func_8027D434(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(func_8027D434) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 actorID = evt_get_variable(script, *args++);
|
||||
s32 partID;
|
||||
@ -3107,7 +3107,7 @@ ApiStatus func_8027D434(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus SetProjectileTargetOffset(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(SetProjectileTargetOffset) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 actorID = evt_get_variable(script, *args++);
|
||||
s32 partID;
|
||||
@ -3131,7 +3131,7 @@ ApiStatus SetProjectileTargetOffset(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus EnableActorBlur(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(EnableActorBlur) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 actorID = 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;
|
||||
}
|
||||
|
||||
ApiStatus ForceDisableActorBlur(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(ForceDisableActorBlur) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 actorID = evt_get_variable(script, *args++);
|
||||
Actor* actor;
|
||||
@ -3167,7 +3167,7 @@ ApiStatus ForceDisableActorBlur(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus AfflictActor(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(AfflictActor) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 actorID = evt_get_variable(script, *args++);
|
||||
Actor* actor;
|
||||
@ -3206,7 +3206,7 @@ ApiStatus AfflictActor(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus GetInstigatorValue(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(GetInstigatorValue) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 actorID = evt_get_variable(script, *args++);
|
||||
s32 outVar = *args++;
|
||||
@ -3219,17 +3219,17 @@ ApiStatus GetInstigatorValue(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus GetEncounterTrigger(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(GetEncounterTrigger) {
|
||||
evt_set_variable(script, *script->ptrReadPos, gCurrentEncounter.hitType);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus YieldTurn(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(YieldTurn) {
|
||||
gBattleStatus.flags1 |= BS_FLAGS1_YIELD_TURN;
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus SetActorSize(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(SetActorSize) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 actorID = 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;
|
||||
}
|
||||
|
||||
ApiStatus GetActorSize(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(GetActorSize) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 actorID = evt_get_variable(script, *args++);
|
||||
s32 outY = *args++;
|
||||
@ -3270,7 +3270,7 @@ ApiStatus GetActorSize(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus SetPartSize(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(SetPartSize) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 actorID = 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;
|
||||
}
|
||||
|
||||
ApiStatus GetOriginalActorType(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(GetOriginalActorType) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 actorID = evt_get_variable(script, *args++);
|
||||
s32 outVar = *args++;
|
||||
@ -3310,7 +3310,7 @@ ApiStatus GetOriginalActorType(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus GetCurrentActorType(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(GetCurrentActorType) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 actorID = evt_get_variable(script, *args++);
|
||||
s32 outVar = *args++;
|
||||
@ -3323,7 +3323,7 @@ ApiStatus GetCurrentActorType(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus GetLastDamage(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(GetLastDamage) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 actorID = evt_get_variable(script, *args++);
|
||||
s32 outVar;
|
||||
@ -3337,7 +3337,7 @@ ApiStatus GetLastDamage(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus EnableActorGlow(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(EnableActorGlow) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 actorID = evt_get_variable(script, *args++);
|
||||
s32 flag;
|
||||
@ -3366,7 +3366,7 @@ ApiStatus EnableActorGlow(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus WasStatusInflicted(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(WasStatusInflicted) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
BattleStatus* battleStatus = &gBattleStatus;
|
||||
s32 outVal;
|
||||
@ -3383,7 +3383,7 @@ ApiStatus WasStatusInflicted(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus CopyStatusEffects(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(CopyStatusEffects) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 actorIDTo;
|
||||
s32 actorIDFrom;
|
||||
@ -3414,7 +3414,7 @@ ApiStatus CopyStatusEffects(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus ClearStatusEffects(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(ClearStatusEffects) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 actorID = evt_get_variable(script, *args++);
|
||||
s32 flag;
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -2452,12 +2452,12 @@ void btl_state_update_defeat(void) {
|
||||
void btl_state_draw_defeat(void) {
|
||||
}
|
||||
|
||||
ApiStatus EnablePartnerBlur(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(EnablePartnerBlur) {
|
||||
enable_partner_blur();
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus DisablePartnerBlur(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(DisablePartnerBlur) {
|
||||
disable_partner_blur();
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
@ -138,7 +138,7 @@ EvtScript EVS_OnBattleInit = {
|
||||
EVT_END
|
||||
};
|
||||
|
||||
ApiStatus CamPresetUpdate_B(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(CamPresetUpdate_B) {
|
||||
BattleCam_DoneMoving = TRUE;
|
||||
return ApiStatus_BLOCK;
|
||||
}
|
||||
@ -1006,7 +1006,7 @@ s32 CamPresetUpdate_H(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_BLOCK;
|
||||
}
|
||||
|
||||
ApiStatus CamPresetUpdate_N(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(CamPresetUpdate_N) {
|
||||
Camera* camera = &gCameras[CAM_BATTLE];
|
||||
f32 alpha;
|
||||
f32 x, y, z;
|
||||
@ -1113,7 +1113,7 @@ API_CALLABLE(BattleCamImpl_Default) {
|
||||
return ApiStatus_BLOCK;
|
||||
}
|
||||
|
||||
ApiStatus CamPresetUpdate_D(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(CamPresetUpdate_D) {
|
||||
Camera* camera = &gCameras[CAM_BATTLE];
|
||||
f32 alpha;
|
||||
f32 x, y, z;
|
||||
@ -1165,7 +1165,7 @@ ApiStatus CamPresetUpdate_D(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_BLOCK;
|
||||
}
|
||||
|
||||
ApiStatus CamPresetUpdate_E(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(CamPresetUpdate_E) {
|
||||
Camera* camera = &gCameras[CAM_BATTLE];
|
||||
f32 alpha;
|
||||
f32 x, y, z;
|
||||
@ -1219,7 +1219,7 @@ ApiStatus CamPresetUpdate_E(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_BLOCK;
|
||||
}
|
||||
|
||||
ApiStatus CamPresetUpdate_J(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(CamPresetUpdate_J) {
|
||||
Camera* camera = &gCameras[CAM_BATTLE];
|
||||
f32 alpha;
|
||||
f32 x, y, z;
|
||||
@ -1270,7 +1270,7 @@ ApiStatus CamPresetUpdate_J(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_BLOCK;
|
||||
}
|
||||
|
||||
ApiStatus CamPresetUpdate_K(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(CamPresetUpdate_K) {
|
||||
Camera* camera = &gCameras[CAM_BATTLE];
|
||||
BattleStatus* battleStatus = &gBattleStatus;
|
||||
PlayerStatus* playerStatus = &gPlayerStatus;
|
||||
@ -1336,7 +1336,7 @@ ApiStatus CamPresetUpdate_K(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_BLOCK;
|
||||
}
|
||||
|
||||
ApiStatus CamPresetUpdate_L(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(CamPresetUpdate_L) {
|
||||
Camera* camera = &gCameras[CAM_BATTLE];
|
||||
BattleStatus* battleStatus = &gBattleStatus;
|
||||
PlayerStatus* playerStatus = &gPlayerStatus;
|
||||
@ -1432,7 +1432,7 @@ ApiStatus CamPresetUpdate_L(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_BLOCK;
|
||||
}
|
||||
|
||||
ApiStatus func_8024CE9C(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(func_8024CE9C) {
|
||||
Camera* camera = &gCameras[CAM_BATTLE];
|
||||
|
||||
BattleCam_BoomPitch = 8;
|
||||
@ -2283,7 +2283,7 @@ void func_8024E60C(void) {
|
||||
D_8029F2A6 = FALSE;
|
||||
}
|
||||
|
||||
ApiStatus UseBattleCamPreset(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(UseBattleCamPreset) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 preset;
|
||||
|
||||
@ -2298,7 +2298,7 @@ ApiStatus UseBattleCamPreset(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus UseBattleCamPresetImmediately(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(UseBattleCamPresetImmediately) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 preset;
|
||||
|
||||
@ -2313,7 +2313,7 @@ ApiStatus UseBattleCamPresetImmediately(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus UseBattleCamPresetWait(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(UseBattleCamPresetWait) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
|
||||
if (BattleCam_IsFrozen) {
|
||||
@ -2338,7 +2338,7 @@ ApiStatus UseBattleCamPresetWait(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_BLOCK;
|
||||
}
|
||||
|
||||
ApiStatus SetBattleCamParam(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(SetBattleCamParam) {
|
||||
Camera* camera = &gCameras[CAM_BATTLE];
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 mode;
|
||||
@ -2380,7 +2380,7 @@ ApiStatus SetBattleCamParam(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus SetBattleCamParams(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(SetBattleCamParams) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
Camera* camera = &gCameras[CAM_BATTLE];
|
||||
|
||||
@ -2400,7 +2400,7 @@ ApiStatus SetBattleCamParams(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus SetBattleCamTarget(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(SetBattleCamTarget) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
|
||||
if (BattleCam_IsFrozen) {
|
||||
@ -2413,7 +2413,7 @@ ApiStatus SetBattleCamTarget(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus SetBattleCamPos(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(SetBattleCamPos) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
Camera* camera = &gCameras[CAM_BATTLE];
|
||||
|
||||
@ -2428,7 +2428,7 @@ ApiStatus SetBattleCamPos(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus SetBattleCamOffsetZ(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(SetBattleCamOffsetZ) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
|
||||
if (BattleCam_IsFrozen) {
|
||||
@ -2439,7 +2439,7 @@ ApiStatus SetBattleCamOffsetZ(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus AddBattleCamOffsetZ(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(AddBattleCamOffsetZ) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
|
||||
if (BattleCam_IsFrozen) {
|
||||
@ -2450,7 +2450,7 @@ ApiStatus AddBattleCamOffsetZ(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus SetBattleCamYaw(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(SetBattleCamYaw) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
|
||||
if (BattleCam_IsFrozen) {
|
||||
@ -2461,7 +2461,7 @@ ApiStatus SetBattleCamYaw(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus BattleCamTargetActor(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(BattleCamTargetActor) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 actorID;
|
||||
|
||||
@ -2480,7 +2480,7 @@ ApiStatus BattleCamTargetActor(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus BattleCamTargetActorPart(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(BattleCamTargetActorPart) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 actorID;
|
||||
|
||||
@ -2499,7 +2499,7 @@ ApiStatus BattleCamTargetActorPart(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus MoveBattleCamOver(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(MoveBattleCamOver) {
|
||||
BattleStatus* battleStatus = &gBattleStatus;
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
|
||||
@ -2517,7 +2517,7 @@ ApiStatus MoveBattleCamOver(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus SetBattleCamZoom(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(SetBattleCamZoom) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
|
||||
if (BattleCam_IsFrozen) {
|
||||
@ -2528,7 +2528,7 @@ ApiStatus SetBattleCamZoom(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus AddBattleCamZoom(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(AddBattleCamZoom) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
|
||||
if (BattleCam_IsFrozen) {
|
||||
@ -2539,7 +2539,7 @@ ApiStatus AddBattleCamZoom(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus func_8024ECF8(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(func_8024ECF8) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
|
||||
if (BattleCam_IsFrozen) {
|
||||
@ -2552,12 +2552,12 @@ ApiStatus func_8024ECF8(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus FreezeBattleCam(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(FreezeBattleCam) {
|
||||
BattleCam_IsFrozen = evt_get_variable(script, *script->ptrReadPos);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus func_8024EDA4(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(func_8024EDA4) {
|
||||
D_8029F2A6 = FALSE;
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
@ -531,7 +531,7 @@ HitResult calc_item_damage_enemy(void) {
|
||||
return hitResult;
|
||||
}
|
||||
|
||||
ApiStatus ItemDamageEnemy(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(ItemDamageEnemy) {
|
||||
BattleStatus* battleStatus = &gBattleStatus;
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 hitResultVarOut = *args++;
|
||||
@ -601,7 +601,7 @@ ApiStatus ItemDamageEnemy(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus ItemSpookEnemy(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(ItemSpookEnemy) {
|
||||
BattleStatus* battleStatus = &gBattleStatus;
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 hitResultVarOut = *args++;
|
||||
@ -671,7 +671,7 @@ ApiStatus ItemSpookEnemy(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus ItemAfflictEnemy(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(ItemAfflictEnemy) {
|
||||
BattleStatus* battleStatus = &gBattleStatus;
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 hitResultVarOut = *args++;
|
||||
@ -740,7 +740,7 @@ ApiStatus ItemAfflictEnemy(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus ItemCheckHit(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(ItemCheckHit) {
|
||||
BattleStatus* battleStatus = &gBattleStatus;
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 hitResultVarOut = *args++;
|
||||
|
@ -979,7 +979,7 @@ s32 dispatch_damage_event_partner_1(s32 damageAmount, s32 event) {
|
||||
return dispatch_damage_event_partner(damageAmount, event, TRUE);
|
||||
}
|
||||
|
||||
ApiStatus MakeOwnerTargetIndex(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(MakeOwnerTargetIndex) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
Actor* actor = get_actor(script->owner1.actorID);
|
||||
s32 numTargets = actor->targetListLength;
|
||||
@ -1009,7 +1009,7 @@ ApiStatus MakeOwnerTargetIndex(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus func_8027FC90(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(func_8027FC90) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
BattleStatus* battleStatus = &gBattleStatus;
|
||||
s32 hitResult;
|
||||
@ -1033,7 +1033,7 @@ ApiStatus func_8027FC90(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus GetActorLevel(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(GetActorLevel) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 actorID = evt_get_variable(script, *args++);
|
||||
Bytecode outVar;
|
||||
@ -1048,7 +1048,7 @@ ApiStatus GetActorLevel(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus PartnerDamageEnemy(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(PartnerDamageEnemy) {
|
||||
BattleStatus* battleStatus = &gBattleStatus;
|
||||
PlayerStatus* playerStatus = &gPlayerStatus;
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
@ -1128,7 +1128,7 @@ ApiStatus PartnerDamageEnemy(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus PartnerAfflictEnemy(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(PartnerAfflictEnemy) {
|
||||
BattleStatus* battleStatus = &gBattleStatus;
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
Actor* actor = get_actor(script->owner1.enemyID);
|
||||
@ -1205,7 +1205,7 @@ ApiStatus PartnerAfflictEnemy(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus PartnerPowerBounceEnemy(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(PartnerPowerBounceEnemy) {
|
||||
BattleStatus* battleStatus = &gBattleStatus;
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
Actor* actor = get_actor(script->owner1.enemyID);
|
||||
@ -1281,7 +1281,7 @@ ApiStatus PartnerPowerBounceEnemy(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus PartnerTestEnemy(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(PartnerTestEnemy) {
|
||||
BattleStatus* battleStatus = &gBattleStatus;
|
||||
PlayerStatus* playerStatus = &gPlayerStatus;
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
@ -1358,7 +1358,7 @@ ApiStatus PartnerTestEnemy(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus func_8028070C(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(func_8028070C) {
|
||||
BattleStatus* battleStatus = &gBattleStatus;
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
Actor* actor = get_actor(script->owner1.actorID);
|
||||
@ -1375,14 +1375,14 @@ ApiStatus func_8028070C(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_BLOCK;
|
||||
}
|
||||
|
||||
ApiStatus DeletePartner(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(DeletePartner) {
|
||||
BattleStatus* battleStatus = &gBattleStatus;
|
||||
|
||||
btl_delete_actor(battleStatus->partnerActor);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus GetPartnerActionSuccess(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(GetPartnerActionSuccess) {
|
||||
BattleStatus* battleStatus = &gBattleStatus;
|
||||
s32 var = *script->ptrReadPos;
|
||||
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
|
||||
ApiStatus PartnerYieldTurn(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(PartnerYieldTurn) {
|
||||
gBattleStatus.flags1 |= BS_FLAGS1_YIELD_TURN;
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
@ -7,17 +7,17 @@
|
||||
b32 dispatch_damage_event_player(s32 damageAmount, s32 event, b32 noHitSound);
|
||||
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]);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus PlayDizzyHitFX(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(PlayDizzyHitFX) {
|
||||
fx_debuff(1, script->varTable[0], script->varTable[1], script->varTable[2]);
|
||||
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]);
|
||||
|
||||
debuffEffect->data.debuff->primCol.r = 200;
|
||||
@ -29,7 +29,7 @@ ApiStatus PlayParalyzeHitFX(Evt* script, s32 isInitialCall) {
|
||||
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]);
|
||||
|
||||
debuffEffect->data.debuff->primCol.r = 60;
|
||||
@ -41,7 +41,7 @@ ApiStatus PlayPoisonHitFX(Evt* script, s32 isInitialCall) {
|
||||
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]);
|
||||
|
||||
debuffEffect->data.debuff->primCol.r = 205;
|
||||
@ -53,12 +53,12 @@ ApiStatus PlayStopHitFX(Evt* script, s32 isInitialCall) {
|
||||
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]);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus PlayFreezeHitParticleFX(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(PlayFreezeHitParticleFX) {
|
||||
Actor* actor = (Actor*)script->varTable[3];
|
||||
f32 temp1 = actor->size.y;
|
||||
f32 temp2 = actor->size.x / 2;
|
||||
@ -68,7 +68,7 @@ ApiStatus PlayFreezeHitParticleFX(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus PlayShrinkHitFX(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(PlayShrinkHitFX) {
|
||||
s32 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);
|
||||
}
|
||||
|
||||
ApiStatus GetMenuSelection(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(GetMenuSelection) {
|
||||
BattleStatus* battleStatus = &gBattleStatus;
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 outVar1 = *args++;
|
||||
@ -1146,7 +1146,7 @@ ApiStatus GetMenuSelection(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus func_80273444(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(func_80273444) {
|
||||
BattleStatus* battleStatus = &gBattleStatus;
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
Actor* player = battleStatus->playerActor;
|
||||
@ -1248,7 +1248,7 @@ ApiStatus func_80273444(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE1;
|
||||
}
|
||||
|
||||
ApiStatus PlayerFallToGoal(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(PlayerFallToGoal) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
Actor* player = gBattleStatus.playerActor;
|
||||
ActorState* state = &player->state;
|
||||
@ -1316,7 +1316,7 @@ ApiStatus PlayerFallToGoal(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_BLOCK;
|
||||
}
|
||||
|
||||
ApiStatus PlayerLandJump(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(PlayerLandJump) {
|
||||
Actor* player = gBattleStatus.playerActor;
|
||||
ActorState* walkMovement = &player->state;
|
||||
|
||||
@ -1364,7 +1364,7 @@ ApiStatus PlayerLandJump(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_BLOCK;
|
||||
}
|
||||
|
||||
ApiStatus PlayerRunToGoal(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(PlayerRunToGoal) {
|
||||
BattleStatus* battleStatus = &gBattleStatus;
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
Actor* player = battleStatus->playerActor;
|
||||
@ -1434,7 +1434,7 @@ ApiStatus PlayerRunToGoal(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_BLOCK;
|
||||
}
|
||||
|
||||
ApiStatus CancelablePlayerRunToGoal(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(CancelablePlayerRunToGoal) {
|
||||
BattleStatus* battleStatus = &gBattleStatus;
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
Actor* player = battleStatus->playerActor;
|
||||
@ -1527,12 +1527,12 @@ ApiStatus CancelablePlayerRunToGoal(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus GetPlayerHP(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(GetPlayerHP) {
|
||||
evt_set_variable(script, *script->ptrReadPos, gPlayerData.curHP);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus PlayerDamageEnemy(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(PlayerDamageEnemy) {
|
||||
BattleStatus* battleStatus = &gBattleStatus;
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 hitResultOutVar = *args++;
|
||||
@ -1604,7 +1604,7 @@ ApiStatus PlayerDamageEnemy(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus PlayerPowerBounceEnemy(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(PlayerPowerBounceEnemy) {
|
||||
BattleStatus* battleStatus = &gBattleStatus;
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 hitResultOutVar = *args++;
|
||||
@ -1675,7 +1675,7 @@ ApiStatus PlayerPowerBounceEnemy(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus PlayerTestEnemy(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(PlayerTestEnemy) {
|
||||
BattleStatus* battleStatus = &gBattleStatus;
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 hitResultOutVar = *args++;
|
||||
@ -1741,7 +1741,7 @@ ApiStatus PlayerTestEnemy(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus DispatchDamagePlayerEvent(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(DispatchDamagePlayerEvent) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 damageAmount = evt_get_variable(script, *args++);
|
||||
|
||||
@ -1756,7 +1756,7 @@ ApiStatus DispatchDamagePlayerEvent(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_BLOCK;
|
||||
}
|
||||
|
||||
ApiStatus EnablePlayerBlur(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(EnablePlayerBlur) {
|
||||
s32 setting = evt_get_variable(script, *script->ptrReadPos);
|
||||
|
||||
if (setting == ACTOR_BLUR_DISABLE) {
|
||||
@ -1770,17 +1770,17 @@ ApiStatus EnablePlayerBlur(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus ForceDisablePlayerBlur(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(ForceDisablePlayerBlur) {
|
||||
force_disable_player_blur();
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus ForceDisablePlayerBlurImmediately(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(ForceDisablePlayerBlurImmediately) {
|
||||
force_disable_player_blur_immediately();
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus func_80274A18(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(func_80274A18) {
|
||||
BattleStatus* battleStatus = &gBattleStatus;
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
Actor* player = battleStatus->playerActor;
|
||||
@ -1944,7 +1944,7 @@ ApiStatus func_80274A18(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_BLOCK;
|
||||
}
|
||||
|
||||
ApiStatus func_802752AC(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(func_802752AC) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
Actor* player = gBattleStatus.playerActor;
|
||||
ActorState* playerState = &player->state;
|
||||
@ -2186,7 +2186,7 @@ ApiStatus func_802752AC(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_BLOCK;
|
||||
}
|
||||
|
||||
ApiStatus func_80275F00(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(func_80275F00) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
Actor* player = gBattleStatus.playerActor;
|
||||
ActorState* playerState = &player->state;
|
||||
@ -2477,7 +2477,7 @@ ApiStatus func_80275F00(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_BLOCK;
|
||||
}
|
||||
|
||||
ApiStatus GetPlayerActionSuccess(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(GetPlayerActionSuccess) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 outVar = *args++;
|
||||
s32 actionSuccess = gBattleStatus.actionSuccess;
|
||||
@ -2495,12 +2495,12 @@ ApiStatus GetPlayerActionSuccess(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus PlayerYieldTurn(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(PlayerYieldTurn) {
|
||||
gBattleStatus.flags1 |= BS_FLAGS1_YIELD_TURN;
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus DispatchEventPlayer(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(DispatchEventPlayer) {
|
||||
dispatch_event_player(evt_get_variable(script, *script->ptrReadPos));
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
@ -515,7 +515,7 @@ void btl_bonk_cleanup(void) {
|
||||
}
|
||||
}
|
||||
|
||||
ApiStatus ShowImmuneBonk(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(ShowImmuneBonk) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 x = 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;
|
||||
}
|
||||
|
||||
ApiStatus ForceImmuneBonkCleanup(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(ForceImmuneBonkCleanup) {
|
||||
btl_bonk_cleanup();
|
||||
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;
|
||||
s32 messageIndex = 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;
|
||||
}
|
||||
|
||||
ApiStatus ShowVariableMessageBox(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(ShowVariableMessageBox) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 messageIndex = 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;
|
||||
}
|
||||
|
||||
ApiStatus IsMessageBoxDisplayed(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(IsMessageBoxDisplayed) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 outVar = *args++;
|
||||
|
||||
@ -1658,28 +1658,28 @@ ApiStatus IsMessageBoxDisplayed(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus WaitForMessageBoxDone(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(WaitForMessageBoxDone) {
|
||||
return !btl_is_popup_displayed() * ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus ForceCloseMessageBox(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(ForceCloseMessageBox) {
|
||||
if (bPopupMessage != NULL) {
|
||||
bPopupMessage->duration = 0;
|
||||
}
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus SetMessageBoxDuration(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(SetMessageBoxDuration) {
|
||||
btl_set_popup_duration(evt_get_variable(script, *script->ptrReadPos));
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus LockMessageBoxPosition(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(LockMessageBoxPosition) {
|
||||
btl_message_lock_box_pos();
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus UnlockMessageBoxPosition(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(UnlockMessageBoxPosition) {
|
||||
btl_message_unlock_box_pos();
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
@ -51,7 +51,7 @@ Gfx D_800758A0[] = {
|
||||
Gfx TheaterWallShadowsGfx[] = {
|
||||
gsDPPipeSync(),
|
||||
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),
|
||||
gsSPVertex(theater_wall_shadows_vtx, 8, 0),
|
||||
gsSP2Triangles(0, 1, 2, 0, 0, 2, 3, 0),
|
||||
@ -62,7 +62,7 @@ Gfx TheaterWallShadowsGfx[] = {
|
||||
Gfx TheaterCurtainGfx[] = {
|
||||
gsDPPipeSync(),
|
||||
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),
|
||||
gsSPVertex(theater_curtain_vtx, 31, 0),
|
||||
gsSP2Triangles(0, 1, 2, 0, 0, 2, 3, 0),
|
||||
@ -81,7 +81,7 @@ Gfx TheaterCurtainGfx[] = {
|
||||
Gfx TheaterInsetShadowsGfx[] = {
|
||||
gsDPPipeSync(),
|
||||
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),
|
||||
gsSPVertex(theater_left_inset_shadow_vtx, 4, 0),
|
||||
gsSP2Triangles(0, 1, 2, 0, 0, 2, 3, 0),
|
||||
@ -94,7 +94,7 @@ Gfx TheaterFloorGfx[] = {
|
||||
gsDPPipeSync(),
|
||||
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)),
|
||||
gsDPSetCombineMode(G_CC_MODULATEIA, PM_CC_16),
|
||||
gsDPSetCombineMode(G_CC_MODULATEIA, PM_CC2_MULTIPLY_PRIM),
|
||||
gsSPDisplayList(D_800746E0),
|
||||
gsSPVertex(theater_floor_vtx, 25, 0),
|
||||
gsSP2Triangles(0, 1, 2, 0, 0, 2, 3, 0),
|
||||
@ -116,7 +116,7 @@ Gfx TheaterRightWallGfx[] = {
|
||||
gsDPPipeSync(),
|
||||
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)),
|
||||
gsDPSetCombineMode(G_CC_MODULATEIA, PM_CC_16),
|
||||
gsDPSetCombineMode(G_CC_MODULATEIA, PM_CC2_MULTIPLY_PRIM),
|
||||
gsSPDisplayList(D_800758A0),
|
||||
gsSPVertex(theater_right_wall_vtx, 6, 0),
|
||||
gsSP2Triangles(0, 1, 2, 0, 0, 2, 3, 0),
|
||||
@ -128,7 +128,7 @@ Gfx TheaterLeftWallGfx[] = {
|
||||
gsDPPipeSync(),
|
||||
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)),
|
||||
gsDPSetCombineMode(G_CC_MODULATEIA, PM_CC_16),
|
||||
gsDPSetCombineMode(G_CC_MODULATEIA, PM_CC2_MULTIPLY_PRIM),
|
||||
gsSPDisplayList(D_800758A0),
|
||||
gsSPVertex(theater_left_wall_vtx, 6, 0),
|
||||
gsSP2Triangles(0, 1, 2, 0, 0, 2, 3, 0),
|
||||
|
@ -437,7 +437,7 @@ s32 draw_box(s32 flags, WindowStyle windowStyle, s32 posX, s32 posY, s32 posZ, s
|
||||
gDPSetCycleType(gMainGfxPos++, G_CYC_2CYCLE);
|
||||
gDPSetBlendColor(gMainGfxPos++, 0, 0, 0, 0);
|
||||
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)) {
|
||||
gDPSetScissor(gMainGfxPos++, G_SC_NON_INTERLACE, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT);
|
||||
}
|
||||
|
@ -121,7 +121,7 @@ void quizmo_stage_appendGfx(void* effect) {
|
||||
|
||||
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
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);
|
||||
|
||||
if (data->unk_3C != 255) {
|
||||
|
@ -9,14 +9,14 @@
|
||||
#include "sprite/player.h"
|
||||
#include "model.h"
|
||||
|
||||
ApiStatus ShowMerleeCoinMessage(Evt* script, s32 isInitialCall);
|
||||
ApiStatus ShowMerleeRanOutMessage(Evt* script, s32 isInitialCall);
|
||||
ApiStatus FadeInMerlee(Evt* script, s32 isInitialCall);
|
||||
ApiStatus FadeOutMerlee(Evt* script, s32 isInitialCall);
|
||||
ApiStatus MerleeUpdateFX(Evt* script, s32 isInitialCall);
|
||||
ApiStatus MerleeStopFX(Evt* script, s32 isInitialCall);
|
||||
ApiStatus PlayMerleeGatherFX(Evt* script, s32 isInitialCall);
|
||||
ApiStatus PlayMerleeOrbFX(Evt* script, s32 isInitialCall);
|
||||
API_CALLABLE(ShowMerleeCoinMessage);
|
||||
API_CALLABLE(ShowMerleeRanOutMessage);
|
||||
API_CALLABLE(FadeInMerlee);
|
||||
API_CALLABLE(FadeOutMerlee);
|
||||
API_CALLABLE(MerleeUpdateFX);
|
||||
API_CALLABLE(MerleeStopFX);
|
||||
API_CALLABLE(PlayMerleeGatherFX);
|
||||
API_CALLABLE(PlayMerleeOrbFX);
|
||||
|
||||
s32 D_80077C40 = 0;
|
||||
|
||||
@ -216,7 +216,7 @@ void set_defeated(s32 mapID, s32 encounterID) {
|
||||
currentEncounter->defeatFlags[mapID][encounterIdx] |= (1 << encounterShift);*/
|
||||
}
|
||||
|
||||
ApiStatus ShowMerleeCoinMessage(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(ShowMerleeCoinMessage) {
|
||||
if (isInitialCall) {
|
||||
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) {
|
||||
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) {
|
||||
mdl_set_all_tint_type(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) {
|
||||
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);
|
||||
|
||||
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->alpha -= 17;
|
||||
@ -305,7 +305,7 @@ ApiStatus FadeOutMerlee(Evt* script, s32 isInitialCall) {
|
||||
}
|
||||
|
||||
// same as BattleMerleeUpdateFX aside from syms
|
||||
ApiStatus MerleeUpdateFX(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(MerleeUpdateFX) {
|
||||
Npc* merlee = get_npc_unsafe(NPC_BTL_MERLEE);
|
||||
EnergyOrbWaveFXData* effectData;
|
||||
|
||||
@ -362,12 +362,12 @@ ApiStatus MerleeUpdateFX(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_BLOCK;
|
||||
}
|
||||
|
||||
ApiStatus MerleeStopFX(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(MerleeStopFX) {
|
||||
D_800A0BB8 = 1;
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus GetCamLookAtObjVector(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(GetCamLookAtObjVector) {
|
||||
script->varTable[0] = gCameras[gCurrentCameraID].lookAt_obj.x;
|
||||
script->varTable[1] = gCameras[gCurrentCameraID].lookAt_obj.y;
|
||||
script->varTable[2] = gCameras[gCurrentCameraID].lookAt_obj.z;
|
||||
@ -375,7 +375,7 @@ ApiStatus GetCamLookAtObjVector(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus HasMerleeCasts(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(HasMerleeCasts) {
|
||||
script->varTable[0] = FALSE;
|
||||
if (gPlayerData.merleeCastsLeft > 0) {
|
||||
script->varTable[0] = TRUE;
|
||||
@ -384,7 +384,7 @@ ApiStatus HasMerleeCasts(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus PlayMerleeGatherFX(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(PlayMerleeGatherFX) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 var0 = 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;
|
||||
}
|
||||
|
||||
ApiStatus PlayMerleeOrbFX(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(PlayMerleeOrbFX) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 var0 = 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;
|
||||
}
|
||||
|
||||
ApiStatus OnDefeatEnemy(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(OnDefeatEnemy) {
|
||||
Enemy* enemy = script->owner1.enemy;
|
||||
Npc* npc = get_npc_unsafe(enemy->npcID);
|
||||
s32 temp1;
|
||||
@ -442,7 +442,7 @@ ApiStatus OnDefeatEnemy(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_BLOCK;
|
||||
}
|
||||
|
||||
ApiStatus OnFleeBattleDrops(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(OnFleeBattleDrops) {
|
||||
PlayerStatus* playerStatus = &gPlayerStatus;
|
||||
PlayerData* playerData = &gPlayerData;
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
#include "effects.h"
|
||||
#include "battle/battle.h"
|
||||
|
||||
ApiStatus SetEncounterStatusFlags(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(SetEncounterStatusFlags) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
EncounterStatus* currentEncounter = &gCurrentEncounter;
|
||||
s32 flagBits = *args++;
|
||||
@ -17,7 +17,7 @@ ApiStatus SetEncounterStatusFlags(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus IsStartingConversation(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(IsStartingConversation) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 outVar = *args++;
|
||||
|
||||
@ -25,25 +25,25 @@ ApiStatus IsStartingConversation(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus func_80044238(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(func_80044238) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
|
||||
func_80072BCC(evt_get_variable(script, *args++));
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus LoadDemoBattle(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(LoadDemoBattle) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
|
||||
load_demo_battle(evt_get_variable(script, *args++));
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus func_80044290(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(func_80044290) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus MakeNpcs(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(MakeNpcs) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
|
||||
if (isInitialCall) {
|
||||
@ -64,7 +64,7 @@ ApiStatus MakeNpcs(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_BLOCK;
|
||||
}
|
||||
|
||||
ApiStatus RemoveNpc(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(RemoveNpc) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
Enemy* enemy = script->owner1.enemy;
|
||||
ApiStatus ret = ApiStatus_DONE1;
|
||||
@ -116,7 +116,7 @@ ApiStatus RemoveNpc(Evt* script, s32 isInitialCall) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
ApiStatus RemoveEncounter(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(RemoveEncounter) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
Enemy* enemy = script->owner1.enemy;
|
||||
s32 id = evt_get_variable(script, *args++);
|
||||
@ -148,35 +148,35 @@ ApiStatus RemoveEncounter(Evt* script, s32 isInitialCall) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
ApiStatus GetBattleOutcome(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(GetBattleOutcome) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
|
||||
evt_set_variable(script, *args++, gCurrentEncounter.battleOutcome);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus func_800445A8(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(func_800445A8) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
|
||||
evt_set_variable(script, *args++, script->owner1.enemy->unk_C4);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus func_800445D4(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(func_800445D4) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
|
||||
evt_set_variable(script, *args++, script->owner1.enemy->unk_C8);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus GetOwnerEncounterTrigger(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(GetOwnerEncounterTrigger) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
|
||||
evt_set_variable(script, *args++, script->owner1.enemy->encountered);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus DoNpcDefeat(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(DoNpcDefeat) {
|
||||
Enemy* owner = script->owner1.enemy;
|
||||
Npc* npc = get_npc_unsafe(owner->npcID);
|
||||
Evt* newScript;
|
||||
@ -250,19 +250,19 @@ void start_battle(Evt* script, s32 songID) {
|
||||
gEncounterSubState = ENCOUNTER_SUBSTATE_PRE_BATTLE_INIT;
|
||||
}
|
||||
|
||||
ApiStatus StartBattle(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(StartBattle) {
|
||||
start_battle(script, -1);
|
||||
return ApiStatus_DONE1;
|
||||
}
|
||||
|
||||
ApiStatus StartBattleWith(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(StartBattleWith) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
|
||||
start_battle(script, evt_get_variable(script, *args++));
|
||||
return ApiStatus_DONE1;
|
||||
}
|
||||
|
||||
ApiStatus StartBossBattle(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(StartBossBattle) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
EncounterStatus* currentEncounter = &gCurrentEncounter;
|
||||
Enemy* enemy = script->owner1.enemy;
|
||||
@ -321,7 +321,7 @@ ApiStatus StartBossBattle(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE1;
|
||||
}
|
||||
|
||||
ApiStatus SetBattleMusic(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(SetBattleMusic) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
Bytecode songID = evt_get_variable(script, *args++);
|
||||
EncounterStatus* currentEncounter = &gCurrentEncounter;
|
||||
@ -332,7 +332,7 @@ ApiStatus SetBattleMusic(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus BindNpcAI(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(BindNpcAI) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
Enemy* enemy = script->owner1.enemy;
|
||||
s32 id = evt_get_variable(script, *args++);
|
||||
@ -385,7 +385,7 @@ ApiStatus BindNpcAI(Evt* script, s32 isInitialCall) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
ApiStatus BindNpcIdle(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(BindNpcIdle) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
Enemy* owner = script->owner1.enemy;
|
||||
s32 npcID = evt_get_variable(script, *args++);
|
||||
@ -401,7 +401,7 @@ ApiStatus BindNpcIdle(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus RestartNpcAI(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(RestartNpcAI) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
Enemy* enemy = script->owner1.enemy;
|
||||
s32 npcID = evt_get_variable(script, *args++);
|
||||
@ -438,7 +438,7 @@ ApiStatus RestartNpcAI(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus EnableNpcAI(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(EnableNpcAI) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
Enemy* npc = script->owner1.enemy;
|
||||
s32 npcID = evt_get_variable(script, *args++);
|
||||
@ -461,7 +461,7 @@ ApiStatus EnableNpcAI(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus SetNpcAux(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(SetNpcAux) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
Enemy* enemy = script->owner1.enemy;
|
||||
s32 id = evt_get_variable(script, *args++);
|
||||
@ -506,7 +506,7 @@ ApiStatus SetNpcAux(Evt* script, s32 isInitialCall) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
ApiStatus BindNpcAux(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(BindNpcAux) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
Enemy* npc = script->owner1.enemy;
|
||||
s32 npcID = evt_get_variable(script, *args++);
|
||||
@ -522,7 +522,7 @@ ApiStatus BindNpcAux(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus RestartNpcAux(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(RestartNpcAux) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
Enemy* enemy = script->owner1.enemy;
|
||||
s32 npcID = evt_get_variable(script, *args++);
|
||||
@ -558,7 +558,7 @@ ApiStatus RestartNpcAux(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus EnableNpcAux(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(EnableNpcAux) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
Enemy* npc = script->owner1.enemy;
|
||||
s32 npcID = evt_get_variable(script, *args++);
|
||||
@ -581,7 +581,7 @@ ApiStatus EnableNpcAux(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus BindNpcInteract(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(BindNpcInteract) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
Enemy* npc = script->owner1.enemy;
|
||||
s32 npcID = evt_get_variable(script, *args++);
|
||||
@ -601,7 +601,7 @@ ApiStatus BindNpcInteract(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus BindNpcHit(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(BindNpcHit) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
Enemy* npc = script->owner1.enemy;
|
||||
s32 npcID = evt_get_variable(script, *args++);
|
||||
@ -621,7 +621,7 @@ ApiStatus BindNpcHit(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus BindNpcDefeat(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(BindNpcDefeat) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
Enemy* npc = script->owner1.enemy;
|
||||
s32 npcID = evt_get_variable(script, *args++);
|
||||
@ -637,7 +637,7 @@ ApiStatus BindNpcDefeat(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus SetSelfVar(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(SetSelfVar) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
Enemy* owner = script->owner1.enemy;
|
||||
s32 index = evt_get_variable(script, *args++);
|
||||
@ -647,7 +647,7 @@ ApiStatus SetSelfVar(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus GetSelfVar(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(GetSelfVar) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
Enemy* owner = script->owner1.enemy;
|
||||
s32 var1 = evt_get_variable(script, *args++);
|
||||
@ -657,7 +657,7 @@ ApiStatus GetSelfVar(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus SetNpcVar(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(SetNpcVar) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
Enemy* npc = script->owner1.enemy;
|
||||
s32 npcID = evt_get_variable(script, *args++);
|
||||
@ -674,7 +674,7 @@ ApiStatus SetNpcVar(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus GetNpcVar(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(GetNpcVar) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
Enemy* npc = script->owner1.enemy;
|
||||
s32 npcID = evt_get_variable(script, *args++);
|
||||
@ -691,7 +691,7 @@ ApiStatus GetNpcVar(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus SetSelfRotation(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(SetSelfRotation) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
Npc* self = get_npc_unsafe(script->owner2.npcID);
|
||||
s32 rotX = evt_get_variable(script, *args++);
|
||||
@ -705,13 +705,13 @@ ApiStatus SetSelfRotation(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus SetSelfEnemyFlags(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(SetSelfEnemyFlags) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
script->owner1.enemy->flags = *args++;
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus SetSelfEnemyFlagBits(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(SetSelfEnemyFlagBits) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
Enemy* owner = script->owner1.enemy;
|
||||
s32 bits = *args++;
|
||||
@ -725,7 +725,7 @@ ApiStatus SetSelfEnemyFlagBits(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus SelfEnemyOverrideSyncPos(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(SelfEnemyOverrideSyncPos) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
Enemy* owner = script->owner1.enemy;
|
||||
Npc* npc = get_npc_unsafe(script->owner2.npcID);
|
||||
@ -738,14 +738,14 @@ ApiStatus SelfEnemyOverrideSyncPos(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus GetSelfNpcID(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(GetSelfNpcID) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
|
||||
evt_set_variable(script, *args++, script->owner1.enemy->npcID);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus ClearDefeatedEnemies(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(ClearDefeatedEnemies) {
|
||||
EncounterStatus* currentEncounter = &gCurrentEncounter;
|
||||
s32 i;
|
||||
s32 j;
|
||||
@ -758,7 +758,7 @@ ApiStatus ClearDefeatedEnemies(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus SetEnemyFlagBits(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(SetEnemyFlagBits) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
Enemy* npc = script->owner1.enemy;
|
||||
s32 npcID = evt_get_variable(script, *args++);
|
||||
@ -780,11 +780,11 @@ ApiStatus SetEnemyFlagBits(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus func_8004572C(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(func_8004572C) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus GetSelfAnimationFromTable(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(GetSelfAnimationFromTable) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
Enemy* owner = script->owner1.enemy;
|
||||
s32 animIdx = evt_get_variable(script, *args++);
|
||||
@ -793,14 +793,14 @@ ApiStatus GetSelfAnimationFromTable(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus func_80045798(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(func_80045798) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
|
||||
gPartnerStatus.unk_358 = evt_get_variable(script, *args++);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus SetOwnerInstigatorValue(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(SetOwnerInstigatorValue) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
Enemy* enemy = script->owner1.enemy;
|
||||
|
||||
@ -808,19 +808,19 @@ ApiStatus SetOwnerInstigatorValue(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus SetBattleAsScripted(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(SetBattleAsScripted) {
|
||||
gCurrentEncounter.scriptedBattle = TRUE;
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus GetEncounterTriggerHitTier(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(GetEncounterTriggerHitTier) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
|
||||
evt_set_variable(script, *args++, gCurrentEncounter.hitTier);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus func_80045838(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(func_80045838) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 npcID = 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;
|
||||
}
|
||||
|
||||
ApiStatus func_800458CC(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(func_800458CC) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
|
||||
evt_set_variable(script, *args++, script->owner1.enemy->npcSettings->actionFlags & AI_ACTION_08);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus OnPlayerFled(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(OnPlayerFled) {
|
||||
Enemy* enemy = script->owner1.enemy;
|
||||
Npc* npc = get_npc_unsafe(enemy->npcID);
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
@ -877,7 +877,7 @@ ApiStatus OnPlayerFled(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus SetTattleMessage(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(SetTattleMessage) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 enemyId = evt_get_variable(script, *args++);
|
||||
u32 tattleMsg = evt_get_variable(script, *args++);
|
||||
|
18
src/entity.c
18
src/entity.c
@ -1346,7 +1346,7 @@ s32 create_shadow_from_data(ShadowBlueprint* bp, f32 x, f32 y, f32 z) {
|
||||
return shadow->listIndex;
|
||||
}
|
||||
|
||||
ApiStatus MakeEntity(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(MakeEntity) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
EntityBlueprint* entityData;
|
||||
s32 x, y, z;
|
||||
@ -1386,7 +1386,7 @@ ApiStatus MakeEntity(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus SetEntityCullMode(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(SetEntityCullMode) {
|
||||
Entity* entity = get_entity_by_index(gLastCreatedEntityIndex);
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 mode = evt_get_variable(script, *args++);
|
||||
@ -1404,7 +1404,7 @@ ApiStatus SetEntityCullMode(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus UseDynamicShadow(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(UseDynamicShadow) {
|
||||
Entity* entity = get_entity_by_index(gLastCreatedEntityIndex);
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
|
||||
@ -1421,7 +1421,7 @@ ApiStatus UseDynamicShadow(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus AssignScript(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(AssignScript) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
|
||||
if (isInitialCall == TRUE) {
|
||||
@ -1434,7 +1434,7 @@ ApiStatus AssignScript(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE1;
|
||||
}
|
||||
|
||||
ApiStatus AssignSwitchFlag(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(AssignSwitchFlag) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
|
||||
if (isInitialCall == TRUE) {
|
||||
@ -1452,7 +1452,7 @@ ApiStatus AssignSwitchFlag(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE1;
|
||||
}
|
||||
|
||||
ApiStatus AssignBlockFlag(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(AssignBlockFlag) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
|
||||
if (isInitialCall == TRUE) {
|
||||
@ -1467,7 +1467,7 @@ ApiStatus AssignBlockFlag(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE1;
|
||||
}
|
||||
|
||||
ApiStatus AssignChestFlag(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(AssignChestFlag) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
|
||||
if (isInitialCall == TRUE) {
|
||||
@ -1480,7 +1480,7 @@ ApiStatus AssignChestFlag(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE1;
|
||||
}
|
||||
|
||||
ApiStatus AssignPanelFlag(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(AssignPanelFlag) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
|
||||
if (isInitialCall == TRUE) {
|
||||
@ -1493,7 +1493,7 @@ ApiStatus AssignPanelFlag(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE1;
|
||||
}
|
||||
|
||||
ApiStatus AssignCrateFlag(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(AssignCrateFlag) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
|
||||
if (isInitialCall == TRUE) {
|
||||
|
@ -60,12 +60,12 @@ void entity_ItemBlock_spawn_item(Entity* entity) {
|
||||
BlockData* data = entity->dataBuf.block;
|
||||
s32 angle;
|
||||
|
||||
if (data->item == 0 || (entity->flags & ENTITY_FLAG_100000)) {
|
||||
if (data->item == ITEM_NONE || (entity->flags & ENTITY_FLAG_USED)) {
|
||||
return;
|
||||
}
|
||||
|
||||
angle = player_get_camera_facing_angle();
|
||||
entity->flags |= ENTITY_FLAG_100000;
|
||||
entity->flags |= ENTITY_FLAG_USED;
|
||||
|
||||
if (data->item == ITEM_COIN) {
|
||||
make_item_entity(ITEM_COIN, entity->pos.x, entity->pos.y + 28.0, entity->pos.z,
|
||||
|
@ -86,7 +86,7 @@ void entity_Padlock_idle(Entity* entity) {
|
||||
switch (data->state) {
|
||||
case 0:
|
||||
entity_Padlock_push_player(entity);
|
||||
if (entity->flags & ENTITY_FLAG_100000) {
|
||||
if (entity->flags & ENTITY_FLAG_USED) {
|
||||
data->state++;
|
||||
sfx_play_sound(SOUND_USE_KEY);
|
||||
}
|
||||
|
@ -346,7 +346,7 @@ void appendGfx_entity_model(EntityModel* model) {
|
||||
if (!entity_fog_enabled || (model->flags & ENTITY_MODEL_FLAG_FOG_DISABLED)) {
|
||||
gDPSetCombineMode(gMainGfxPos++, G_CC_MODULATEIA, G_CC_MODULATEIA);
|
||||
} else {
|
||||
gDPSetCombineMode(gMainGfxPos++, PM_CC_42, PM_CC_18);
|
||||
gDPSetCombineMode(gMainGfxPos++, PM_CC_42, PM_CC2_MULTIPLY_SHADE);
|
||||
}
|
||||
}
|
||||
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)) {
|
||||
gDPSetCombineMode(gMainGfxPos++, G_CC_MODULATEIA, G_CC_MODULATEIA);
|
||||
} else {
|
||||
gDPSetCombineMode(gMainGfxPos++, PM_CC_42, PM_CC_18);
|
||||
gDPSetCombineMode(gMainGfxPos++, PM_CC_42, PM_CC2_MULTIPLY_SHADE);
|
||||
}
|
||||
if (model->vertexArray != NULL) {
|
||||
gSPSegment(gMainGfxPos++, D_80154374, VIRTUAL_TO_PHYSICAL(model->vertexArray));
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include "common.h"
|
||||
|
||||
ApiStatus PollMusicEvents(Evt* script, s32 isInitialCall);
|
||||
API_CALLABLE(PollMusicEvents);
|
||||
|
||||
extern MusicEvent* MusicEventList;
|
||||
extern Evt* RunningMusicEvents[10];
|
||||
@ -14,7 +14,7 @@ static EvtScript EVS_MusicEventMonitor = {
|
||||
EVT_END
|
||||
};
|
||||
|
||||
ApiStatus PollMusicEvents(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(PollMusicEvents) {
|
||||
MusicEventTrigger* list;
|
||||
s32 musicEventID, scriptSelector;
|
||||
u32 count;
|
||||
@ -51,7 +51,7 @@ ApiStatus PollMusicEvents(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_BLOCK;
|
||||
}
|
||||
|
||||
ApiStatus RegisterMusicEvents(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(RegisterMusicEvents) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 i;
|
||||
|
||||
@ -67,7 +67,7 @@ ApiStatus RegisterMusicEvents(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus FadeOutMusic(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(FadeOutMusic) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 musicPlayer = 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;
|
||||
s32 musicPlayer = 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;
|
||||
s32 musicPlayer = 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;
|
||||
s32 playerIndex = evt_get_variable(script, *args++);
|
||||
|
||||
@ -117,7 +117,7 @@ ApiStatus EnableMusicProximityMix(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus AdjustMusicProximityMix(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(AdjustMusicProximityMix) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 playerIndex = 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;
|
||||
}
|
||||
|
||||
ApiStatus SetMusicTrackVolumes(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(SetMusicTrackVolumes) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s16 trackVolSet = evt_get_variable(script, *args++);
|
||||
|
||||
@ -135,12 +135,12 @@ ApiStatus SetMusicTrackVolumes(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus PopSong(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(PopSong) {
|
||||
bgm_pop_song();
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus PushSong(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(PushSong) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 songID = 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;
|
||||
}
|
||||
|
||||
ApiStatus PopBattleSong(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(PopBattleSong) {
|
||||
bgm_pop_battle_song();
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus PushBattleSong(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(PushBattleSong) {
|
||||
bgm_push_battle_song();
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus SetBattleSong(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(SetBattleSong) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 songID = 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;
|
||||
}
|
||||
|
||||
ApiStatus ClearAmbientSounds(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(ClearAmbientSounds) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
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;
|
||||
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;
|
||||
s32 soundID = evt_get_variable(script, *args++);
|
||||
|
||||
@ -198,7 +198,7 @@ ApiStatus PlaySound(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus PlaySoundWithVolume(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(PlaySoundWithVolume) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 soundID = 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;
|
||||
}
|
||||
|
||||
ApiStatus PlaySoundAt(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(PlaySoundAt) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 soundID = 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;
|
||||
}
|
||||
|
||||
ApiStatus StopSound(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(StopSound) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 soundID = evt_get_variable(script, *args++);
|
||||
|
||||
@ -227,7 +227,7 @@ ApiStatus StopSound(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus StopTrackingSoundPos(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(StopTrackingSoundPos) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 soundID = evt_get_variable(script, *args++);
|
||||
|
||||
@ -235,21 +235,21 @@ ApiStatus StopTrackingSoundPos(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus UseDoorSounds(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(UseDoorSounds) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
|
||||
gCurrentDoorSounds = evt_get_variable(script, *args++);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus UseRoomDoorSounds(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(UseRoomDoorSounds) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
|
||||
gCurrentRoomDoorSounds = evt_get_variable(script, *args++);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus PlaySoundAtF(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(PlaySoundAtF) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
Bytecode soundID = *args++;
|
||||
u16 spatializationFlags = evt_get_variable(script, *args++);
|
||||
|
@ -15,7 +15,7 @@ EvtScript ShakeCamX = {
|
||||
EVT_END
|
||||
};
|
||||
|
||||
ApiStatus SetCamEnabled(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(SetCamEnabled) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 id = 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;
|
||||
}
|
||||
|
||||
ApiStatus SetCamNoDraw(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(SetCamNoDraw) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 id = 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;
|
||||
}
|
||||
|
||||
ApiStatus SetCamPerspective(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(SetCamPerspective) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 id = 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;
|
||||
}
|
||||
|
||||
ApiStatus func_802CA90C(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(func_802CA90C) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 id = 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;
|
||||
}
|
||||
|
||||
ApiStatus func_802CA988(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(func_802CA988) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
Bytecode id = evt_get_variable(script, *args++);
|
||||
Bytecode outVar1 = *args++;
|
||||
@ -102,7 +102,7 @@ ApiStatus func_802CA988(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus SetCamViewport(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(SetCamViewport) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 id = 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;
|
||||
}
|
||||
|
||||
ApiStatus func_802CABE8(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(func_802CABE8) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 id = 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;
|
||||
}
|
||||
|
||||
ApiStatus func_802CACC0(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(func_802CACC0) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 id = 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;
|
||||
}
|
||||
|
||||
ApiStatus SetCamBGColor(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(SetCamBGColor) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 id = 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;
|
||||
}
|
||||
|
||||
ApiStatus func_802CAE50(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(func_802CAE50) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 id = 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;
|
||||
}
|
||||
|
||||
ApiStatus SetCamTarget(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(SetCamTarget) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 id = 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;
|
||||
}
|
||||
|
||||
ApiStatus InterpCamTargetPos(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(InterpCamTargetPos) {
|
||||
typedef struct CamInterpData {
|
||||
/* 0x00 */ Camera* cam;
|
||||
/* 0x04 */ s32 useTarget;
|
||||
@ -253,7 +253,7 @@ ApiStatus InterpCamTargetPos(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_BLOCK;
|
||||
}
|
||||
|
||||
ApiStatus ShakeCam(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(ShakeCam) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 camIndex = 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);
|
||||
}
|
||||
|
||||
ApiStatus SetCamLeadPlayer(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(SetCamLeadPlayer) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 id = 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;
|
||||
}
|
||||
|
||||
ApiStatus func_802CB710(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(func_802CB710) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 id = 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;
|
||||
}
|
||||
|
||||
ApiStatus PanToTarget(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(PanToTarget) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 id = evt_get_variable(script, *args++);
|
||||
f32 panPhase = evt_get_float_variable(script, *args++);
|
||||
@ -388,7 +388,7 @@ ApiStatus PanToTarget(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus UseSettingsFrom(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(UseSettingsFrom) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 id = evt_get_variable(script, *args++);
|
||||
Camera* camera = &gCameras[id];
|
||||
@ -407,7 +407,7 @@ ApiStatus UseSettingsFrom(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus LoadSettings(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(LoadSettings) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 id = evt_get_variable(script, *args++);
|
||||
Camera* camera = &gCameras[id];
|
||||
@ -417,7 +417,7 @@ ApiStatus LoadSettings(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus SetCamType(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(SetCamType) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 id = evt_get_variable(script, *args++);
|
||||
Camera* camera = &gCameras[id];
|
||||
@ -429,7 +429,7 @@ ApiStatus SetCamType(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus SetCamPitch(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(SetCamPitch) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 id = evt_get_variable(script, *args++);
|
||||
Camera* camera = &gCameras[id];
|
||||
@ -441,7 +441,7 @@ ApiStatus SetCamPitch(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus SetCamDistance(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(SetCamDistance) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 id = evt_get_variable(script, *args++);
|
||||
Camera* camera = &gCameras[id];
|
||||
@ -451,7 +451,7 @@ ApiStatus SetCamDistance(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus SetCamPosA(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(SetCamPosA) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 id = evt_get_variable(script, *args++);
|
||||
Camera* camera = &gCameras[id];
|
||||
@ -463,7 +463,7 @@ ApiStatus SetCamPosA(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus SetCamPosB(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(SetCamPosB) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 id = evt_get_variable(script, *args++);
|
||||
Camera* camera = &gCameras[id];
|
||||
@ -475,7 +475,7 @@ ApiStatus SetCamPosB(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus SetCamPosC(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(SetCamPosC) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 id = evt_get_variable(script, *args++);
|
||||
Camera* camera = &gCameras[id];
|
||||
@ -487,7 +487,7 @@ ApiStatus SetCamPosC(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus SetPanTarget(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(SetPanTarget) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 id = evt_get_variable(script, *args++);
|
||||
Camera* camera = &gCameras[id];
|
||||
@ -502,7 +502,7 @@ ApiStatus SetPanTarget(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus SetCamSpeed(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(SetCamSpeed) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 id = evt_get_variable(script, *args++);
|
||||
f32 speed = evt_get_float_variable(script, *args++);
|
||||
@ -512,7 +512,7 @@ ApiStatus SetCamSpeed(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus GetCamType(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(GetCamType) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 id = evt_get_variable(script, *args++);
|
||||
Bytecode outVar1 = *args++;
|
||||
@ -524,7 +524,7 @@ ApiStatus GetCamType(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus GetCamPitch(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(GetCamPitch) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 id = evt_get_variable(script, *args++);
|
||||
Bytecode outVar1 = *args++;
|
||||
@ -536,7 +536,7 @@ ApiStatus GetCamPitch(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus GetCamDistance(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(GetCamDistance) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 id = evt_get_variable(script, *args++);
|
||||
Bytecode outVar1 = *args++;
|
||||
@ -546,7 +546,7 @@ ApiStatus GetCamDistance(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus GetCamPosA(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(GetCamPosA) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 id = evt_get_variable(script, *args++);
|
||||
Bytecode outVar1 = *args++;
|
||||
@ -558,7 +558,7 @@ ApiStatus GetCamPosA(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus GetCamPosB(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(GetCamPosB) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 id = evt_get_variable(script, *args++);
|
||||
Bytecode outVar1 = *args++;
|
||||
@ -570,7 +570,7 @@ ApiStatus GetCamPosB(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus GetCamPosC(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(GetCamPosC) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 id = evt_get_variable(script, *args++);
|
||||
Bytecode outVar1 = *args++;
|
||||
@ -582,7 +582,7 @@ ApiStatus GetCamPosC(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus GetCamPosition(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(GetCamPosition) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 id = evt_get_variable(script, *args++);
|
||||
Bytecode outVar1 = *args++;
|
||||
@ -596,7 +596,7 @@ ApiStatus GetCamPosition(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus WaitForCam(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(WaitForCam) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 id = evt_get_variable(script, args[0]);
|
||||
f32 endInterpValue = evt_get_float_variable(script, args[1]);
|
||||
@ -608,7 +608,7 @@ ApiStatus WaitForCam(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus SetCamProperties(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(SetCamProperties) {
|
||||
f32 hitX, hitY, hitZ, hitDepth, nX, nY, nZ;
|
||||
s32 zoneID;
|
||||
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 posX, posY, posZ;
|
||||
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;
|
||||
s32 id = evt_get_variable(script, *args++);
|
||||
Camera* camera = &gCameras[id];
|
||||
|
@ -11,7 +11,7 @@ extern u8 gSpriteShadingData[0x100];
|
||||
|
||||
extern Addr sprite_shading_profiles_data_ROM_START;
|
||||
|
||||
ApiStatus SetSpriteShading(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(SetSpriteShading) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 profileID = evt_get_variable(script, *args++);
|
||||
s32 shadingGroupOffset = (profileID >> 0x10) * 8;
|
||||
@ -66,40 +66,40 @@ ApiStatus SetSpriteShading(Evt* script, s32 isInitialCall) {
|
||||
source->falloff = *(f32*)&falloff;
|
||||
source->unk_14 = gSpriteShadingData[6 + 16 * i + 14];
|
||||
}
|
||||
gSpriteShadingProfile->flags |= 1;
|
||||
gSpriteShadingProfile->flags |= SPR_SHADING_FLAG_ENABLED;
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus EnableSpriteShading(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(EnableSpriteShading) {
|
||||
if (evt_get_variable(script, *script->ptrReadPos) != 0) {
|
||||
gSpriteShadingProfile->flags |= 1;
|
||||
gSpriteShadingProfile->flags |= SPR_SHADING_FLAG_ENABLED;
|
||||
} else {
|
||||
gSpriteShadingProfile->flags &= ~1;
|
||||
gSpriteShadingProfile->flags &= ~SPR_SHADING_FLAG_ENABLED;
|
||||
}
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus GetDemoState(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(GetDemoState) {
|
||||
evt_set_variable(script, *script->ptrReadPos, gGameStatusPtr->demoState);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus DemoPressButton(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(DemoPressButton) {
|
||||
gGameStatusPtr->demoButtonInput |= evt_get_variable(script, *script->ptrReadPos);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus DemoReleaseButton(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(DemoReleaseButton) {
|
||||
gGameStatusPtr->demoButtonInput &= ~evt_get_variable(script, *script->ptrReadPos);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus DemoSetButtons(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(DemoSetButtons) {
|
||||
gGameStatusPtr->demoButtonInput = evt_get_variable(script, *script->ptrReadPos);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus DemoJoystickRadial(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(DemoJoystickRadial) {
|
||||
GameStatus** gameStatus = &gGameStatusPtr;
|
||||
f32 a;
|
||||
f32 b;
|
||||
@ -114,7 +114,7 @@ ApiStatus DemoJoystickRadial(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus DemoJoystickXY(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(DemoJoystickXY) {
|
||||
GameStatus** gameStatus = &gGameStatusPtr;
|
||||
f32 x;
|
||||
f32 y;
|
||||
|
@ -1047,7 +1047,7 @@ ApiStatus evt_handle_bind(Evt* script) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus DeleteTrigger(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(DeleteTrigger) {
|
||||
delete_trigger((Trigger*)evt_get_variable(script, *script->ptrReadPos));
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
#include "game_modes.h"
|
||||
|
||||
// args: start, end, duration, EasingType
|
||||
ApiStatus MakeLerp(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(MakeLerp) {
|
||||
Bytecode* ptrReadPos = script->ptrReadPos;
|
||||
|
||||
script->varTable[0xC] = evt_get_variable(script, *ptrReadPos++); // start
|
||||
@ -14,7 +14,7 @@ ApiStatus MakeLerp(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus UpdateLerp(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(UpdateLerp) {
|
||||
script->varTable[0x0] = (s32) update_lerp(
|
||||
script->varTable[0xB],
|
||||
script->varTable[0xC],
|
||||
@ -33,7 +33,7 @@ ApiStatus UpdateLerp(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus RandInt(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(RandInt) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
|
||||
s32 max = evt_get_variable(script, *args++);
|
||||
@ -44,7 +44,7 @@ ApiStatus RandInt(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus GetAngleBetweenNPCs(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(GetAngleBetweenNPCs) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
|
||||
s32 aID = evt_get_variable(script, *args++);
|
||||
@ -58,7 +58,7 @@ ApiStatus GetAngleBetweenNPCs(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus GetAngleToNPC(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(GetAngleToNPC) {
|
||||
PlayerStatus* playerStatus = &gPlayerStatus;
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
|
||||
@ -71,7 +71,7 @@ ApiStatus GetAngleToNPC(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus GetAngleToPlayer(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(GetAngleToPlayer) {
|
||||
PlayerStatus* playerStatus = &gPlayerStatus;
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
|
||||
@ -84,7 +84,7 @@ ApiStatus GetAngleToPlayer(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus AwaitPlayerApproach(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(AwaitPlayerApproach) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
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;
|
||||
PlayerStatus* playerStatus = &gPlayerStatus;
|
||||
|
||||
@ -143,7 +143,7 @@ ApiStatus IsPlayerWithin(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus AwaitPlayerLeave(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(AwaitPlayerLeave) {
|
||||
Bytecode* ptrReadPos = script->ptrReadPos;
|
||||
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 xVar = *args++;
|
||||
@ -190,7 +190,7 @@ ApiStatus AddVectorPolar(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus func_802D4BDC(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(func_802D4BDC) {
|
||||
s32* ready = &script->functionTemp[0];
|
||||
s32* progress = &script->functionTemp[1];
|
||||
s32 t1v;
|
||||
@ -219,7 +219,7 @@ ApiStatus func_802D4BDC(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_BLOCK;
|
||||
}
|
||||
|
||||
ApiStatus func_802D4C4C(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(func_802D4C4C) {
|
||||
s32* ready = &script->functionTemp[0];
|
||||
s32* progress = &script->functionTemp[1];
|
||||
s32 t1v;
|
||||
@ -247,7 +247,7 @@ ApiStatus func_802D4C4C(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_BLOCK;
|
||||
}
|
||||
|
||||
ApiStatus func_802D4CC4(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(func_802D4CC4) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 value = evt_get_variable(script, *args++);
|
||||
|
||||
@ -260,7 +260,7 @@ ApiStatus func_802D4CC4(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus func_802D4D14(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(func_802D4D14) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 value = evt_get_float_variable(script, *args++);
|
||||
|
||||
@ -271,7 +271,7 @@ ApiStatus func_802D4D14(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus func_802D4D88(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(func_802D4D88) {
|
||||
set_screen_overlay_params_front(OVERLAY_BLUR, 0);
|
||||
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;
|
||||
}
|
||||
|
||||
ApiStatus LoadPath(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(LoadPath) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 time = 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;
|
||||
}
|
||||
|
||||
ApiStatus GetNextPathPos(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(GetNextPathPos) {
|
||||
Path* path = script->varTablePtr[0xF];
|
||||
Vec3f pos;
|
||||
f32 alpha;
|
||||
@ -450,7 +450,7 @@ ApiStatus GetNextPathPos(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus GetDist2D(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(GetDist2D) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
Bytecode outVar = *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 ???
|
||||
|
||||
ApiStatus SetTimeFreezeMode(Evt* script, s32 initialCall) {
|
||||
API_CALLABLE(SetTimeFreezeMode) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
|
||||
set_time_freeze_mode(evt_get_variable(script, *args++));
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus ModifyGlobalOverrideFlags(Evt* script, s32 initialCall) {
|
||||
API_CALLABLE(ModifyGlobalOverrideFlags) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 setMode = 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;
|
||||
}
|
||||
|
||||
ApiStatus SetValueByRef(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(SetValueByRef) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
|
||||
s32 dest = evt_get_variable(script, *args++); /* Reference */
|
||||
@ -496,7 +496,7 @@ ApiStatus SetValueByRef(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus GetValueByRef(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(GetValueByRef) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 src = evt_get_variable(script, *args++); /* Reference */
|
||||
Bytecode dest = *args++;
|
||||
@ -506,7 +506,7 @@ ApiStatus GetValueByRef(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus EnableWorldStatusBar(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(EnableWorldStatusBar) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
b32 shouldEnable = evt_get_variable(script, *args++);
|
||||
|
||||
@ -519,7 +519,7 @@ ApiStatus EnableWorldStatusBar(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus ShowWorldStatusBar(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(ShowWorldStatusBar) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
b32 shouldShow = evt_get_variable(script, *args++);
|
||||
|
||||
@ -533,7 +533,7 @@ ApiStatus ShowWorldStatusBar(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus SetGameMode(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(SetGameMode) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s16 mode = evt_get_variable(script, *args++);
|
||||
|
||||
@ -542,7 +542,7 @@ ApiStatus SetGameMode(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus ClampAngleInt(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(ClampAngleInt) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 angle = evt_get_variable(script, *args);
|
||||
|
||||
@ -551,7 +551,7 @@ ApiStatus ClampAngleInt(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus ClampAngleFloat(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(ClampAngleFloat) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
f32 angle = evt_get_float_variable(script, *args);
|
||||
|
||||
@ -561,7 +561,7 @@ ApiStatus ClampAngleFloat(Evt* script, s32 isInitialCall) {
|
||||
}
|
||||
|
||||
#if VERSION_PAL
|
||||
ApiStatus GetLanguage(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(GetLanguage) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
|
||||
evt_set_variable(script, *args++, gCurrentLanguage);
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
ApiStatus ShowStartRecoveryShimmer(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(ShowStartRecoveryShimmer) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
f32 x = 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;
|
||||
}
|
||||
|
||||
ApiStatus ShowRecoveryShimmer(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(ShowRecoveryShimmer) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
f32 x = 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;
|
||||
}
|
||||
|
||||
ApiStatus func_802D7690(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(func_802D7690) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
f32 posX = 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;
|
||||
s32 npcID = 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;
|
||||
}
|
||||
|
||||
ApiStatus RemoveEffect(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(RemoveEffect) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
|
||||
remove_effect((EffectInstance*)evt_get_variable(script, *args++));
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus DismissEffect(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(DismissEffect) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
EffectInstance* effect = (EffectInstance*)evt_get_variable(script, *args++);
|
||||
|
||||
@ -131,7 +131,7 @@ ApiStatus DismissEffect(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus DismissItemOutline(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(DismissItemOutline) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
EffectInstance* effect = (EffectInstance*)evt_get_variable(script, *args++);
|
||||
|
||||
@ -139,7 +139,7 @@ ApiStatus DismissItemOutline(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus func_802D7B74(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(func_802D7B74) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
EffectInstance* effect = (EffectInstance*)evt_get_variable(script, *args++);
|
||||
|
||||
@ -148,7 +148,7 @@ ApiStatus func_802D7B74(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus InterpMotionBlurParams(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(InterpMotionBlurParams) {
|
||||
s32 centerX0 = script->varTable[1];
|
||||
s32 centerY0 = script->varTable[2];
|
||||
s32 centerX1 = script->varTable[3];
|
||||
@ -186,7 +186,7 @@ EvtScript EVS_UpdateMotionBlurParams = {
|
||||
EVT_END
|
||||
};
|
||||
|
||||
ApiStatus SetMotionBlurParams(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(SetMotionBlurParams) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 var0 = 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;
|
||||
}
|
||||
|
||||
ApiStatus ShowSweat(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(ShowSweat) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 npcID = 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;
|
||||
}
|
||||
|
||||
ApiStatus ShowSleepBubble(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(ShowSleepBubble) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 npcID = 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;
|
||||
}
|
||||
|
||||
ApiStatus SetSleepBubbleTimeLeft(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(SetSleepBubbleTimeLeft) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
EffectInstance* effect = (EffectInstance*)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;
|
||||
}
|
||||
|
||||
ApiStatus PlayEffect(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(PlayEffect) {
|
||||
Bytecode* intArgs = script->ptrReadPos;
|
||||
Bytecode* floatArgs = script->ptrReadPos;
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
extern PopupMenu D_802DB830;
|
||||
|
||||
ApiStatus ShowKeyChoicePopup(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(ShowKeyChoicePopup) {
|
||||
PlayerData* playerData = &gPlayerData;
|
||||
PopupMenu* menu = &D_802DB830;
|
||||
Trigger* trigger = script->owner2.trigger;
|
||||
@ -96,7 +96,7 @@ ApiStatus ShowKeyChoicePopup(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_BLOCK;
|
||||
}
|
||||
|
||||
ApiStatus ShowConsumableChoicePopup(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(ShowConsumableChoicePopup) {
|
||||
PlayerData* playerData = &gPlayerData;
|
||||
PopupMenu* menu = &D_802DB830;
|
||||
Trigger* trigger = script->owner2.trigger;
|
||||
@ -187,7 +187,7 @@ ApiStatus ShowConsumableChoicePopup(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_BLOCK;
|
||||
}
|
||||
|
||||
ApiStatus RemoveKeyItemAt(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(RemoveKeyItemAt) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 index = evt_get_variable(script, *args++);
|
||||
s16* ptrKeyItems = gPlayerData.keyItems;
|
||||
@ -196,7 +196,7 @@ ApiStatus RemoveKeyItemAt(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus RemoveItemAt(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(RemoveItemAt) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 index = evt_get_variable(script, *args++);
|
||||
s16* ptrInvItems = gPlayerData.invItems;
|
||||
@ -206,7 +206,7 @@ ApiStatus RemoveItemAt(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus AddKeyItem(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(AddKeyItem) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 value = *args++;
|
||||
PlayerData* playerData = &gPlayerData;
|
||||
@ -230,7 +230,7 @@ ApiStatus AddKeyItem(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus CloseChoicePopup(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(CloseChoicePopup) {
|
||||
enable_player_input();
|
||||
enable_player_static_collisions();
|
||||
partner_enable_input();
|
||||
@ -238,7 +238,7 @@ ApiStatus CloseChoicePopup(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus HasKeyItem(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(HasKeyItem) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 itemID = evt_get_variable(script, *args++);
|
||||
s32 value = *args++;
|
||||
@ -254,7 +254,7 @@ ApiStatus HasKeyItem(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus FindKeyItem(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(FindKeyItem) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 itemID = evt_get_variable(script, *args++);
|
||||
s32 value = *args++;
|
||||
@ -277,7 +277,7 @@ ApiStatus FindKeyItem(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus AddItem(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(AddItem) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 itemID = evt_get_variable(script, *args++);
|
||||
Bytecode outItemIdx = *args++;
|
||||
@ -286,12 +286,12 @@ ApiStatus AddItem(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus ClearVariable(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(ClearVariable) {
|
||||
evt_set_variable(script, *script->ptrReadPos, 0);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus FindItem(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(FindItem) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 itemID = evt_get_variable(script, *args++);
|
||||
s32 value = *args++;
|
||||
@ -314,7 +314,7 @@ ApiStatus FindItem(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus RemoveItem(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(RemoveItem) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 itemID = evt_get_variable(script, *args++);
|
||||
s32 value = *args++;
|
||||
@ -344,21 +344,21 @@ ApiStatus RemoveItem(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus CountFortessKeys(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(CountFortessKeys) {
|
||||
s32 outVar = *script->ptrReadPos;
|
||||
|
||||
evt_set_variable(script, outVar, get_fortress_key_count());
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus RemoveFortressKeys(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(RemoveFortressKeys) {
|
||||
s32 num = evt_get_variable(script, *script->ptrReadPos);
|
||||
|
||||
subtract_fortress_keys(num);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus MakeItemEntity(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(MakeItemEntity) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 itemID = 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;
|
||||
}
|
||||
|
||||
ApiStatus DropItemEntity(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(DropItemEntity) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 itemID = 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;
|
||||
}
|
||||
|
||||
ApiStatus DropResizableItemEntity(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(DropResizableItemEntity) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 itemID = 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;
|
||||
}
|
||||
|
||||
ApiStatus RemoveItemEntity(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(RemoveItemEntity) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 itemEntityIndex = evt_get_variable(script, *args++);
|
||||
|
||||
@ -406,7 +406,7 @@ ApiStatus RemoveItemEntity(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus AddBadge(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(AddBadge) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 badgeID = evt_get_variable(script, *args++);
|
||||
Bytecode outBadgeIdx = *args++;
|
||||
@ -415,7 +415,7 @@ ApiStatus AddBadge(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus RemoveBadge(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(RemoveBadge) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
PlayerData* playerData = &gPlayerData;
|
||||
s32 badge = evt_get_variable(script, *args++);
|
||||
@ -435,7 +435,7 @@ ApiStatus RemoveBadge(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus SetItemPos(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(SetItemPos) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
ItemEntity* ptrItemEntity;
|
||||
s32 itemEntityIndex;
|
||||
@ -453,7 +453,7 @@ ApiStatus SetItemPos(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus SetItemFlags(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(SetItemFlags) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 itemEntityIndex = evt_get_variable(script, *args++);
|
||||
s32 flagBits = *args++;
|
||||
@ -468,7 +468,7 @@ ApiStatus SetItemFlags(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus SetItemAlpha(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(SetItemAlpha) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 itemEntityIndex = 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;
|
||||
}
|
||||
|
||||
ApiStatus AddCoin(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(AddCoin) {
|
||||
script->varTable[0] = add_coins(evt_get_variable(script, *script->ptrReadPos));
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus AddStarPoints(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(AddStarPoints) {
|
||||
script->varTable[0] = add_star_points(evt_get_variable(script, *script->ptrReadPos));
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus AddStarPieces(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(AddStarPieces) {
|
||||
script->varTable[0] = add_star_pieces(evt_get_variable(script, *script->ptrReadPos));
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus GetItemPower(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(GetItemPower) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 itemIdx = evt_get_variable(script, *args++);
|
||||
Bytecode out1 = *args++;
|
||||
@ -504,7 +504,7 @@ ApiStatus GetItemPower(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus ShowGotItem(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(ShowGotItem) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 itemID, category, pickupMsgFlags;
|
||||
|
||||
|
@ -7,7 +7,7 @@ extern LavaReset* gLavaResetList;
|
||||
extern s32 LastSafeFloor;
|
||||
extern ModelTreeInfoList* gCurrentModelTreeNodeInfo;
|
||||
|
||||
ApiStatus TranslateModel(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(TranslateModel) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 modelIndex = evt_get_variable(script, *args++);
|
||||
f32 x;
|
||||
@ -34,7 +34,7 @@ ApiStatus TranslateModel(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus RotateModel(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(RotateModel) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 var1 = evt_get_variable(script, *args++);
|
||||
s32 modelListIndex = get_model_list_index_from_tree_index(var1);
|
||||
@ -57,7 +57,7 @@ ApiStatus RotateModel(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus ScaleModel(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(ScaleModel) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 modelIndex = evt_get_variable(script, *args++);
|
||||
f32 x;
|
||||
@ -84,7 +84,7 @@ ApiStatus ScaleModel(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus GetModelIndex(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(GetModelIndex) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
Bytecode modelID = evt_get_variable(script, *args++);
|
||||
Bytecode index = *args++;
|
||||
@ -93,7 +93,7 @@ ApiStatus GetModelIndex(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus InvalidateModelTransform(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(InvalidateModelTransform) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
Bytecode modelID = evt_get_variable(script, *args++);
|
||||
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;
|
||||
}
|
||||
|
||||
ApiStatus CloneModel(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(CloneModel) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
Bytecode srcModelID = 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;
|
||||
}
|
||||
|
||||
ApiStatus GetModelCenter(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(GetModelCenter) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
f32 centerX;
|
||||
f32 centerY;
|
||||
@ -128,7 +128,7 @@ ApiStatus GetModelCenter(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus SetTexPanner(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(SetTexPanner) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 treeIndex = 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;
|
||||
}
|
||||
|
||||
ApiStatus SetCustomGfxEnabled(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(SetCustomGfxEnabled) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
Bytecode treeIndex = 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;
|
||||
}
|
||||
|
||||
ApiStatus SetModelCustomGfx(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(SetModelCustomGfx) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 treeIndex = 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;
|
||||
}
|
||||
|
||||
ApiStatus SetModelTexVariant(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(SetModelTexVariant) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
Bytecode modelID = 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;
|
||||
}
|
||||
|
||||
ApiStatus EnableTexPanning(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(EnableTexPanning) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 modelID = 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;
|
||||
}
|
||||
|
||||
ApiStatus EnableModel(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(EnableModel) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 modelIndex = get_model_list_index_from_tree_index(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;
|
||||
}
|
||||
|
||||
ApiStatus SetGroupVisibility(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(SetGroupVisibility) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
Bytecode groupModelID = 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;
|
||||
}
|
||||
|
||||
ApiStatus SetTexPanOffset(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(SetTexPanOffset) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
Bytecode texPanner = 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;
|
||||
}
|
||||
|
||||
ApiStatus SetCustomGfx(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(SetCustomGfx) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 idx = 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;
|
||||
}
|
||||
|
||||
ApiStatus SetCustomGfxBuilders(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(SetCustomGfxBuilders) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 index = 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;
|
||||
}
|
||||
|
||||
ApiStatus SetModelFlags(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(SetModelFlags) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 modelIndex;
|
||||
s32 a1;
|
||||
@ -339,12 +339,12 @@ void apply_transform_to_children(ApiStatus (*apiFunc)(Evt*, s32), Evt* script) {
|
||||
*argsPtr = originalArg;
|
||||
}
|
||||
|
||||
ApiStatus MakeTransformGroup(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(MakeTransformGroup) {
|
||||
mdl_make_transform_group((u16)evt_get_variable(script, *script->ptrReadPos));
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus SetTransformGroupEnabled(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(SetTransformGroupEnabled) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
u16 var1 = 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;
|
||||
}
|
||||
|
||||
ApiStatus TranslateGroup(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(TranslateGroup) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 modelID = evt_get_variable(script, *args);
|
||||
s32 index = get_transform_group_index(modelID);
|
||||
@ -391,7 +391,7 @@ ApiStatus TranslateGroup(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus RotateGroup(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(RotateGroup) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 modelID = evt_get_variable(script, *args);
|
||||
s32 index = get_transform_group_index(modelID);
|
||||
@ -425,7 +425,7 @@ ApiStatus RotateGroup(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus ScaleGroup(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(ScaleGroup) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 modelID = evt_get_variable(script, *args);
|
||||
s32 transformIndex = get_transform_group_index(modelID);
|
||||
@ -459,7 +459,7 @@ ApiStatus ScaleGroup(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus GetTransformGroup(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(GetTransformGroup) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 modelID = evt_get_variable(script, *args++);
|
||||
Bytecode var2 = *args++;
|
||||
@ -468,7 +468,7 @@ ApiStatus GetTransformGroup(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus EnableGroup(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(EnableGroup) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 modelID = evt_get_variable(script, *args);
|
||||
s32 index = get_transform_group_index(modelID);
|
||||
@ -497,7 +497,7 @@ ApiStatus EnableGroup(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus MakeLocalVertexCopy(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(MakeLocalVertexCopy) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 copyIndex = 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;
|
||||
s32 mode = 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
|
||||
ApiStatus ResetFromLava(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(ResetFromLava) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
CollisionStatus* collisionStatus = &gCollisionStatus;
|
||||
Collider* collider;
|
||||
@ -631,7 +631,7 @@ s32 get_lava_reset_pos(f32* outX, f32* outY, f32* outZ) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
ApiStatus GetColliderCenter(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(GetColliderCenter) {
|
||||
f32 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;
|
||||
}
|
||||
|
||||
ApiStatus ParentColliderToModel(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(ParentColliderToModel) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s16 colliderID = 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;
|
||||
}
|
||||
|
||||
ApiStatus UpdateColliderTransform(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(UpdateColliderTransform) {
|
||||
update_collider_transform(evt_get_variable(script, *script->ptrReadPos));
|
||||
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;
|
||||
s32 zoneID = 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);
|
||||
}
|
||||
|
||||
ApiStatus GotoMap(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(GotoMap) {
|
||||
goto_map(script, 0);
|
||||
return ApiStatus_DONE1;
|
||||
}
|
||||
|
||||
ApiStatus GotoMapSpecial(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(GotoMapSpecial) {
|
||||
goto_map(script, 1);
|
||||
return ApiStatus_DONE1;
|
||||
}
|
||||
|
||||
ApiStatus GotoMapByID(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(GotoMapByID) {
|
||||
goto_map(script, 2);
|
||||
return ApiStatus_DONE1;
|
||||
}
|
||||
|
||||
ApiStatus GetEntryID(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(GetEntryID) {
|
||||
evt_set_variable(script, *script->ptrReadPos, gGameStatusPtr->entryID);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus GetMapID(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(GetMapID) {
|
||||
evt_set_variable(script, *script->ptrReadPos, gGameStatusPtr->mapID);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus GetLoadType(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(GetLoadType) {
|
||||
evt_set_variable(script, *script->ptrReadPos, gGameStatusPtr->loadType != 0);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus SetRenderMode(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(SetRenderMode) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 treeIndex = 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;
|
||||
}
|
||||
|
||||
ApiStatus PlaySoundAtModel(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(PlaySoundAtModel) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 modelID = 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;
|
||||
}
|
||||
|
||||
ApiStatus PlaySoundAtCollider(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(PlaySoundAtCollider) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 colliderID = evt_get_variable(script, *args++);
|
||||
s32 soundID = evt_get_variable(script, *args++);
|
||||
|
@ -49,7 +49,7 @@ void render_animated_models(void) {
|
||||
|
||||
// split here?
|
||||
|
||||
ApiStatus InitAnimatedModels(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(InitAnimatedModels) {
|
||||
if (!gGameStatusPtr->isBattle) {
|
||||
gCurrentMeshAnimationListPtr = &gWorldMeshAnimationList;
|
||||
} else {
|
||||
@ -59,7 +59,7 @@ ApiStatus InitAnimatedModels(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus LoadAnimatedModel(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(LoadAnimatedModel) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 index = 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;
|
||||
}
|
||||
|
||||
ApiStatus LoadAnimatedMesh(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(LoadAnimatedMesh) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 index = 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;
|
||||
}
|
||||
|
||||
ApiStatus PlayModelAnimation(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(PlayModelAnimation) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 index = 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;
|
||||
}
|
||||
|
||||
ApiStatus PlayModelAnimationStartingFrom(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(PlayModelAnimationStartingFrom) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 index = 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;
|
||||
}
|
||||
|
||||
ApiStatus ChangeModelAnimation(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(ChangeModelAnimation) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 index = 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;
|
||||
}
|
||||
|
||||
ApiStatus SetAnimatedModelRootPosition(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(SetAnimatedModelRootPosition) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 index = evt_get_variable(script, *args++);
|
||||
f32 x = evt_get_float_variable(script, *args++);
|
||||
@ -162,7 +162,7 @@ ApiStatus SetAnimatedModelRootPosition(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus GetAnimatedModelRootPosition(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(GetAnimatedModelRootPosition) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 index = evt_get_variable(script, *args++);
|
||||
s32 outX = *args++;
|
||||
@ -177,7 +177,7 @@ ApiStatus GetAnimatedModelRootPosition(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus AddAnimatedModelRootPosition(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(AddAnimatedModelRootPosition) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 index = evt_get_variable(script, *args++);
|
||||
f32 x = evt_get_float_variable(script, *args++);
|
||||
@ -192,7 +192,7 @@ ApiStatus AddAnimatedModelRootPosition(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus SetAnimatedModelRootRotation(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(SetAnimatedModelRootRotation) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 index = evt_get_variable(script, *args++);
|
||||
f32 x = evt_get_float_variable(script, *args++);
|
||||
@ -207,7 +207,7 @@ ApiStatus SetAnimatedModelRootRotation(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus SetAnimatedModelRootScale(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(SetAnimatedModelRootScale) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 index = evt_get_variable(script, *args++);
|
||||
f32 x = evt_get_float_variable(script, *args++);
|
||||
@ -222,7 +222,7 @@ ApiStatus SetAnimatedModelRootScale(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus SetAnimatedModelRenderMode(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(SetAnimatedModelRenderMode) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 index = evt_get_variable(script, *args++);
|
||||
s32 renderMode = evt_get_float_variable(script, *args++);
|
||||
@ -231,7 +231,7 @@ ApiStatus SetAnimatedModelRenderMode(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus DeleteAnimatedModel(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(DeleteAnimatedModel) {
|
||||
AnimatedModel* model = (*gCurrentMeshAnimationListPtr)[evt_get_variable(script, *script->ptrReadPos)];
|
||||
|
||||
delete_model_animator(get_animator_by_index(model->animModelID));
|
||||
@ -239,7 +239,7 @@ ApiStatus DeleteAnimatedModel(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus SetAnimatorFlags(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(SetAnimatorFlags) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 index = evt_get_variable(script, *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;
|
||||
s32 listIndex = 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;
|
||||
}
|
||||
|
||||
ApiStatus GetAnimatedNodeRotation(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(GetAnimatedNodeRotation) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 listIndex = 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;
|
||||
}
|
||||
|
||||
ApiStatus GetAnimatedPositionByTreeIndex(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(GetAnimatedPositionByTreeIndex) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 listIndex = 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;
|
||||
}
|
||||
|
||||
ApiStatus GetAnimatedRotationByTreeIndex(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(GetAnimatedRotationByTreeIndex) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 listIndex = 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;
|
||||
}
|
||||
|
||||
ApiStatus SetAnimatedNodeFlags(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(SetAnimatedNodeFlags) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 listIndex = evt_get_variable(script, *args++);
|
||||
s32 id = evt_get_variable(script, *args++);
|
||||
|
@ -8,7 +8,7 @@ extern MessagePrintState* gCurrentPrintContext;
|
||||
extern s32 D_802DB264;
|
||||
extern MessagePrintState* D_802DB268;
|
||||
|
||||
ApiStatus _show_message(Evt* script, s32 isInitialCall, s32 arg2);
|
||||
ApiStatus _show_message(Evt* script, s32 isInitialCall, s32 mode);
|
||||
|
||||
enum {
|
||||
SHOW_MESSAGE_SPEAK_TO_PLAYER = 0,
|
||||
@ -17,19 +17,19 @@ enum {
|
||||
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);
|
||||
}
|
||||
|
||||
ApiStatus EndSpeech(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(EndSpeech) {
|
||||
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);
|
||||
}
|
||||
|
||||
ApiStatus SpeakToNpc(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(SpeakToNpc) {
|
||||
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;
|
||||
}
|
||||
|
||||
ApiStatus ShowMessageAtScreenPos(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(ShowMessageAtScreenPos) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
|
||||
if (isInitialCall) {
|
||||
@ -212,7 +212,7 @@ ApiStatus ShowMessageAtScreenPos(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE1;
|
||||
}
|
||||
|
||||
ApiStatus ShowMessageAtWorldPos(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(ShowMessageAtWorldPos) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
MessagePrintState** currentPrintContext;
|
||||
s32* currentCameraID = &gCurrentCameraID;
|
||||
@ -246,7 +246,7 @@ ApiStatus ShowMessageAtWorldPos(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE1;
|
||||
}
|
||||
|
||||
ApiStatus CloseMessage(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(CloseMessage) {
|
||||
if (isInitialCall) {
|
||||
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;
|
||||
|
||||
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;
|
||||
MessagePrintState** temp802DB268;
|
||||
|
||||
@ -299,12 +299,12 @@ ApiStatus ShowChoice(Evt* script, s32 isInitialCall) {
|
||||
return script->functionTemp[1] == 1;
|
||||
}
|
||||
|
||||
ApiStatus CloseChoice(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(CloseChoice) {
|
||||
close_message(D_802DB268);
|
||||
return ApiStatus_DONE1;
|
||||
}
|
||||
|
||||
ApiStatus CancelMessage(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(CancelMessage) {
|
||||
cancel_message(gCurrentPrintContext);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
@ -314,14 +314,14 @@ s32 cancel_current_message(void) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
ApiStatus SetMessageImages(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(SetMessageImages) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
|
||||
set_message_images((MessageImageData*) *args++);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus func_802D0C94(Evt* script, s32 initialCall) {
|
||||
API_CALLABLE(func_802D0C94) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
|
||||
if (evt_get_variable(script, *args++) == 0) {
|
||||
@ -332,7 +332,7 @@ ApiStatus func_802D0C94(Evt* script, s32 initialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus SetMessageText(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(SetMessageText) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 msg = 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;
|
||||
}
|
||||
|
||||
ApiStatus SetMessageValue(Evt* script, s32 initialCall) {
|
||||
API_CALLABLE(SetMessageValue) {
|
||||
Bytecode* ptrReadPos = script->ptrReadPos;
|
||||
s32 value = evt_get_variable(script, *ptrReadPos++);
|
||||
s32 index = evt_get_variable(script, *ptrReadPos);
|
||||
|
@ -5,18 +5,18 @@
|
||||
|
||||
#define SpeakToPlayer(ARGS...) \
|
||||
_EVT_CMD(EVT_OP_CALL, evt_SpeakToPlayer, ##ARGS),
|
||||
ApiStatus evt_SpeakToPlayer(Evt* script, s32 isInitialCall);
|
||||
API_CALLABLE(evt_SpeakToPlayer);
|
||||
|
||||
#define EndSpeech(ARGS...) \
|
||||
_EVT_CMD(EVT_OP_CALL, evt_EndSpeech, ##ARGS),
|
||||
ApiStatus evt_EndSpeech(Evt* script, s32 isInitialCall);
|
||||
API_CALLABLE(evt_EndSpeech);
|
||||
|
||||
#define ContinueSpeech(ARGS...) \
|
||||
_EVT_CMD(EVT_OP_CALL, evt_ContinueSpeech, ##ARGS),
|
||||
ApiStatus evt_ContinueSpeech(Evt* script, s32 isInitialCall);
|
||||
API_CALLABLE(evt_ContinueSpeech);
|
||||
|
||||
#define SpeakToNpc(ARGS...) \
|
||||
_EVT_CMD(EVT_OP_CALL, evt_SpeakToNpc, ##ARGS),
|
||||
ApiStatus evt_SpeakToNpc(Evt* script, s32 isInitialCall);
|
||||
API_CALLABLE(evt_SpeakToNpc);
|
||||
|
||||
#endif
|
||||
|
@ -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;
|
||||
s32 npcID = 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;
|
||||
}
|
||||
|
||||
ApiStatus DeleteNpc(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(DeleteNpc) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
Npc* npc = get_npc_unsafe(evt_get_variable(script, *args++));
|
||||
|
||||
@ -57,7 +57,7 @@ ApiStatus DeleteNpc(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus GetNpcPointer(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(GetNpcPointer) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 npcID = evt_get_variable(script, *args++);
|
||||
Bytecode varNPC = *args++;
|
||||
@ -66,7 +66,7 @@ ApiStatus GetNpcPointer(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus SetNpcPos(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(SetNpcPos) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 npcID = 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;
|
||||
}
|
||||
|
||||
ApiStatus SetNpcRotation(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(SetNpcRotation) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 npcID = evt_get_variable(script, *args++);
|
||||
f32 rotX = evt_get_float_variable(script, *args++);
|
||||
@ -107,7 +107,7 @@ ApiStatus SetNpcRotation(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus SetNpcRotationPivot(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(SetNpcRotationPivot) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 npcId = evt_get_variable(script, *args++);
|
||||
f32 value = evt_get_float_variable(script, *args++);
|
||||
@ -122,7 +122,7 @@ ApiStatus SetNpcRotationPivot(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus SetNpcScale(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(SetNpcScale) {
|
||||
Bytecode* ptrReadPos = script->ptrReadPos;
|
||||
s32 npcID = evt_get_variable(script, *ptrReadPos++);
|
||||
f32 scaleX = evt_get_float_variable(script, *ptrReadPos++);
|
||||
@ -140,7 +140,7 @@ ApiStatus SetNpcScale(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus SetNpcCollisionSize(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(SetNpcCollisionSize) {
|
||||
Bytecode* ptrReadPos = script->ptrReadPos;
|
||||
s32 npcID = 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;
|
||||
}
|
||||
|
||||
ApiStatus SetNpcSpeed(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(SetNpcSpeed) {
|
||||
Bytecode* ptrReadPos = script->ptrReadPos;
|
||||
s32 npcID = evt_get_variable(script, *ptrReadPos++);
|
||||
f32 speed = evt_get_float_variable(script, *ptrReadPos);
|
||||
@ -170,7 +170,7 @@ ApiStatus SetNpcSpeed(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus SetNpcJumpscale(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(SetNpcJumpscale) {
|
||||
Bytecode* ptrReadPos = script->ptrReadPos;
|
||||
s32 npcID = evt_get_variable(script, *ptrReadPos++);
|
||||
f32 jumpScale = evt_get_float_variable(script, *ptrReadPos);
|
||||
@ -184,7 +184,7 @@ ApiStatus SetNpcJumpscale(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus SetNpcAnimation(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(SetNpcAnimation) {
|
||||
Bytecode* ptrReadPos = script->ptrReadPos;
|
||||
s32 npcID = 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;
|
||||
}
|
||||
|
||||
ApiStatus GetNpcAnimation(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(GetNpcAnimation) {
|
||||
Bytecode* ptrReadPos = script->ptrReadPos;
|
||||
s32 npcID = evt_get_variable(script, *ptrReadPos++);
|
||||
Bytecode outVar = *ptrReadPos++;
|
||||
@ -212,7 +212,7 @@ ApiStatus GetNpcAnimation(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus SetNpcAnimationSpeed(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(SetNpcAnimationSpeed) {
|
||||
Bytecode* ptrReadPos = script->ptrReadPos;
|
||||
s32 npcID = evt_get_variable(script, *ptrReadPos++);
|
||||
f32 animationSpeed = evt_get_float_variable(script, *ptrReadPos++);
|
||||
@ -226,7 +226,7 @@ ApiStatus SetNpcAnimationSpeed(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus NpcMoveTo(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(NpcMoveTo) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
Npc* npc;
|
||||
f32 dist;
|
||||
@ -357,15 +357,15 @@ ApiStatus _npc_jump_to(Evt* script, s32 isInitialCall, s32 snapYaw) {
|
||||
return ApiStatus_BLOCK;
|
||||
}
|
||||
|
||||
ApiStatus NpcJump0(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(NpcJump0) {
|
||||
return _npc_jump_to(script, isInitialCall, 0);
|
||||
}
|
||||
|
||||
ApiStatus NpcJump1(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(NpcJump1) {
|
||||
return _npc_jump_to(script, isInitialCall, 1);
|
||||
}
|
||||
|
||||
ApiStatus NpcFlyTo(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(NpcFlyTo) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
f32* outX = (f32*)&script->varTable[3];
|
||||
f32* outY = (f32*)&script->varTable[4];
|
||||
@ -437,7 +437,7 @@ ApiStatus NpcFlyTo(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_BLOCK;
|
||||
}
|
||||
|
||||
ApiStatus GetNpcYaw(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(GetNpcYaw) {
|
||||
Bytecode* ptrReadPos = script->ptrReadPos;
|
||||
s32 npcID = evt_get_variable(script, *ptrReadPos++);
|
||||
Bytecode outVar = *ptrReadPos++;
|
||||
@ -451,7 +451,7 @@ ApiStatus GetNpcYaw(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus SetNpcYaw(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(SetNpcYaw) {
|
||||
Bytecode* ptrReadPos = script->ptrReadPos;
|
||||
s32 npcID = evt_get_variable(script, *ptrReadPos++);
|
||||
Npc* npc = resolve_npc(script, npcID);
|
||||
@ -464,7 +464,7 @@ ApiStatus SetNpcYaw(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus InterpNpcYaw(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(InterpNpcYaw) {
|
||||
PlayerStatus* playerStatus = &gPlayerStatus;
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
f32* initialYaw = &script->functionTempF[1];
|
||||
@ -512,7 +512,7 @@ ApiStatus InterpNpcYaw(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus NpcFacePlayer(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(NpcFacePlayer) {
|
||||
PlayerStatus* playerStatus = &gPlayerStatus;
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
f32* initialYaw = &script->functionTempF[1];
|
||||
@ -554,7 +554,7 @@ ApiStatus NpcFacePlayer(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus NpcFaceNpc(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(NpcFaceNpc) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
f32* initialYaw = &script->functionTempF[1];
|
||||
f32* deltaYaw = &script->functionTempF[2];
|
||||
@ -602,7 +602,7 @@ ApiStatus NpcFaceNpc(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus SetNpcFlagBits(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(SetNpcFlagBits) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 npcID = evt_get_variable(script, *args++);
|
||||
s32 bits = *args++;
|
||||
@ -622,7 +622,7 @@ ApiStatus SetNpcFlagBits(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus GetNpcPos(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(GetNpcPos) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 npcID = evt_get_variable(script, *args++);
|
||||
s32 outX = *args++;
|
||||
@ -640,7 +640,7 @@ ApiStatus GetNpcPos(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus SetNpcCollisionChannel(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(SetNpcCollisionChannel) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 npcID = evt_get_variable(script, *args++);
|
||||
Bytecode channel = *args;
|
||||
@ -654,7 +654,7 @@ ApiStatus SetNpcCollisionChannel(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus SetNpcSprite(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(SetNpcSprite) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 npcID = evt_get_variable(script, *args++);
|
||||
Bytecode animID = *args;
|
||||
@ -668,7 +668,7 @@ ApiStatus SetNpcSprite(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus EnableNpcShadow(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(EnableNpcShadow) {
|
||||
Bytecode* ptrReadPos = script->ptrReadPos;
|
||||
s32 npcID = 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;
|
||||
}
|
||||
|
||||
ApiStatus EnableNpcBlur(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(EnableNpcBlur) {
|
||||
Bytecode* ptrReadPos = script->ptrReadPos;
|
||||
s32 npcID = 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;
|
||||
}
|
||||
|
||||
ApiStatus ClearPartnerMoveHistory(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(ClearPartnerMoveHistory) {
|
||||
Bytecode* ptrReadPos = script->ptrReadPos;
|
||||
s32 npcID = evt_get_variable(script, *ptrReadPos++);
|
||||
Npc* npc = resolve_npc(script, npcID);
|
||||
@ -717,7 +717,7 @@ ApiStatus ClearPartnerMoveHistory(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus NpcSetHomePosToCurrent(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(NpcSetHomePosToCurrent) {
|
||||
Npc* npc = resolve_npc(script, evt_get_variable(script, *script->ptrReadPos));
|
||||
|
||||
if (npc == NULL) {
|
||||
@ -730,7 +730,7 @@ ApiStatus NpcSetHomePosToCurrent(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus GetPartnerPos(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(GetPartnerPos) {
|
||||
Bytecode* ptrReadPos = script->ptrReadPos;
|
||||
Bytecode posX = *ptrReadPos++;
|
||||
Bytecode posY = *ptrReadPos++;
|
||||
@ -747,7 +747,7 @@ ApiStatus GetPartnerPos(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus DisablePartnerAI(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(DisablePartnerAI) {
|
||||
Bytecode* ptrReadPos = script->ptrReadPos;
|
||||
|
||||
if (evt_get_variable(script, *ptrReadPos++) == 0) {
|
||||
@ -758,17 +758,17 @@ ApiStatus DisablePartnerAI(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus EnablePartnerAI(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(EnablePartnerAI) {
|
||||
enable_partner_ai();
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus func_802CF54C(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(func_802CF54C) {
|
||||
func_800EF43C();
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus func_802CF56C(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(func_802CF56C) {
|
||||
Bytecode* ptrReadPos = script->ptrReadPos;
|
||||
s32 value = evt_get_variable(script, *ptrReadPos++);
|
||||
|
||||
@ -780,7 +780,7 @@ ApiStatus func_802CF56C(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus BringPartnerOut(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(BringPartnerOut) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
NpcBlueprint bp;
|
||||
NpcBlueprint* bpPointer = &bp;
|
||||
@ -874,7 +874,7 @@ ApiStatus BringPartnerOut(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_BLOCK;
|
||||
}
|
||||
|
||||
ApiStatus PutPartnerAway(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(PutPartnerAway) {
|
||||
Npc* partner = get_npc_unsafe(NPC_PARTNER);
|
||||
PlayerStatus* playerStatus = &gPlayerStatus;
|
||||
f32 scale;
|
||||
@ -946,26 +946,26 @@ ApiStatus PutPartnerAway(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_BLOCK;
|
||||
}
|
||||
|
||||
ApiStatus GetCurrentPartnerID(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(GetCurrentPartnerID) {
|
||||
evt_set_variable(script, *script->ptrReadPos, gPlayerData.curPartner);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus PartnerCanUseAbility(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(PartnerCanUseAbility) {
|
||||
Bytecode outVar = *script->ptrReadPos;
|
||||
|
||||
evt_set_variable(script, outVar, partner_can_use_ability());
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus PartnerIsFlying(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(PartnerIsFlying) {
|
||||
Bytecode outVar = *script->ptrReadPos;
|
||||
|
||||
evt_set_variable(script, outVar, partner_is_flying());
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus SetNpcImgFXParams(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(SetNpcImgFXParams) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 npcId = 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;
|
||||
}
|
||||
|
||||
ApiStatus SetNpcImgFXFlags(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(SetNpcImgFXFlags) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 npcId = evt_get_variable(script, *args++);
|
||||
Bytecode flags = *args;
|
||||
@ -997,7 +997,7 @@ ApiStatus SetNpcImgFXFlags(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus SetNpcPaletteSwapMode(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(SetNpcPaletteSwapMode) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 npcId = 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;
|
||||
}
|
||||
|
||||
ApiStatus SetNpcPaletteSwapLower(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(SetNpcPaletteSwapLower) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 npcId = 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;
|
||||
}
|
||||
|
||||
ApiStatus SetNpcPaletteSwapping(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(SetNpcPaletteSwapping) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 npcId = 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;
|
||||
}
|
||||
|
||||
ApiStatus SetNpcDecoration(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(SetNpcDecoration) {
|
||||
Bytecode* ptrReadPos = script->ptrReadPos;
|
||||
s32 npcID = 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;
|
||||
}
|
||||
|
||||
ApiStatus PlaySoundAtNpc(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(PlaySoundAtNpc) {
|
||||
Bytecode* ptrReadPos = script->ptrReadPos;
|
||||
s32 npcID = 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;
|
||||
}
|
||||
|
||||
ApiStatus SetNpcRenderMode(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(SetNpcRenderMode) {
|
||||
Bytecode* ptrReadPos = script->ptrReadPos;
|
||||
s32 npcID = evt_get_variable(script, *ptrReadPos++);
|
||||
u8 renderMode = evt_get_variable(script, *ptrReadPos++);
|
||||
|
@ -13,7 +13,7 @@ extern s32 D_802DB5B4[3]; // unused
|
||||
|
||||
Npc* playerNpc = &playerNpcData;
|
||||
|
||||
ApiStatus HidePlayerShadow(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(HidePlayerShadow) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 hideShadow = evt_get_variable(script, *args++);
|
||||
|
||||
@ -25,7 +25,7 @@ ApiStatus HidePlayerShadow(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus DisablePlayerPhysics(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(DisablePlayerPhysics) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 disable = evt_get_variable(script, *args++);
|
||||
|
||||
@ -37,7 +37,7 @@ ApiStatus DisablePlayerPhysics(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus DisablePlayerInput(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(DisablePlayerInput) {
|
||||
PlayerStatus* playerStatus = &gPlayerStatus;
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 enable = evt_get_variable(script, *args++);
|
||||
@ -61,7 +61,7 @@ ApiStatus DisablePlayerInput(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus SetPlayerPos(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(SetPlayerPos) {
|
||||
PlayerStatus* playerStatus = &gPlayerStatus;
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
f32 x = evt_get_variable(script, *args++);
|
||||
@ -79,7 +79,7 @@ ApiStatus SetPlayerPos(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus SetPlayerCollisionSize(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(SetPlayerCollisionSize) {
|
||||
PlayerStatus* playerStatus = &gPlayerStatus;
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 height = evt_get_variable(script, *args++);
|
||||
@ -94,21 +94,21 @@ ApiStatus SetPlayerCollisionSize(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus SetPlayerSpeed(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(SetPlayerSpeed) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
|
||||
playerNpc->moveSpeed = evt_get_float_variable(script, *args++);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus SetPlayerJumpscale(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(SetPlayerJumpscale) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
|
||||
playerNpc->jumpScale = evt_get_float_variable(script, *args++);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus SetPlayerAnimation(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(SetPlayerAnimation) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
AnimID anim = evt_get_variable(script, *args++);
|
||||
|
||||
@ -121,21 +121,21 @@ ApiStatus SetPlayerAnimation(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus SetPlayerActionState(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(SetPlayerActionState) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
|
||||
set_action_state(evt_get_variable(script, *args++));
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus SetPlayerAnimationSpeed(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(SetPlayerAnimationSpeed) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
|
||||
playerNpc->animationSpeed = evt_get_float_variable(script, *args++);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus PlayerMoveTo(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(PlayerMoveTo) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
PlayerStatus* playerStatus = &gPlayerStatus;
|
||||
|
||||
@ -162,7 +162,7 @@ ApiStatus PlayerMoveTo(Evt* script, s32 isInitialCall) {
|
||||
return script->functionTemp[0] < 0;
|
||||
}
|
||||
|
||||
ApiStatus func_802D1270(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(func_802D1270) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
PlayerStatus* playerStatus = &gPlayerStatus;
|
||||
|
||||
@ -186,7 +186,7 @@ ApiStatus func_802D1270(Evt* script, s32 isInitialCall) {
|
||||
return (script->functionTemp[0] < 0) * ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus func_802D1380(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(func_802D1380) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
PlayerStatus* playerStatus = &gPlayerStatus;
|
||||
|
||||
@ -337,19 +337,19 @@ ApiStatus player_jump(Evt* script, s32 isInitialCall, s32 mode) {
|
||||
return ApiStatus_BLOCK;
|
||||
}
|
||||
|
||||
ApiStatus PlayerJump(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(PlayerJump) {
|
||||
return player_jump(script, isInitialCall, 0);
|
||||
}
|
||||
|
||||
ApiStatus PlayerJump1(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(PlayerJump1) {
|
||||
return player_jump(script, isInitialCall, 1);
|
||||
}
|
||||
|
||||
ApiStatus PlayerJump2(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(PlayerJump2) {
|
||||
return player_jump(script, isInitialCall, 2);
|
||||
}
|
||||
|
||||
ApiStatus InterpPlayerYaw(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(InterpPlayerYaw) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
PlayerStatus* playerStatus = &gPlayerStatus;
|
||||
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;
|
||||
s32* args = script->ptrReadPos;
|
||||
f32* playerTargetYaw = &script->functionTempF[1];
|
||||
@ -436,12 +436,12 @@ ApiStatus PlayerFaceNpc(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus GetPlayerTargetYaw(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(GetPlayerTargetYaw) {
|
||||
evt_set_variable(script, *script->ptrReadPos, gPlayerStatus.targetYaw);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus SetPlayerFlagBits(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(SetPlayerFlagBits) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
PlayerStatus* playerStatus = &gPlayerStatus;
|
||||
Bytecode bits = *args++;
|
||||
@ -456,13 +456,13 @@ ApiStatus SetPlayerFlagBits(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus GetPlayerActionState(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(GetPlayerActionState) {
|
||||
Bytecode outVar = *script->ptrReadPos;
|
||||
evt_set_variable(script, outVar, gPlayerStatus.actionState);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus GetPlayerPos(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(GetPlayerPos) {
|
||||
PlayerStatus* playerStatus = &gPlayerStatus;
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
Bytecode outVar1 = *args++;
|
||||
@ -475,14 +475,14 @@ ApiStatus GetPlayerPos(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus GetPlayerAnimation(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(GetPlayerAnimation) {
|
||||
Bytecode outVar = *script->ptrReadPos;
|
||||
|
||||
evt_set_variable(script, outVar, gPlayerStatus.anim);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus FullyRestoreHPandFP(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(FullyRestoreHPandFP) {
|
||||
PlayerData* playerData = &gPlayerData;
|
||||
|
||||
playerData->curHP = playerData->curMaxHP;
|
||||
@ -490,14 +490,14 @@ ApiStatus FullyRestoreHPandFP(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus FullyRestoreSP(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(FullyRestoreSP) {
|
||||
PlayerData* playerData = &gPlayerData;
|
||||
|
||||
playerData->starPower = playerData->maxStarPower * SP_PER_BAR;
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus EnablePartner(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(EnablePartner) {
|
||||
s32 partnerIdx = evt_get_variable(script, *script->ptrReadPos) - 1;
|
||||
PartnerData* partner = &gPlayerData.partners[partnerIdx];
|
||||
|
||||
@ -505,7 +505,7 @@ ApiStatus EnablePartner(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus DisablePartner(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(DisablePartner) {
|
||||
s32 partnerIdx = evt_get_variable(script, *script->ptrReadPos) - 1;
|
||||
PartnerData* partner = &gPlayerData.partners[partnerIdx];
|
||||
|
||||
@ -513,7 +513,7 @@ ApiStatus DisablePartner(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus UseEntryHeading(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(UseEntryHeading) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
MapSettings* mapSettings = get_current_map_settings();
|
||||
s32 var1 = evt_get_variable(script, *args++);
|
||||
@ -537,12 +537,12 @@ ApiStatus UseEntryHeading(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus func_802D2148(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(func_802D2148) {
|
||||
gPlayerStatus.flags &= ~PS_FLAG_CAMERA_DOESNT_FOLLOW;
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus UseExitHeading(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(UseExitHeading) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
PlayerStatus* playerStatus = &gPlayerStatus;
|
||||
MapSettings* mapSettings = get_current_map_settings();
|
||||
@ -591,7 +591,7 @@ s32 func_802D23F8(void) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
ApiStatus WaitForPlayerTouchingFloor(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(WaitForPlayerTouchingFloor) {
|
||||
if ((gCollisionStatus.curFloor >= 0) && func_802D23F8()) {
|
||||
return ApiStatus_DONE2;
|
||||
} 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) {
|
||||
return ApiStatus_DONE2;
|
||||
} 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;
|
||||
s32 result = FALSE;
|
||||
|
||||
@ -619,7 +619,7 @@ ApiStatus IsPlayerOnValidFloor(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus WaitForPlayerMoveToComplete(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(WaitForPlayerMoveToComplete) {
|
||||
if (gPlayerStatus.moveFrames == 0) {
|
||||
return ApiStatus_DONE2;
|
||||
} 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) {
|
||||
return ApiStatus_BLOCK;
|
||||
} else {
|
||||
@ -635,7 +635,7 @@ ApiStatus WaitForPlayerInputEnabled(Evt* script, s32 isInitialCall) {
|
||||
}
|
||||
}
|
||||
|
||||
ApiStatus UpdatePlayerImgFX(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(UpdatePlayerImgFX) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
PlayerStatus* playerStatus = &gPlayerStatus;
|
||||
s32 a0 = *args++;
|
||||
@ -703,14 +703,14 @@ ApiStatus UpdatePlayerImgFX(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus SetPlayerImgFXFlags(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(SetPlayerImgFXFlags) {
|
||||
s32 imgfxFlags = *script->ptrReadPos;
|
||||
|
||||
PlayerImgFXFlags = imgfxFlags;
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus FacePlayerTowardPoint(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(FacePlayerTowardPoint) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
PlayerStatus* playerStatus = &gPlayerStatus;
|
||||
f32* initialYaw = &script->functionTempF[1];
|
||||
@ -758,7 +758,7 @@ ApiStatus FacePlayerTowardPoint(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus DisablePulseStone(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(DisablePulseStone) {
|
||||
PlayerStatus* playerStatus = &gPlayerStatus;
|
||||
|
||||
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
|
||||
ApiStatus GetPartnerInUse(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(GetPartnerInUse) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
Bytecode outVar = *args++;
|
||||
PlayerData* playerData = &gPlayerData;
|
||||
@ -785,21 +785,21 @@ ApiStatus GetPartnerInUse(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus ForceUsePartner(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(ForceUsePartner) {
|
||||
PlayerStatus* playerStatus = &gPlayerStatus;
|
||||
|
||||
playerStatus->animFlags |= PA_FLAG_FORCE_USE_PARTNER;
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus InterruptUsePartner(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(InterruptUsePartner) {
|
||||
PlayerStatus* playerStatus = &gPlayerStatus;
|
||||
|
||||
playerStatus->animFlags |= PA_FLAG_INTERRUPT_USE_PARTNER;
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus Disable8bitMario(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(Disable8bitMario) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
PlayerStatus* playerStatus = &gPlayerStatus;
|
||||
|
||||
@ -818,14 +818,14 @@ ApiStatus Disable8bitMario(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus func_802D2C14(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(func_802D2C14) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
|
||||
func_800EF3D4(evt_get_variable(script, *args++));
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus SetPlayerPushVelocity(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(SetPlayerPushVelocity) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
f32 x = evt_get_variable(script, *args++);
|
||||
f32 y;
|
||||
@ -838,7 +838,7 @@ ApiStatus SetPlayerPushVelocity(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus PlaySoundAtPlayer(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(PlaySoundAtPlayer) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 soundID = evt_get_variable(script, *args++);
|
||||
s32 flags = evt_get_variable(script, *args++);
|
||||
|
@ -118,7 +118,7 @@ void virtual_entity_list_render_UI(void) {
|
||||
}
|
||||
}
|
||||
|
||||
ApiStatus InitVirtualEntityList(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(InitVirtualEntityList) {
|
||||
if (!gGameStatusPtr->isBattle) {
|
||||
gCurrentVirtualEntityListPtr = &wWorldVirtualEntityList;
|
||||
} else {
|
||||
@ -127,7 +127,7 @@ ApiStatus InitVirtualEntityList(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus CreateVirtualEntityAt(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(CreateVirtualEntityAt) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 index = 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;
|
||||
}
|
||||
|
||||
ApiStatus CreateVirtualEntity(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(CreateVirtualEntity) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 outVar = *args++;
|
||||
EntityModelScript* cmdList = (EntityModelScript*)evt_get_variable(script, *args++);
|
||||
@ -183,7 +183,7 @@ ApiStatus CreateVirtualEntity(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus CreateVirtualEntity_ALT(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(CreateVirtualEntity_ALT) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 outVar = *args++;
|
||||
EntityModelScript* cmdList = (EntityModelScript*) evt_get_variable(script, *args++);
|
||||
@ -218,7 +218,7 @@ ApiStatus CreateVirtualEntity_ALT(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus DeleteVirtualEntity(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(DeleteVirtualEntity) {
|
||||
VirtualEntity* virtualEntity = (*gCurrentVirtualEntityListPtr)[evt_get_variable(script, *script->ptrReadPos)];
|
||||
|
||||
free_entity_model_by_index(virtualEntity->entityModelIndex);
|
||||
@ -226,7 +226,7 @@ ApiStatus DeleteVirtualEntity(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus SetVirtualEntityRenderCommands(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(SetVirtualEntityRenderCommands) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 index = 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;
|
||||
}
|
||||
|
||||
ApiStatus SetVirtualEntityPosition(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(SetVirtualEntityPosition) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 index = evt_get_variable(script, *args++);
|
||||
f32 x = evt_get_float_variable(script, *args++);
|
||||
@ -249,7 +249,7 @@ ApiStatus SetVirtualEntityPosition(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus GetVirtualEntityPosition(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(GetVirtualEntityPosition) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 index = evt_get_variable(script, *args++);
|
||||
VirtualEntity* virtualEntity = (*gCurrentVirtualEntityListPtr)[index];
|
||||
@ -263,7 +263,7 @@ ApiStatus GetVirtualEntityPosition(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus SetVirtualEntityRotation(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(SetVirtualEntityRotation) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 index = evt_get_variable(script, *args++);
|
||||
f32 x = evt_get_float_variable(script, *args++);
|
||||
@ -277,7 +277,7 @@ ApiStatus SetVirtualEntityRotation(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus SetVirtualEntityScale(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(SetVirtualEntityScale) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 index = evt_get_variable(script, *args++);
|
||||
f32 x = evt_get_float_variable(script, *args++);
|
||||
@ -291,7 +291,7 @@ ApiStatus SetVirtualEntityScale(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus SetVirtualEntityMoveSpeed(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(SetVirtualEntityMoveSpeed) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 index = evt_get_variable(script, *args++);
|
||||
|
||||
@ -299,7 +299,7 @@ ApiStatus SetVirtualEntityMoveSpeed(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus SetVirtualEntityJumpGravity(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(SetVirtualEntityJumpGravity) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 index = evt_get_variable(script, *args++);
|
||||
|
||||
@ -307,7 +307,7 @@ ApiStatus SetVirtualEntityJumpGravity(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus VirtualEntityMoveTo(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(VirtualEntityMoveTo) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
VirtualEntity* virtualEntity;
|
||||
|
||||
@ -363,7 +363,7 @@ ApiStatus VirtualEntityMoveTo(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_BLOCK;
|
||||
}
|
||||
|
||||
ApiStatus VirtualEntityJumpTo(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(VirtualEntityJumpTo) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
VirtualEntity* virtualEntity;
|
||||
s32 index;
|
||||
@ -434,7 +434,7 @@ ApiStatus VirtualEntityJumpTo(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_BLOCK;
|
||||
}
|
||||
|
||||
ApiStatus VirtualEntityLandJump(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(VirtualEntityLandJump) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
VirtualEntity* virtualEntity;
|
||||
|
||||
@ -461,7 +461,7 @@ ApiStatus VirtualEntityLandJump(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_BLOCK;
|
||||
}
|
||||
|
||||
ApiStatus SetVirtualEntityFlags(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(SetVirtualEntityFlags) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 index = evt_get_variable(script, *args++);
|
||||
s32 flags = *args++;
|
||||
@ -471,7 +471,7 @@ ApiStatus SetVirtualEntityFlags(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus SetVirtualEntityFlagBits(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(SetVirtualEntityFlagBits) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 index = evt_get_variable(script, *args++);
|
||||
s32 bits = *args++;
|
||||
@ -487,7 +487,7 @@ ApiStatus SetVirtualEntityFlagBits(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus SetVirtualEntityRenderMode(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(SetVirtualEntityRenderMode) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 index = evt_get_variable(script, *args++);
|
||||
s32 mode = evt_get_variable(script, *args++);
|
||||
|
32
src/imgfx.c
32
src/imgfx.c
@ -1477,7 +1477,7 @@ void imgfx_appendGfx_mesh_basic(ImgFXState* state, Matrix4f mtx) {
|
||||
s32 alpha2;
|
||||
|
||||
if (!(state->flags & IMGFX_FLAG_SKIP_TEX_SETUP)) {
|
||||
if ((gSpriteShadingProfile->flags & 1)
|
||||
if ((gSpriteShadingProfile->flags & SPR_SHADING_FLAG_ENABLED)
|
||||
&& (state->arrayIdx != 0)
|
||||
&& (state->flags & someFlags)
|
||||
&& ( state->renderType == IMGFX_RENDER_DEFAULT
|
||||
@ -1513,7 +1513,10 @@ void imgfx_appendGfx_mesh_basic(ImgFXState* state, Matrix4f mtx) {
|
||||
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];
|
||||
|
||||
if (gGameStatusPtr->isBattle == 2) {
|
||||
@ -1548,7 +1551,10 @@ void imgfx_appendGfx_mesh_basic(ImgFXState* state, Matrix4f mtx) {
|
||||
G_TX_NOLOD, G_TX_NOLOD, // shift,
|
||||
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;
|
||||
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];
|
||||
if (gGameStatusPtr->isBattle == 2) {
|
||||
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 lrIdx = firstVtxIdx + (i + 1) * (state->subdivX + 1) + j + 1;
|
||||
if (!(state->flags & IMGFX_FLAG_SKIP_TEX_SETUP)) {
|
||||
if ((gSpriteShadingProfile->flags & 1) &&
|
||||
(*ImgFXInstances)[0].arrayIdx != 0 &&
|
||||
(state->flags & (IMGFX_FLAG_100000 | IMGFX_FLAG_80000)) &&
|
||||
(state->renderType == IMGFX_RENDER_DEFAULT
|
||||
|| state->renderType == IMGFX_RENDER_MULTIPLY_ALPHA
|
||||
|| state->renderType == IMGFX_RENDER_MULTIPLY_SHADE_ALPHA)) {
|
||||
if ((gSpriteShadingProfile->flags & SPR_SHADING_FLAG_ENABLED)
|
||||
&& (*ImgFXInstances)[0].arrayIdx != 0
|
||||
&& (state->flags & (IMGFX_FLAG_100000 | IMGFX_FLAG_80000))
|
||||
&& (state->renderType == IMGFX_RENDER_DEFAULT
|
||||
|| state->renderType == IMGFX_RENDER_MULTIPLY_ALPHA
|
||||
|| state->renderType == IMGFX_RENDER_MULTIPLY_SHADE_ALPHA)
|
||||
) {
|
||||
s32 alpha = 255;
|
||||
gDPScrollMultiTile2_4b(gMainGfxPos++,
|
||||
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)) {
|
||||
gDPSetTextureLUT(gMainGfxPos++, G_TT_RGBA16);
|
||||
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->renderType == IMGFX_RENDER_DEFAULT
|
||||
|| state->renderType == IMGFX_RENDER_MULTIPLY_ALPHA
|
||||
|
@ -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)) {
|
||||
show_coin_counter();
|
||||
} else {
|
||||
|
@ -1207,7 +1207,7 @@ void render_item_entities(void) {
|
||||
gSPDisplayList(gMainGfxPos++, D_8014C678);
|
||||
} else {
|
||||
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);
|
||||
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++);
|
||||
|
200
src/model.c
200
src/model.c
@ -26,10 +26,11 @@ enum {
|
||||
};
|
||||
|
||||
// supported values for auxCombineSubType
|
||||
// different subtypes are only supported for textures with EXTRA_TILE_NONE
|
||||
enum {
|
||||
AUX_COMBINE_SUB_0 = 0,
|
||||
AUX_COMBINE_SUB_1 = 1,
|
||||
AUX_COMBINE_SUB_2 = 2,
|
||||
AUX_COMBINE_SUB_0 = 0, // multiply TEX * SHADE for color, use TEX for alpha
|
||||
AUX_COMBINE_SUB_1 = 1, // lerp from TEX to SHADE based on TEX alpha
|
||||
AUX_COMBINE_SUB_2 = 2, // TEX only, shade is ignored
|
||||
AUX_COMBINE_SUB_COUNT = 3,
|
||||
};
|
||||
|
||||
@ -238,8 +239,8 @@ Gfx SolidCombineModes[][5] = {
|
||||
[TINT_COMBINE_NONE] gsDPSetCombineMode(G_CC_SHADE, G_CC_SHADE),
|
||||
[TINT_COMBINE_FOG] 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_REMAP] gsDPSetCombineMode(PM_CC_NOTEX_TINT_REMAP, G_CC_PASS2),
|
||||
[TINT_COMBINE_DEPTH] gsDPSetCombineMode(PM_CC_TINT_DEPTH_NOTEX, G_CC_PASS2),
|
||||
[TINT_COMBINE_REMAP] gsDPSetCombineMode(PM_CC_TINT_REMAP_NOTEX, G_CC_PASS2),
|
||||
},
|
||||
|
||||
[TEX_COMBINE_MAIN_ONLY_0] {
|
||||
@ -247,90 +248,93 @@ Gfx SolidCombineModes[][5] = {
|
||||
[TINT_COMBINE_FOG] gsDPSetCombineMode(G_CC_MODULATEIDECALA, 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_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] {
|
||||
[TINT_COMBINE_NONE] gsDPSetCombineMode(G_CC_BLENDRGBA, G_CC_BLENDRGBA),
|
||||
[TINT_COMBINE_FOG] 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_REMAP] gsDPSetCombineMode(G_CC_BLENDRGBA, PM_CC_17),
|
||||
[TINT_COMBINE_DEPTH] gsDPSetCombineMode(G_CC_BLENDRGBDECALA, PM_CC_TINT_DEPTH_NO_SHADE),
|
||||
[TINT_COMBINE_REMAP] gsDPSetCombineMode(G_CC_BLENDRGBA, PM_CC_TINT_REMAP_NO_SHADE),
|
||||
},
|
||||
[TEX_COMBINE_MAIN_ONLY_2] {
|
||||
[TINT_COMBINE_NONE] gsDPSetCombineMode(G_CC_DECALRGBA, G_CC_DECALRGBA),
|
||||
[TINT_COMBINE_FOG] 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_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
|
||||
// all three sub-types are identical
|
||||
[TEX_COMBINE_MIPMAPS_0] {
|
||||
[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_DEPTH] gsDPSetCombineMode(G_CC_TRILERP, PM_CC_19),
|
||||
[TINT_COMBINE_REMAP] gsDPSetCombineMode(G_CC_TRILERP, PM_CC_17),
|
||||
[TINT_COMBINE_DEPTH] gsDPSetCombineMode(G_CC_TRILERP, PM_CC_TINT_DEPTH_MIPMAPS),
|
||||
[TINT_COMBINE_REMAP] gsDPSetCombineMode(G_CC_TRILERP, PM_CC_TINT_REMAP_NO_SHADE),
|
||||
},
|
||||
[TEX_COMBINE_MIPMAPS_1] {
|
||||
[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_DEPTH] gsDPSetCombineMode(G_CC_TRILERP, PM_CC_19),
|
||||
[TINT_COMBINE_REMAP] gsDPSetCombineMode(G_CC_TRILERP, PM_CC_17),
|
||||
[TINT_COMBINE_DEPTH] gsDPSetCombineMode(G_CC_TRILERP, PM_CC_TINT_DEPTH_MIPMAPS),
|
||||
[TINT_COMBINE_REMAP] gsDPSetCombineMode(G_CC_TRILERP, PM_CC_TINT_REMAP_NO_SHADE),
|
||||
},
|
||||
[TEX_COMBINE_MIPMAPS_2] {
|
||||
[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_DEPTH] gsDPSetCombineMode(G_CC_TRILERP, PM_CC_19),
|
||||
[TINT_COMBINE_REMAP] gsDPSetCombineMode(G_CC_TRILERP, PM_CC_17),
|
||||
[TINT_COMBINE_DEPTH] gsDPSetCombineMode(G_CC_TRILERP, PM_CC_TINT_DEPTH_MIPMAPS),
|
||||
[TINT_COMBINE_REMAP] gsDPSetCombineMode(G_CC_TRILERP, PM_CC_TINT_REMAP_NO_SHADE),
|
||||
},
|
||||
|
||||
// blend main/aux textures in first cycle, tint in second cycle
|
||||
// all three sub-types are identical
|
||||
[TEX_COMBINE_AUX_SHARED_0] {
|
||||
[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_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] {
|
||||
[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_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] {
|
||||
[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_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
|
||||
// all three sub-types are identical
|
||||
[TEX_COMBINE_AUX_IND_0] {
|
||||
[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_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] {
|
||||
[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_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] {
|
||||
[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_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
|
||||
@ -347,7 +351,7 @@ Gfx SolidCombineModes[][5] = {
|
||||
[TINT_COMBINE_FOG] 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_REMAP] gsDPSetCombineMode(PM_CC_22, PM_CC_17),
|
||||
[TINT_COMBINE_REMAP] gsDPSetCombineMode(PM_CC_22, PM_CC_TINT_REMAP_NO_SHADE),
|
||||
},
|
||||
[TEX_COMBINE_5] {
|
||||
[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_SHROUD] 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] {
|
||||
[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_FOG] 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_REMAP] gsDPSetCombineMode(PM_CC_NOTEX_TINT_REMAP, G_CC_PASS2),
|
||||
[TINT_COMBINE_DEPTH] gsDPSetCombineMode(PM_CC_TINT_DEPTH_NOTEX, G_CC_PASS2),
|
||||
[TINT_COMBINE_REMAP] gsDPSetCombineMode(PM_CC_TINT_REMAP_NOTEX, G_CC_PASS2),
|
||||
},
|
||||
|
||||
[TEX_COMBINE_MAIN_ONLY_0] {
|
||||
@ -407,90 +411,90 @@ Gfx AlphaTestCombineModes[][5] = {
|
||||
[TINT_COMBINE_FOG] 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_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] {
|
||||
[TINT_COMBINE_NONE] gsDPSetCombineMode(G_CC_BLENDRGBA, G_CC_BLENDRGBA),
|
||||
[TINT_COMBINE_FOG] 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_REMAP] gsDPSetCombineMode(G_CC_BLENDRGBA, PM_CC_17),
|
||||
[TINT_COMBINE_DEPTH] gsDPSetCombineMode(G_CC_BLENDRGBDECALA, PM_CC_TINT_DEPTH_NO_SHADE),
|
||||
[TINT_COMBINE_REMAP] gsDPSetCombineMode(G_CC_BLENDRGBA, PM_CC_TINT_REMAP_NO_SHADE),
|
||||
},
|
||||
[TEX_COMBINE_MAIN_ONLY_2] {
|
||||
[TINT_COMBINE_NONE] gsDPSetCombineMode(G_CC_DECALRGBA, G_CC_DECALRGBA),
|
||||
[TINT_COMBINE_FOG] 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_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
|
||||
[TEX_COMBINE_MIPMAPS_0] {
|
||||
[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_DEPTH] gsDPSetCombineMode(G_CC_TRILERP, PM_CC_19),
|
||||
[TINT_COMBINE_REMAP] gsDPSetCombineMode(G_CC_TRILERP, PM_CC_17),
|
||||
[TINT_COMBINE_DEPTH] gsDPSetCombineMode(G_CC_TRILERP, PM_CC_TINT_DEPTH_MIPMAPS),
|
||||
[TINT_COMBINE_REMAP] gsDPSetCombineMode(G_CC_TRILERP, PM_CC_TINT_REMAP_NO_SHADE),
|
||||
},
|
||||
[TEX_COMBINE_MIPMAPS_1] {
|
||||
[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_DEPTH] gsDPSetCombineMode(G_CC_TRILERP, PM_CC_19),
|
||||
[TINT_COMBINE_REMAP] gsDPSetCombineMode(G_CC_TRILERP, PM_CC_17),
|
||||
[TINT_COMBINE_DEPTH] gsDPSetCombineMode(G_CC_TRILERP, PM_CC_TINT_DEPTH_MIPMAPS),
|
||||
[TINT_COMBINE_REMAP] gsDPSetCombineMode(G_CC_TRILERP, PM_CC_TINT_REMAP_NO_SHADE),
|
||||
},
|
||||
[TEX_COMBINE_MIPMAPS_2] {
|
||||
[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_DEPTH] gsDPSetCombineMode(G_CC_TRILERP, PM_CC_19),
|
||||
[TINT_COMBINE_REMAP] gsDPSetCombineMode(G_CC_TRILERP, PM_CC_17),
|
||||
[TINT_COMBINE_DEPTH] gsDPSetCombineMode(G_CC_TRILERP, PM_CC_TINT_DEPTH_MIPMAPS),
|
||||
[TINT_COMBINE_REMAP] gsDPSetCombineMode(G_CC_TRILERP, PM_CC_TINT_REMAP_NO_SHADE),
|
||||
},
|
||||
|
||||
// blend main/aux textures in first cycle, tint in second cycle
|
||||
[TEX_COMBINE_AUX_SHARED_0] {
|
||||
[TINT_COMBINE_NONE] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, PM_CC_18),
|
||||
[TINT_COMBINE_FOG] gsDPSetCombineMode(G_CC_INTERFERENCE, PM_CC_18),
|
||||
[TINT_COMBINE_SHROUD] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, PM_CC_18),
|
||||
[TINT_COMBINE_DEPTH] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, PM_CC_18),
|
||||
[TINT_COMBINE_REMAP] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, PM_CC_1B),
|
||||
[TINT_COMBINE_NONE] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, PM_CC2_MULTIPLY_SHADE),
|
||||
[TINT_COMBINE_FOG] gsDPSetCombineMode(G_CC_INTERFERENCE, PM_CC2_MULTIPLY_SHADE),
|
||||
[TINT_COMBINE_SHROUD] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, PM_CC2_MULTIPLY_SHADE),
|
||||
[TINT_COMBINE_DEPTH] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, PM_CC2_MULTIPLY_SHADE),
|
||||
[TINT_COMBINE_REMAP] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, PM_CC_TINT_REMAP_SHADE_ALPHA),
|
||||
},
|
||||
[TEX_COMBINE_AUX_SHARED_1] {
|
||||
[TINT_COMBINE_NONE] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, PM_CC_18),
|
||||
[TINT_COMBINE_FOG] gsDPSetCombineMode(G_CC_INTERFERENCE, PM_CC_18),
|
||||
[TINT_COMBINE_SHROUD] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, PM_CC_18),
|
||||
[TINT_COMBINE_DEPTH] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, PM_CC_18),
|
||||
[TINT_COMBINE_REMAP] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, PM_CC_17),
|
||||
[TINT_COMBINE_NONE] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, PM_CC2_MULTIPLY_SHADE),
|
||||
[TINT_COMBINE_FOG] gsDPSetCombineMode(G_CC_INTERFERENCE, PM_CC2_MULTIPLY_SHADE),
|
||||
[TINT_COMBINE_SHROUD] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, PM_CC2_MULTIPLY_SHADE),
|
||||
[TINT_COMBINE_DEPTH] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, PM_CC2_MULTIPLY_SHADE),
|
||||
[TINT_COMBINE_REMAP] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, PM_CC_TINT_REMAP_NO_SHADE),
|
||||
},
|
||||
[TEX_COMBINE_AUX_SHARED_2] {
|
||||
[TINT_COMBINE_NONE] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, PM_CC_18),
|
||||
[TINT_COMBINE_FOG] gsDPSetCombineMode(G_CC_INTERFERENCE, PM_CC_18),
|
||||
[TINT_COMBINE_SHROUD] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, PM_CC_18),
|
||||
[TINT_COMBINE_DEPTH] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, PM_CC_18),
|
||||
[TINT_COMBINE_REMAP] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, PM_CC_17),
|
||||
[TINT_COMBINE_NONE] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, PM_CC2_MULTIPLY_SHADE),
|
||||
[TINT_COMBINE_FOG] gsDPSetCombineMode(G_CC_INTERFERENCE, PM_CC2_MULTIPLY_SHADE),
|
||||
[TINT_COMBINE_SHROUD] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, PM_CC2_MULTIPLY_SHADE),
|
||||
[TINT_COMBINE_DEPTH] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, PM_CC2_MULTIPLY_SHADE),
|
||||
[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
|
||||
[TEX_COMBINE_AUX_IND_0] {
|
||||
[TINT_COMBINE_NONE] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, PM_CC_18),
|
||||
[TINT_COMBINE_FOG] gsDPSetCombineMode(G_CC_INTERFERENCE, PM_CC_18),
|
||||
[TINT_COMBINE_SHROUD] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, PM_CC_18),
|
||||
[TINT_COMBINE_DEPTH] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, PM_CC_18),
|
||||
[TINT_COMBINE_REMAP] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, PM_CC_17),
|
||||
[TINT_COMBINE_NONE] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, PM_CC2_MULTIPLY_SHADE),
|
||||
[TINT_COMBINE_FOG] gsDPSetCombineMode(G_CC_INTERFERENCE, PM_CC2_MULTIPLY_SHADE),
|
||||
[TINT_COMBINE_SHROUD] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, PM_CC2_MULTIPLY_SHADE),
|
||||
[TINT_COMBINE_DEPTH] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, PM_CC2_MULTIPLY_SHADE),
|
||||
[TINT_COMBINE_REMAP] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, PM_CC_TINT_REMAP_NO_SHADE),
|
||||
},
|
||||
[TEX_COMBINE_AUX_IND_1] {
|
||||
[TINT_COMBINE_NONE] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, PM_CC_18),
|
||||
[TINT_COMBINE_FOG] gsDPSetCombineMode(G_CC_INTERFERENCE, PM_CC_18),
|
||||
[TINT_COMBINE_SHROUD] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, PM_CC_18),
|
||||
[TINT_COMBINE_DEPTH] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, PM_CC_18),
|
||||
[TINT_COMBINE_REMAP] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, PM_CC_17),
|
||||
[TINT_COMBINE_NONE] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, PM_CC2_MULTIPLY_SHADE),
|
||||
[TINT_COMBINE_FOG] gsDPSetCombineMode(G_CC_INTERFERENCE, PM_CC2_MULTIPLY_SHADE),
|
||||
[TINT_COMBINE_SHROUD] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, PM_CC2_MULTIPLY_SHADE),
|
||||
[TINT_COMBINE_DEPTH] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, PM_CC2_MULTIPLY_SHADE),
|
||||
[TINT_COMBINE_REMAP] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, PM_CC_TINT_REMAP_NO_SHADE),
|
||||
},
|
||||
[TEX_COMBINE_AUX_IND_2] {
|
||||
[TINT_COMBINE_NONE] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, PM_CC_18),
|
||||
[TINT_COMBINE_FOG] gsDPSetCombineMode(G_CC_INTERFERENCE, PM_CC_18),
|
||||
[TINT_COMBINE_SHROUD] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, PM_CC_18),
|
||||
[TINT_COMBINE_DEPTH] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, PM_CC_18),
|
||||
[TINT_COMBINE_REMAP] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, PM_CC_17),
|
||||
[TINT_COMBINE_NONE] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, PM_CC2_MULTIPLY_SHADE),
|
||||
[TINT_COMBINE_FOG] gsDPSetCombineMode(G_CC_INTERFERENCE, PM_CC2_MULTIPLY_SHADE),
|
||||
[TINT_COMBINE_SHROUD] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, PM_CC2_MULTIPLY_SHADE),
|
||||
[TINT_COMBINE_DEPTH] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, PM_CC2_MULTIPLY_SHADE),
|
||||
[TINT_COMBINE_REMAP] gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, PM_CC_TINT_REMAP_NO_SHADE),
|
||||
},
|
||||
|
||||
[TEX_COMBINE_3] {
|
||||
@ -505,7 +509,7 @@ Gfx AlphaTestCombineModes[][5] = {
|
||||
[TINT_COMBINE_FOG] 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_REMAP] gsDPSetCombineMode(PM_CC_22, PM_CC_17),
|
||||
[TINT_COMBINE_REMAP] gsDPSetCombineMode(PM_CC_22, PM_CC_TINT_REMAP_NO_SHADE),
|
||||
},
|
||||
[TEX_COMBINE_5] {
|
||||
[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_SHROUD] 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] {
|
||||
[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]);
|
||||
switch (renderMode) {
|
||||
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;
|
||||
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;
|
||||
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;
|
||||
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;
|
||||
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;
|
||||
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;
|
||||
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;
|
||||
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;
|
||||
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;
|
||||
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;
|
||||
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;
|
||||
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;
|
||||
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;
|
||||
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;
|
||||
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;
|
||||
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;
|
||||
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;
|
||||
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;
|
||||
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;
|
||||
}
|
||||
gDPSetFogColor((*gfxPos)++, gFogSettings->color.r, gFogSettings->color.g, gFogSettings->color.b, ShroudTintAmt);
|
||||
|
@ -72,7 +72,7 @@ Gfx D_8014C2D8[] = {
|
||||
gsDPSetTextureFilter(G_TF_AVERAGE),
|
||||
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)),
|
||||
gsDPSetCombineMode(PM_CC_13, G_CC_PASS2),
|
||||
gsDPSetCombineMode(PM_CC_MSG_UP_ARROW, G_CC_PASS2),
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
||||
|
@ -88,7 +88,7 @@ Gfx D_8014E8F0[] = {
|
||||
gsDPSetDepthSource(G_ZS_PRIM),
|
||||
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)),
|
||||
gsDPSetCombineMode(PM_CC_3B, PM_CC_3B),
|
||||
gsDPSetCombineMode(PM_CC_SCREEN_OVERLAY, PM_CC_SCREEN_OVERLAY),
|
||||
gsDPSetTexturePersp(G_TP_PERSP),
|
||||
gsDPSetTextureDetail(G_TD_CLAMP),
|
||||
gsDPSetTextureLOD(G_TL_TILE),
|
||||
@ -112,7 +112,7 @@ Gfx D_8014E9A8[] = {
|
||||
gsDPSetDepthSource(G_ZS_PRIM),
|
||||
gsDPSetPrimDepth(20, 0),
|
||||
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),
|
||||
gsSPSetGeometryMode(G_ZBUFFER | G_SHADE),
|
||||
gsDPSetColorDither(G_CD_MAGICSQ),
|
||||
|
16
src/sprite.c
16
src/sprite.c
@ -1,6 +1,8 @@
|
||||
#include "sprite.h"
|
||||
#include "sprite/player.h"
|
||||
|
||||
#define MAX_SPRITE_ID 0xEA // todo generate this
|
||||
|
||||
extern HeapNode heap_generalHead;
|
||||
extern HeapNode heap_spriteHead;
|
||||
|
||||
@ -17,8 +19,8 @@ BSS s32 spr_playerMaxComponents;
|
||||
BSS s32 D_802DF584; // unused?
|
||||
BSS PlayerCurrentAnimInfo spr_playerCurrentAnimInfo[3];
|
||||
BSS s32 D_802DF5AC; // unused?
|
||||
BSS SpriteAnimData* NpcSpriteData[234];
|
||||
BSS u8 NpcSpriteInstanceCount[234];
|
||||
BSS SpriteAnimData* NpcSpriteData[MAX_SPRITE_ID];
|
||||
BSS u8 NpcSpriteInstanceCount[MAX_SPRITE_ID];
|
||||
BSS s32 D_802DFA44; // unused?
|
||||
BSS SpriteInstance SpriteInstances[51];
|
||||
BSS Quad* D_802DFE44;
|
||||
@ -230,14 +232,14 @@ void spr_appendGfx_component_flat(
|
||||
s32 alpha
|
||||
) {
|
||||
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,
|
||||
0, 0, width - 1, height - 1, 0,
|
||||
G_TX_CLAMP, G_TX_CLAMP, 8, 8, G_TX_NOLOD, G_TX_NOLOD,
|
||||
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);
|
||||
gDPSetTileSize(gMainGfxPos++, 2, 0, 0, 63 << 2, 0);
|
||||
if (gSpriteShadingProfile->flags & 2) {
|
||||
if (gSpriteShadingProfile->flags & SPR_SHADING_FLAG_SET_VIEWPORT) {
|
||||
Camera* camera = &gCameras[gCurrentCamID];
|
||||
if (gGameStatusPtr->isBattle == 2) {
|
||||
gSPViewport(gMainGfxPos++, &SprPauseVpAlt);
|
||||
@ -264,7 +266,7 @@ void spr_appendGfx_component_flat(
|
||||
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,
|
||||
256, 256);
|
||||
if (gSpriteShadingProfile->flags & 2) {
|
||||
if (gSpriteShadingProfile->flags & SPR_SHADING_FLAG_SET_VIEWPORT) {
|
||||
Camera* camera = &gCameras[gCurrentCamID];
|
||||
if (gGameStatusPtr->isBattle == 2) {
|
||||
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];
|
||||
|
||||
if (gGameStatusPtr->isBattle == 2) {
|
||||
@ -356,7 +358,7 @@ void spr_appendGfx_component(
|
||||
gSPMatrix(gMainGfxPos++, VIRTUAL_TO_PHYSICAL(&gDisplayContext->matrixStack[gMatrixListPos++]),
|
||||
G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
|
||||
if (gSpriteShadingProfile->flags & 1) {
|
||||
if (gSpriteShadingProfile->flags & SPR_SHADING_FLAG_ENABLED) {
|
||||
if ((u8) opacity == 255) {
|
||||
gSPDisplayList(gMainGfxPos++, D_802DF460);
|
||||
} else {
|
||||
|
@ -2,7 +2,7 @@
|
||||
#include "ld_addrs.h"
|
||||
#include "sprite/player.h"
|
||||
|
||||
ApiStatus N(LoadSmashBridgesGraphics)(void) {
|
||||
API_CALLABLE(N(LoadSmashBridgesGraphics)) {
|
||||
DMA_COPY_SEGMENT(dgb_01_smash_bridges);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
#include "common.h"
|
||||
#include "npc.h"
|
||||
|
||||
ApiStatus N(ApproachPlayer100Units)(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(N(ApproachPlayer100Units)) {
|
||||
PlayerStatus* playerStatus = &gPlayerStatus;
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 npcID = evt_get_variable(script, *args++);
|
||||
|
@ -212,7 +212,7 @@ API_CALLABLE(N(SetFireplaceAlpha)) {
|
||||
void N(setup_gfx_fireplace)(void) {
|
||||
gDPSetCycleType(gMainGfxPos++, G_CYC_2CYCLE);
|
||||
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));
|
||||
}
|
||||
|
||||
|
@ -92,7 +92,7 @@ API_CALLABLE(N(InterpSpriteShadingColor)) {
|
||||
script->varTable[4] = shadingProfile->ambientColor.g;
|
||||
script->varTable[5] = shadingProfile->ambientColor.b;
|
||||
script->varTable[6] = 0;
|
||||
gSpriteShadingProfile->flags |= 1;
|
||||
gSpriteShadingProfile->flags |= SPR_SHADING_FLAG_ENABLED;
|
||||
}
|
||||
|
||||
script->varTable[6]++;
|
||||
@ -102,7 +102,7 @@ API_CALLABLE(N(InterpSpriteShadingColor)) {
|
||||
|
||||
if (script->varTable[6] == 20) {
|
||||
if (script->varTable[0] == 255) {
|
||||
gSpriteShadingProfile->flags &= ~1;
|
||||
gSpriteShadingProfile->flags &= ~SPR_SHADING_FLAG_ENABLED;
|
||||
}
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
@ -22,12 +22,12 @@ MapSettings N(settings) = {
|
||||
|
||||
#include "world/common/todo/SpawnSunEffect.inc.c"
|
||||
|
||||
ApiStatus N(StartOasisSongVariation)(void) {
|
||||
API_CALLABLE(N(StartOasisSongVariation)) {
|
||||
bgm_set_variation(0, 1);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus N(StopOasisSongVariation)(void) {
|
||||
API_CALLABLE(N(StopOasisSongVariation)) {
|
||||
bgm_set_variation(0, 0);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
#include "common.h"
|
||||
#include "effects.h"
|
||||
|
||||
ApiStatus N(CreateWhaleGeyser)(Evt* script, s32 isInitialStatus) {
|
||||
API_CALLABLE(N(CreateWhaleGeyser)) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 var1 = evt_get_variable(script, *args++);
|
||||
f32 var2 = evt_get_float_variable(script, *args++);
|
||||
@ -31,7 +31,7 @@ API_CALLABLE(N(SetWhaleGeyserPos)) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus N(DisposeWhaleGeyser)(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(N(DisposeWhaleGeyser)) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
EffectInstance* effect = (EffectInstance*) evt_get_variable(script, *args++);
|
||||
|
||||
|
@ -54,7 +54,7 @@ void N(gfx_build_knocked_down_player)(void) {
|
||||
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||
}
|
||||
|
||||
ApiStatus N(KnockdownCreate)(Evt* script) {
|
||||
API_CALLABLE(N(KnockdownCreate)) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 spriteIndex = evt_get_variable(script, *args++);
|
||||
s32 rasterIndex = evt_get_variable(script, *args++);
|
||||
|
@ -80,7 +80,7 @@ void N(SpearGuyAI_Loiter)(Evt* script, MobileAISettings* aiSettings, EnemyDetect
|
||||
// prerequisites
|
||||
#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;
|
||||
Npc *npc = get_npc_unsafe(enemy->npcID);
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
|
@ -208,7 +208,7 @@ void N(PatrolAI_ChaseInit)(Evt* script, MobileAISettings* aiSettings, EnemyDetec
|
||||
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;
|
||||
Npc* npc = get_npc_unsafe(enemy->npcID);
|
||||
EffectInstance* emoteTemp;
|
||||
|
@ -13,7 +13,7 @@
|
||||
// prerequisites
|
||||
#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;
|
||||
Npc *npc = get_npc_unsafe(enemy->npcID);
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
|
@ -4,6 +4,6 @@
|
||||
API_CALLABLE(N(RemovePadlock)) {
|
||||
Entity* entity = get_entity_by_index(script->varTable[0]);
|
||||
|
||||
entity->flags |= ENTITY_FLAG_100000;
|
||||
entity->flags |= ENTITY_FLAG_USED;
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
@ -1046,7 +1046,7 @@ void partner_reset_data(void) {
|
||||
wCurrentPartnerId = currentPartner;
|
||||
|
||||
if (gGameStatusPtr->keepUsingPartnerOnMapChange) {
|
||||
gPartnerStatus.partnerActionState = 1;
|
||||
gPartnerStatus.partnerActionState = PARTNER_ACTION_USE;
|
||||
gGameStatusPtr->keepUsingPartnerOnMapChange = FALSE;
|
||||
}
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
#include "script_api/battle.h"
|
||||
#include "sprite/player.h"
|
||||
|
||||
ApiStatus WorldItem_ShowUseSparkles(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(WorldItem_ShowUseSparkles) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 x = 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;
|
||||
}
|
||||
|
||||
ApiStatus WorldItem_ShowHPGain(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(WorldItem_ShowHPGain) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 x = 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;
|
||||
}
|
||||
|
||||
ApiStatus WorldItem_ShowFPGain(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(WorldItem_ShowFPGain) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 x = 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;
|
||||
}
|
||||
|
||||
ApiStatus WorldItem_RestoreHP(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(WorldItem_RestoreHP) {
|
||||
PlayerData* playerData = &gPlayerData;
|
||||
s32 newHP = playerData->curHP + evt_get_variable(script, *script->ptrReadPos);
|
||||
|
||||
@ -51,7 +51,7 @@ ApiStatus WorldItem_RestoreHP(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus WorldItem_RestoreFP(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(WorldItem_RestoreFP) {
|
||||
PlayerData* playerData = &gPlayerData;
|
||||
s32 newFP = playerData->curFP + evt_get_variable(script, *script->ptrReadPos);
|
||||
|
||||
@ -67,19 +67,19 @@ ApiStatus WorldItem_RestoreFP(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus WorldItem_PauseTime(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(WorldItem_PauseTime) {
|
||||
set_time_freeze_mode(TIME_FREEZE_FULL);
|
||||
gOverrideFlags |= GLOBAL_OVERRIDES_CANT_PICK_UP_ITEMS;
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus WorldItem_UnpauseTime(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(WorldItem_UnpauseTime) {
|
||||
set_time_freeze_mode(TIME_FREEZE_NORMAL);
|
||||
gOverrideFlags &= ~GLOBAL_OVERRIDES_CANT_PICK_UP_ITEMS;
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus WorldItem_GetItemProperties(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(WorldItem_GetItemProperties) {
|
||||
s32 itemIdx = evt_get_variable(script, *script->ptrReadPos);
|
||||
s32 var15;
|
||||
|
||||
@ -100,7 +100,7 @@ ApiStatus WorldItem_GetItemProperties(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus WorldItem_ConsumeItem(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(WorldItem_ConsumeItem) {
|
||||
remove_consumable();
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user