mirror of
https://github.com/pmret/papermario.git
synced 2024-11-18 00:42:34 +01:00
area KZN and others (#795)
* kzn_01 * cleanup * kzn_05 * sound name * missed evt_ptr * splat change * broken :( * pan params for other maps * works, but not great * some kzn funcs * documentin * minor * kzn_07 funcs * more matches * kzn_08 * kzn_06 fixup * kzn_01_fix * kzn 5 * kzn_07 * surprisingly OK * some matches * letter choice * refactor * more maps * check * first area done! * now with extra bonus map * kzn23 * some camera stuff * entrances adjustment * kzn_22 OK * kzn_22 cleanup * kzn_20 ok * kzn_20 cleanup * kzn_18 ok * kzn_18 cleanup * kgr_01 * area kgr done * kgr_02 renames * kzn_11 * kzn_17 ok * kzn_17 cleanup * kzn_04 done * kzn_03 ok * kzn_19 * bad kzn_19 * funcs idk * figured a thing out * kzn_19 ok * some matches * kzn_19 cleanup * all kzn funcs * merg'd * some kzn btl matches * vine field renames * kzn cleanup 1 * kzn cleanup 2 * tab patrol * trailing space patrol * piranha anims split * actor type sounds * example * requests + remove hardcoded dma entries * split vine image Co-authored-by: HailSanta <Hail2Santa@gmail.com> Co-authored-by: Ethan Roseman <ethteck@gmail.com>
This commit is contained in:
parent
a293e4e120
commit
7b24d78503
@ -717,9 +717,9 @@ typedef struct Camera {
|
||||
/* 0x014 */ s16 farClip;
|
||||
/* 0x016 */ char unk_16[2];
|
||||
/* 0x018 */ f32 vfov;
|
||||
/* 0x01C */ s16 unk_1C;
|
||||
/* 0x01C */ s16 auxPitch;
|
||||
/* 0x01E */ s16 auxBoomLength;
|
||||
/* 0x020 */ s16 unk_20;
|
||||
/* 0x020 */ s16 lookAt_dist;
|
||||
/* 0x022 */ s16 auxBoomPitch;
|
||||
/* 0x024 */ s16 auxBoomYaw;
|
||||
/* 0x026 */ s16 auxBoomZOffset;
|
||||
@ -731,7 +731,7 @@ typedef struct Camera {
|
||||
/* 0x03A */ char unk_3A[2];
|
||||
/* 0x03C */ Vec3f lookAt_eye;
|
||||
/* 0x048 */ Vec3f lookAt_obj;
|
||||
/* 0x054 */ Vec3f auxPos;
|
||||
/* 0x054 */ Vec3f lookAt_obj_target;
|
||||
/* 0x060 */ Vec3f targetPos;
|
||||
/* 0x06C */ f32 currentYaw;
|
||||
/* 0x070 */ f32 unk_70;
|
||||
@ -1006,8 +1006,8 @@ typedef struct ModelDisplayData {
|
||||
} ModelDisplayData; // size = 0x8
|
||||
|
||||
typedef struct AnimatorNode {
|
||||
/* 0x00 */ Gfx* displayList;
|
||||
/* 0x04 */ struct AnimatorNode* children[0x20];
|
||||
/* 0x00 */ void* displayList;
|
||||
/* 0x04 */ struct AnimatorNode* children[32];
|
||||
/* 0x84 */ Vec3f basePos; // ?
|
||||
/* 0x90 */ Vec3f pos;
|
||||
/* 0x9C */ Vec3f rotation;
|
||||
@ -1024,14 +1024,14 @@ typedef struct AnimatorNode {
|
||||
} AnimatorNode; // size = 0x100
|
||||
|
||||
typedef struct AnimatorNodeBlueprint {
|
||||
/* 0x00 */ Gfx* displayList;
|
||||
/* 0x00 */ void* displayList;
|
||||
/* 0x04 */ Vec3f basePos;
|
||||
/* 0x10 */ Vec3f rotation;
|
||||
/* 0x1C */ char unk_1C[0x4];
|
||||
} AnimatorNodeBlueprint; // size = 0x20
|
||||
|
||||
typedef struct StaticAnimatorNode {
|
||||
/* 0x00 */ Gfx* displayList; // can sometime point to a node???
|
||||
/* 0x00 */ void* displayList; // sometimes StaticAnimatorNode*, sometimes Gfx*???
|
||||
/* 0x04 */ Vec3s rot; /* range = -180,180 */
|
||||
/* 0x0A */ char unk_0A[0x2];
|
||||
/* 0x0C */ Vec3f pos;
|
||||
@ -1692,6 +1692,16 @@ typedef struct PlayerPathElement {
|
||||
/* 0x04 */ Vec3f pos;
|
||||
} PlayerPathElement; // size = 0x10
|
||||
|
||||
typedef struct LavaReset {
|
||||
/* 0x00 */ s32 colliderID;
|
||||
/* 0x04 */ Vec3f pos;
|
||||
} LavaReset; // size = 0x10;
|
||||
|
||||
typedef struct BombTrigger {
|
||||
/* 0x00 */ Vec3f pos;
|
||||
/* 0x0C */ s32 radius; // effective 'size' of the object, usually set to zero because bombettes explosion radius is large enough
|
||||
} BombTrigger; // size = 0x10;
|
||||
|
||||
typedef struct AnimatedModel {
|
||||
/* 0x00 */ s32 animModelID;
|
||||
/* 0x04 */ Vec3f pos;
|
||||
@ -1918,7 +1928,7 @@ typedef struct PlayerStatus {
|
||||
/* 0x014 */ s8 enableCollisionOverlapsCheck;
|
||||
/* 0x015 */ s8 inputEnabledCounter; /* whether the C-up menu can appear */
|
||||
/* 0x016 */ Vec3s lastGoodPosition;
|
||||
/* 0x01C */ Vec3f extraVelocity;
|
||||
/* 0x01C */ Vec3f pushVelocity;
|
||||
/* 0x028 */ Vec3f position;
|
||||
/* 0x034 */ Vec2f groundAnglesXZ; /* angles along X/Z axes of ground beneath player */
|
||||
/* 0x03C */ VecXZf jumpFromPos;
|
||||
@ -1953,7 +1963,7 @@ typedef struct PlayerStatus {
|
||||
/* 0x0BE */ s8 renderMode;
|
||||
/* 0x0BF */ s8 hazardType;
|
||||
/* 0x0C0 */ s16 timeInAir;
|
||||
/* 0x0C2 */ s16 unk_C2;
|
||||
/* 0x0C2 */ s16 peakJumpTime; // frame of current jump when player Y velocity went from position to negative
|
||||
/* 0x0C4 */ s8 peachItemHeld;
|
||||
/* 0x0C5 */ s8 camResetDelay;
|
||||
/* 0x0C6 */ s16 interactingWithID;
|
||||
|
@ -62,6 +62,8 @@ enum {
|
||||
#define ENTITY_ADDR(entity, type, data) (type)((s32)(entity->gfxBaseAddr) + ((s32)(data) & 0xFFFF))
|
||||
#define ENTITY_ROM(name) { entity_model_##name##_ROM_START, entity_model_##name##_ROM_END }
|
||||
|
||||
#define BLOCK_GRID_SIZE 25
|
||||
|
||||
typedef struct SaveBlockData {
|
||||
/* 0x000 */ char unk_0[4];
|
||||
/* 0x004 */ s16 angle;
|
||||
@ -197,7 +199,7 @@ typedef struct ChestData {
|
||||
/* 0x24 */ f32 giveItemRadiusInterpPhase;
|
||||
/* 0x28 */ f32 giveItemHeightInterpPhase;
|
||||
/* 0x2C */ f32 itemVelY;
|
||||
/* 0x30 */ s8 unk_30;
|
||||
/* 0x30 */ s8 gotItemDone;
|
||||
/* 0x31 */ char unk_31[3];
|
||||
/* 0x34 */ struct EffectInstance* gotItemEffect;
|
||||
} ChestData; // size = 0x38
|
||||
@ -397,6 +399,7 @@ extern EntityBlueprint Entity_Hammer2Block;
|
||||
extern EntityBlueprint Entity_Hammer2Block_WideHitbox;
|
||||
extern EntityBlueprint Entity_Hammer2Block_TallHitbox;
|
||||
extern EntityBlueprint Entity_Hammer2BlockTiny;
|
||||
extern EntityBlueprint Entity_Hammer3Block;
|
||||
extern EntityBlueprint Entity_Hammer3Block_WideHitbox;
|
||||
extern EntityBlueprint Entity_Hammer3Block_TallHitbox;
|
||||
extern EntityBlueprint Entity_Hammer3BlockTiny;
|
||||
|
105
include/enums.h
105
include/enums.h
@ -642,6 +642,7 @@ enum SoundIDs {
|
||||
SOUND_FD = 0x000000FD,
|
||||
SOUND_FE = 0x000000FE,
|
||||
SOUND_FF = 0x000000FF,
|
||||
SOUND_100 = 0x00000100,
|
||||
SOUND_108 = 0x00000108,
|
||||
SOUND_IMMUNE = 0x0000010C,
|
||||
SOUND_HIT_BONES = 0x0000010D,
|
||||
@ -855,9 +856,12 @@ enum SoundIDs {
|
||||
SOUND_2A7 = 0x000002A7,
|
||||
SOUND_UNUSED_2C1 = 0x000002C1,
|
||||
SOUND_2C5 = 0x000002C5,
|
||||
SOUND_2C9 = 0x000002C9,
|
||||
SOUND_2CA = 0x000002CA,
|
||||
SOUND_2CB = 0x000002CB,
|
||||
SOUND_SMOKE_BURST = 0x000002CD,
|
||||
SOUND_2D5 = 0x000002D5,
|
||||
SOUND_2D6 = 0x000002D6,
|
||||
SOUND_DAYZEE_SONG = 0x000002D7,
|
||||
SOUND_POWER_UP = 0x000002D8,
|
||||
SOUND_2DB = 0x000002DB,
|
||||
@ -875,12 +879,14 @@ enum SoundIDs {
|
||||
SOUND_TWEESTER_LAUNCH = 0x000002F6,
|
||||
SOUND_2F7 = 0x000002F7,
|
||||
SOUND_2F9 = 0x000002F9,
|
||||
SOUND_2FD = 0x000002FD,
|
||||
SOUND_CLOSE_SHELL = 0x000002FF,
|
||||
SOUND_301 = 0x00000301,
|
||||
SOUND_302 = 0x00000302,
|
||||
SOUND_303 = 0x00000303,
|
||||
SOUND_305 = 0x00000305,
|
||||
SOUND_306 = 0x00000306,
|
||||
SOUND_30B = 0x0000030B,
|
||||
SOUND_SHY_GUY_SCREAMS1 = 0x0000030C,
|
||||
SOUND_SHY_GUY_SCREAMS2 = 0x0000030D,
|
||||
SOUND_SHY_GUY_SCREAMS3 = 0x0000030E,
|
||||
@ -888,8 +894,8 @@ enum SoundIDs {
|
||||
SOUND_TOY_TANK_MOVE2 = 0x00000310,
|
||||
SOUND_311 = 0x00000311,
|
||||
SOUND_315 = 0x00000315,
|
||||
SOUND_MOLE_SURFACE = 0x00000321,
|
||||
SOUND_MOLE_DIG = 0x00000322,
|
||||
SOUND_BURROW_SURFACE = 0x00000321,
|
||||
SOUND_BURROW_DIG = 0x00000322,
|
||||
SOUND_MOLE_POP = 0x00000323,
|
||||
SOUND_328 = 0x00000328,
|
||||
SOUND_32B = 0x0000032B,
|
||||
@ -900,10 +906,13 @@ enum SoundIDs {
|
||||
SOUND_332 = 0x00000332,
|
||||
SOUND_333 = 0x00000333,
|
||||
SOUND_334 = 0x00000334,
|
||||
SOUND_343 = 0x00000343,
|
||||
SOUND_349 = 0x00000349,
|
||||
SOUND_34A = 0x0000034A,
|
||||
SOUND_34E = 0x0000034E,
|
||||
SOUND_351 = 0x00000351,
|
||||
SOUND_356 = 0x00000356,
|
||||
SOUND_357 = 0x00000357,
|
||||
SOUND_359 = 0x00000359,
|
||||
SOUND_35D = 0x0000035D,
|
||||
SOUND_361 = 0x00000361,
|
||||
@ -927,6 +936,9 @@ enum SoundIDs {
|
||||
SOUND_HIT_PLAYER_SHOCK = 0x0000037A,
|
||||
SOUND_HIT_SHOCK = 0x0000037B,
|
||||
SOUND_37C = 0x0000037C,
|
||||
SOUND_37D = 0x0000037D,
|
||||
SOUND_37E = 0x0000037E,
|
||||
SOUND_380 = 0x00000380,
|
||||
SOUND_381 = 0x00000381,
|
||||
SOUND_382 = 0x00000382,
|
||||
SOUND_383 = 0x00000383,
|
||||
@ -969,6 +981,8 @@ enum SoundIDs {
|
||||
SOUND_3C0 = 0x000003C0,
|
||||
SOUND_3C5 = 0x000003C5,
|
||||
SOUND_3C6 = 0x000003C6,
|
||||
SOUND_3CE = 0x000003CE,
|
||||
SOUND_3D1 = 0x000003D1,
|
||||
SOUND_3D2 = 0x000003D2,
|
||||
SOUND_OPEN_SHELL = 0x000003D4,
|
||||
SOUND_3D5 = 0x000003D5,
|
||||
@ -986,6 +1000,7 @@ enum SoundIDs {
|
||||
SOUND_3E7 = 0x000003E7,
|
||||
SOUND_MOLE_THROW = 0x000003E8,
|
||||
SOUND_3E9 = 0x000003E9,
|
||||
SOUND_3EA = 0x000003EA,
|
||||
SOUND_3EB = 0x000003EB,
|
||||
SOUND_3EC = 0x000003EC,
|
||||
SOUND_3ED = 0x000003ED,
|
||||
@ -1140,15 +1155,21 @@ enum SoundIDs {
|
||||
SOUND_20BA = 0x000020BA,
|
||||
SOUND_20C1 = 0x000020C1,
|
||||
SOUND_20C3 = 0x000020C3,
|
||||
SOUND_20C4 = 0x000020C4,
|
||||
SOUND_20C5 = 0x000020C5,
|
||||
SOUND_20C6 = 0x000020C6,
|
||||
SOUND_20C8 = 0x000020C8,
|
||||
SOUND_20CD = 0x000020CD,
|
||||
SOUND_20D0 = 0x000020D0,
|
||||
SOUND_SPELL_CAST1 = 0x000020D4,
|
||||
SOUND_SPELL_CAST2 = 0x000020D5,
|
||||
SOUND_SPELL_CAST3 = 0x000020D6,
|
||||
SOUND_SPELL_CAST4 = 0x000020D7,
|
||||
SOUND_SPELL_CAST5 = 0x000020D8,
|
||||
SOUND_20D9 = 0x000020D9,
|
||||
SOUND_20DD = 0x000020DD,
|
||||
SOUND_20DE = 0x000020DE,
|
||||
SOUND_20DF = 0x000020DF,
|
||||
SOUND_20E3 = 0x000020E3,
|
||||
SOUND_20E4 = 0x000020E4,
|
||||
SOUND_20E5 = 0x000020E5,
|
||||
@ -1275,6 +1296,17 @@ enum SoundIDs {
|
||||
SOUND_8000006A = 0x8000006A,
|
||||
SOUND_8000006B = 0x8000006B,
|
||||
SOUND_8000006C = 0x8000006C,
|
||||
|
||||
SOUND_FIRE_BAR_0 = 0xB0000000,
|
||||
SOUND_FIRE_BAR_1 = 0xB0000001,
|
||||
SOUND_FIRE_BAR_2 = 0xB0000002,
|
||||
SOUND_FIRE_BAR_3 = 0xB0000003,
|
||||
SOUND_FIRE_BAR_4 = 0xB0000004,
|
||||
SOUND_FIRE_BAR_5 = 0xB0000005,
|
||||
SOUND_FIRE_BAR_6 = 0xB0000006,
|
||||
SOUND_FIRE_BAR_7 = 0xB0000007,
|
||||
SOUND_FIRE_BAR_8 = 0xB0000008,
|
||||
SOUND_FIRE_BAR_9 = 0xB0000009,
|
||||
SOUND_B000000A = 0xB000000A,
|
||||
SOUND_B000000C = 0xB000000C,
|
||||
SOUND_B000000D = 0xB000000D,
|
||||
@ -1774,6 +1806,13 @@ enum ItemIDs {
|
||||
#define IS_ITEM(itemID) (itemID >= ITEM_FIRST_KEY && itemID <= ITEM_LAST_CONSUMABLE)
|
||||
#define IS_BADGE(itemID) (itemID >= ITEM_FIRST_BADGE && itemID <= ITEM_LAST_BADGE)
|
||||
|
||||
// used for chest and give item events
|
||||
enum GotItemType {
|
||||
ITEM_TYPE_CONSUMABLE = 0,
|
||||
ITEM_TYPE_KEY = 1,
|
||||
ITEM_TYPE_BADGE = 2
|
||||
};
|
||||
|
||||
enum ItemTypeFlags {
|
||||
ITEM_TYPE_FLAG_WORLD_USABLE = 0x0001,
|
||||
ITEM_TYPE_FLAG_BATTLE_USABLE = 0x0002,
|
||||
@ -2176,6 +2215,7 @@ enum AmbientSounds {
|
||||
AMBIENT_WIND = 1,
|
||||
AMBIENT_BEACH = 2,
|
||||
AMBIENT_JUNGLE = 3,
|
||||
// actually, 'undersea' are all lava-related. sort these out when map data is done
|
||||
AMBIENT_UNDER_SEA1 = 4,
|
||||
AMBIENT_UNDER_SEA2 = 5,
|
||||
AMBIENT_SILENCE = 6,
|
||||
@ -3170,7 +3210,7 @@ enum PlayerStatusFlags {
|
||||
enum PlayerStatusAnimFlags {
|
||||
PA_FLAGS_HOLDING_WATT = 0x00000001,
|
||||
PA_FLAGS_2 = 0x00000002,
|
||||
PA_FLAGS_4 = 0x00000004,
|
||||
PA_FLAGS_INTERRUPT_USE_PARTNER = 0x00000004, ///< forces actions with bow, parakarry, watt, and lakilester to end (sushie not tested)
|
||||
PA_FLAGS_8 = 0x00000008, ///< triggers partner use when set
|
||||
PA_FLAGS_INTERACT_PROMPT_AVAILABLE = 0x00000010, ///< ! prompt
|
||||
PA_FLAGS_SPEECH_PROMPT_AVAILABLE = 0x00000020, ///< (...) prompt
|
||||
@ -3717,6 +3757,17 @@ enum GameModeIDs {
|
||||
GAME_MODE_DEMO = 0x00000011,
|
||||
};
|
||||
|
||||
enum DemoState {
|
||||
DEMO_STATE_NONE = 0,
|
||||
DEMO_STATE_ACTIVE = 1,
|
||||
DEMO_STATE_CHANGE_MAP = 2,
|
||||
};
|
||||
|
||||
enum MapLoadType {
|
||||
LOAD_FROM_MAP = 0,
|
||||
LOAD_FROM_FILE_SELECT = 1,
|
||||
};
|
||||
|
||||
enum IntroStates {
|
||||
INTRO_STATE_0 = 0x00000000,
|
||||
INTRO_STATE_1 = 0x00000001,
|
||||
@ -3951,6 +4002,27 @@ enum ModelFlags {
|
||||
MODEL_FLAGS_FLAG_8000 = 0x8000,
|
||||
};
|
||||
|
||||
enum TexPanner {
|
||||
TEX_PANNER_0 = 0x0,
|
||||
TEX_PANNER_1 = 0x1,
|
||||
TEX_PANNER_2 = 0x2,
|
||||
TEX_PANNER_3 = 0x3,
|
||||
TEX_PANNER_4 = 0x4,
|
||||
TEX_PANNER_5 = 0x5,
|
||||
TEX_PANNER_6 = 0x6,
|
||||
TEX_PANNER_7 = 0x7,
|
||||
TEX_PANNER_8 = 0x8,
|
||||
TEX_PANNER_9 = 0x9,
|
||||
TEX_PANNER_A = 0xA,
|
||||
TEX_PANNER_B = 0xB,
|
||||
TEX_PANNER_C = 0xC,
|
||||
TEX_PANNER_D = 0xD,
|
||||
TEX_PANNER_E = 0xE,
|
||||
TEX_PANNER_F = 0xF,
|
||||
TEX_PANNER_MAIN = 0,
|
||||
TEX_PANNER_AUX = 1,
|
||||
};
|
||||
|
||||
enum EnemyFlags {
|
||||
ENEMY_FLAGS_1 = 0x00000001,
|
||||
ENEMY_FLAGS_2 = 0x00000002,
|
||||
@ -4128,6 +4200,7 @@ enum MusicSettingsFlags {
|
||||
// the lower byte of Collider::flags
|
||||
enum SurfaceType {
|
||||
SURFACE_TYPE_DEFAULT = 0,
|
||||
/*
|
||||
SURFACE_TYPE_WATER = 1,
|
||||
SURFACE_TYPE_SPIKES = 2,
|
||||
SURFACE_TYPE_LAVA = 3,
|
||||
@ -4137,22 +4210,40 @@ enum SurfaceType {
|
||||
SURFACE_TYPE_CLOUD = 7, ///< used with clouds in flo_19 and flo_21
|
||||
SURFACE_TYPE_SNOW = 8,
|
||||
SURFACE_TYPE_HEDGES = 9, ///< used within hedge maze in flo_11
|
||||
*/
|
||||
};
|
||||
|
||||
//TODO -- enums temporarily combined for map dumper
|
||||
enum ColliderFlags {
|
||||
COLLIDER_FLAGS_UPPER_MASK = 0x7FFFFE00, // map data dumper needs this to be first
|
||||
COLLIDER_FLAGS_SURFACE_TYPE_MASK = 0x000000FF,
|
||||
|
||||
// SURFACE_TYPE_DEFAULT = 0,
|
||||
SURFACE_TYPE_HEDGES = 9, ///< used within hedge maze in flo_11
|
||||
SURFACE_TYPE_SNOW = 8,
|
||||
SURFACE_TYPE_CLOUD = 7, ///< used with clouds in flo_19 and flo_21
|
||||
SURFACE_TYPE_FLOWERS = 6,
|
||||
SURFACE_TYPE_SLIDE = 5,
|
||||
SURFACE_TYPE_DOCK_WALL = 4,
|
||||
SURFACE_TYPE_LAVA = 3,
|
||||
SURFACE_TYPE_SPIKES = 2,
|
||||
SURFACE_TYPE_WATER = 1,
|
||||
|
||||
COLLIDER_FLAGS_SAFE_FLOOR = 0x00000100,
|
||||
COLLIDER_FLAGS_IGNORE_SHELL = 0x00008000,
|
||||
COLLIDER_FLAGS_IGNORE_PLAYER = 0x00010000,
|
||||
COLLIDER_FLAGS_HAS_MODEL_PARENT = 0x80000000
|
||||
};
|
||||
|
||||
|
||||
//TODO reversed for map dumper with 0 separated
|
||||
enum ColliderFlagsModifyMode {
|
||||
MODIFY_COLLIDER_FLAGS_SET_BITS = 0,
|
||||
MODIFY_COLLIDER_FLAGS_CLEAR_BITS = 1,
|
||||
MODIFY_COLLIDER_FLAGS_SET_VALUE = 2,
|
||||
MODIFY_COLLIDER_FLAGS_SET_SURFACE = 3,
|
||||
MODIFY_COLLIDER_FLAGS_SET_VALUE = 2,
|
||||
MODIFY_COLLIDER_FLAGS_CLEAR_BITS = 1,
|
||||
};
|
||||
enum TempColliderFlagsModifyMode {
|
||||
MODIFY_COLLIDER_FLAGS_SET_BITS = 0,
|
||||
};
|
||||
|
||||
enum CollisionChannels {
|
||||
@ -4234,7 +4325,7 @@ enum CameraFlags {
|
||||
};
|
||||
|
||||
enum CameraMoveFlags {
|
||||
CAMERA_MOVE_FLAGS_1 = 0x00000001,
|
||||
CAMERA_MOVE_IGNORE_PLAYER_Y = 0x00000001,
|
||||
CAMERA_MOVE_FLAGS_2 = 0x00000002,
|
||||
CAMERA_MOVE_FLAGS_4 = 0x00000004
|
||||
};
|
||||
|
@ -121,6 +121,7 @@ typedef s32 ApiStatus;
|
||||
|
||||
enum EventGroupFlags {
|
||||
EVT_GROUP_00 = 0x00,
|
||||
EVT_GROUP_0A = 0x0A, // 8 | 2
|
||||
EVT_GROUP_0B = 0x0B, // 8 | 4 | 1
|
||||
EVT_GROUP_1B = 0x1B, // 10 | 8 | 4 | 1
|
||||
EVT_GROUP_EF = 0xEF, // ~10
|
||||
|
@ -15,13 +15,16 @@
|
||||
#define ALIGN16(val) (((val) + 0xF) & ~0xF)
|
||||
#define ALIGN8(val) (((val) + 0x7) & ~0x7)
|
||||
|
||||
#define A(sym) NS(AREA, sym)
|
||||
#define N(sym) NS(NAMESPACE, sym)
|
||||
#define NAMESUFFIX
|
||||
#define A(sym) NS(AREA, sym, NAMESUFFIX)
|
||||
#define N(sym) NS(NAMESPACE, sym, NAMESUFFIX)
|
||||
|
||||
#define ARRAY_COUNT(arr) (s32)(sizeof(arr) / sizeof(arr[0]))
|
||||
|
||||
#define PTR_LIST_END ((void*) -1)
|
||||
|
||||
#define API_CALLABLE(name) ApiStatus name(Evt* script, s32 isInitialCall)
|
||||
|
||||
#define PHYSICAL_TO_VIRTUAL(addr) (void*)((u32)(addr) + 0x80000000)
|
||||
#define VIRTUAL_TO_PHYSICAL(addr) (u32)((u8*)(addr) - 0x80000000)
|
||||
|
||||
@ -67,6 +70,9 @@
|
||||
#define SCREEN_WIDTH 320
|
||||
#define SCREEN_HEIGHT 240
|
||||
|
||||
#define CAM_NEAR_CLIP 16
|
||||
#define CAM_FAR_CLIP 4096
|
||||
|
||||
// Size of tmem in bytes (4kB)
|
||||
#define TMEM_SIZE 0x1000
|
||||
// Height of tiles to use when copying fullscreen images (6)
|
||||
@ -96,6 +102,11 @@
|
||||
#define COLLISION_WITH_NPC_BIT 0x2000
|
||||
#define COLLISION_WITH_ENTITY_BIT 0x4000
|
||||
|
||||
#define NPC_DISPOSE_LOCATION 0,-1000,0
|
||||
#define NPC_DISPOSE_POS_X 0
|
||||
#define NPC_DISPOSE_POS_Y -1000
|
||||
#define NPC_DISPOSE_POS_Z 0
|
||||
|
||||
#define PACK_FILL_COLOR(r, g, b, a) (GPACK_RGBA5551(r, g, b, a) << 0x10) | GPACK_RGBA5551(r, g, b, a)
|
||||
#define PACK_FILL_DEPTH(z,dz) (GPACK_ZDZ(z, dz) << 0x10) | GPACK_ZDZ(z, dz)
|
||||
|
||||
@ -109,8 +120,8 @@
|
||||
/// X.10 fixed-point literal
|
||||
#define X10(f) (s32)(f * 1024.0f)
|
||||
|
||||
#define _NS(x, y) x ## _ ## y
|
||||
#define NS(x, y) _NS(x, y)
|
||||
#define _NS(x, y, z) x ## _ ## y ## z
|
||||
#define NS(x, y, z) _NS(x, y, z)
|
||||
|
||||
#define ASCII_TO_U32(a, b, c, d) ((u32)((a << 24) | (b << 16) | (c << 8) | (d << 0)))
|
||||
|
||||
|
@ -3,9 +3,15 @@
|
||||
|
||||
#include "common_structs.h"
|
||||
#include "enums.h"
|
||||
#include "world/entrances.h"
|
||||
#include "script_api/map.h"
|
||||
#include "npc.h"
|
||||
|
||||
// temporary: some standard script names
|
||||
#define EVS_MakeEntities EVS_MakeEntities
|
||||
#define EVS_SetupMusic EVS_SetupMusic
|
||||
#define EVS_BindExitTriggers EVS_BindExitTriggers
|
||||
|
||||
// TODO: consider moving Npc here
|
||||
|
||||
#define ENTRY_COUNT(entryList) (sizeof(entryList) / sizeof(Vec4f))
|
||||
|
@ -81,6 +81,11 @@ typedef struct ModelTransformGroup {
|
||||
typedef Model* ModelList[MAX_MODELS];
|
||||
typedef ModelTransformGroup* ModelTransformGroupList[MAX_MODEL_TRANSFORM_GROUPS];
|
||||
|
||||
typedef struct ModelIDList {
|
||||
u16 count;
|
||||
u16 list[0];
|
||||
} ModelIDList;
|
||||
|
||||
typedef struct ModelLocalVertexCopy {
|
||||
/* 0x00 */ s32 numVertices;
|
||||
/* 0x04 */ Vtx* minVertexAddr;
|
||||
|
@ -140,7 +140,8 @@ typedef struct NpcSettings {
|
||||
/* 0x18 */ EvtScript* aux;
|
||||
/* 0x1C */ EvtScript* onDefeat;
|
||||
/* 0x20 */ s32 flags;
|
||||
/* 0x24 */ char unk_24[4];
|
||||
/* 0x24 */ char unk_24[3];
|
||||
/* 0x24 */ s8 unk_27;
|
||||
/* 0x28 */ s16 level;
|
||||
/* 0x2A */ s16 actionFlags; // action flags: 1 = jump on seeing player
|
||||
} NpcSettings; // size = 0x2C
|
||||
|
@ -39,6 +39,7 @@ ApiStatus GetNpcVar(Evt* script, s32 isInitialCall);
|
||||
ApiStatus SetSelfRotation(Evt* script, s32 isInitialCall);
|
||||
ApiStatus SetSelfEnemyFlags(Evt* script, s32 isInitialCall);
|
||||
ApiStatus SetSelfEnemyFlagBits(Evt* script, s32 isInitialCall);
|
||||
ApiStatus SelfEnemyOverrideSyncPos(Evt* script, s32 isInitialCall);
|
||||
ApiStatus GetSelfNpcID(Evt* script, s32 isInitialCall);
|
||||
ApiStatus ClearDefeatedEnemies(Evt* script, s32 isInitialCall);
|
||||
ApiStatus SetEnemyFlagBits(Evt* script, s32 isInitialCall);
|
||||
@ -284,7 +285,7 @@ ApiStatus func_800458CC(Evt* script, s32 isInitialCall);
|
||||
ApiStatus func_80045900(Evt* script, s32 isInitialCall);
|
||||
ApiStatus ShowKeyChoicePopup(Evt* script, s32 isInitialCall);
|
||||
ApiStatus CloseChoicePopup(Evt* script, s32 isInitialCall);
|
||||
ApiStatus func_802D2B6C(Evt* script, s32 isInitialCall);
|
||||
ApiStatus InterruptUsePartner(Evt* script, s32 isInitialCall);
|
||||
ApiStatus func_80045838(Evt* script, s32 isInitialCall);
|
||||
ApiStatus ModifyGlobalOverrideFlags(Evt* script, s32 isInitialCall);
|
||||
ApiStatus func_802CF56C(Evt* script, s32 isInitialCall);
|
||||
@ -305,6 +306,7 @@ ApiStatus SetNpcPaletteSwapping(Evt* script, s32 isInitialCall);
|
||||
ApiStatus MakeTransformGroup(Evt* script, s32 isInitialCall);
|
||||
|
||||
ApiStatus SetMotionBlurParams(Evt* script, s32 isInitialCall);
|
||||
ApiStatus ShowSweat(Evt* script, s32 isInitialCall);
|
||||
|
||||
extern EvtScript EnemyNpcHit;
|
||||
extern EvtScript EnemyNpcDefeat;
|
||||
|
@ -571,7 +571,7 @@
|
||||
|
||||
/****** COMMON SCRIPTS ************************************************************************************************/
|
||||
|
||||
#define EXIT_WALK_SCRIPT(walkDistance, exitIdx, map, entryIdx) \
|
||||
#define EVT_EXIT_WALK(walkDistance, exitIdx, map, entryIdx) \
|
||||
{ \
|
||||
EVT_SET_GROUP(EVT_GROUP_1B) \
|
||||
EVT_CALL(UseExitHeading, walkDistance, exitIdx) \
|
||||
@ -582,4 +582,29 @@
|
||||
EVT_END \
|
||||
}
|
||||
|
||||
// alternate version of EVT_EXIT_WALK which includes a call to DisablePlayerInput
|
||||
#define EVT_EXIT_WALK_FIXED(walkDistance, exitIdx, map, entryIdx) \
|
||||
{ \
|
||||
EVT_SET_GROUP(EVT_GROUP_1B) \
|
||||
EVT_CALL(DisablePlayerInput, TRUE) \
|
||||
EVT_CALL(UseExitHeading, walkDistance, exitIdx) \
|
||||
EVT_EXEC(ExitWalk) \
|
||||
EVT_CALL(GotoMap, EVT_PTR(map), entryIdx) \
|
||||
EVT_WAIT(100) \
|
||||
EVT_RETURN \
|
||||
EVT_END \
|
||||
}
|
||||
|
||||
|
||||
#define EVT_SETUP_CAMERA_DEFAULT() \
|
||||
EVT_CALL(SetCamPerspective, CAM_DEFAULT, 3, 25, 16, 4096) \
|
||||
EVT_CALL(SetCamBGColor, CAM_DEFAULT, 0, 0, 0) \
|
||||
EVT_CALL(SetCamEnabled, CAM_DEFAULT, TRUE) \
|
||||
|
||||
#define EVT_SETUP_CAMERA_NO_LEAD() \
|
||||
EVT_CALL(SetCamPerspective, CAM_DEFAULT, 3, 25, 16, 4096) \
|
||||
EVT_CALL(SetCamBGColor, CAM_DEFAULT, 0, 0, 0) \
|
||||
EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE) \
|
||||
EVT_CALL(SetCamEnabled, CAM_DEFAULT, TRUE) \
|
||||
|
||||
#endif
|
||||
|
1696
src/17D6A0.c
1696
src/17D6A0.c
File diff suppressed because it is too large
Load Diff
@ -153,7 +153,7 @@ EvtScript D_802C05CC_32579C = {
|
||||
EVT_CALL(DisablePlayerInput, TRUE)
|
||||
EVT_CALL(GetCurrentPartner, LVar0)
|
||||
EVT_IF_NE(LVar0, 0)
|
||||
EVT_CALL(func_802D2B6C)
|
||||
EVT_CALL(InterruptUsePartner)
|
||||
EVT_WAIT(20)
|
||||
EVT_END_IF
|
||||
EVT_CALL(func_802C02E4)
|
||||
|
@ -605,7 +605,7 @@ void update_player(void) {
|
||||
if (playerStatus->animFlags & PA_FLAGS_400000) {
|
||||
Npc* partner;
|
||||
|
||||
playerStatus->animFlags |= PA_FLAGS_20000000 | PA_FLAGS_4;
|
||||
playerStatus->animFlags |= PA_FLAGS_20000000 | PA_FLAGS_INTERRUPT_USE_PARTNER;
|
||||
partner = get_npc_unsafe(NPC_PARTNER);
|
||||
partner->pos.x = playerStatus->lastGoodPosition.x;
|
||||
partner->pos.y = playerStatus->lastGoodPosition.y + playerStatus->colliderHeight;
|
||||
@ -668,9 +668,9 @@ void update_player(void) {
|
||||
check_for_pulse_stone();
|
||||
check_for_ispy();
|
||||
|
||||
playerStatus->extraVelocity.x = 0.0f;
|
||||
playerStatus->extraVelocity.y = 0.0f;
|
||||
playerStatus->extraVelocity.z = 0.0f;
|
||||
playerStatus->pushVelocity.x = 0.0f;
|
||||
playerStatus->pushVelocity.y = 0.0f;
|
||||
playerStatus->pushVelocity.z = 0.0f;
|
||||
playerStatus->flags &= ~PS_FLAGS_10;
|
||||
playerStatus->animFlags &= ~PA_FLAGS_8;
|
||||
}
|
||||
|
15
src/7E9D0.c
15
src/7E9D0.c
@ -148,10 +148,10 @@ s32 phys_adjust_cam_on_landing(void) {
|
||||
s32 surfaceType = get_collider_flags(gCollisionStatus.currentFloor) & COLLIDER_FLAGS_SURFACE_TYPE_MASK;
|
||||
|
||||
if (surfaceType == SURFACE_TYPE_LAVA) {
|
||||
gCameras[0].moveFlags |= CAMERA_MOVE_FLAGS_1;
|
||||
gCameras[0].moveFlags |= CAMERA_MOVE_IGNORE_PLAYER_Y;
|
||||
ret = 0;
|
||||
} else {
|
||||
gCameras[0].moveFlags &= ~CAMERA_MOVE_FLAGS_1;
|
||||
gCameras[0].moveFlags &= ~CAMERA_MOVE_IGNORE_PLAYER_Y;
|
||||
}
|
||||
} else if (partnerActionStatus->partnerActionState != PARTNER_ACTION_NONE && partnerActionStatus->actingPartner == PARTNER_PARAKARRY) {
|
||||
gCameras[0].moveFlags |= CAMERA_MOVE_FLAGS_2;
|
||||
@ -228,11 +228,12 @@ void phys_update_action_state(void) {
|
||||
}
|
||||
}
|
||||
|
||||
// if midair, look for velocity inflection
|
||||
if (playerStatus->timeInAir != 0) {
|
||||
if (playerStatus->gravityIntegrator[0] <= 0.0f && D_800F7B90 > 0.0f) {
|
||||
playerStatus->unk_C2 = playerStatus->timeInAir;
|
||||
if (playerStatus->gravityIntegrator[0] <= 0.0f && LastMidairPlayerVelY > 0.0f) {
|
||||
playerStatus->peakJumpTime = playerStatus->timeInAir;
|
||||
}
|
||||
D_800F7B90 = playerStatus->gravityIntegrator[0];
|
||||
LastMidairPlayerVelY = playerStatus->gravityIntegrator[0];
|
||||
}
|
||||
|
||||
func_800E24F8();
|
||||
@ -358,7 +359,7 @@ void set_action_state(s32 actionState) {
|
||||
|
||||
if (partner == PARTNER_SUSHIE || partner == PARTNER_LAKILESTER || partner == PARTNER_PARAKARRY) {
|
||||
if (gPartnerActionStatus.partnerActionState != PARTNER_ACTION_NONE) {
|
||||
playerStatus->animFlags |= PA_FLAGS_4;
|
||||
playerStatus->animFlags |= PA_FLAGS_INTERRUPT_USE_PARTNER;
|
||||
playerStatus->flags |= PS_FLAGS_800;
|
||||
return;
|
||||
}
|
||||
@ -377,7 +378,7 @@ void set_action_state(s32 actionState) {
|
||||
}
|
||||
|
||||
if (actionState == ACTION_STATE_ENEMY_FIRST_STRIKE) {
|
||||
playerStatus->animFlags |= PA_FLAGS_4;
|
||||
playerStatus->animFlags |= PA_FLAGS_INTERRUPT_USE_PARTNER;
|
||||
}
|
||||
playerStatus->actionState = actionState;
|
||||
playerStatus->flags |= PS_FLAGS_ACTION_STATE_CHANGED;
|
||||
|
@ -35,7 +35,7 @@ s32 can_trigger_loading_zone(void) {
|
||||
if (partnerActionStatus->partnerActionState != PARTNER_ACTION_NONE) {
|
||||
return TRUE;
|
||||
} else {
|
||||
gPlayerStatusPtr->animFlags |= PA_FLAGS_4;
|
||||
gPlayerStatusPtr->animFlags |= PA_FLAGS_INTERRUPT_USE_PARTNER;
|
||||
return FALSE;
|
||||
}
|
||||
} else {
|
||||
@ -43,7 +43,7 @@ s32 can_trigger_loading_zone(void) {
|
||||
return partnerActionStatus->partnerActionState != PARTNER_ACTION_NONE;
|
||||
}
|
||||
if (partnerActionStatus->actingPartner == PARTNER_PARAKARRY) {
|
||||
gPlayerStatusPtr->animFlags |= PA_FLAGS_4;
|
||||
gPlayerStatusPtr->animFlags |= PA_FLAGS_INTERRUPT_USE_PARTNER;
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
@ -383,7 +383,7 @@ void phys_player_land(void) {
|
||||
f32 moveMagnitude;
|
||||
|
||||
playerStatus->timeInAir = 0;
|
||||
playerStatus->unk_C2 = 0;
|
||||
playerStatus->peakJumpTime = 0;
|
||||
playerStatus->flags &= ~PS_FLAGS_800000;
|
||||
playerStatus->landPos.x = playerStatus->position.x;
|
||||
playerStatus->landPos.z = playerStatus->position.z;
|
||||
@ -525,52 +525,52 @@ void collision_main_lateral(void) {
|
||||
break;
|
||||
case ACTION_STATE_RIDE:
|
||||
if (get_current_partner_id() == PARTNER_BOW) {
|
||||
playerStatus->position.x += playerStatus->extraVelocity.x;
|
||||
playerStatus->position.y += playerStatus->extraVelocity.y;
|
||||
playerStatus->position.z += playerStatus->extraVelocity.z;
|
||||
playerStatus->position.x += playerStatus->pushVelocity.x;
|
||||
playerStatus->position.y += playerStatus->pushVelocity.y;
|
||||
playerStatus->position.z += playerStatus->pushVelocity.z;
|
||||
|
||||
if (playerStatus->extraVelocity.x != 0.0f ||
|
||||
playerStatus->extraVelocity.y != 0.0f ||
|
||||
playerStatus->extraVelocity.z != 0.0f)
|
||||
if (playerStatus->pushVelocity.x != 0.0f ||
|
||||
playerStatus->pushVelocity.y != 0.0f ||
|
||||
playerStatus->pushVelocity.z != 0.0f)
|
||||
{
|
||||
gCameras[CAM_DEFAULT].targetPos.x = playerStatus->position.x;
|
||||
gCameras[CAM_DEFAULT].targetPos.y = playerStatus->position.y;
|
||||
gCameras[CAM_DEFAULT].targetPos.z = playerStatus->position.z;
|
||||
if (playerStatus->alpha1 != 128) {
|
||||
collision_check_player_intersecting_world(0, 0,
|
||||
atan2(0.0f, 0.0f, playerStatus->extraVelocity.x, playerStatus->extraVelocity.z));
|
||||
atan2(0.0f, 0.0f, playerStatus->pushVelocity.x, playerStatus->pushVelocity.z));
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case ACTION_STATE_SPIN_POUND:
|
||||
case ACTION_STATE_TORNADO_POUND:
|
||||
playerStatus->position.x += playerStatus->extraVelocity.x;
|
||||
playerStatus->position.y += playerStatus->extraVelocity.y;
|
||||
playerStatus->position.z += playerStatus->extraVelocity.z;
|
||||
if (playerStatus->extraVelocity.x != 0.0f ||
|
||||
playerStatus->extraVelocity.y != 0.0f ||
|
||||
playerStatus->extraVelocity.z != 0.0f)
|
||||
playerStatus->position.x += playerStatus->pushVelocity.x;
|
||||
playerStatus->position.y += playerStatus->pushVelocity.y;
|
||||
playerStatus->position.z += playerStatus->pushVelocity.z;
|
||||
if (playerStatus->pushVelocity.x != 0.0f ||
|
||||
playerStatus->pushVelocity.y != 0.0f ||
|
||||
playerStatus->pushVelocity.z != 0.0f)
|
||||
{
|
||||
gCameras[CAM_DEFAULT].targetPos.x = playerStatus->position.x;
|
||||
gCameras[CAM_DEFAULT].targetPos.y = playerStatus->position.y;
|
||||
gCameras[CAM_DEFAULT].targetPos.z = playerStatus->position.z;
|
||||
}
|
||||
if (playerStatus->extraVelocity.x != 0.0f ||
|
||||
playerStatus->extraVelocity.y != 0.0f ||
|
||||
playerStatus->extraVelocity.z != 0.0f)
|
||||
if (playerStatus->pushVelocity.x != 0.0f ||
|
||||
playerStatus->pushVelocity.y != 0.0f ||
|
||||
playerStatus->pushVelocity.z != 0.0f)
|
||||
{
|
||||
collision_check_player_intersecting_world(0, 0,
|
||||
playerStatus->spriteFacingAngle - 90.0f + gCameras[gCurrentCameraID].currentYaw);
|
||||
}
|
||||
break;
|
||||
case ACTION_STATE_HAMMER:
|
||||
playerStatus->position.x += playerStatus->extraVelocity.x;
|
||||
playerStatus->position.y += playerStatus->extraVelocity.y;
|
||||
playerStatus->position.z += playerStatus->extraVelocity.z;
|
||||
if (playerStatus->extraVelocity.x != 0.0f ||
|
||||
playerStatus->extraVelocity.y != 0.0f ||
|
||||
playerStatus->extraVelocity.z != 0.0f)
|
||||
playerStatus->position.x += playerStatus->pushVelocity.x;
|
||||
playerStatus->position.y += playerStatus->pushVelocity.y;
|
||||
playerStatus->position.z += playerStatus->pushVelocity.z;
|
||||
if (playerStatus->pushVelocity.x != 0.0f ||
|
||||
playerStatus->pushVelocity.y != 0.0f ||
|
||||
playerStatus->pushVelocity.z != 0.0f)
|
||||
{
|
||||
gCameras[CAM_DEFAULT].targetPos.x = playerStatus->position.x;
|
||||
gCameras[CAM_DEFAULT].targetPos.y = playerStatus->position.y;
|
||||
@ -589,9 +589,9 @@ void collision_main_lateral(void) {
|
||||
player_test_move_with_slipping(playerStatus, &playerX, &playerY, &playerZ,
|
||||
playerStatus->colliderDiameter * 0.5f, yaw);
|
||||
|
||||
if (playerStatus->extraVelocity.x != 0.0f ||
|
||||
playerStatus->extraVelocity.y != 0.0f ||
|
||||
playerStatus->extraVelocity.z != 0.0f)
|
||||
if (playerStatus->pushVelocity.x != 0.0f ||
|
||||
playerStatus->pushVelocity.y != 0.0f ||
|
||||
playerStatus->pushVelocity.z != 0.0f)
|
||||
{
|
||||
collision_check_player_intersecting_world(0, 0,
|
||||
playerStatus->spriteFacingAngle - 90.0f + gCameras[gCurrentCameraID].currentYaw);
|
||||
@ -650,16 +650,16 @@ void collision_main_lateral(void) {
|
||||
}
|
||||
}
|
||||
|
||||
playerStatus->position.x += playerStatus->extraVelocity.x;
|
||||
playerStatus->position.z += playerStatus->extraVelocity.z;
|
||||
playerStatus->position.x += playerStatus->pushVelocity.x;
|
||||
playerStatus->position.z += playerStatus->pushVelocity.z;
|
||||
if (playerStatus->timeInAir == 0) {
|
||||
playerStatus->position.y += playerStatus->extraVelocity.y;
|
||||
playerStatus->position.y += playerStatus->pushVelocity.y;
|
||||
}
|
||||
|
||||
if (
|
||||
playerStatus->extraVelocity.x != 0.0f ||
|
||||
playerStatus->extraVelocity.y != 0.0f ||
|
||||
playerStatus->extraVelocity.z != 0.0f)
|
||||
playerStatus->pushVelocity.x != 0.0f ||
|
||||
playerStatus->pushVelocity.y != 0.0f ||
|
||||
playerStatus->pushVelocity.z != 0.0f)
|
||||
{
|
||||
gCameras[CAM_DEFAULT].targetPos.x = playerStatus->position.x;
|
||||
gCameras[CAM_DEFAULT].targetPos.y = playerStatus->position.y;
|
||||
@ -1081,7 +1081,7 @@ void func_800E4F10(void) {
|
||||
void check_input_midair_jump(void) {
|
||||
if (!(gPlayerStatus.flags & (PS_FLAGS_800000 | PS_FLAGS_10 | PS_FLAGS_FLYING)) &&
|
||||
!(gPlayerStatus.animFlags & (PA_FLAGS_8BIT_MARIO | PA_FLAGS_HOLDING_WATT)) &&
|
||||
gPlayerStatus.unk_C2 >= 6 &&
|
||||
gPlayerStatus.peakJumpTime >= 6 &&
|
||||
gPlayerStatus.timeInAir < 18 &&
|
||||
gPlayerStatus.pressedButtons & A_BUTTON) {
|
||||
|
||||
|
@ -361,7 +361,7 @@ Camera* initialize_next_camera(CameraInitData* initData) {
|
||||
camera->trueRotation.y = 0.0f;
|
||||
camera->trueRotation.z = 0.0f;
|
||||
camera->updateMode = initData->type;
|
||||
camera->unk_06 = 1;
|
||||
camera->unk_06 = TRUE;
|
||||
camera->nearClip = initData->nearClip;
|
||||
camera->farClip = initData->farClip;
|
||||
camera->vfov = initData->vfov;
|
||||
@ -373,9 +373,9 @@ Camera* initialize_next_camera(CameraInitData* initData) {
|
||||
camera->bgColor[1] = 0;
|
||||
camera->bgColor[2] = 0;
|
||||
camera->unk_C0 = 0;
|
||||
camera->auxPos.x = 0;
|
||||
camera->auxPos.y = 0;
|
||||
camera->auxPos.z = 0;
|
||||
camera->lookAt_obj_target.x = 0;
|
||||
camera->lookAt_obj_target.y = 0;
|
||||
camera->lookAt_obj_target.z = 0;
|
||||
camera->targetPos.x = 0;
|
||||
camera->targetPos.y = 0;
|
||||
camera->targetPos.z = 0;
|
||||
|
@ -15,11 +15,11 @@ void update_camera_mode_0(Camera* camera) {
|
||||
f32 yTemp;
|
||||
f32 zTemp;
|
||||
|
||||
if (camera->unk_06 != 0) {
|
||||
if (camera->unk_06) {
|
||||
camera->lookAt_obj.x = 0.0f;
|
||||
camera->lookAt_obj.y = 0.0f;
|
||||
camera->lookAt_obj.z = 0.0f;
|
||||
camera->unk_06 = 0;
|
||||
camera->unk_06 = FALSE;
|
||||
camera->lookAt_eye.x = camera->lookAt_obj.x;
|
||||
camera->lookAt_eye.y = camera->lookAt_obj.y;
|
||||
camera->lookAt_eye.z = camera->lookAt_obj.z - (1000.0f / D_8009A5EC);
|
||||
|
56
src/B0E0.c
56
src/B0E0.c
@ -7,7 +7,7 @@ extern f32 D_800A08E4;
|
||||
extern f32 D_800A08E8;
|
||||
extern f32 D_800A08EC;
|
||||
|
||||
void func_80030210(Camera* camera, f32 arg1, f32 arg2, s32 arg3);
|
||||
void cam_interp_lookat_pos(Camera* camera, f32 arg1, f32 arg2, s16 arg3);
|
||||
void func_8003034C(Camera* camera);
|
||||
|
||||
void update_camera_mode_unused(Camera* camera);
|
||||
@ -94,30 +94,30 @@ void update_camera_mode_5(Camera* camera) {
|
||||
camera->currentBoomLength = 690.0f;
|
||||
camera->currentYOffset = 47.0f;
|
||||
|
||||
if (camera->unk_06 != 0) {
|
||||
if (camera->unk_06) {
|
||||
camera->unk_550 = 0.0f;
|
||||
camera->unk_70 = 0.0f;
|
||||
camera->trueRotation.x = 0.0f;
|
||||
camera->unk_06 = 0;
|
||||
camera->unk_06 = FALSE;
|
||||
camera->unk_554 = 0;
|
||||
camera->lookAt_obj.x = camera->targetPos.x;
|
||||
camera->lookAt_obj.y = camera->targetPos.y + camera->currentYOffset;
|
||||
camera->lookAt_obj.z = camera->targetPos.z;
|
||||
func_80030210(camera, 0.0f, 0.0f, 0);
|
||||
cam_interp_lookat_pos(camera, 0.0f, 0.0f, FALSE);
|
||||
} else {
|
||||
f32 temp_f22 = (playerStatus->currentSpeed * 1.5f) + 1.0f;
|
||||
f32 temp_f20 = (playerStatus->currentSpeed * 0.05f) + 0.05f;
|
||||
f32 maxInterpSpeed = (playerStatus->currentSpeed * 1.5f) + 1.0f;
|
||||
f32 interpRate = (playerStatus->currentSpeed * 0.05f) + 0.05f;
|
||||
|
||||
camera->auxPos.x = camera->targetPos.x + camera->unk_550;
|
||||
camera->auxPos.y = camera->targetPos.y + camera->currentYOffset;
|
||||
camera->auxPos.z = camera->targetPos.z;
|
||||
camera->lookAt_obj_target.x = camera->targetPos.x + camera->unk_550;
|
||||
camera->lookAt_obj_target.y = camera->targetPos.y + camera->currentYOffset;
|
||||
camera->lookAt_obj_target.z = camera->targetPos.z;
|
||||
func_8003034C(camera);
|
||||
if (!(camera->moveFlags & CAMERA_MOVE_FLAGS_1)) {
|
||||
func_80030210(camera, temp_f20, temp_f22, 0);
|
||||
if (!(camera->moveFlags & CAMERA_MOVE_IGNORE_PLAYER_Y)) {
|
||||
cam_interp_lookat_pos(camera, interpRate, maxInterpSpeed, FALSE);
|
||||
} else {
|
||||
lookXDelta = temp_f22; // needed to match
|
||||
lookXDelta = maxInterpSpeed; // needed to match
|
||||
|
||||
func_80030210(camera, temp_f20, lookXDelta, 1);
|
||||
cam_interp_lookat_pos(camera, interpRate, lookXDelta, TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
@ -129,29 +129,29 @@ void update_camera_mode_5(Camera* camera) {
|
||||
camera->currentPitch = atan2(0.0f, 0.0f, lookYDelta, -sqrtf(SQ(lookXDelta) + SQ(lookZDelta)));
|
||||
}
|
||||
|
||||
void func_80030210(Camera* camera, f32 arg1, f32 arg2, s32 arg3) {
|
||||
f32 xDelta = (camera->auxPos.x - camera->lookAt_obj.x) * arg1;
|
||||
void cam_interp_lookat_pos(Camera* camera, f32 interpAmtXZ, f32 maxDeltaXZ, s16 lockPosY) {
|
||||
f32 xDelta = (camera->lookAt_obj_target.x - camera->lookAt_obj.x) * interpAmtXZ;
|
||||
f32 theta;
|
||||
f32 cosTheta;
|
||||
f32 sinTheta;
|
||||
|
||||
if (xDelta < -arg2) {
|
||||
xDelta = -arg2;
|
||||
if (xDelta < -maxDeltaXZ) {
|
||||
xDelta = -maxDeltaXZ;
|
||||
}
|
||||
if (xDelta > arg2) {
|
||||
xDelta = arg2;
|
||||
if (xDelta > maxDeltaXZ) {
|
||||
xDelta = maxDeltaXZ;
|
||||
}
|
||||
|
||||
camera->lookAt_obj.x = camera->lookAt_eye.x = camera->lookAt_obj.x + xDelta;
|
||||
theta = DEG_TO_RAD(camera->currentBoomYaw);
|
||||
|
||||
cosTheta = cos_rad(theta);
|
||||
camera->lookAt_obj.z += (camera->auxPos.z - camera->lookAt_obj.z) * arg1;
|
||||
theta = DEG_TO_RAD(camera->currentBoomYaw);
|
||||
cosTheta = cos_rad(DEG_TO_RAD(camera->currentBoomYaw));
|
||||
camera->lookAt_obj.z += (camera->lookAt_obj_target.z - camera->lookAt_obj.z) * interpAmtXZ;
|
||||
camera->lookAt_eye.z = camera->lookAt_obj.z + (camera->currentBoomLength * cosTheta);
|
||||
|
||||
if (arg3 << 16 == 0) {
|
||||
if (!lockPosY) {
|
||||
sinTheta = sin_rad(theta);
|
||||
camera->lookAt_obj.y += (camera->auxPos.y - camera->lookAt_obj.y) * 0.125f;
|
||||
camera->lookAt_obj.y += (camera->lookAt_obj_target.y - camera->lookAt_obj.y) * 0.125f;
|
||||
camera->lookAt_eye.y = camera->lookAt_obj.y + (camera->currentBoomLength * sinTheta);
|
||||
}
|
||||
}
|
||||
@ -763,7 +763,7 @@ void update_camera_zone_interp(Camera* camera) {
|
||||
camera->linearInterpScale = 1.0f;
|
||||
}
|
||||
temp = targetX;
|
||||
if (camera->moveFlags & CAMERA_MOVE_FLAGS_1) {
|
||||
if (camera->moveFlags & CAMERA_MOVE_IGNORE_PLAYER_Y) {
|
||||
camera->unk_498 = 0.0f;
|
||||
} else if (camera->unk_494 != targetY) {
|
||||
camera->unk_494 = targetY;
|
||||
@ -1048,8 +1048,8 @@ void update_camera_zone_interp(Camera* camera) {
|
||||
camera->currentBoomLength = blendedCamSettings.boomLength;
|
||||
camera->currentBlendedYawNegated = -blendedCamSettings.boomYaw;
|
||||
camera->currentPitch = -blendedCamSettings.boomPitch - blendedCamSettings.viewPitch;
|
||||
camera->auxPos.x = camera->lookAt_obj.x;
|
||||
camera->auxPos.y = camera->lookAt_obj.y;
|
||||
camera->auxPos.z = camera->lookAt_obj.z;
|
||||
camera->lookAt_obj_target.x = camera->lookAt_obj.x;
|
||||
camera->lookAt_obj_target.y = camera->lookAt_obj.y;
|
||||
camera->lookAt_obj_target.z = camera->lookAt_obj.z;
|
||||
camera->currentYOffset = 0.0f;
|
||||
}
|
||||
|
@ -14,7 +14,7 @@ ApiStatus N(SpinyTrompHit)(Evt* script, s32 isInitialCall) {
|
||||
}
|
||||
|
||||
ApiStatus N(GetActingPartner)(Evt* script, s32 isInitialCall) {
|
||||
if (gPartnerActionStatus.partnerActionState != 0) {
|
||||
if (gPartnerActionStatus.partnerActionState != PARTNER_ACTION_NONE) {
|
||||
script->varTable[0] = gPartnerActionStatus.actingPartner;
|
||||
} else {
|
||||
script->varTable[0] = -1;
|
||||
@ -24,7 +24,7 @@ ApiStatus N(GetActingPartner)(Evt* script, s32 isInitialCall) {
|
||||
|
||||
#include "world/common/UnkFunc46.inc.c"
|
||||
|
||||
#include "world/common/UnkFunc47.inc.c"
|
||||
#include "world/common/SpinyTromp_CheckDist.inc.c"
|
||||
|
||||
#include "world/common/UnkFunc48.inc.c"
|
||||
|
||||
|
@ -4217,8 +4217,7 @@ void get_background_color_blend(u8* r, u8* g, u8* b, u8* a) {
|
||||
*a = mdl_bgMultiplyColorA;
|
||||
}
|
||||
|
||||
void set_model_fog_color_parameters(s8 primR, s8 primG, s8 primB, s8 primA, s32 fogR, s32 fogG, s32 fogB, s32 fogStart,
|
||||
s32 fogEnd) {
|
||||
void set_model_fog_color_parameters(u8 primR, u8 primG, u8 primB, u8 primA, u8 fogR, u8 fogG, u8 fogB, s32 fogStart, s32 fogEnd) {
|
||||
mdl_renderModelFogPrimColorR = primR;
|
||||
mdl_renderModelFogPrimColorG = primG;
|
||||
mdl_renderModelFogPrimColorB = primB;
|
||||
|
@ -518,10 +518,10 @@ void sfx_play_sound(s32 soundID) {
|
||||
sfx_play_sound_with_params(soundID, 0, 0, 0);
|
||||
}
|
||||
|
||||
void sfx_play_sound_at_player(s32 soundID, s32 arg1) {
|
||||
void sfx_play_sound_at_player(s32 soundID, s32 flags) {
|
||||
PlayerStatus* playerStatus = &gPlayerStatus;
|
||||
|
||||
sfx_play_sound_at_position(soundID, arg1, playerStatus->position.x, playerStatus->position.y, playerStatus->position.z);
|
||||
sfx_play_sound_at_position(soundID, flags, playerStatus->position.x, playerStatus->position.y, playerStatus->position.z);
|
||||
}
|
||||
|
||||
void sfx_play_sound_at_npc(s32 soundID, s32 arg1, s32 npcID) {
|
||||
|
@ -259,11 +259,11 @@ EvtScript N(handleEvent_8021A824) = {
|
||||
EVT_CASE_OR_EQ(EVENT_IMMUNE)
|
||||
EVT_CALL(GetLastElement, LVar0)
|
||||
EVT_IF_FLAG(LVar0, DAMAGE_TYPE_SMASH)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_MOLE_DIG)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BURROW_DIG)
|
||||
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FLOAT(2.0))
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_MontyMole_Anim11)
|
||||
EVT_WAIT(80)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_MOLE_SURFACE)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BURROW_SURFACE)
|
||||
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FLOAT(1.0))
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_MontyMole_Anim10)
|
||||
EVT_WAIT(20)
|
||||
@ -324,11 +324,11 @@ EvtScript N(handleEvent_8021A824) = {
|
||||
EVT_WAIT(1000)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(EVENT_AIR_LIFT_FAILED)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_MOLE_DIG)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BURROW_DIG)
|
||||
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FLOAT(2.0))
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_MontyMole_Anim11)
|
||||
EVT_WAIT(40)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_MOLE_SURFACE)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BURROW_SURFACE)
|
||||
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FLOAT(1.0))
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_MontyMole_Anim10)
|
||||
EVT_WAIT(20)
|
||||
@ -355,9 +355,9 @@ EvtScript N(takeTurn_8021AFAC) = {
|
||||
EVT_CALL(MoveBattleCamOver, 1)
|
||||
EVT_END_IF
|
||||
EVT_CHILD_THREAD
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_MOLE_DIG)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BURROW_DIG)
|
||||
EVT_WAIT(20)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_MOLE_SURFACE)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BURROW_SURFACE)
|
||||
EVT_END_CHILD_THREAD
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_MontyMole_Anim04)
|
||||
EVT_WAIT(37)
|
||||
|
@ -296,7 +296,7 @@ EvtScript N(80220684) = {
|
||||
EvtScript N(80220764) = {
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_MOLE_DIG)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BURROW_DIG)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Whacka_Burrow)
|
||||
EVT_WAIT(40)
|
||||
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LVar0)
|
||||
|
@ -334,7 +334,7 @@ EvtScript N(80221334) = {
|
||||
EvtScript N(80221414) = {
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_MOLE_DIG)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BURROW_DIG)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Whacka_Burrow)
|
||||
EVT_WAIT(40)
|
||||
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LVar0)
|
||||
|
@ -329,7 +329,7 @@ EvtScript N(80222050) = {
|
||||
EvtScript N(80222130) = {
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_MOLE_DIG)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BURROW_DIG)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Whacka_Burrow)
|
||||
EVT_WAIT(40)
|
||||
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LVar0)
|
||||
|
@ -124,13 +124,13 @@ EvtScript N(idle_8021DAE4) = {
|
||||
|
||||
EvtScript N(8021DBFC) = {
|
||||
EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, 1)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_MOLE_DIG)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BURROW_DIG)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_HurtPlant_Anim04)
|
||||
EVT_WAIT(10)
|
||||
EVT_CALL(SetGoalToHome, ACTOR_SELF)
|
||||
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
|
||||
EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_MOLE_SURFACE)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BURROW_SURFACE)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_HurtPlant_Anim03)
|
||||
EVT_WAIT(10)
|
||||
EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, 0)
|
||||
@ -227,7 +227,7 @@ EvtScript N(handleEvent_8021DCF4) = {
|
||||
EVT_SET_CONST(LVar0, 1)
|
||||
EVT_SET_CONST(LVar1, ANIM_HurtPlant_Anim0E)
|
||||
EVT_EXEC_WAIT(DoNormalHit)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_MOLE_DIG)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BURROW_DIG)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_HurtPlant_Anim04)
|
||||
EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, 1)
|
||||
EVT_WAIT(20)
|
||||
@ -272,7 +272,7 @@ EvtScript N(takeTurn_8021E33C) = {
|
||||
EVT_WAIT(15)
|
||||
EVT_GOTO(123)
|
||||
EVT_END_IF
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_MOLE_DIG)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BURROW_DIG)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_HurtPlant_Anim04)
|
||||
EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, 1)
|
||||
EVT_WAIT(8)
|
||||
@ -295,7 +295,7 @@ EvtScript N(takeTurn_8021E33C) = {
|
||||
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE)
|
||||
EVT_LABEL(123)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_MOLE_SURFACE)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BURROW_SURFACE)
|
||||
EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
|
||||
EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, 0)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_HurtPlant_Anim03)
|
||||
|
@ -2,23 +2,77 @@
|
||||
|
||||
#define NAMESPACE b_area_kzn2
|
||||
|
||||
enum {
|
||||
VINE_0 = 0,
|
||||
VINE_1 = 1,
|
||||
VINE_2 = 2,
|
||||
VINE_3 = 3,
|
||||
NUM_VINES = 4
|
||||
};
|
||||
|
||||
enum {
|
||||
VINE_0_BASE = 0x80200000,
|
||||
VINE_1_BASE = 0x80204000,
|
||||
VINE_2_BASE = 0x80207000,
|
||||
VINE_3_BASE = 0x8020A000,
|
||||
};
|
||||
|
||||
typedef struct LavaPiranhaVine {
|
||||
/* 0x000 */ Vec3f bonePos[9];
|
||||
/* 0x06C */ f32 boneRot[9];
|
||||
/* 0x090 */ s32 boneCount;
|
||||
/* 0x094 */ f32 boneLength;
|
||||
/* 0x098 */ Vec3f points[27];
|
||||
/* 0x1DC */ s32 numPoints;
|
||||
} LavaPiranhaVine;
|
||||
|
||||
typedef struct LavaPiranhaVineSet {
|
||||
LavaPiranhaVine vines[NUM_VINES];
|
||||
} LavaPiranhaVineSet; // size = 0x780
|
||||
|
||||
#include "common/StartRumbleWithParams.inc.c"
|
||||
|
||||
extern LavaPiranhaVineSet* D_8022ADD0;
|
||||
extern s32 N(VineRenderState); // TODO static
|
||||
|
||||
// N(make_vine_interpolation)
|
||||
INCLUDE_ASM(s32, "battle/area_kzn2/59E6E0", func_80218058_59E738);
|
||||
|
||||
// N(SetVineBonePos)
|
||||
INCLUDE_ASM(s32, "battle/area_kzn2/59E6E0", func_8021812C_59E80C);
|
||||
|
||||
// N(SetVineBoneRot)
|
||||
INCLUDE_ASM(s32, "battle/area_kzn2/59E6E0", func_80218224_59E904);
|
||||
|
||||
// N(SetVineBoneScale)
|
||||
INCLUDE_ASM(s32, "battle/area_kzn2/59E6E0", func_802182E4_59E9C4);
|
||||
|
||||
void func_8021835C_59EA3C(void* data);
|
||||
|
||||
// N(appendGfx_piranha_vines)
|
||||
INCLUDE_ASM(s32, "battle/area_kzn2/59E6E0", func_8021835C_59EA3C);
|
||||
|
||||
INCLUDE_ASM(s32, "battle/area_kzn2/59E6E0", func_802188B0_59EF90);
|
||||
void N(worker_render_piranha_vines)(void) {
|
||||
RenderTask renderTask;
|
||||
|
||||
INCLUDE_ASM(s32, "battle/area_kzn2/59E6E0", func_802188EC_59EFCC);
|
||||
renderTask.appendGfx = &func_8021835C_59EA3C;
|
||||
renderTask.appendGfxArg = 0;
|
||||
renderTask.distance = 10;
|
||||
renderTask.renderMode = RENDER_MODE_SURFACE_OPA;
|
||||
|
||||
INCLUDE_ASM(s32, "battle/area_kzn2/59E6E0", func_802188FC_59EFDC);
|
||||
queue_render_task(&renderTask);
|
||||
}
|
||||
|
||||
API_CALLABLE(N(MarkVineInterpolationDirty)) {
|
||||
N(VineRenderState) = 0;
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
API_CALLABLE(N(CreateVineRenderer)) {
|
||||
N(VineRenderState) = -1;
|
||||
create_generic_entity_world(NULL, &N(worker_render_piranha_vines));
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
INCLUDE_ASM(s32, "battle/area_kzn2/59E6E0", func_80218930_59F010);
|
||||
|
||||
|
@ -119,13 +119,13 @@ EvtScript N(8021D4F4) = {
|
||||
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
|
||||
EVT_CALL(MoveBattleCamOver, 20)
|
||||
EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, 1)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_MOLE_DIG)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BURROW_DIG)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_SmallPiranha_Anim04)
|
||||
EVT_WAIT(10)
|
||||
EVT_CALL(SetGoalToHome, ACTOR_SELF)
|
||||
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
|
||||
EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_MOLE_SURFACE)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BURROW_SURFACE)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_SmallPiranha_Anim03)
|
||||
EVT_WAIT(10)
|
||||
EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, 0)
|
||||
@ -230,7 +230,7 @@ EvtScript N(handleEvent_8021D60C) = {
|
||||
EVT_SET_CONST(LVar0, 1)
|
||||
EVT_SET_CONST(LVar1, ANIM_SmallPiranha_Anim09)
|
||||
EVT_EXEC_WAIT(DoNormalHit)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_MOLE_DIG)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BURROW_DIG)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_SmallPiranha_Anim04)
|
||||
EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, 1)
|
||||
EVT_WAIT(8)
|
||||
@ -275,7 +275,7 @@ EvtScript N(takeTurn_8021DCD4) = {
|
||||
EVT_WAIT(15)
|
||||
EVT_GOTO(123)
|
||||
EVT_END_IF
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_MOLE_DIG)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BURROW_DIG)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_SmallPiranha_Anim04)
|
||||
EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, 1)
|
||||
EVT_WAIT(8)
|
||||
@ -304,7 +304,7 @@ EvtScript N(takeTurn_8021DCD4) = {
|
||||
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
|
||||
EVT_CALL(JumpToGoal, ACTOR_SELF, 20, FALSE, FALSE, FALSE)
|
||||
EVT_LABEL(123)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_MOLE_SURFACE)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BURROW_SURFACE)
|
||||
EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
|
||||
EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, 0)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_SmallPiranha_Anim03)
|
||||
|
@ -279,7 +279,7 @@ EvtScript N(attack_bite) = {
|
||||
EVT_CALL(SetBattleCamZoom, 300)
|
||||
EVT_CALL(SetBattleCamOffsetZ, 40)
|
||||
EVT_WAIT(20)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_MOLE_SURFACE)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BURROW_SURFACE)
|
||||
EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
|
||||
EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, 0)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_LargePiranha_Frost_Anim17)
|
||||
@ -327,13 +327,13 @@ EvtScript N(attack_bite) = {
|
||||
EVT_IF_EQ(LVar0, PHASE_FIRST_STRIKE)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(7.0))
|
||||
EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, 1)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_MOLE_DIG)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BURROW_DIG)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_LargePiranha_Frost_Anim18)
|
||||
EVT_WAIT(10)
|
||||
EVT_CALL(SetGoalToHome, ACTOR_SELF)
|
||||
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
|
||||
EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_MOLE_SURFACE)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BURROW_SURFACE)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_LargePiranha_Frost_Anim17)
|
||||
EVT_WAIT(10)
|
||||
EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, 0)
|
||||
@ -371,13 +371,13 @@ EvtScript N(attack_bite) = {
|
||||
EVT_IF_EQ(LVar0, PHASE_FIRST_STRIKE)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(7.0))
|
||||
EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, 1)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_MOLE_DIG)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BURROW_DIG)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_LargePiranha_Frost_Anim18)
|
||||
EVT_WAIT(10)
|
||||
EVT_CALL(SetGoalToHome, ACTOR_SELF)
|
||||
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
|
||||
EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_MOLE_SURFACE)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BURROW_SURFACE)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_LargePiranha_Frost_Anim17)
|
||||
EVT_WAIT(10)
|
||||
EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, 0)
|
||||
|
@ -269,7 +269,7 @@ EvtScript N(bite) = {
|
||||
EVT_CALL(SetBattleCamZoom, 300)
|
||||
EVT_CALL(SetBattleCamOffsetZ, 40)
|
||||
EVT_WAIT(20)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_MOLE_SURFACE)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BURROW_SURFACE)
|
||||
EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
|
||||
EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, 0)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_LargePiranha_Putrid_Anim17)
|
||||
@ -318,13 +318,13 @@ EvtScript N(bite) = {
|
||||
EVT_IF_EQ(LVar0, PHASE_FIRST_STRIKE)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(7.0))
|
||||
EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, 1)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_MOLE_DIG)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BURROW_DIG)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_LargePiranha_Putrid_Anim18)
|
||||
EVT_WAIT(10)
|
||||
EVT_CALL(SetGoalToHome, ACTOR_SELF)
|
||||
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
|
||||
EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_MOLE_SURFACE)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BURROW_SURFACE)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_LargePiranha_Putrid_Anim17)
|
||||
EVT_WAIT(10)
|
||||
EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, 0)
|
||||
@ -362,13 +362,13 @@ EvtScript N(bite) = {
|
||||
EVT_IF_EQ(LVar0, PHASE_FIRST_STRIKE)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(7.0))
|
||||
EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, 1)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_MOLE_DIG)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BURROW_DIG)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_LargePiranha_Putrid_Anim18)
|
||||
EVT_WAIT(10)
|
||||
EVT_CALL(SetGoalToHome, ACTOR_SELF)
|
||||
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
|
||||
EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_MOLE_SURFACE)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BURROW_SURFACE)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_LargePiranha_Putrid_Anim17)
|
||||
EVT_WAIT(10)
|
||||
EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, 0)
|
||||
|
@ -22,7 +22,7 @@ ApiStatus N(func_802A1270_727B80)(Evt* script, s32 isInitialCall) {
|
||||
script->functionTemp[1] = 0;
|
||||
script->functionTemp[2] = 0;
|
||||
sfx_play_sound(SOUND_2033);
|
||||
camera->unk_1C = 0;
|
||||
camera->auxPitch = 0;
|
||||
D_802A1CD0 = create_generic_entity_frontUI(NULL, func_802A123C_727B4C);
|
||||
script->functionTemp[0] = 1;
|
||||
case 1:
|
||||
@ -34,7 +34,7 @@ ApiStatus N(func_802A1270_727B80)(Evt* script, s32 isInitialCall) {
|
||||
if (script->functionTemp[2] <= 90) {
|
||||
return ApiStatus_BLOCK;
|
||||
}
|
||||
camera->unk_1C = 0;
|
||||
camera->auxPitch = 0;
|
||||
camera->flags &= ~CAM_FLAG_SHAKING;
|
||||
free_generic_entity(D_802A1CD0);
|
||||
return ApiStatus_DONE2;
|
||||
|
@ -249,30 +249,9 @@ static s32 _pad = 0; // XXX
|
||||
#include "battle/item/strange_cake3.png.inc.c"
|
||||
#include "battle/item/strange_cake3.pal.inc.c"
|
||||
|
||||
HudScript N(D_802A27D0) = {
|
||||
HUD_ELEMENT_OP_SetVisible,
|
||||
HUD_ELEMENT_OP_SetTileSize, HUD_ELEMENT_SIZE_32x32, HUD_ELEMENT_OP_Loop,
|
||||
HUD_ELEMENT_OP_SetCI, 60, (s32) battle_item_strange_cake1_png, (s32) battle_item_strange_cake1_pal,
|
||||
0x00000003,
|
||||
HUD_ELEMENT_OP_End,
|
||||
};
|
||||
|
||||
HudScript N(D_802A27F8) = {
|
||||
HUD_ELEMENT_OP_SetVisible,
|
||||
HUD_ELEMENT_OP_SetTileSize, HUD_ELEMENT_SIZE_32x32, HUD_ELEMENT_OP_Loop,
|
||||
HUD_ELEMENT_OP_SetCI, 60, (s32) battle_item_strange_cake2_png, (s32) battle_item_strange_cake2_pal,
|
||||
0x00000003,
|
||||
HUD_ELEMENT_OP_End,
|
||||
};
|
||||
|
||||
HudScript N(D_802A2820) = {
|
||||
HUD_ELEMENT_OP_SetVisible,
|
||||
HUD_ELEMENT_OP_SetTileSize, HUD_ELEMENT_SIZE_32x32,
|
||||
HUD_ELEMENT_OP_Loop,
|
||||
HUD_ELEMENT_OP_SetCI, 60, (s32) battle_item_strange_cake3_png, (s32) battle_item_strange_cake3_pal,
|
||||
0x00000003,
|
||||
HUD_ELEMENT_OP_End
|
||||
};
|
||||
HudScript N(D_802A27D0) = HES_TEMPLATE_CI_ENUM_SIZE(battle_item_strange_cake1, 32, 32);
|
||||
HudScript N(D_802A27F8) = HES_TEMPLATE_CI_ENUM_SIZE(battle_item_strange_cake2, 32, 32);
|
||||
HudScript N(D_802A2820) = HES_TEMPLATE_CI_ENUM_SIZE(battle_item_strange_cake3, 32, 32);
|
||||
|
||||
HudScript* N(D_802A2848_732B48)[] = {
|
||||
&N(D_802A27F8), &N(D_802A2820), &N(D_802A27D0), &N(D_802A27F8)
|
||||
@ -285,62 +264,62 @@ s32 N(D_802A2858_732B58)[] = {
|
||||
|
||||
EvtScript N(script6) = {
|
||||
EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2)
|
||||
EVT_IF_EQ(LVar1, 211)
|
||||
EVT_SET_CONST(LVarA, 0xD3)
|
||||
EVT_IF_EQ(LVar1, ITEM_KOOKY_COOKIE)
|
||||
EVT_SET_CONST(LVarA, ITEM_KOOKY_COOKIE)
|
||||
EVT_SET(LVar1, 0)
|
||||
EVT_EXEC_WAIT(battle_item_strange_cake_UseItemWithEffect)
|
||||
EVT_EXEC_WAIT(battle_item_strange_cake_EatItem)
|
||||
EVT_CALL(battle_item_strange_cake_func_802A1A8C_731D8C)
|
||||
EVT_EXEC_WAIT(N(UseItemWithEffect))
|
||||
EVT_EXEC_WAIT(N(EatItem))
|
||||
EVT_CALL(N(func_802A1A8C_731D8C))
|
||||
EVT_CALL(GetActorPos, 0, LVar0, LVar1, LVar2)
|
||||
EVT_ADD(LVar0, 20)
|
||||
EVT_ADD(LVar1, 25)
|
||||
EVT_CALL(battle_item_strange_cake_func_802A18D8_731BD8, LVar0, LVar1, LVar2, LVar3)
|
||||
EVT_CALL(N(func_802A18D8_731BD8), LVar0, LVar1, LVar2, LVar3)
|
||||
EVT_CALL(GetActorPos, 0, LVar0, LVar1, LVar2)
|
||||
EVT_ADD(LVar1, 25)
|
||||
EVT_CALL(ShowStartRecoveryShimmer, LVar0, LVar1, LVar2, LVar3)
|
||||
EVT_CALL(battle_item_strange_cake_AddFP, LVar3)
|
||||
EVT_CALL(N(AddFP), LVar3)
|
||||
EVT_WAIT(10)
|
||||
EVT_CALL(SetAnimation, 0, 0, 65586)
|
||||
EVT_CALL(SetAnimation, 0, 0, ANIM_Mario_ThumbsUp)
|
||||
EVT_WAIT(30)
|
||||
EVT_CALL(GetActorPos, 0, LVar0, LVar1, LVar2)
|
||||
EVT_CALL(ShowRecoveryShimmer, LVar0, LVar1, LVar2, LVar3)
|
||||
EVT_CALL(SetAnimation, 0, 0, 65538)
|
||||
EVT_CALL(SetAnimation, 0, 0, ANIM_Mario_10002)
|
||||
EVT_WAIT(20)
|
||||
EVT_CALL(SetAnimation, 0, 0, 65567)
|
||||
EVT_CALL(SetAnimation, 0, 0, ANIM_Mario_GotItem)
|
||||
EVT_ELSE
|
||||
EVT_SET_CONST(LVarA, 0xD2)
|
||||
EVT_SET_CONST(LVarA, ITEM_STRANGE_CAKE)
|
||||
EVT_SET(LVar1, 0)
|
||||
EVT_EXEC_WAIT(battle_item_strange_cake_UseItemWithEffect)
|
||||
EVT_EXEC_WAIT(battle_item_strange_cake_EatItem)
|
||||
EVT_CALL(SetAnimation, 0, 0, 65567)
|
||||
EVT_EXEC_WAIT(N(UseItemWithEffect))
|
||||
EVT_EXEC_WAIT(N(EatItem))
|
||||
EVT_CALL(SetAnimation, 0, 0, ANIM_Mario_GotItem)
|
||||
EVT_END_IF
|
||||
EVT_WAIT(10)
|
||||
EVT_THREAD
|
||||
EVT_WAIT(220)
|
||||
EVT_CALL(PlaySoundAtActor, 0, 1011)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_3F3)
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(PlaySoundAtActor, 0, 872)
|
||||
EVT_CALL(battle_item_strange_cake_func_802A13E4_7316E4)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_368)
|
||||
EVT_CALL(N(func_802A13E4_7316E4))
|
||||
EVT_WAIT(2)
|
||||
EVT_SWITCH(LVar0)
|
||||
EVT_CASE_EQ(0)
|
||||
EVT_EXEC_WAIT(battle_item_strange_cake_script7)
|
||||
EVT_EXEC_WAIT(N(script7))
|
||||
EVT_CASE_EQ(1)
|
||||
EVT_EXEC_WAIT(battle_item_strange_cake_script8)
|
||||
EVT_EXEC_WAIT(N(script8))
|
||||
EVT_CASE_EQ(2)
|
||||
EVT_EXEC_WAIT(battle_item_strange_cake_script9)
|
||||
EVT_EXEC_WAIT(N(script9))
|
||||
EVT_END_SWITCH
|
||||
EVT_EXEC_WAIT(battle_item_strange_cake_PlayerGoHome)
|
||||
EVT_EXEC_WAIT(N(PlayerGoHome))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(script7) = {
|
||||
EVT_CALL(SetAnimation, 0, 0, 65538)
|
||||
EVT_CALL(SetAnimation, 0, 0, ANIM_Mario_10002)
|
||||
EVT_CALL(GetActorPos, 0, LVar0, LVar1, LVar2)
|
||||
EVT_ADD(LVar1, 20)
|
||||
EVT_CALL(PlayEffect, 87, 0, LVar0, LVar1, LVar2, EVT_FLOAT(1.0), 30, 0, 0, 0, 0, 0, 0, 0)
|
||||
EVT_CALL(battle_item_strange_cake_func_802A1AD8_731DD8)
|
||||
EVT_CALL(N(func_802A1AD8_731DD8))
|
||||
EVT_WAIT(20)
|
||||
EVT_CALL(ShowMessageBox, 16, 60)
|
||||
EVT_CALL(WaitForMessageBoxDone)
|
||||
@ -349,11 +328,11 @@ EvtScript N(script7) = {
|
||||
};
|
||||
|
||||
EvtScript N(script8) = {
|
||||
EVT_CALL(SetAnimation, 0, 0, 65538)
|
||||
EVT_CALL(SetAnimation, 0, 0, ANIM_Mario_10002)
|
||||
EVT_CALL(GetActorPos, 0, LVar0, LVar1, LVar2)
|
||||
EVT_ADD(LVar1, 20)
|
||||
EVT_CALL(PlayEffect, 51, 6, LVar0, LVar1, LVar2, EVT_FLOAT(1.0), 30, 0, 0, 0, 0, 0, 0, 0)
|
||||
EVT_CALL(battle_item_strange_cake_func_802A1B14_731E14)
|
||||
EVT_CALL(N(func_802A1B14_731E14))
|
||||
EVT_WAIT(20)
|
||||
EVT_CALL(ShowMessageBox, 17, 60)
|
||||
EVT_CALL(WaitForMessageBoxDone)
|
||||
@ -362,11 +341,11 @@ EvtScript N(script8) = {
|
||||
};
|
||||
|
||||
EvtScript N(script9) = {
|
||||
EVT_CALL(SetAnimation, 0, 0, 196612)
|
||||
EVT_CALL(SetAnimation, 0, 0, ANIM_Mario_30004)
|
||||
EVT_CALL(SetGoalToTarget, 0)
|
||||
EVT_CALL(GetGoalPos, 0, LVar0, LVar1, LVar2)
|
||||
EVT_EXEC(DoSleepHit)
|
||||
EVT_CALL(battle_item_strange_cake_func_802A1B68_731E68)
|
||||
EVT_CALL(N(func_802A1B68_731E68))
|
||||
EVT_WAIT(20)
|
||||
EVT_CALL(ShowMessageBox, 11, 60)
|
||||
EVT_CALL(WaitForMessageBoxDone)
|
||||
|
242
src/battle_cam.c
242
src/battle_cam.c
@ -301,9 +301,9 @@ s32 CamPresetUpdate_F(Evt* script, s32 isInitialCall) {
|
||||
}
|
||||
BattleCam_BoomLength += sizeX + sizeY;
|
||||
if (BattleCam_SetImmediately) {
|
||||
camera->auxPos.x = middlePosX;
|
||||
camera->auxPos.y = middlePosY;
|
||||
camera->auxPos.z = middlePosZ;
|
||||
camera->lookAt_obj_target.x = middlePosX;
|
||||
camera->lookAt_obj_target.y = middlePosY;
|
||||
camera->lookAt_obj_target.z = middlePosZ;
|
||||
camera->auxBoomLength = BattleCam_BoomLength;
|
||||
camera->auxBoomZOffset = BattleCam_BoomZOffset * 256;
|
||||
camera->auxBoomYaw = BattleCam_BoomYaw;
|
||||
@ -314,9 +314,9 @@ s32 CamPresetUpdate_F(Evt* script, s32 isInitialCall) {
|
||||
BattleCam_InitialBoomPitch = camera->auxBoomPitch;
|
||||
BattleCam_InitialBoomYaw = camera->auxBoomYaw;
|
||||
BattleCam_InitialBoomZOffset = camera->auxBoomZOffset / 256;
|
||||
BattleCam_InitialPosX = camera->auxPos.x;
|
||||
BattleCam_InitialPosY = camera->auxPos.y;
|
||||
BattleCam_InitialPosZ = camera->auxPos.z;
|
||||
BattleCam_InitialPosX = camera->lookAt_obj_target.x;
|
||||
BattleCam_InitialPosY = camera->lookAt_obj_target.y;
|
||||
BattleCam_InitialPosZ = camera->lookAt_obj_target.z;
|
||||
BattleCam_MoveTimeTotal = BattleCam_MoveTimeLeft;
|
||||
}
|
||||
|
||||
@ -329,16 +329,16 @@ s32 CamPresetUpdate_F(Evt* script, s32 isInitialCall) {
|
||||
alpha /= BattleCam_MoveTimeTotal;
|
||||
}
|
||||
|
||||
x = camera->auxPos.x;
|
||||
y = camera->auxPos.y;
|
||||
z = camera->auxPos.z;
|
||||
x = camera->lookAt_obj_target.x;
|
||||
y = camera->lookAt_obj_target.y;
|
||||
z = camera->lookAt_obj_target.z;
|
||||
|
||||
camera->auxPos.x = LERP(BattleCam_InitialPosX, middlePosX, alpha);
|
||||
camera->auxPos.y = LERP(BattleCam_InitialPosY, middlePosY, alpha);
|
||||
camera->auxPos.z = LERP(BattleCam_InitialPosZ, middlePosZ, alpha);
|
||||
camera->lookAt_obj_target.x = LERP(BattleCam_InitialPosX, middlePosX, alpha);
|
||||
camera->lookAt_obj_target.y = LERP(BattleCam_InitialPosY, middlePosY, alpha);
|
||||
camera->lookAt_obj_target.z = LERP(BattleCam_InitialPosZ, middlePosZ, alpha);
|
||||
camera->auxBoomZOffset = LERP(BattleCam_InitialBoomZOffset, BattleCam_BoomZOffset, alpha) * 256.0f;
|
||||
|
||||
dist = dist2D(camera->auxPos.x, camera->auxPos.z, middlePosX, middlePosZ);
|
||||
dist = dist2D(camera->lookAt_obj_target.x, camera->lookAt_obj_target.z, middlePosX, middlePosZ);
|
||||
adjustedSize = (averageSize + targetAverageSize) / 8;
|
||||
extraLength = dist + adjustedSize - 64.0f;
|
||||
distToTarget = dist3D(x, y, z, targetX, targetY, targetZ);
|
||||
@ -515,9 +515,9 @@ s32 CamPresetUpdate_M(Evt* script, s32 isInitialCall) {
|
||||
}
|
||||
BattleCam_BoomLength += sizeX + sizeY;
|
||||
if (BattleCam_SetImmediately) {
|
||||
camera->auxPos.x = middlePosX;
|
||||
camera->auxPos.y = middlePosY;
|
||||
camera->auxPos.z = middlePosZ;
|
||||
camera->lookAt_obj_target.x = middlePosX;
|
||||
camera->lookAt_obj_target.y = middlePosY;
|
||||
camera->lookAt_obj_target.z = middlePosZ;
|
||||
camera->auxBoomLength = BattleCam_BoomLength;
|
||||
camera->auxBoomZOffset = BattleCam_BoomZOffset * 256;
|
||||
camera->auxBoomYaw = BattleCam_BoomYaw;
|
||||
@ -528,9 +528,9 @@ s32 CamPresetUpdate_M(Evt* script, s32 isInitialCall) {
|
||||
BattleCam_InitialBoomPitch = camera->auxBoomPitch;
|
||||
BattleCam_InitialBoomYaw = camera->auxBoomYaw;
|
||||
BattleCam_InitialBoomZOffset = camera->auxBoomZOffset / 256;
|
||||
BattleCam_InitialPosX = camera->auxPos.x;
|
||||
BattleCam_InitialPosY = camera->auxPos.y;
|
||||
BattleCam_InitialPosZ = camera->auxPos.z;
|
||||
BattleCam_InitialPosX = camera->lookAt_obj_target.x;
|
||||
BattleCam_InitialPosY = camera->lookAt_obj_target.y;
|
||||
BattleCam_InitialPosZ = camera->lookAt_obj_target.z;
|
||||
BattleCam_MoveTimeTotal = BattleCam_MoveTimeLeft;
|
||||
}
|
||||
|
||||
@ -543,16 +543,16 @@ s32 CamPresetUpdate_M(Evt* script, s32 isInitialCall) {
|
||||
alpha /= BattleCam_MoveTimeTotal;
|
||||
}
|
||||
|
||||
x = camera->auxPos.x;
|
||||
y = camera->auxPos.y;
|
||||
z = camera->auxPos.z;
|
||||
x = camera->lookAt_obj_target.x;
|
||||
y = camera->lookAt_obj_target.y;
|
||||
z = camera->lookAt_obj_target.z;
|
||||
|
||||
camera->auxPos.x = LERP(BattleCam_InitialPosX, middlePosX, alpha);
|
||||
camera->auxPos.y = LERP(BattleCam_InitialPosY, middlePosY, alpha);
|
||||
camera->auxPos.z = LERP(BattleCam_InitialPosZ, middlePosZ, alpha);
|
||||
camera->lookAt_obj_target.x = LERP(BattleCam_InitialPosX, middlePosX, alpha);
|
||||
camera->lookAt_obj_target.y = LERP(BattleCam_InitialPosY, middlePosY, alpha);
|
||||
camera->lookAt_obj_target.z = LERP(BattleCam_InitialPosZ, middlePosZ, alpha);
|
||||
camera->auxBoomZOffset = LERP(BattleCam_InitialBoomZOffset, BattleCam_BoomZOffset, alpha) * 256.0f;
|
||||
|
||||
dist = dist2D(camera->auxPos.x, camera->auxPos.z, middlePosX, middlePosZ);
|
||||
dist = dist2D(camera->lookAt_obj_target.x, camera->lookAt_obj_target.z, middlePosX, middlePosZ);
|
||||
extraLength = dist + averageSize + targetAverageSize - 64.0f;
|
||||
distToTarget = dist3D(x, y, z, targetX, targetY, targetZ);
|
||||
boomLength = BattleCam_BoomLength + extraLength + distToTarget * 0.5f;
|
||||
@ -617,7 +617,7 @@ s32 CamPresetUpdate_G(Evt* script, s32 isInitialCall) {
|
||||
middlePosY = y;
|
||||
}
|
||||
} else {
|
||||
middlePosY = camera->auxPos.y;
|
||||
middlePosY = camera->lookAt_obj_target.y;
|
||||
}
|
||||
middlePosZ = z + (targetZ - z) / 2;
|
||||
break;
|
||||
@ -651,7 +651,7 @@ s32 CamPresetUpdate_G(Evt* script, s32 isInitialCall) {
|
||||
middlePosY = y;
|
||||
}
|
||||
} else {
|
||||
middlePosY = camera->auxPos.y;
|
||||
middlePosY = camera->lookAt_obj_target.y;
|
||||
}
|
||||
middlePosZ = z + (targetZ - z) / 2;
|
||||
break;
|
||||
@ -686,7 +686,7 @@ s32 CamPresetUpdate_G(Evt* script, s32 isInitialCall) {
|
||||
middlePosY = y;
|
||||
}
|
||||
} else {
|
||||
middlePosY = camera->auxPos.y;
|
||||
middlePosY = camera->lookAt_obj_target.y;
|
||||
}
|
||||
middlePosZ = z + (targetZ - z) / 2;
|
||||
break;
|
||||
@ -716,9 +716,9 @@ s32 CamPresetUpdate_G(Evt* script, s32 isInitialCall) {
|
||||
}
|
||||
BattleCam_BoomLength += sizeX + sizeY;
|
||||
if (BattleCam_SetImmediately) {
|
||||
camera->auxPos.x = middlePosX;
|
||||
camera->auxPos.y = middlePosY;
|
||||
camera->auxPos.z = middlePosZ;
|
||||
camera->lookAt_obj_target.x = middlePosX;
|
||||
camera->lookAt_obj_target.y = middlePosY;
|
||||
camera->lookAt_obj_target.z = middlePosZ;
|
||||
camera->auxBoomLength = BattleCam_BoomLength;
|
||||
camera->auxBoomZOffset = BattleCam_BoomZOffset * 256;
|
||||
camera->auxBoomYaw = BattleCam_BoomYaw;
|
||||
@ -729,9 +729,9 @@ s32 CamPresetUpdate_G(Evt* script, s32 isInitialCall) {
|
||||
BattleCam_InitialBoomPitch = camera->auxBoomPitch;
|
||||
BattleCam_InitialBoomYaw = camera->auxBoomYaw;
|
||||
BattleCam_InitialBoomZOffset = camera->auxBoomZOffset / 256;
|
||||
BattleCam_InitialPosX = camera->auxPos.x;
|
||||
BattleCam_InitialPosY = camera->auxPos.y;
|
||||
BattleCam_InitialPosZ = camera->auxPos.z;
|
||||
BattleCam_InitialPosX = camera->lookAt_obj_target.x;
|
||||
BattleCam_InitialPosY = camera->lookAt_obj_target.y;
|
||||
BattleCam_InitialPosZ = camera->lookAt_obj_target.z;
|
||||
BattleCam_MoveTimeTotal = BattleCam_MoveTimeLeft;
|
||||
}
|
||||
|
||||
@ -744,13 +744,13 @@ s32 CamPresetUpdate_G(Evt* script, s32 isInitialCall) {
|
||||
alpha /= BattleCam_MoveTimeTotal;
|
||||
}
|
||||
|
||||
x = camera->auxPos.x;
|
||||
y = camera->auxPos.y;
|
||||
z = camera->auxPos.z;
|
||||
x = camera->lookAt_obj_target.x;
|
||||
y = camera->lookAt_obj_target.y;
|
||||
z = camera->lookAt_obj_target.z;
|
||||
|
||||
camera->auxPos.x = LERP(BattleCam_InitialPosX, middlePosX, alpha);
|
||||
camera->auxPos.y = LERP(BattleCam_InitialPosY, middlePosY, alpha);
|
||||
camera->auxPos.z = LERP(BattleCam_InitialPosZ, middlePosZ, alpha);
|
||||
camera->lookAt_obj_target.x = LERP(BattleCam_InitialPosX, middlePosX, alpha);
|
||||
camera->lookAt_obj_target.y = LERP(BattleCam_InitialPosY, middlePosY, alpha);
|
||||
camera->lookAt_obj_target.z = LERP(BattleCam_InitialPosZ, middlePosZ, alpha);
|
||||
camera->auxBoomZOffset = LERP(BattleCam_InitialBoomZOffset, BattleCam_BoomZOffset, alpha) * 256.0f;
|
||||
|
||||
camera->auxBoomLength = LERP(BattleCam_InitialBoomLength, BattleCam_BoomLength, alpha);
|
||||
@ -851,9 +851,9 @@ s32 CamPresetUpdate_I(Evt* script, s32 isInitialCall) {
|
||||
BattleCam_InitialBoomPitch = camera->auxBoomPitch;
|
||||
BattleCam_InitialBoomYaw = camera->auxBoomYaw;
|
||||
BattleCam_InitialBoomZOffset = camera->auxBoomZOffset / 256;
|
||||
BattleCam_InitialPosX = camera->auxPos.x;
|
||||
BattleCam_InitialPosY = camera->auxPos.y;
|
||||
BattleCam_InitialPosZ = camera->auxPos.z;
|
||||
BattleCam_InitialPosX = camera->lookAt_obj_target.x;
|
||||
BattleCam_InitialPosY = camera->lookAt_obj_target.y;
|
||||
BattleCam_InitialPosZ = camera->lookAt_obj_target.z;
|
||||
BattleCam_MoveTimeTotal = BattleCam_MoveTimeLeft;
|
||||
}
|
||||
|
||||
@ -867,12 +867,12 @@ s32 CamPresetUpdate_I(Evt* script, s32 isInitialCall) {
|
||||
}
|
||||
|
||||
if (BattleCam_ModeX) {
|
||||
camera->auxPos.x = LERP(BattleCam_InitialPosX, x + D_8029F2A7, alpha);
|
||||
camera->lookAt_obj_target.x = LERP(BattleCam_InitialPosX, x + D_8029F2A7, alpha);
|
||||
}
|
||||
if (BattleCam_ModeY != 0) {
|
||||
camera->auxPos.y = LERP(BattleCam_InitialPosY, y, alpha);
|
||||
camera->lookAt_obj_target.y = LERP(BattleCam_InitialPosY, y, alpha);
|
||||
}
|
||||
camera->auxPos.z = LERP(BattleCam_InitialPosZ, z, alpha);
|
||||
camera->lookAt_obj_target.z = LERP(BattleCam_InitialPosZ, z, alpha);
|
||||
|
||||
camera->auxBoomZOffset = LERP(BattleCam_InitialBoomZOffset, BattleCam_BoomZOffset, alpha) * 256.0f;
|
||||
extraLength = averageSize - 32.0f;
|
||||
@ -971,9 +971,9 @@ s32 CamPresetUpdate_H(Evt* script, s32 isInitialCall) {
|
||||
BattleCam_InitialBoomPitch = camera->auxBoomPitch;
|
||||
BattleCam_InitialBoomYaw = camera->auxBoomYaw;
|
||||
BattleCam_InitialBoomZOffset = camera->auxBoomZOffset / 256;
|
||||
BattleCam_InitialPosX = camera->auxPos.x;
|
||||
BattleCam_InitialPosY = camera->auxPos.y;
|
||||
BattleCam_InitialPosZ = camera->auxPos.z;
|
||||
BattleCam_InitialPosX = camera->lookAt_obj_target.x;
|
||||
BattleCam_InitialPosY = camera->lookAt_obj_target.y;
|
||||
BattleCam_InitialPosZ = camera->lookAt_obj_target.z;
|
||||
BattleCam_MoveTimeTotal = BattleCam_MoveTimeLeft;
|
||||
}
|
||||
|
||||
@ -986,9 +986,9 @@ s32 CamPresetUpdate_H(Evt* script, s32 isInitialCall) {
|
||||
alpha /= BattleCam_MoveTimeTotal;
|
||||
}
|
||||
|
||||
camera->auxPos.x = LERP(BattleCam_InitialPosX, x, alpha);
|
||||
camera->auxPos.y = LERP(BattleCam_InitialPosY, y, alpha);
|
||||
camera->auxPos.z = LERP(BattleCam_InitialPosZ, z, alpha);
|
||||
camera->lookAt_obj_target.x = LERP(BattleCam_InitialPosX, x, alpha);
|
||||
camera->lookAt_obj_target.y = LERP(BattleCam_InitialPosY, y, alpha);
|
||||
camera->lookAt_obj_target.z = LERP(BattleCam_InitialPosZ, z, alpha);
|
||||
|
||||
camera->auxBoomZOffset = LERP(BattleCam_InitialBoomZOffset, BattleCam_BoomZOffset, alpha) * 256.0f;
|
||||
extraLength = averageSize - 32.0f;
|
||||
@ -1019,9 +1019,9 @@ ApiStatus CamPresetUpdate_N(Evt* script, s32 isInitialCall) {
|
||||
BattleCam_InitialBoomPitch = camera->auxBoomPitch;
|
||||
BattleCam_InitialBoomYaw = camera->auxBoomYaw;
|
||||
BattleCam_InitialBoomZOffset = camera->auxBoomZOffset / 256;
|
||||
BattleCam_InitialPosX = camera->auxPos.x;
|
||||
BattleCam_InitialPosY = camera->auxPos.y;
|
||||
BattleCam_InitialPosZ = camera->auxPos.z;
|
||||
BattleCam_InitialPosX = camera->lookAt_obj_target.x;
|
||||
BattleCam_InitialPosY = camera->lookAt_obj_target.y;
|
||||
BattleCam_InitialPosZ = camera->lookAt_obj_target.z;
|
||||
BattleCam_MoveTimeTotal = BattleCam_MoveTimeLeft;
|
||||
}
|
||||
|
||||
@ -1034,9 +1034,9 @@ ApiStatus CamPresetUpdate_N(Evt* script, s32 isInitialCall) {
|
||||
alpha /= BattleCam_MoveTimeTotal;
|
||||
}
|
||||
|
||||
camera->auxPos.x = LERP(BattleCam_InitialPosX, x, alpha);
|
||||
camera->auxPos.y = LERP(BattleCam_InitialPosY, y, alpha);
|
||||
camera->auxPos.z = LERP(BattleCam_InitialPosZ, z, alpha);
|
||||
camera->lookAt_obj_target.x = LERP(BattleCam_InitialPosX, x, alpha);
|
||||
camera->lookAt_obj_target.y = LERP(BattleCam_InitialPosY, y, alpha);
|
||||
camera->lookAt_obj_target.z = LERP(BattleCam_InitialPosZ, z, alpha);
|
||||
camera->auxBoomZOffset = LERP(BattleCam_InitialBoomZOffset, BattleCam_BoomZOffset, alpha) * 256.0f;
|
||||
camera->auxBoomLength = LERP(BattleCam_InitialBoomLength, BattleCam_BoomLength, alpha);
|
||||
camera->auxBoomYaw = LERP(BattleCam_InitialBoomYaw, BattleCam_BoomYaw, alpha);
|
||||
@ -1064,9 +1064,9 @@ ApiStatus CamPresetUpdate_C(Evt* script, s32 isInitialCall) {
|
||||
BattleCam_BoomPitch = 8;
|
||||
BattleCam_BoomZOffset = 0;
|
||||
if (BattleCam_SetImmediately) {
|
||||
camera->auxPos.x = BattleCam_PosX;
|
||||
camera->auxPos.y = BattleCam_PosY;
|
||||
camera->auxPos.z = BattleCam_PosZ;
|
||||
camera->lookAt_obj_target.x = BattleCam_PosX;
|
||||
camera->lookAt_obj_target.y = BattleCam_PosY;
|
||||
camera->lookAt_obj_target.z = BattleCam_PosZ;
|
||||
camera->auxBoomZOffset = BattleCam_BoomZOffset;
|
||||
camera->auxBoomYaw = BattleCam_BoomYaw;
|
||||
camera->auxBoomPitch = BattleCam_BoomPitch;
|
||||
@ -1076,9 +1076,9 @@ ApiStatus CamPresetUpdate_C(Evt* script, s32 isInitialCall) {
|
||||
BattleCam_InitialBoomPitch = camera->auxBoomPitch;
|
||||
BattleCam_InitialBoomYaw = camera->auxBoomYaw;
|
||||
BattleCam_InitialBoomZOffset = camera->auxBoomZOffset / 256;
|
||||
BattleCam_InitialPosX = camera->auxPos.x;
|
||||
BattleCam_InitialPosY = camera->auxPos.y;
|
||||
BattleCam_InitialPosZ = camera->auxPos.z;
|
||||
BattleCam_InitialPosX = camera->lookAt_obj_target.x;
|
||||
BattleCam_InitialPosY = camera->lookAt_obj_target.y;
|
||||
BattleCam_InitialPosZ = camera->lookAt_obj_target.z;
|
||||
BattleCam_MoveTimeTotal = BattleCam_MoveTimeLeft;
|
||||
}
|
||||
|
||||
@ -1095,9 +1095,9 @@ ApiStatus CamPresetUpdate_C(Evt* script, s32 isInitialCall) {
|
||||
alpha /= BattleCam_MoveTimeTotal;
|
||||
}
|
||||
|
||||
camera->auxPos.x = LERP(BattleCam_InitialPosX, x, alpha);
|
||||
camera->auxPos.y = LERP(BattleCam_InitialPosY, y, alpha);
|
||||
camera->auxPos.z = LERP(BattleCam_InitialPosZ, z, alpha);
|
||||
camera->lookAt_obj_target.x = LERP(BattleCam_InitialPosX, x, alpha);
|
||||
camera->lookAt_obj_target.y = LERP(BattleCam_InitialPosY, y, alpha);
|
||||
camera->lookAt_obj_target.z = LERP(BattleCam_InitialPosZ, z, alpha);
|
||||
camera->auxBoomZOffset = LERP(BattleCam_InitialBoomZOffset, BattleCam_BoomZOffset, alpha) * 256.0f;
|
||||
camera->auxBoomLength = LERP(BattleCam_InitialBoomLength, BattleCam_BoomLength, alpha);
|
||||
camera->auxBoomYaw = LERP(BattleCam_InitialBoomYaw, BattleCam_BoomYaw, alpha);
|
||||
@ -1128,9 +1128,9 @@ ApiStatus CamPresetUpdate_D(Evt* script, s32 isInitialCall) {
|
||||
BattleCam_InitialBoomPitch = camera->auxBoomPitch;
|
||||
BattleCam_InitialBoomYaw = camera->auxBoomYaw;
|
||||
BattleCam_InitialBoomZOffset = camera->auxBoomZOffset / 256;
|
||||
BattleCam_InitialPosX = camera->auxPos.x;
|
||||
BattleCam_InitialPosY = camera->auxPos.y;
|
||||
BattleCam_InitialPosZ = camera->auxPos.z;
|
||||
BattleCam_InitialPosX = camera->lookAt_obj_target.x;
|
||||
BattleCam_InitialPosY = camera->lookAt_obj_target.y;
|
||||
BattleCam_InitialPosZ = camera->lookAt_obj_target.z;
|
||||
BattleCam_MoveTimeTotal = BattleCam_MoveTimeLeft;
|
||||
}
|
||||
|
||||
@ -1147,9 +1147,9 @@ ApiStatus CamPresetUpdate_D(Evt* script, s32 isInitialCall) {
|
||||
alpha /= BattleCam_MoveTimeTotal;
|
||||
}
|
||||
|
||||
camera->auxPos.x = LERP(BattleCam_InitialPosX, x, alpha);
|
||||
camera->auxPos.y = LERP(BattleCam_InitialPosY, y, alpha);
|
||||
camera->auxPos.z = LERP(BattleCam_InitialPosZ, z, alpha);
|
||||
camera->lookAt_obj_target.x = LERP(BattleCam_InitialPosX, x, alpha);
|
||||
camera->lookAt_obj_target.y = LERP(BattleCam_InitialPosY, y, alpha);
|
||||
camera->lookAt_obj_target.z = LERP(BattleCam_InitialPosZ, z, alpha);
|
||||
camera->auxBoomZOffset = LERP(BattleCam_InitialBoomZOffset, BattleCam_BoomZOffset, alpha) * 256.0f;
|
||||
camera->auxBoomLength = LERP(BattleCam_InitialBoomLength, BattleCam_BoomLength, alpha);
|
||||
camera->auxBoomYaw = LERP(BattleCam_InitialBoomYaw, BattleCam_BoomYaw, alpha);
|
||||
@ -1171,7 +1171,7 @@ ApiStatus CamPresetUpdate_E(Evt* script, s32 isInitialCall) {
|
||||
|
||||
if (isInitialCall) {
|
||||
BattleCam_PosX = 35.0f;
|
||||
BattleCam_PosY = camera->auxPos.y;
|
||||
BattleCam_PosY = camera->lookAt_obj_target.y;
|
||||
if (BattleCam_PosY < 60.0f) {
|
||||
BattleCam_PosY = 60.0f;
|
||||
}
|
||||
@ -1182,9 +1182,9 @@ ApiStatus CamPresetUpdate_E(Evt* script, s32 isInitialCall) {
|
||||
BattleCam_InitialBoomPitch = camera->auxBoomPitch;
|
||||
BattleCam_InitialBoomYaw = camera->auxBoomYaw;
|
||||
BattleCam_InitialBoomZOffset = camera->auxBoomZOffset / 256;
|
||||
BattleCam_InitialPosX = camera->auxPos.x;
|
||||
BattleCam_InitialPosY = camera->auxPos.y;
|
||||
BattleCam_InitialPosZ = camera->auxPos.z;
|
||||
BattleCam_InitialPosX = camera->lookAt_obj_target.x;
|
||||
BattleCam_InitialPosY = camera->lookAt_obj_target.y;
|
||||
BattleCam_InitialPosZ = camera->lookAt_obj_target.z;
|
||||
BattleCam_MoveTimeTotal = BattleCam_MoveTimeLeft;
|
||||
}
|
||||
|
||||
@ -1201,9 +1201,9 @@ ApiStatus CamPresetUpdate_E(Evt* script, s32 isInitialCall) {
|
||||
alpha /= BattleCam_MoveTimeTotal;
|
||||
}
|
||||
|
||||
camera->auxPos.x = LERP(BattleCam_InitialPosX, x, alpha);
|
||||
camera->auxPos.y = LERP(BattleCam_InitialPosY, y, alpha);
|
||||
camera->auxPos.z = LERP(BattleCam_InitialPosZ, z, alpha);
|
||||
camera->lookAt_obj_target.x = LERP(BattleCam_InitialPosX, x, alpha);
|
||||
camera->lookAt_obj_target.y = LERP(BattleCam_InitialPosY, y, alpha);
|
||||
camera->lookAt_obj_target.z = LERP(BattleCam_InitialPosZ, z, alpha);
|
||||
camera->auxBoomZOffset = LERP(BattleCam_InitialBoomZOffset, BattleCam_BoomZOffset, alpha) * 256.0f;
|
||||
camera->auxBoomLength = LERP(BattleCam_InitialBoomLength, BattleCam_BoomLength, alpha);
|
||||
camera->auxBoomYaw = LERP(BattleCam_InitialBoomYaw, BattleCam_BoomYaw, alpha);
|
||||
@ -1225,17 +1225,17 @@ ApiStatus CamPresetUpdate_J(Evt* script, s32 isInitialCall) {
|
||||
|
||||
if (isInitialCall) {
|
||||
if (BattleCam_SetImmediately) {
|
||||
BattleCam_PosX = camera->auxPos.x;
|
||||
BattleCam_PosY = camera->auxPos.y;
|
||||
BattleCam_PosZ = camera->auxPos.z;
|
||||
BattleCam_PosX = camera->lookAt_obj_target.x;
|
||||
BattleCam_PosY = camera->lookAt_obj_target.y;
|
||||
BattleCam_PosZ = camera->lookAt_obj_target.z;
|
||||
}
|
||||
BattleCam_InitialBoomLength = camera->auxBoomLength;
|
||||
BattleCam_InitialBoomPitch = camera->auxBoomPitch;
|
||||
BattleCam_InitialBoomYaw = camera->auxBoomYaw;
|
||||
BattleCam_InitialBoomZOffset = camera->auxBoomZOffset / 256;
|
||||
BattleCam_InitialPosX = camera->auxPos.x;
|
||||
BattleCam_InitialPosY = camera->auxPos.y;
|
||||
BattleCam_InitialPosZ = camera->auxPos.z;
|
||||
BattleCam_InitialPosX = camera->lookAt_obj_target.x;
|
||||
BattleCam_InitialPosY = camera->lookAt_obj_target.y;
|
||||
BattleCam_InitialPosZ = camera->lookAt_obj_target.z;
|
||||
BattleCam_MoveTimeTotal = BattleCam_MoveTimeLeft;
|
||||
}
|
||||
|
||||
@ -1252,9 +1252,9 @@ ApiStatus CamPresetUpdate_J(Evt* script, s32 isInitialCall) {
|
||||
alpha /= BattleCam_MoveTimeTotal;
|
||||
}
|
||||
|
||||
camera->auxPos.x = LERP(BattleCam_InitialPosX, x, alpha);
|
||||
camera->auxPos.y = LERP(BattleCam_InitialPosY, y, alpha);
|
||||
camera->auxPos.z = LERP(BattleCam_InitialPosZ, z, alpha);
|
||||
camera->lookAt_obj_target.x = LERP(BattleCam_InitialPosX, x, alpha);
|
||||
camera->lookAt_obj_target.y = LERP(BattleCam_InitialPosY, y, alpha);
|
||||
camera->lookAt_obj_target.z = LERP(BattleCam_InitialPosZ, z, alpha);
|
||||
camera->auxBoomZOffset = LERP(BattleCam_InitialBoomZOffset, BattleCam_BoomZOffset, alpha) * 256.0f;
|
||||
camera->auxBoomLength = LERP(BattleCam_InitialBoomLength, BattleCam_BoomLength, alpha);
|
||||
camera->auxBoomYaw = LERP(BattleCam_InitialBoomYaw, BattleCam_BoomYaw, alpha);
|
||||
@ -1280,9 +1280,9 @@ ApiStatus CamPresetUpdate_K(Evt* script, s32 isInitialCall) {
|
||||
s32 actorClass;
|
||||
|
||||
if (isInitialCall) {
|
||||
BattleCam_PosX = camera->auxPos.x;
|
||||
BattleCam_PosY = camera->auxPos.y;
|
||||
BattleCam_PosZ = camera->auxPos.z;
|
||||
BattleCam_PosX = camera->lookAt_obj_target.x;
|
||||
BattleCam_PosY = camera->lookAt_obj_target.y;
|
||||
BattleCam_PosZ = camera->lookAt_obj_target.z;
|
||||
D_8029F288 = camera->auxBoomLength;
|
||||
BattleCam_InitialBoomYaw = camera->auxBoomYaw;
|
||||
BattleCam_InitialBoomPitch = camera->auxBoomPitch;
|
||||
@ -1323,13 +1323,13 @@ ApiStatus CamPresetUpdate_K(Evt* script, s32 isInitialCall) {
|
||||
y = BattleCam_PosY;
|
||||
}
|
||||
|
||||
deltaY = y - camera->auxPos.y;
|
||||
deltaY = y - camera->lookAt_obj_target.y;
|
||||
if (fabsf(deltaY) < 0.01) {
|
||||
if (deltaY != 0.0f) {
|
||||
camera->auxPos.y = y;
|
||||
camera->lookAt_obj_target.y = y;
|
||||
}
|
||||
} else {
|
||||
camera->auxPos.y += deltaY / 5.0f;
|
||||
camera->lookAt_obj_target.y += deltaY / 5.0f;
|
||||
}
|
||||
|
||||
return ApiStatus_BLOCK;
|
||||
@ -1374,9 +1374,9 @@ ApiStatus CamPresetUpdate_L(Evt* script, s32 isInitialCall) {
|
||||
}
|
||||
|
||||
if (isInitialCall) {
|
||||
BattleCam_PosX = camera->auxPos.x;
|
||||
BattleCam_PosY = camera->auxPos.y;
|
||||
BattleCam_PosZ = camera->auxPos.z;
|
||||
BattleCam_PosX = camera->lookAt_obj_target.x;
|
||||
BattleCam_PosY = camera->lookAt_obj_target.y;
|
||||
BattleCam_PosZ = camera->lookAt_obj_target.z;
|
||||
D_8029F288 = camera->auxBoomLength;
|
||||
BattleCam_InitialBoomYaw = camera->auxBoomYaw;
|
||||
BattleCam_InitialBoomPitch = camera->auxBoomPitch;
|
||||
@ -1401,31 +1401,31 @@ ApiStatus CamPresetUpdate_L(Evt* script, s32 isInitialCall) {
|
||||
x += 25.0f;
|
||||
}
|
||||
|
||||
delta = x - camera->auxPos.x;
|
||||
delta = x - camera->lookAt_obj_target.x;
|
||||
if (fabsf(delta) < 0.01) {
|
||||
if (delta != 0.0f) {
|
||||
camera->auxPos.x = x;
|
||||
camera->lookAt_obj_target.x = x;
|
||||
}
|
||||
} else {
|
||||
camera->auxPos.x += delta / 5.0f;
|
||||
camera->lookAt_obj_target.x += delta / 5.0f;
|
||||
}
|
||||
|
||||
delta = y - camera->auxPos.y;
|
||||
delta = y - camera->lookAt_obj_target.y;
|
||||
if (fabsf(delta) < 0.01) {
|
||||
if (delta != 0.0f) {
|
||||
camera->auxPos.y = y;
|
||||
camera->lookAt_obj_target.y = y;
|
||||
}
|
||||
} else {
|
||||
camera->auxPos.y += delta / 5.0f;
|
||||
camera->lookAt_obj_target.y += delta / 5.0f;
|
||||
}
|
||||
|
||||
delta = z - camera->auxPos.z;
|
||||
delta = z - camera->lookAt_obj_target.z;
|
||||
if (fabsf(delta) < 0.01) {
|
||||
if (delta != 0.0f) {
|
||||
camera->auxPos.z = z;
|
||||
camera->lookAt_obj_target.z = z;
|
||||
}
|
||||
} else {
|
||||
camera->auxPos.z += delta / 5.0f;
|
||||
camera->lookAt_obj_target.z += delta / 5.0f;
|
||||
}
|
||||
|
||||
return ApiStatus_BLOCK;
|
||||
@ -1439,7 +1439,7 @@ ApiStatus func_8024CE9C(Evt* script, s32 isInitialCall) {
|
||||
camera->auxBoomZOffset = 0;
|
||||
BattleCam_BoomYaw = BattleCam_BoomZOffset = 0;
|
||||
BattleCam_IsFrozen = FALSE;
|
||||
D_8029F288 = camera->unk_1C;
|
||||
D_8029F288 = camera->auxPitch;
|
||||
BattleCam_InitialBoomLength = camera->auxBoomLength;
|
||||
BattleCam_InitialBoomPitch = camera->auxBoomPitch;
|
||||
BattleCam_InitialBoomZOffset = BattleCam_InitialBoomYaw = 0.0f;
|
||||
@ -2212,9 +2212,9 @@ void btl_cam_set_params(s16 arg0, s16 boomLength, s16 arg2, s16 boomPitch, s32 b
|
||||
Camera* camera = &gCameras[CAM_BATTLE];
|
||||
|
||||
if (!BattleCam_IsFrozen) {
|
||||
camera->unk_1C = arg0;
|
||||
camera->auxPitch = arg0;
|
||||
camera->auxBoomLength = boomLength;
|
||||
camera->unk_20 = arg2;
|
||||
camera->lookAt_dist = arg2;
|
||||
camera->auxBoomPitch = boomPitch;
|
||||
camera->auxBoomYaw = boomYaw;
|
||||
camera->auxBoomZOffset = boomZOffset * 256;
|
||||
@ -2246,9 +2246,9 @@ void btl_cam_set_pos(f32 x, f32 y, f32 z) {
|
||||
Camera* camera = &gCameras[CAM_BATTLE];
|
||||
|
||||
if (!BattleCam_IsFrozen) {
|
||||
camera->auxPos.x = x;
|
||||
camera->auxPos.y = y;
|
||||
camera->auxPos.z = z;
|
||||
camera->lookAt_obj_target.x = x;
|
||||
camera->lookAt_obj_target.y = y;
|
||||
camera->lookAt_obj_target.z = z;
|
||||
}
|
||||
}
|
||||
|
||||
@ -2352,13 +2352,13 @@ ApiStatus SetBattleCamParam(Evt* script, s32 isInitialCall) {
|
||||
|
||||
switch (mode) {
|
||||
case AUX_CAM_PARAM_1:
|
||||
camera->unk_1C = val;
|
||||
camera->auxPitch = val;
|
||||
break;
|
||||
case AUX_CAM_BOOM_LENGTH:
|
||||
camera->auxBoomLength = val;
|
||||
break;
|
||||
case AUX_CAM_PARAM_3:
|
||||
camera->unk_20 = val;
|
||||
camera->lookAt_dist = val;
|
||||
break;
|
||||
case AUX_CAM_BOOM_PITCH:
|
||||
camera->auxBoomPitch = val;
|
||||
@ -2387,9 +2387,9 @@ ApiStatus SetBattleCamParams(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
camera->unk_1C = evt_get_variable(script, *args++);
|
||||
camera->auxPitch = evt_get_variable(script, *args++);
|
||||
camera->auxBoomLength = evt_get_variable(script, *args++);
|
||||
camera->unk_20 = evt_get_variable(script, *args++);
|
||||
camera->lookAt_dist = evt_get_variable(script, *args++);
|
||||
camera->auxBoomPitch = evt_get_variable(script, *args++);
|
||||
camera->auxBoomYaw = evt_get_variable(script, *args++);
|
||||
camera->auxBoomZOffset = evt_get_variable(script, *args++) * 256;
|
||||
@ -2420,9 +2420,9 @@ ApiStatus SetBattleCamPos(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
camera->auxPos.x = evt_get_variable(script, *args++);
|
||||
camera->auxPos.y = evt_get_variable(script, *args++);
|
||||
camera->auxPos.z = evt_get_variable(script, *args++);
|
||||
camera->lookAt_obj_target.x = evt_get_variable(script, *args++);
|
||||
camera->lookAt_obj_target.y = evt_get_variable(script, *args++);
|
||||
camera->lookAt_obj_target.z = evt_get_variable(script, *args++);
|
||||
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
@ -694,7 +694,7 @@ ApiStatus SetSelfEnemyFlagBits(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus SyncOverrideEnemyPos(Evt* script, s32 isInitialCall) {
|
||||
ApiStatus SelfEnemyOverrideSyncPos(Evt* script, s32 isInitialCall) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
Enemy* owner = script->owner1.enemy;
|
||||
Npc* npc = get_npc_unsafe(script->owner2.npcID);
|
||||
|
@ -409,7 +409,7 @@ void entity_Chest_enable_player_input(Entity* entity) {
|
||||
void entity_GiantChest_await_got_item(Entity* entity) {
|
||||
ChestData* data = entity->dataBuf.chest;
|
||||
if (data->itemID != 0) {
|
||||
if (data->unk_30 != 0) {
|
||||
if (data->gotItemDone) {
|
||||
exec_entity_commandlist(entity);
|
||||
remove_item_entity_by_index(data->itemEntityIndex);
|
||||
suggest_player_anim_clearUnkFlag(ANIM_Mario_10002);
|
||||
|
@ -55,7 +55,7 @@ void func_802BB000_E2D930(Entity* entity) {
|
||||
|
||||
if ((entity->collisionFlags & ENTITY_COLLISION_PLAYER_TOUCH_FLOOR) && !is_picking_up_item()) {
|
||||
if (playerStatus->actionState == ACTION_STATE_RIDE) {
|
||||
playerStatus->animFlags |= PA_FLAGS_4;
|
||||
playerStatus->animFlags |= PA_FLAGS_INTERRUPT_USE_PARTNER;
|
||||
} else if (playerStatus->actionState != ACTION_STATE_USE_SPINNING_FLOWER) {
|
||||
D_802BCE34 = data->unk_28;
|
||||
D_802BCE30 = data->unk_2A;
|
||||
@ -275,7 +275,7 @@ void entity_CymbalPlant_idle(Entity* entity) {
|
||||
case 0:
|
||||
if (entity->collisionFlags & ENTITY_COLLISION_PLAYER_TOUCH_FLOOR) {
|
||||
if (partnerActionStatus->actingPartner != 0) {
|
||||
playerStatus->animFlags |= PA_FLAGS_4;
|
||||
playerStatus->animFlags |= PA_FLAGS_INTERRUPT_USE_PARTNER;
|
||||
}
|
||||
func_800EF300();
|
||||
playerStatus->animFlags |= PA_FLAGS_40000;
|
||||
|
@ -95,7 +95,7 @@ void func_802BC050_E2E980(Entity* entity) {
|
||||
|
||||
if (entity->collisionFlags & ENTITY_COLLISION_PLAYER_TOUCH_FLOOR) {
|
||||
Entity* resetMunchlesia;
|
||||
gPlayerStatus.animFlags |= PA_FLAGS_4;
|
||||
gPlayerStatus.animFlags |= PA_FLAGS_INTERRUPT_USE_PARTNER;
|
||||
func_800EF300();
|
||||
resetMunchlesia = get_entity_by_index(entity->dataBuf.munchlesia->unk_00);
|
||||
exec_entity_commandlist(entity);
|
||||
|
@ -280,7 +280,7 @@ void entity_Tweester_idle(Entity* entity) {
|
||||
fabs(dist2D(entity->position.x, entity->position.z, playerStatus->position.x, playerStatus->position.z)) <= 50.0
|
||||
) {
|
||||
TweesterTouchingPlayer = entity;
|
||||
playerStatus->animFlags |= PA_FLAGS_4;
|
||||
playerStatus->animFlags |= PA_FLAGS_INTERRUPT_USE_PARTNER;
|
||||
set_action_state(ACTION_STATE_USE_TWEESTER);
|
||||
}
|
||||
}
|
||||
|
@ -52,7 +52,7 @@ ApiStatus SetCamPerspective(Evt* script, s32 isInitialCall) {
|
||||
|
||||
camera->farClip = farClip;
|
||||
camera->updateMode = mode;
|
||||
camera->unk_06 = 1;
|
||||
camera->unk_06 = TRUE;
|
||||
camera->changingMap = TRUE;
|
||||
camera->vfov = vfov;
|
||||
camera->nearClip = nearClip;
|
||||
@ -66,7 +66,7 @@ ApiStatus func_802CA90C(Evt* script, s32 isInitialCall) {
|
||||
Camera* camera = &gCameras[id];
|
||||
|
||||
camera->updateMode = mode;
|
||||
camera->unk_06 = 0;
|
||||
camera->unk_06 = FALSE;
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
@ -80,23 +80,23 @@ ApiStatus func_802CA988(Evt* script, s32 isInitialCall) {
|
||||
f32 dx, dy, dz;
|
||||
|
||||
gCameras[id].updateMode = 2;
|
||||
gCameras[id].unk_06 = 0;
|
||||
gCameras[id].unk_1C = -round(gCameras[id].currentPitch);
|
||||
gCameras[id].unk_06 = FALSE;
|
||||
gCameras[id].auxPitch = -round(gCameras[id].currentPitch);
|
||||
gCameras[id].auxBoomLength = -gCameras[id].currentBlendedYawNegated;
|
||||
|
||||
dx = gCameras[id].lookAt_obj.x - gCameras[id].lookAt_eye.x;
|
||||
dy = gCameras[id].lookAt_obj.y - gCameras[id].lookAt_eye.y;
|
||||
dz = gCameras[id].lookAt_obj.z - gCameras[id].lookAt_eye.z;
|
||||
|
||||
gCameras[id].unk_20 = round(sqrtf(SQ(dx) + SQ(dy) + SQ(dz)));
|
||||
gCameras[id].lookAt_dist = round(sqrtf(SQ(dx) + SQ(dy) + SQ(dz)));
|
||||
gCameras[id].auxBoomPitch = 0;
|
||||
gCameras[id].auxPos.x = gCameras[id].lookAt_obj.x;
|
||||
gCameras[id].auxPos.y = gCameras[id].lookAt_obj.y;
|
||||
gCameras[id].auxPos.z = gCameras[id].lookAt_obj.z;
|
||||
gCameras[id].lookAt_obj_target.x = gCameras[id].lookAt_obj.x;
|
||||
gCameras[id].lookAt_obj_target.y = gCameras[id].lookAt_obj.y;
|
||||
gCameras[id].lookAt_obj_target.z = gCameras[id].lookAt_obj.z;
|
||||
|
||||
evt_set_variable(script, outVar1, gCameras[id].unk_1C);
|
||||
evt_set_variable(script, outVar1, gCameras[id].auxPitch);
|
||||
evt_set_variable(script, outVar2, gCameras[id].auxBoomLength);
|
||||
evt_set_variable(script, outVar3, gCameras[id].unk_20);
|
||||
evt_set_variable(script, outVar3, gCameras[id].lookAt_dist);
|
||||
evt_set_variable(script, outVar4, gCameras[id].auxBoomPitch);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
@ -123,9 +123,9 @@ ApiStatus func_802CABE8(Evt* script, s32 isInitialCall) {
|
||||
Camera* camera = &gCameras[id];
|
||||
|
||||
camera->auxBoomPitch = value4;
|
||||
camera->unk_1C = value1;
|
||||
camera->auxPitch = value1;
|
||||
camera->auxBoomLength = value2;
|
||||
camera->unk_20 = value3;
|
||||
camera->lookAt_dist = value3;
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
@ -167,9 +167,9 @@ ApiStatus func_802CAE50(Evt* script, s32 isInitialCall) {
|
||||
s32 value3 = evt_get_variable(script, *args++);
|
||||
Camera* camera = &gCameras[id];
|
||||
|
||||
camera->auxPos.x = value1;
|
||||
camera->auxPos.y = value2;
|
||||
camera->auxPos.z = value3;
|
||||
camera->lookAt_obj_target.x = value1;
|
||||
camera->lookAt_obj_target.y = value2;
|
||||
camera->lookAt_obj_target.z = value3;
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
@ -216,9 +216,9 @@ ApiStatus InterpCamTargetPos(Evt* script, s32 isInitialCall) {
|
||||
|
||||
switch (data->useTarget) {
|
||||
case 0:
|
||||
data->vel.x = (posX - cam->auxPos.x) / data->time;
|
||||
data->vel.y = (posY - cam->auxPos.y) / data->time;
|
||||
data->vel.z = (posZ - cam->auxPos.z) / data->time;
|
||||
data->vel.x = (posX - cam->lookAt_obj_target.x) / data->time;
|
||||
data->vel.y = (posY - cam->lookAt_obj_target.y) / data->time;
|
||||
data->vel.z = (posZ - cam->lookAt_obj_target.z) / data->time;
|
||||
break;
|
||||
case 1:
|
||||
data->vel.x = (posX - cam->targetPos.x) / data->time;
|
||||
@ -232,9 +232,9 @@ ApiStatus InterpCamTargetPos(Evt* script, s32 isInitialCall) {
|
||||
cam = data->cam;
|
||||
switch (data->useTarget) {
|
||||
case 0:
|
||||
cam->auxPos.x += data->vel.x;
|
||||
cam->auxPos.y += data->vel.y;
|
||||
cam->auxPos.z += data->vel.z;
|
||||
cam->lookAt_obj_target.x += data->vel.x;
|
||||
cam->lookAt_obj_target.y += data->vel.y;
|
||||
cam->lookAt_obj_target.z += data->vel.z;
|
||||
break;
|
||||
case 1:
|
||||
cam->targetPos.x += data->vel.x;
|
||||
|
@ -208,7 +208,7 @@ ApiStatus SetMotionBlurParams(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus ShowSweat(Evt* script) {
|
||||
ApiStatus ShowSweat(Evt* script, s32 isInitialCall) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 npcID = evt_get_variable(script, *args++);
|
||||
s32 type = evt_get_variable(script, *args++);
|
||||
|
@ -2,11 +2,6 @@
|
||||
#include "model.h"
|
||||
#include "evt.h"
|
||||
|
||||
typedef struct LavaReset {
|
||||
/* 0x00 */ s32 colliderID;
|
||||
/* 0x04 */ Vec3f pos;
|
||||
} LavaReset; // size = 0x10;
|
||||
|
||||
extern LavaReset* gLavaResetList;
|
||||
extern s32 LastSafeFloor;
|
||||
|
||||
@ -221,17 +216,17 @@ ApiStatus SetGroupEnabled(Evt* script, s32 isInitialCall) {
|
||||
|
||||
ApiStatus SetTexPanOffset(Evt* script, s32 isInitialCall) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
Bytecode var1 = evt_get_variable(script, *args++);
|
||||
Bytecode var2 = evt_get_variable(script, *args++);
|
||||
Bytecode var3 = evt_get_variable(script, *args++);
|
||||
Bytecode var4 = evt_get_variable(script, *args++);
|
||||
Bytecode texPanner = evt_get_variable(script, *args++);
|
||||
Bytecode tileSelect = evt_get_variable(script, *args++);
|
||||
Bytecode u = evt_get_variable(script, *args++);
|
||||
Bytecode v = evt_get_variable(script, *args++);
|
||||
|
||||
if (var2 == 0) {
|
||||
set_main_pan_u(var1, var3);
|
||||
set_main_pan_v(var1, var4);
|
||||
if (tileSelect == 0) {
|
||||
set_main_pan_u(texPanner, u);
|
||||
set_main_pan_v(texPanner, v);
|
||||
} else {
|
||||
set_aux_pan_u(var1, var3);
|
||||
set_aux_pan_v(var1, var4);
|
||||
set_aux_pan_u(texPanner, u);
|
||||
set_aux_pan_v(texPanner, v);
|
||||
}
|
||||
|
||||
return ApiStatus_DONE2;
|
||||
@ -359,9 +354,10 @@ ApiStatus SetTransformGroupEnabled(Evt* script, s32 isInitialCall) {
|
||||
|
||||
ApiStatus TranslateGroup(Evt* script, s32 isInitialCall) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 var1 = evt_get_variable(script, *args);
|
||||
s32 index = get_transform_group_index(var1);
|
||||
s32 modelIndex = evt_get_variable(script, *args);
|
||||
s32 index = get_transform_group_index(modelIndex);
|
||||
ModelTransformGroup* transformGroup;
|
||||
Matrix4f mtx;
|
||||
f32 x, y, z;
|
||||
|
||||
if (index == -1) {
|
||||
@ -382,8 +378,6 @@ ApiStatus TranslateGroup(Evt* script, s32 isInitialCall) {
|
||||
guTranslateF(transformGroup->matrixB, x, y, z);
|
||||
transformGroup->flags |= (MODEL_TRANSFORM_GROUP_FLAGS_400 | MODEL_TRANSFORM_GROUP_FLAGS_1000);
|
||||
} else {
|
||||
Matrix4f mtx;
|
||||
|
||||
guTranslateF(mtx, x, y, z);
|
||||
guMtxCatF(mtx, transformGroup->matrixB, transformGroup->matrixB);
|
||||
}
|
||||
|
@ -785,10 +785,10 @@ ApiStatus func_802D2B50(void) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus func_802D2B6C(Evt* script, s32 isInitialCall) {
|
||||
ApiStatus InterruptUsePartner(Evt* script, s32 isInitialCall) {
|
||||
PlayerStatus* playerStatus = &gPlayerStatus;
|
||||
|
||||
playerStatus->animFlags |= PA_FLAGS_4;
|
||||
playerStatus->animFlags |= PA_FLAGS_INTERRUPT_USE_PARTNER;
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
@ -805,37 +805,38 @@ ApiStatus Disable8bitMario(Evt* script, s32 isInitialCall) {
|
||||
playerStatus->colliderDiameter = 26;
|
||||
playerStatus->animFlags |= PA_FLAGS_8BIT_MARIO
|
||||
| PA_FLAGS_40000
|
||||
| PA_FLAGS_4;
|
||||
| PA_FLAGS_INTERRUPT_USE_PARTNER;
|
||||
}
|
||||
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus func_802D2C14(Evt* script, s32 isInitialCall) {
|
||||
func_800EF3D4(evt_get_variable(script, *script->ptrReadPos));
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
|
||||
func_800EF3D4(evt_get_variable(script, *args++));
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus func_802D2C40(Evt* script) {
|
||||
ApiStatus SetPlayerPushVelocity(Evt* script) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
f32 x = evt_get_variable(script, *args++);
|
||||
PlayerStatus* playerStatus = &gPlayerStatus;
|
||||
f32 y;
|
||||
f32 z;
|
||||
|
||||
playerStatus->extraVelocity.x = x;
|
||||
playerStatus->extraVelocity.y = evt_get_variable(script, *args++);
|
||||
playerStatus->extraVelocity.z = evt_get_variable(script, *args++);
|
||||
gPlayerStatus.pushVelocity.x = x;
|
||||
gPlayerStatus.pushVelocity.y = evt_get_variable(script, *args++);
|
||||
gPlayerStatus.pushVelocity.z = evt_get_variable(script, *args++);
|
||||
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus PlaySoundAtPlayer(Evt* script, s32 isInitialCall) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 var = evt_get_variable(script, *args++);
|
||||
s32 var2 = evt_get_variable(script, *args++);
|
||||
s32 soundID = evt_get_variable(script, *args++);
|
||||
s32 flags = evt_get_variable(script, *args++);
|
||||
|
||||
sfx_play_sound_at_player(var, var2);
|
||||
sfx_play_sound_at_player(soundID, flags);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
|
@ -683,19 +683,19 @@ void init_hud_element_list(void) {
|
||||
void func_801413F8(void) {
|
||||
set_cam_viewport(CAM_3, 0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1);
|
||||
gCameras[CAM_3].updateMode = 2;
|
||||
gCameras[CAM_3].unk_06 = 1;
|
||||
gCameras[CAM_3].unk_20 = 0x3CBF;
|
||||
gCameras[CAM_3].nearClip = 0x10;
|
||||
gCameras[CAM_3].unk_1C = 0;
|
||||
gCameras[CAM_3].unk_06 = TRUE;
|
||||
gCameras[CAM_3].lookAt_dist = 15551;
|
||||
gCameras[CAM_3].nearClip = CAM_NEAR_CLIP;
|
||||
gCameras[CAM_3].auxPitch = 0;
|
||||
gCameras[CAM_3].auxBoomLength = 0;
|
||||
gCameras[CAM_3].auxBoomPitch = 0;
|
||||
gCameras[CAM_3].auxPos.z = 0;
|
||||
gCameras[CAM_3].lookAt_obj_target.z = 0;
|
||||
gCameras[CAM_3].farClip = 0x4000;
|
||||
gCameras[CAM_3].bgColor[0] = 0;
|
||||
gCameras[CAM_3].bgColor[1] = 0;
|
||||
gCameras[CAM_3].bgColor[2] = 0;
|
||||
gCameras[CAM_3].auxPos.x = 160.0f;
|
||||
gCameras[CAM_3].auxPos.y = -120.0f;
|
||||
gCameras[CAM_3].lookAt_obj_target.x = 160.0f;
|
||||
gCameras[CAM_3].lookAt_obj_target.y = -120.0f;
|
||||
gCameras[CAM_3].vfov = 1.0f;
|
||||
gCameras[CAM_3].flags &= ~0x6;
|
||||
}
|
||||
|
@ -55,14 +55,14 @@ void state_init_file_select(void) {
|
||||
gCameras[CAM_DEFAULT].lookAt_eye.x = 500.0f;
|
||||
gCameras[CAM_DEFAULT].lookAt_eye.y = 1000.0f;
|
||||
gCameras[CAM_DEFAULT].lookAt_eye.z = 1500.0f;
|
||||
gCameras[CAM_DEFAULT].auxPos.z = 150.0f;
|
||||
gCameras[CAM_DEFAULT].lookAt_obj_target.z = 150.0f;
|
||||
gCameras[CAM_DEFAULT].bgColor[0] = 0;
|
||||
gCameras[CAM_DEFAULT].bgColor[1] = 0;
|
||||
gCameras[CAM_DEFAULT].bgColor[2] = 0;
|
||||
gCameras[CAM_DEFAULT].auxPos.x = 25.0f;
|
||||
gCameras[CAM_DEFAULT].auxPos.y = 25.0f;
|
||||
gCameras[CAM_DEFAULT].unk_1C = 0;
|
||||
gCameras[CAM_DEFAULT].unk_20 = 100;
|
||||
gCameras[CAM_DEFAULT].lookAt_obj_target.x = 25.0f;
|
||||
gCameras[CAM_DEFAULT].lookAt_obj_target.y = 25.0f;
|
||||
gCameras[CAM_DEFAULT].auxPitch = 0;
|
||||
gCameras[CAM_DEFAULT].lookAt_dist = 100;
|
||||
gCameras[CAM_DEFAULT].auxBoomPitch = 0;
|
||||
gOverrideFlags |= GLOBAL_OVERRIDES_WINDOWS_IN_FRONT_OF_CURTAINS;
|
||||
}
|
||||
|
@ -60,9 +60,9 @@ void state_init_logos(void) {
|
||||
nuContRmbForceStop();
|
||||
create_cameras_a();
|
||||
gCameras[CAM_DEFAULT].updateMode = 6;
|
||||
gCameras[CAM_DEFAULT].unk_06 = 1;
|
||||
gCameras[CAM_DEFAULT].nearClip = 0x10;
|
||||
gCameras[CAM_DEFAULT].farClip = 0x1000;
|
||||
gCameras[CAM_DEFAULT].unk_06 = TRUE;
|
||||
gCameras[CAM_DEFAULT].nearClip = 16;
|
||||
gCameras[CAM_DEFAULT].farClip = 4096;
|
||||
gCurrentCameraID = CAM_DEFAULT;
|
||||
gCameras[CAM_DEFAULT].vfov = 25.0f;
|
||||
gCameras[CAM_DEFAULT].flags |= CAM_FLAG_ENABLED;
|
||||
@ -74,15 +74,15 @@ void state_init_logos(void) {
|
||||
gCameras[CAM_DEFAULT].bgColor[0] = 0;
|
||||
gCameras[CAM_DEFAULT].bgColor[1] = 0;
|
||||
gCameras[CAM_DEFAULT].bgColor[2] = 0;
|
||||
gCameras[CAM_DEFAULT].auxPos.x = 25.0f;
|
||||
gCameras[CAM_DEFAULT].auxPos.y = 25.0f;
|
||||
gCameras[CAM_DEFAULT].unk_1C = 0;
|
||||
gCameras[CAM_DEFAULT].unk_20 = 100;
|
||||
gCameras[CAM_DEFAULT].lookAt_obj_target.x = 25.0f;
|
||||
gCameras[CAM_DEFAULT].lookAt_obj_target.y = 25.0f;
|
||||
gCameras[CAM_DEFAULT].auxPitch = 0;
|
||||
gCameras[CAM_DEFAULT].lookAt_dist = 100;
|
||||
gCameras[CAM_DEFAULT].auxBoomPitch = 0;
|
||||
gCameras[CAM_DEFAULT].lookAt_eye.x = 500.0f;
|
||||
gCameras[CAM_DEFAULT].lookAt_eye.y = 1000.0f;
|
||||
gCameras[CAM_DEFAULT].lookAt_eye.z = 1500.0f;
|
||||
gCameras[CAM_DEFAULT].auxPos.z = 150.0f;
|
||||
gCameras[CAM_DEFAULT].lookAt_obj_target.z = 150.0f;
|
||||
clear_script_list();
|
||||
clear_generic_entity_list();
|
||||
clear_render_tasks();
|
||||
|
@ -97,9 +97,9 @@ void state_init_title_screen(void) {
|
||||
|
||||
create_cameras_a();
|
||||
gCameras[CAM_DEFAULT].updateMode = 6;
|
||||
gCameras[CAM_DEFAULT].unk_06 = 1;
|
||||
gCameras[CAM_DEFAULT].nearClip = 0x10;
|
||||
gCameras[CAM_DEFAULT].farClip = 0x1000;
|
||||
gCameras[CAM_DEFAULT].unk_06 = TRUE;
|
||||
gCameras[CAM_DEFAULT].nearClip = CAM_NEAR_CLIP;
|
||||
gCameras[CAM_DEFAULT].farClip = CAM_FAR_CLIP;
|
||||
gCurrentCameraID = CAM_DEFAULT;
|
||||
gCameras[CAM_DEFAULT].vfov = 25.0f;
|
||||
gCameras[CAM_DEFAULT].flags |= CAMERA_FLAGS_2;
|
||||
@ -111,15 +111,15 @@ void state_init_title_screen(void) {
|
||||
gCameras[CAM_DEFAULT].bgColor[0] = 0;
|
||||
gCameras[CAM_DEFAULT].bgColor[1] = 0;
|
||||
gCameras[CAM_DEFAULT].bgColor[2] = 0;
|
||||
gCameras[CAM_DEFAULT].auxPos.x = 25.0f;
|
||||
gCameras[CAM_DEFAULT].auxPos.y = 25.0f;
|
||||
gCameras[CAM_DEFAULT].unk_1C = 0;
|
||||
gCameras[CAM_DEFAULT].unk_20 = 100;
|
||||
gCameras[CAM_DEFAULT].lookAt_obj_target.x = 25.0f;
|
||||
gCameras[CAM_DEFAULT].lookAt_obj_target.y = 25.0f;
|
||||
gCameras[CAM_DEFAULT].auxPitch = 0;
|
||||
gCameras[CAM_DEFAULT].lookAt_dist = 100;
|
||||
gCameras[CAM_DEFAULT].auxBoomPitch = 0;
|
||||
gCameras[CAM_DEFAULT].lookAt_eye.x = 500.0f;
|
||||
gCameras[CAM_DEFAULT].lookAt_eye.y = 1000.0f;
|
||||
gCameras[CAM_DEFAULT].lookAt_eye.z = 1500.0f;
|
||||
gCameras[CAM_DEFAULT].auxPos.z = 150.0f;
|
||||
gCameras[CAM_DEFAULT].lookAt_obj_target.z = 150.0f;
|
||||
clear_script_list();
|
||||
clear_generic_entity_list();
|
||||
clear_render_tasks();
|
||||
|
@ -15,7 +15,7 @@ void action_update_hit_fire(void) {
|
||||
if (playerStatus->flags & PS_FLAGS_ACTION_STATE_CHANGED) {
|
||||
playerStatus->flags &= ~PS_FLAGS_ACTION_STATE_CHANGED;
|
||||
|
||||
playerStatus->animFlags |= PA_FLAGS_4;
|
||||
playerStatus->animFlags |= PA_FLAGS_INTERRUPT_USE_PARTNER;
|
||||
playerStatus->flags |= (PS_FLAGS_800 | PS_FLAGS_FLYING);
|
||||
|
||||
suggest_player_anim_setUnkFlag(ANIM_Mario_Scared);
|
||||
@ -25,7 +25,7 @@ void action_update_hit_fire(void) {
|
||||
playerStatus->gravityIntegrator[1] = -3.738f;
|
||||
playerStatus->gravityIntegrator[2] = 0.8059f;
|
||||
playerStatus->gravityIntegrator[3] = -0.0987f;
|
||||
gCameras[CAM_DEFAULT].moveFlags |= CAMERA_MOVE_FLAGS_1;
|
||||
gCameras[CAM_DEFAULT].moveFlags |= CAMERA_MOVE_IGNORE_PLAYER_Y;
|
||||
ReturnAngle = atan2(playerStatus->position.x, playerStatus->position.z, playerStatus->lastGoodPosition.x, playerStatus->lastGoodPosition.z);
|
||||
playerStatus->currentSpeed = get_xz_dist_to_player(playerStatus->lastGoodPosition.x, playerStatus->lastGoodPosition.z) / 18.0f;
|
||||
subtract_hp(1);
|
||||
|
@ -31,7 +31,7 @@ void action_update_hit_lava(void) {
|
||||
if (playerStatus->flags & PS_FLAGS_ACTION_STATE_CHANGED) {
|
||||
playerStatus->flags &= ~PS_FLAGS_ACTION_STATE_CHANGED;
|
||||
playerStatus->flags |= (PS_FLAGS_800000 | PS_FLAGS_FLYING);
|
||||
playerStatus->animFlags |= PA_FLAGS_4;
|
||||
playerStatus->animFlags |= PA_FLAGS_INTERRUPT_USE_PARTNER;
|
||||
playerStatus->flags |= PS_FLAGS_800;
|
||||
if (playerStatus->hazardType == HAZARD_TYPE_LAVA) {
|
||||
playerStatus->actionSubstate = SUBSTATE_DELAY_INIT_SINK;
|
||||
@ -43,7 +43,7 @@ void action_update_hit_lava(void) {
|
||||
playerStatus->currentSpeed = 0.0f;
|
||||
LaunchVelocity = 0.0f;
|
||||
|
||||
gCameras[CAM_DEFAULT].moveFlags |= (CAMERA_MOVE_FLAGS_1 | CAMERA_MOVE_FLAGS_2);
|
||||
gCameras[CAM_DEFAULT].moveFlags |= (CAMERA_MOVE_IGNORE_PLAYER_Y | CAMERA_MOVE_FLAGS_2);
|
||||
LaunchInterpPhase = 90.0f;
|
||||
subtract_hp(1);
|
||||
open_status_menu_long();
|
||||
@ -70,7 +70,7 @@ void action_update_hit_lava(void) {
|
||||
suggest_player_anim_setUnkFlag(ANIM_Mario_80002);
|
||||
playerStatus->gravityIntegrator[1] = 0.0f;
|
||||
playerStatus->timeInAir = 0;
|
||||
playerStatus->unk_C2 = 0;
|
||||
playerStatus->peakJumpTime = 0;
|
||||
playerStatus->actionSubstate = SUBSTATE_LAUNCH;
|
||||
playerStatus->currentStateTime = 1;
|
||||
playerStatus->gravityIntegrator[0] = 20.0f;
|
||||
|
@ -55,7 +55,7 @@ void action_update_idle(void) {
|
||||
playerStatus->actionSubstate = SUBSTATE_IDLE_DEFAULT;
|
||||
playerStatus->currentStateTime = 0;
|
||||
playerStatus->timeInAir = 0;
|
||||
playerStatus->unk_C2 = 0;
|
||||
playerStatus->peakJumpTime = 0;
|
||||
playerStatus->currentSpeed = 0.0f;
|
||||
playerStatus->pitch = 0.0f;
|
||||
|
||||
@ -106,7 +106,7 @@ void action_update_idle_peach(void) {
|
||||
playerStatus->actionSubstate = SUBSTATE_IDLE_DEFAULT;
|
||||
playerStatus->currentStateTime = 0;
|
||||
playerStatus->timeInAir = 0;
|
||||
playerStatus->unk_C2 = 0;
|
||||
playerStatus->peakJumpTime = 0;
|
||||
playerStatus->currentSpeed = 0.0f;
|
||||
playerStatus->flags &= ~PS_FLAGS_AIRBORNE;
|
||||
|
||||
|
@ -15,7 +15,7 @@ void initialize_jump(void) {
|
||||
|
||||
playerStatus->actionSubstate = JUMP_SUBSTATE_0;
|
||||
playerStatus->timeInAir = 0;
|
||||
playerStatus->unk_C2 = 0;
|
||||
playerStatus->peakJumpTime = 0;
|
||||
playerStatus->flags &= ~(PS_FLAGS_ACTION_STATE_CHANGED | PS_FLAGS_FLYING);
|
||||
playerStatus->flags |= PS_FLAGS_JUMPING;
|
||||
playerStatus->jumpFromPos.x = playerStatus->position.x;
|
||||
@ -48,7 +48,7 @@ void action_update_jump(void) {
|
||||
if (playerStatus->actionState == ACTION_STATE_LAUNCH) {
|
||||
phys_adjust_cam_on_landing();
|
||||
} else {
|
||||
gCameras[CAM_DEFAULT].moveFlags |= CAMERA_MOVE_FLAGS_1;
|
||||
gCameras[CAM_DEFAULT].moveFlags |= CAMERA_MOVE_IGNORE_PLAYER_Y;
|
||||
}
|
||||
|
||||
if (playerStatus->actionState == ACTION_STATE_JUMP) {
|
||||
@ -105,7 +105,7 @@ void action_update_landing_on_switch(void) {
|
||||
}
|
||||
|
||||
suggest_player_anim_clearUnkFlag(anim);
|
||||
gCameras[CAM_DEFAULT].moveFlags |= CAMERA_MOVE_FLAGS_1;
|
||||
gCameras[CAM_DEFAULT].moveFlags |= CAMERA_MOVE_IGNORE_PLAYER_Y;
|
||||
}
|
||||
|
||||
playerStatus->actionSubstate++;
|
||||
@ -133,7 +133,7 @@ void action_update_falling(void) {
|
||||
anim = ANIM_Mario_6000A;
|
||||
}
|
||||
suggest_player_anim_clearUnkFlag(anim);
|
||||
gCameras[CAM_DEFAULT].moveFlags |= CAMERA_MOVE_FLAGS_1;
|
||||
gCameras[CAM_DEFAULT].moveFlags |= CAMERA_MOVE_IGNORE_PLAYER_Y;
|
||||
}
|
||||
playerStatus->timeInAir++;
|
||||
}
|
||||
@ -155,7 +155,7 @@ void action_update_step_down(void) {
|
||||
if (playerStatus->flags & PS_FLAGS_ACTION_STATE_CHANGED) {
|
||||
playerStatus->flags &= ~(PS_FLAGS_ACTION_STATE_CHANGED | PS_FLAGS_JUMPING | PS_FLAGS_FLYING);
|
||||
playerStatus->flags |= PS_FLAGS_FALLING;
|
||||
gCameras[CAM_DEFAULT].moveFlags |= CAMERA_MOVE_FLAGS_1;
|
||||
gCameras[CAM_DEFAULT].moveFlags |= CAMERA_MOVE_IGNORE_PLAYER_Y;
|
||||
}
|
||||
|
||||
playerStatus->timeInAir++;
|
||||
@ -190,7 +190,7 @@ void action_update_peach_falling(void) {
|
||||
}
|
||||
|
||||
suggest_player_anim_clearUnkFlag(anim);
|
||||
gCameras[CAM_DEFAULT].moveFlags |= CAMERA_MOVE_FLAGS_1;
|
||||
gCameras[CAM_DEFAULT].moveFlags |= CAMERA_MOVE_IGNORE_PLAYER_Y;
|
||||
}
|
||||
playerStatus->timeInAir++;
|
||||
}
|
||||
@ -202,7 +202,7 @@ void action_update_peach_step_down(void) {
|
||||
playerStatus->flags &= ~PS_FLAGS_ACTION_STATE_CHANGED;
|
||||
playerStatus->flags &= ~(PS_FLAGS_JUMPING | PS_FLAGS_FLYING);
|
||||
playerStatus->flags |= PS_FLAGS_FALLING;
|
||||
gCameras[CAM_DEFAULT].moveFlags |= CAMERA_MOVE_FLAGS_1;
|
||||
gCameras[CAM_DEFAULT].moveFlags |= CAMERA_MOVE_IGNORE_PLAYER_Y;
|
||||
|
||||
if (playerStatus->animFlags & PA_FLAGS_USING_PEACH_PHYSICS) {
|
||||
suggest_player_anim_clearUnkFlag(ANIM_Peach_A0006);
|
||||
|
@ -25,7 +25,7 @@ void action_update_knockback(void) {
|
||||
playerStatus->gravityIntegrator[2] = 0.8059f;
|
||||
playerStatus->gravityIntegrator[3] = -0.0987f;
|
||||
|
||||
gCameras[CAM_DEFAULT].moveFlags |= CAMERA_MOVE_FLAGS_1;
|
||||
gCameras[CAM_DEFAULT].moveFlags |= CAMERA_MOVE_IGNORE_PLAYER_Y;
|
||||
|
||||
ReturnAngle = atan2(playerStatus->position.x, playerStatus->position.z, playerStatus->lastGoodPosition.x,
|
||||
playerStatus->lastGoodPosition.z);
|
||||
|
@ -31,7 +31,7 @@ void action_update_land(void) {
|
||||
);
|
||||
playerStatus->actionSubstate = SUBSTATE_INIT;
|
||||
playerStatus->timeInAir = 0;
|
||||
playerStatus->unk_C2 = 0;
|
||||
playerStatus->peakJumpTime = 0;
|
||||
playerStatus->landPos.x = playerStatus->position.x;
|
||||
playerStatus->landPos.z = playerStatus->position.z;
|
||||
|
||||
@ -93,7 +93,7 @@ void action_update_step_down_land(void) {
|
||||
);
|
||||
playerStatus->actionSubstate = SUBSTATE_INIT;
|
||||
playerStatus->timeInAir = 0;
|
||||
playerStatus->unk_C2 = 0;
|
||||
playerStatus->peakJumpTime = 0;
|
||||
playerStatus->landPos.x = playerStatus->position.x;
|
||||
playerStatus->landPos.z = playerStatus->position.z;
|
||||
|
||||
@ -127,7 +127,7 @@ void action_update_peach_land(void) {
|
||||
playerStatus->flags &= ~PS_FLAGS_ACTION_STATE_CHANGED;
|
||||
playerStatus->actionSubstate = SUBSTATE_INIT;
|
||||
playerStatus->timeInAir = 0;
|
||||
playerStatus->unk_C2 = 0;
|
||||
playerStatus->peakJumpTime = 0;
|
||||
playerStatus->flags &= ~PS_FLAGS_AIRBORNE;
|
||||
playerStatus->landPos.x = playerStatus->position.x;
|
||||
playerStatus->landPos.z = playerStatus->position.z;
|
||||
@ -171,7 +171,7 @@ void action_update_peach_step_down_land(void) {
|
||||
playerStatus->flags &= ~PS_FLAGS_ACTION_STATE_CHANGED;
|
||||
playerStatus->actionSubstate = SUBSTATE_INIT;
|
||||
playerStatus->timeInAir = 0;
|
||||
playerStatus->unk_C2 = 0;
|
||||
playerStatus->peakJumpTime = 0;
|
||||
playerStatus->flags &= ~PS_FLAGS_AIRBORNE;
|
||||
playerStatus->landPos.x = playerStatus->position.x;
|
||||
playerStatus->landPos.z = playerStatus->position.z;
|
||||
|
@ -16,7 +16,7 @@ s32 action_update_ride(void) {
|
||||
playerStatus->actionSubstate = 0;
|
||||
playerStatus->currentStateTime = 0;
|
||||
playerStatus->timeInAir = 0;
|
||||
playerStatus->unk_C2 = 0;
|
||||
playerStatus->peakJumpTime = 0;
|
||||
playerStatus->currentSpeed = 0.0f;
|
||||
playerStatus->pitch = 0.0f;
|
||||
}
|
||||
@ -59,7 +59,7 @@ void action_update_state_23(void) {
|
||||
playerStatus->actionSubstate = 0;
|
||||
playerStatus->currentStateTime = 0;
|
||||
playerStatus->timeInAir = 0;
|
||||
playerStatus->unk_C2 = 0;
|
||||
playerStatus->peakJumpTime = 0;
|
||||
playerStatus->currentSpeed = 0.0f;
|
||||
playerStatus->pitch = 0.0f;
|
||||
D_802B6770_E27C80 = D_8010C938;
|
||||
@ -130,7 +130,7 @@ void action_update_launch(void) {
|
||||
playerStatus->actionSubstate = 0;
|
||||
playerStatus->currentStateTime = 0;
|
||||
playerStatus->timeInAir = 0;
|
||||
playerStatus->unk_C2 = 0;
|
||||
playerStatus->peakJumpTime = 0;
|
||||
playerStatus->currentSpeed = 0.0f;
|
||||
playerStatus->pitch = 0.0f;
|
||||
|
||||
@ -153,7 +153,7 @@ void action_update_first_strike(void) {
|
||||
playerStatus->flags &= ~(PS_FLAGS_ACTION_STATE_CHANGED | PS_FLAGS_AIRBORNE);
|
||||
playerStatus->actionSubstate = 0;
|
||||
playerStatus->timeInAir = 0;
|
||||
playerStatus->unk_C2 = 0;
|
||||
playerStatus->peakJumpTime = 0;
|
||||
playerStatus->currentSpeed = 0.0f;
|
||||
playerStatus->pitch = 0.0f;
|
||||
suggest_player_anim_setUnkFlag(ANIM_Mario_FallBack);
|
||||
|
@ -48,7 +48,7 @@ void action_update_sliding(void) {
|
||||
playerStatus->flags &= ~PS_FLAGS_ACTION_STATE_CHANGED;
|
||||
playerStatus->actionSubstate = SUBSTATE_SLIDING;
|
||||
playerStatus->currentSpeed = 0.0f;
|
||||
playerStatus->animFlags |= PA_FLAGS_4;
|
||||
playerStatus->animFlags |= PA_FLAGS_INTERRUPT_USE_PARTNER;
|
||||
func_802B6000_E27510();
|
||||
SlideAcceleration = 0.0f;
|
||||
D_802B6790 = 0.0f;
|
||||
@ -57,7 +57,7 @@ void action_update_sliding(void) {
|
||||
D_802B679C = 0;
|
||||
suggest_player_anim_clearUnkFlag(ANIM_Mario_1000A);
|
||||
sfx_play_sound_at_player(SOUND_167, 0);
|
||||
gCameras[CAM_DEFAULT].moveFlags |= CAMERA_MOVE_FLAGS_1;
|
||||
gCameras[CAM_DEFAULT].moveFlags |= CAMERA_MOVE_IGNORE_PLAYER_Y;
|
||||
}
|
||||
speed = playerStatus->currentSpeed;
|
||||
posX = playerStatus->position.x;
|
||||
|
@ -85,7 +85,7 @@ void action_update_parasol(void) {
|
||||
disable_player_static_collisions();
|
||||
tempUnk_1C = &transformation->playerRotationRate;
|
||||
playerStatus->timeInAir = 0;
|
||||
playerStatus->unk_C2 = 0;
|
||||
playerStatus->peakJumpTime = 0;
|
||||
playerStatus->currentSpeed = 0;
|
||||
playerStatus->pitch = 0;
|
||||
|
||||
|
@ -38,7 +38,7 @@ void action_update_spin_jump(void) {
|
||||
suggest_player_anim_clearUnkFlag(ANIM_Mario_1000A);
|
||||
disable_player_input();
|
||||
playerStatus->flags |= PS_FLAGS_200;
|
||||
gCameras[CAM_DEFAULT].moveFlags |= CAMERA_MOVE_FLAGS_1;
|
||||
gCameras[CAM_DEFAULT].moveFlags |= CAMERA_MOVE_IGNORE_PLAYER_Y;
|
||||
sfx_play_sound_at_player(SOUND_SPIN_JUMP, 0);
|
||||
}
|
||||
|
||||
|
@ -46,7 +46,7 @@ void action_update_step_up(void) {
|
||||
}
|
||||
playerStatus->actionSubstate = 0;
|
||||
playerStatus->timeInAir = 0;
|
||||
playerStatus->unk_C2 = 0;
|
||||
playerStatus->peakJumpTime = 0;
|
||||
playerStatus->gravityIntegrator[0] = 17.7566f;
|
||||
playerStatus->gravityIntegrator[1] = -11.3862f;
|
||||
playerStatus->gravityIntegrator[2] = 3.5f;
|
||||
|
@ -41,7 +41,7 @@ void action_update_tornado_jump(void) {
|
||||
suggest_player_anim_setUnkFlag(ANIM_Mario_80000);
|
||||
disable_player_input();
|
||||
playerStatus->flags |= PS_FLAGS_200;
|
||||
gCameras[CAM_DEFAULT].moveFlags |= CAMERA_MOVE_FLAGS_1;
|
||||
gCameras[CAM_DEFAULT].moveFlags |= CAMERA_MOVE_IGNORE_PLAYER_Y;
|
||||
cameraRelativeYaw = clamp_angle(playerStatus->targetYaw - gCameras[gCurrentCameraID].currentYaw);
|
||||
if (cameraRelativeYaw <= 180.0f) {
|
||||
spinRate = 60.0f;
|
||||
|
@ -49,7 +49,7 @@ f32 D_800F7B7C = -32.0f; // ???
|
||||
|
||||
s16 FootstepSoundSelector = 0;
|
||||
s32 D_800F7B84[] = { 0, 0, 0};
|
||||
f32 D_800F7B90 = 0.0;
|
||||
f32 LastMidairPlayerVelY = 0.0;
|
||||
|
||||
AnimID ClubbaDisguiseExtraAnims[] = { 0x00390000, 0x00390002, 0x00390003, 0x00390004, 0x00390005, 0x00390008, 0x00390007, 0x00390013, 0x00390014, ANIM_LIST_END };
|
||||
|
||||
|
@ -19,7 +19,7 @@ typedef struct DisguiseAnims {
|
||||
/* 0x14 */ s32 hold;
|
||||
} DisguiseAnims; // size = 0x18
|
||||
|
||||
extern f32 D_800F7B90;
|
||||
extern f32 LastMidairPlayerVelY;
|
||||
extern Action PlayerActionsTable[39];
|
||||
|
||||
extern DisguiseAnims BasicPeachDisguiseAnims[4];
|
||||
|
@ -4,9 +4,9 @@
|
||||
#include "effects.h"
|
||||
#include "entity.h"
|
||||
|
||||
EvtScript N(exitWalk_802410F0) = EXIT_WALK_SCRIPT(60, 0, "arn_05", 1);
|
||||
EvtScript N(exitWalk_802410F0) = EVT_EXIT_WALK(60, 0, "arn_05", 1);
|
||||
|
||||
EvtScript N(exitWalk_8024114C) = EXIT_WALK_SCRIPT(60, 1, "arn_04", 0);
|
||||
EvtScript N(exitWalk_8024114C) = EVT_EXIT_WALK(60, 1, "arn_04", 0);
|
||||
|
||||
EvtScript N(802411A8) = {
|
||||
EVT_BIND_TRIGGER(N(exitWalk_802410F0), TRIGGER_FLOOR_ABOVE, 1, 1, 0)
|
||||
|
@ -6,9 +6,9 @@
|
||||
|
||||
static s32 N(KeyItemChoiceList)[112];
|
||||
|
||||
EvtScript N(exitWalk_80241830) = EXIT_WALK_SCRIPT(60, 0, "arn_07", 1);
|
||||
EvtScript N(exitWalk_80241830) = EVT_EXIT_WALK(60, 0, "arn_07", 1);
|
||||
|
||||
EvtScript N(exitWalk_8024188C) = EXIT_WALK_SCRIPT(60, 1, "arn_05", 0);
|
||||
EvtScript N(exitWalk_8024188C) = EVT_EXIT_WALK(60, 1, "arn_05", 0);
|
||||
|
||||
EvtScript N(802418E8) = {
|
||||
EVT_BIND_TRIGGER(N(exitWalk_80241830), TRIGGER_FLOOR_ABOVE, 1, 1, 0)
|
||||
|
@ -5,9 +5,9 @@
|
||||
#include "effects.h"
|
||||
#include "entity.h"
|
||||
|
||||
EvtScript N(exitWalk_80243480) = EXIT_WALK_SCRIPT(60, 0, "arn_02", 1);
|
||||
EvtScript N(exitWalk_80243480) = EVT_EXIT_WALK(60, 0, "arn_02", 1);
|
||||
|
||||
EvtScript N(exitWalk_802434DC) = EXIT_WALK_SCRIPT(60, 1, "dgb_00", 0);
|
||||
EvtScript N(exitWalk_802434DC) = EVT_EXIT_WALK(60, 1, "dgb_00", 0);
|
||||
|
||||
EvtScript N(80243538) = {
|
||||
EVT_BIND_TRIGGER(N(exitWalk_80243480), TRIGGER_FLOOR_ABOVE, 1, 1, 0)
|
||||
|
@ -17,9 +17,9 @@ enum {
|
||||
NPC_BOO8,
|
||||
};
|
||||
|
||||
EvtScript N(exitWalk_80241430) = EXIT_WALK_SCRIPT(60, 0, "arn_03", 1);
|
||||
EvtScript N(exitWalk_80241430) = EVT_EXIT_WALK(60, 0, "arn_03", 1);
|
||||
|
||||
EvtScript N(exitWalk_8024148C) = EXIT_WALK_SCRIPT(60, 1, "arn_02", 0);
|
||||
EvtScript N(exitWalk_8024148C) = EVT_EXIT_WALK(60, 1, "arn_02", 0);
|
||||
|
||||
EvtScript N(802414E8) = {
|
||||
EVT_BIND_TRIGGER(N(exitWalk_80241430), TRIGGER_FLOOR_ABOVE, 1, 1, 0)
|
||||
@ -771,7 +771,7 @@ EvtScript N(802441FC) = {
|
||||
EVT_END_IF
|
||||
EVT_WAIT(1)
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(func_802D2B6C)
|
||||
EVT_CALL(InterruptUsePartner)
|
||||
EVT_EXEC_WAIT(N(80242C50))
|
||||
EVT_CALL(BindNpcInteract, 0, EVT_PTR(N(interact_802418F4)))
|
||||
EVT_CALL(BindNpcInteract, 1, EVT_PTR(N(interact_80241A84)))
|
||||
|
@ -162,9 +162,9 @@ EvtScript N(exitSingleDoor_802428D4) = {
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(exitWalk_80242978) = EXIT_WALK_SCRIPT(60, 1, "arn_03", 0);
|
||||
EvtScript N(exitWalk_80242978) = EVT_EXIT_WALK(60, 1, "arn_03", 0);
|
||||
|
||||
EvtScript N(exitWalk_802429D4) = EXIT_WALK_SCRIPT(60, 2, "mim_12", 1);
|
||||
EvtScript N(exitWalk_802429D4) = EVT_EXIT_WALK(60, 2, "mim_12", 1);
|
||||
|
||||
static const f64 rodata_alignment = 0.0;
|
||||
|
||||
|
@ -39,7 +39,7 @@ static s32 N(pad_1B8)[] = {
|
||||
0x00000000, 0x00000000,
|
||||
};
|
||||
|
||||
EvtScript N(exitWalk_802401C0) = EXIT_WALK_SCRIPT(60, 0, "arn_04", 1);
|
||||
EvtScript N(exitWalk_802401C0) = EVT_EXIT_WALK(60, 0, "arn_04", 1);
|
||||
|
||||
EvtScript N(exitDoubleDoor_8024021C) = {
|
||||
EVT_SET_GROUP(EVT_GROUP_1B)
|
||||
|
@ -256,7 +256,7 @@ EvtScript N(80243EF0) = {
|
||||
EVT_CALL(N(func_80240000_BFD880))
|
||||
EVT_CALL(InitAnimatedModels)
|
||||
EVT_WAIT(1)
|
||||
EVT_CALL(func_802D2B6C)
|
||||
EVT_CALL(InterruptUsePartner)
|
||||
EVT_CALL(SetPlayerAnimation, 524298)
|
||||
EVT_THREAD
|
||||
EVT_CALL(PlaySoundAtNpc, 4, SOUND_20F6, 0)
|
||||
@ -528,7 +528,7 @@ EvtScript N(npcAI_80244D54) = {
|
||||
EVT_GOTO(20)
|
||||
EVT_END_IF
|
||||
EVT_CALL(DisablePlayerPhysics, TRUE)
|
||||
EVT_CALL(func_802D2B6C)
|
||||
EVT_CALL(InterruptUsePartner)
|
||||
EVT_CALL(DisablePartnerAI, 0)
|
||||
EVT_SET_GROUP(EVT_GROUP_00)
|
||||
EVT_CALL(SetTimeFreezeMode, 1)
|
||||
|
@ -93,7 +93,7 @@ EvtScript N(exitDoubleDoor_80242A78) = {
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(exitWalk_80242B2C) = EXIT_WALK_SCRIPT(26, 2, "dgb_13", 0);
|
||||
EvtScript N(exitWalk_80242B2C) = EVT_EXIT_WALK(26, 2, "dgb_13", 0);
|
||||
|
||||
EvtScript N(exitSingleDoor_80242B88) = {
|
||||
EVT_SET_GROUP(EVT_GROUP_1B)
|
||||
|
@ -156,7 +156,7 @@ EvtScript N(npcAI_802435E4) = {
|
||||
EVT_GOTO(20)
|
||||
EVT_END_IF
|
||||
EVT_CALL(DisablePlayerPhysics, TRUE)
|
||||
EVT_CALL(func_802D2B6C)
|
||||
EVT_CALL(InterruptUsePartner)
|
||||
EVT_CALL(DisablePartnerAI, 0)
|
||||
EVT_SET_GROUP(EVT_GROUP_00)
|
||||
EVT_CALL(SetTimeFreezeMode, 1)
|
||||
@ -274,7 +274,7 @@ NpcGroupList N(npcGroupList_80243D18) = {
|
||||
|
||||
#define SUPER_BLOCK_MAPVAR MapVar(0)
|
||||
#define SUPER_BLOCK_GAMEFLAG GF_DGB04_SuperBlock
|
||||
#include "world/common/atomic/SuperBlockData.inc.c"
|
||||
#include "world/common/atomic/SuperBlock.data.inc.c"
|
||||
|
||||
EvtScript N(makeEntities) = {
|
||||
EVT_CALL(MakeEntity, EVT_PTR(Entity_SuperBlock), 500, -360, 110, 0, MAKE_ENTITY_END)
|
||||
|
@ -306,7 +306,7 @@ EvtScript N(npcAI_802444E4) = {
|
||||
EVT_GOTO(20)
|
||||
EVT_END_IF
|
||||
EVT_CALL(DisablePlayerPhysics, TRUE)
|
||||
EVT_CALL(func_802D2B6C)
|
||||
EVT_CALL(InterruptUsePartner)
|
||||
EVT_CALL(DisablePartnerAI, 0)
|
||||
EVT_SET_GROUP(EVT_GROUP_00)
|
||||
EVT_CALL(SetTimeFreezeMode, 1)
|
||||
|
@ -92,7 +92,7 @@ EvtScript N(exitSingleDoor_80243A88) = {
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(exitWalk_80243B3C) = EXIT_WALK_SCRIPT(40, 3, "dgb_10", 0);
|
||||
EvtScript N(exitWalk_80243B3C) = EVT_EXIT_WALK(40, 3, "dgb_10", 0);
|
||||
|
||||
EvtScript N(80243B98) = {
|
||||
EVT_BIND_TRIGGER(N(exitWalk_80243B3C), TRIGGER_FLOOR_ABOVE, 11, 1, 0)
|
||||
@ -358,7 +358,7 @@ EvtScript N(npcAI_802443DC) = {
|
||||
EVT_GOTO(20)
|
||||
EVT_END_IF
|
||||
EVT_CALL(DisablePlayerPhysics, TRUE)
|
||||
EVT_CALL(func_802D2B6C)
|
||||
EVT_CALL(InterruptUsePartner)
|
||||
EVT_CALL(DisablePartnerAI, 0)
|
||||
EVT_SET_GROUP(EVT_GROUP_00)
|
||||
EVT_CALL(SetTimeFreezeMode, 1)
|
||||
|
@ -31,7 +31,7 @@ static s32 N(pad_2E8)[] = {
|
||||
0x00000000, 0x00000000,
|
||||
};
|
||||
|
||||
EvtScript N(exitWalk_802402F0) = EXIT_WALK_SCRIPT(40, 0, "dgb_09", 3);
|
||||
EvtScript N(exitWalk_802402F0) = EVT_EXIT_WALK(40, 0, "dgb_09", 3);
|
||||
|
||||
EvtScript N(8024034C) = {
|
||||
EVT_BIND_TRIGGER(N(exitWalk_802402F0), TRIGGER_FLOOR_ABOVE, 8, 1, 0)
|
||||
@ -252,7 +252,7 @@ EvtScript N(80240E68) = {
|
||||
EVT_CALL(N(func_8024013C_C4C4CC))
|
||||
EVT_CALL(func_802CA988, 0, LVar2, LVar3, LVar4, LVar5)
|
||||
EVT_CALL(N(func_802401C0_C4C550))
|
||||
EVT_CALL(func_802D2B6C)
|
||||
EVT_CALL(InterruptUsePartner)
|
||||
EVT_CALL(GotoMap, EVT_PTR("dgb_11"), LVar0)
|
||||
EVT_WAIT(100)
|
||||
EVT_RETURN
|
||||
|
@ -29,7 +29,7 @@ static s32 N(pad_E8)[] = {
|
||||
0x00000000, 0x00000000,
|
||||
};
|
||||
|
||||
EvtScript N(exitWalk_802400F0) = EXIT_WALK_SCRIPT(26, 0, "dgb_03", 5);
|
||||
EvtScript N(exitWalk_802400F0) = EVT_EXIT_WALK(26, 0, "dgb_03", 5);
|
||||
|
||||
EvtScript N(8024014C) = {
|
||||
EVT_BIND_TRIGGER(N(exitWalk_802400F0), TRIGGER_FLOOR_ABOVE, 5, 1, 0)
|
||||
|
@ -122,7 +122,7 @@ EvtScript N(exitWalk_80244960) = {
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(exitWalk_802449CC) = EXIT_WALK_SCRIPT(60, 1, "dro_02", 0);
|
||||
EvtScript N(exitWalk_802449CC) = EVT_EXIT_WALK(60, 1, "dro_02", 0);
|
||||
|
||||
EvtScript N(80244A28) = {
|
||||
EVT_BIND_TRIGGER(N(exitWalk_80244960), TRIGGER_FLOOR_ABOVE, 1, 1, 0)
|
||||
@ -1894,7 +1894,7 @@ EvtScript N(8024CCC4) = {
|
||||
EVT_IF_NE(LVar1, 6)
|
||||
EVT_RETURN
|
||||
EVT_ELSE
|
||||
EVT_CALL(func_802D2B6C)
|
||||
EVT_CALL(InterruptUsePartner)
|
||||
EVT_CALL(DisablePlayerInput, TRUE)
|
||||
EVT_END_IF
|
||||
EVT_ELSE
|
||||
@ -1954,7 +1954,7 @@ EvtScript N(8024CF7C) = {
|
||||
EVT_IF_NE(LVar1, 6)
|
||||
EVT_RETURN
|
||||
EVT_ELSE
|
||||
EVT_CALL(func_802D2B6C)
|
||||
EVT_CALL(InterruptUsePartner)
|
||||
EVT_CALL(DisablePlayerInput, TRUE)
|
||||
EVT_END_IF
|
||||
EVT_ELSE
|
||||
|
@ -127,7 +127,7 @@ static s32 N(pad_3C3C) = {
|
||||
0x00000000,
|
||||
};
|
||||
|
||||
EvtScript N(exitWalk_80243C40) = EXIT_WALK_SCRIPT(60, 0, "dro_01", 1);
|
||||
EvtScript N(exitWalk_80243C40) = EVT_EXIT_WALK(60, 0, "dro_01", 1);
|
||||
|
||||
EvtScript N(80243C9C) = {
|
||||
EVT_BIND_TRIGGER(N(exitWalk_80243C40), TRIGGER_FLOOR_ABOVE, 4, 1, 0)
|
||||
|
@ -195,17 +195,17 @@ EvtScript N(80241B90) = {
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(exitWalk_80241D7C) = EXIT_WALK_SCRIPT(60, 1, "flo_14", 0);
|
||||
EvtScript N(exitWalk_80241D7C) = EVT_EXIT_WALK(60, 1, "flo_14", 0);
|
||||
|
||||
EvtScript N(exitWalk_80241DD8) = EXIT_WALK_SCRIPT(60, 2, "flo_23", 0);
|
||||
EvtScript N(exitWalk_80241DD8) = EVT_EXIT_WALK(60, 2, "flo_23", 0);
|
||||
|
||||
EvtScript N(exitWalk_80241E34) = EXIT_WALK_SCRIPT(60, 3, "flo_25", 0);
|
||||
EvtScript N(exitWalk_80241E34) = EVT_EXIT_WALK(60, 3, "flo_25", 0);
|
||||
|
||||
EvtScript N(exitWalk_80241E90) = EXIT_WALK_SCRIPT(60, 4, "flo_16", 0);
|
||||
EvtScript N(exitWalk_80241E90) = EVT_EXIT_WALK(60, 4, "flo_16", 0);
|
||||
|
||||
EvtScript N(exitWalk_80241EEC) = EXIT_WALK_SCRIPT(60, 5, "flo_09", 0);
|
||||
EvtScript N(exitWalk_80241EEC) = EVT_EXIT_WALK(60, 5, "flo_09", 0);
|
||||
|
||||
EvtScript N(exitWalk_80241F48) = EXIT_WALK_SCRIPT(60, 6, "flo_08", 0);
|
||||
EvtScript N(exitWalk_80241F48) = EVT_EXIT_WALK(60, 6, "flo_08", 0);
|
||||
|
||||
const s32 N(pad_XXXX)[] = { 0, 0};
|
||||
|
||||
@ -1663,7 +1663,7 @@ extern const char N(flo_19_name_hack)[];
|
||||
EvtScript N(802477EC) = {
|
||||
EVT_IF_EQ(AreaFlag(44), 0)
|
||||
EVT_CALL(DisablePlayerInput, TRUE)
|
||||
EVT_CALL(func_802D2B6C)
|
||||
EVT_CALL(InterruptUsePartner)
|
||||
EVT_WAIT(15)
|
||||
EVT_CALL(DisablePartnerAI, 0)
|
||||
EVT_SET(AreaFlag(44), 1)
|
||||
|
@ -113,9 +113,9 @@ EvtScript N(80240880) = {
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(exitWalk_80240B2C) = EXIT_WALK_SCRIPT(60, 0, "flo_09", 1);
|
||||
EvtScript N(exitWalk_80240B2C) = EVT_EXIT_WALK(60, 0, "flo_09", 1);
|
||||
|
||||
EvtScript N(exitWalk_80240B88) = EXIT_WALK_SCRIPT(60, 1, "flo_22", 0);
|
||||
EvtScript N(exitWalk_80240B88) = EVT_EXIT_WALK(60, 1, "flo_22", 0);
|
||||
|
||||
EvtScript N(80240BE4) = {
|
||||
EVT_BIND_TRIGGER(N(exitWalk_80240B2C), TRIGGER_FLOOR_ABOVE, 0, 1, 0)
|
||||
@ -296,7 +296,7 @@ EvtScript N(interact_802412BC) = {
|
||||
EVT_CALL(PanToTarget, 0, 0, 1)
|
||||
EVT_CALL(WaitForCam, 0, EVT_FLOAT(1.0))
|
||||
EVT_WAIT(20)
|
||||
EVT_CALL(PlaySoundAtNpc, 2, SOUND_MOLE_SURFACE, 0)
|
||||
EVT_CALL(PlaySoundAtNpc, 2, SOUND_BURROW_SURFACE, 0)
|
||||
EVT_CALL(SetNpcAnimation, 2, ANIM_MontyMole_Dark_Anim16)
|
||||
EVT_WAIT(10)
|
||||
EVT_CALL(PlaySoundAtNpc, 2, 0x263, 0)
|
||||
@ -313,7 +313,7 @@ EvtScript N(interact_802412BC) = {
|
||||
EVT_CALL(WaitForCam, 0, EVT_FLOAT(1.0))
|
||||
EVT_CALL(SetNpcAnimation, 3, ANIM_MontyMole_Dark_Anim00)
|
||||
EVT_WAIT(20)
|
||||
EVT_CALL(PlaySoundAtNpc, 3, SOUND_MOLE_SURFACE, 0)
|
||||
EVT_CALL(PlaySoundAtNpc, 3, SOUND_BURROW_SURFACE, 0)
|
||||
EVT_CALL(SetNpcPos, 3, LVar0, LVar1, LVar2)
|
||||
EVT_CALL(SetNpcAnimation, 3, ANIM_MontyMole_Dark_Anim10)
|
||||
EVT_WAIT(20)
|
||||
@ -533,7 +533,7 @@ EvtScript N(idle_8024219C) = {
|
||||
EVT_WAIT(LVar1)
|
||||
EVT_CALL(SetSelfEnemyFlagBits, ((NPC_FLAG_MOTION_BLUR | NPC_FLAG_1000000 | NPC_FLAG_SIMPLIFIED_PHYSICS | NPC_FLAG_PARTICLE | NPC_FLAG_10000000)), TRUE)
|
||||
EVT_END_IF
|
||||
EVT_CALL(PlaySoundAtNpc, 2, SOUND_MOLE_DIG, 0)
|
||||
EVT_CALL(PlaySoundAtNpc, 2, SOUND_BURROW_DIG, 0)
|
||||
EVT_CALL(SetNpcAnimation, 2, ANIM_MontyMole_Dark_Anim11)
|
||||
EVT_WAIT(20)
|
||||
EVT_IF_EQ(GF_FLO03_Defeated_MontyMoleA, 0)
|
||||
@ -556,7 +556,7 @@ EvtScript N(idle_8024219C) = {
|
||||
EVT_SET(AreaFlag(23), 0)
|
||||
EVT_CALL(NpcFacePlayer, 2, 1)
|
||||
EVT_WAIT(1)
|
||||
EVT_CALL(PlaySoundAtNpc, 2, SOUND_MOLE_SURFACE, 0)
|
||||
EVT_CALL(PlaySoundAtNpc, 2, SOUND_BURROW_SURFACE, 0)
|
||||
EVT_CALL(SetNpcAnimation, 2, ANIM_MontyMole_Dark_Anim10)
|
||||
EVT_WAIT(10)
|
||||
EVT_CALL(SetSelfEnemyFlagBits, ((NPC_FLAG_MOTION_BLUR | NPC_FLAG_1000000 | NPC_FLAG_SIMPLIFIED_PHYSICS | NPC_FLAG_PARTICLE | NPC_FLAG_10000000)), FALSE)
|
||||
@ -611,7 +611,7 @@ EvtScript N(idle_80242618) = {
|
||||
EVT_WAIT(LVar1)
|
||||
EVT_CALL(SetSelfEnemyFlagBits, ((NPC_FLAG_MOTION_BLUR | NPC_FLAG_1000000 | NPC_FLAG_SIMPLIFIED_PHYSICS | NPC_FLAG_PARTICLE | NPC_FLAG_10000000)), TRUE)
|
||||
EVT_END_IF
|
||||
EVT_CALL(PlaySoundAtNpc, 3, SOUND_MOLE_DIG, 0)
|
||||
EVT_CALL(PlaySoundAtNpc, 3, SOUND_BURROW_DIG, 0)
|
||||
EVT_CALL(SetNpcAnimation, 3, ANIM_MontyMole_Dark_Anim11)
|
||||
EVT_WAIT(20)
|
||||
EVT_IF_EQ(GF_FLO03_Defeated_MontyMoleB, 0)
|
||||
@ -634,7 +634,7 @@ EvtScript N(idle_80242618) = {
|
||||
EVT_SET(AreaFlag(24), 0)
|
||||
EVT_CALL(NpcFacePlayer, 3, 1)
|
||||
EVT_WAIT(1)
|
||||
EVT_CALL(PlaySoundAtNpc, 3, SOUND_MOLE_SURFACE, 0)
|
||||
EVT_CALL(PlaySoundAtNpc, 3, SOUND_BURROW_SURFACE, 0)
|
||||
EVT_CALL(SetNpcAnimation, 3, ANIM_MontyMole_Dark_Anim10)
|
||||
EVT_WAIT(10)
|
||||
EVT_CALL(SetSelfEnemyFlagBits, ((NPC_FLAG_MOTION_BLUR | NPC_FLAG_1000000 | NPC_FLAG_SIMPLIFIED_PHYSICS | NPC_FLAG_PARTICLE | NPC_FLAG_10000000)), FALSE)
|
||||
@ -689,7 +689,7 @@ EvtScript N(idle_80242A94) = {
|
||||
EVT_WAIT(LVar1)
|
||||
EVT_CALL(SetSelfEnemyFlagBits, ((NPC_FLAG_MOTION_BLUR | NPC_FLAG_1000000 | NPC_FLAG_SIMPLIFIED_PHYSICS | NPC_FLAG_PARTICLE | NPC_FLAG_10000000)), TRUE)
|
||||
EVT_END_IF
|
||||
EVT_CALL(PlaySoundAtNpc, 4, SOUND_MOLE_DIG, 0)
|
||||
EVT_CALL(PlaySoundAtNpc, 4, SOUND_BURROW_DIG, 0)
|
||||
EVT_CALL(SetNpcAnimation, 4, ANIM_MontyMole_Dark_Anim11)
|
||||
EVT_WAIT(20)
|
||||
EVT_IF_EQ(GF_FLO03_Defeated_MontyMoleC, 0)
|
||||
@ -712,7 +712,7 @@ EvtScript N(idle_80242A94) = {
|
||||
EVT_SET(AreaFlag(25), 0)
|
||||
EVT_CALL(NpcFacePlayer, 4, 1)
|
||||
EVT_WAIT(1)
|
||||
EVT_CALL(PlaySoundAtNpc, 4, SOUND_MOLE_SURFACE, 0)
|
||||
EVT_CALL(PlaySoundAtNpc, 4, SOUND_BURROW_SURFACE, 0)
|
||||
EVT_CALL(SetNpcAnimation, 4, ANIM_MontyMole_Dark_Anim10)
|
||||
EVT_WAIT(10)
|
||||
EVT_CALL(SetSelfEnemyFlagBits, ((NPC_FLAG_MOTION_BLUR | NPC_FLAG_1000000 | NPC_FLAG_SIMPLIFIED_PHYSICS | NPC_FLAG_PARTICLE | NPC_FLAG_10000000)), FALSE)
|
||||
@ -767,7 +767,7 @@ EvtScript N(idle_80242F10) = {
|
||||
EVT_WAIT(LVar1)
|
||||
EVT_CALL(SetSelfEnemyFlagBits, ((NPC_FLAG_MOTION_BLUR | NPC_FLAG_1000000 | NPC_FLAG_SIMPLIFIED_PHYSICS | NPC_FLAG_PARTICLE | NPC_FLAG_10000000)), TRUE)
|
||||
EVT_END_IF
|
||||
EVT_CALL(PlaySoundAtNpc, 5, SOUND_MOLE_DIG, 0)
|
||||
EVT_CALL(PlaySoundAtNpc, 5, SOUND_BURROW_DIG, 0)
|
||||
EVT_CALL(SetNpcAnimation, 5, ANIM_MontyMole_Dark_Anim11)
|
||||
EVT_WAIT(20)
|
||||
EVT_IF_EQ(GF_FLO03_Defeated_MontyMoleD, 0)
|
||||
@ -790,7 +790,7 @@ EvtScript N(idle_80242F10) = {
|
||||
EVT_SET(AreaFlag(26), 0)
|
||||
EVT_CALL(NpcFacePlayer, 5, 1)
|
||||
EVT_WAIT(1)
|
||||
EVT_CALL(PlaySoundAtNpc, 5, SOUND_MOLE_SURFACE, 0)
|
||||
EVT_CALL(PlaySoundAtNpc, 5, SOUND_BURROW_SURFACE, 0)
|
||||
EVT_CALL(SetNpcAnimation, 5, ANIM_MontyMole_Dark_Anim10)
|
||||
EVT_WAIT(10)
|
||||
EVT_CALL(SetSelfEnemyFlagBits, ((NPC_FLAG_MOTION_BLUR | NPC_FLAG_1000000 | NPC_FLAG_SIMPLIFIED_PHYSICS | NPC_FLAG_PARTICLE | NPC_FLAG_10000000)), FALSE)
|
||||
|
@ -112,7 +112,7 @@ EvtScript N(8024096C) = {
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(exitWalk_80240C18) = EXIT_WALK_SCRIPT(60, 0, "flo_25", 1);
|
||||
EvtScript N(exitWalk_80240C18) = EVT_EXIT_WALK(60, 0, "flo_25", 1);
|
||||
|
||||
EvtScript N(80240C74) = {
|
||||
EVT_BIND_TRIGGER(N(exitWalk_80240C18), TRIGGER_FLOOR_ABOVE, 0, 1, 0)
|
||||
|
@ -48,7 +48,7 @@ EvtScript N(80241F40) = {
|
||||
|
||||
#define SUPER_BLOCK_MAPVAR MapVar(0)
|
||||
#define SUPER_BLOCK_GAMEFLAG GF_FLO08_SuperBlock
|
||||
#include "world/common/atomic/SuperBlockData.inc.c"
|
||||
#include "world/common/atomic/SuperBlock.data.inc.c"
|
||||
|
||||
EvtScript N(makeEntities) = {
|
||||
EVT_CALL(MakeEntity, EVT_PTR(Entity_SuperBlock), -780, 120, -110, 0, MAKE_ENTITY_END)
|
||||
@ -99,9 +99,9 @@ EvtScript N(80242680) = {
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(exitWalk_8024292C) = EXIT_WALK_SCRIPT(60, 0, "flo_00", 6);
|
||||
EvtScript N(exitWalk_8024292C) = EVT_EXIT_WALK(60, 0, "flo_00", 6);
|
||||
|
||||
EvtScript N(exitWalk_80242988) = EXIT_WALK_SCRIPT(60, 1, "flo_24", 0);
|
||||
EvtScript N(exitWalk_80242988) = EVT_EXIT_WALK(60, 1, "flo_24", 0);
|
||||
|
||||
EvtScript N(802429E4) = {
|
||||
EVT_BIND_TRIGGER(N(exitWalk_8024292C), TRIGGER_FLOOR_ABOVE, 0, 1, 0)
|
||||
|
@ -75,9 +75,9 @@ EvtScript N(802418F0) = {
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(exitWalk_80241B9C) = EXIT_WALK_SCRIPT(60, 0, "flo_00", 5);
|
||||
EvtScript N(exitWalk_80241B9C) = EVT_EXIT_WALK(60, 0, "flo_00", 5);
|
||||
|
||||
EvtScript N(exitWalk_80241BF8) = EXIT_WALK_SCRIPT(60, 1, "flo_03", 0);
|
||||
EvtScript N(exitWalk_80241BF8) = EVT_EXIT_WALK(60, 1, "flo_03", 0);
|
||||
|
||||
EvtScript N(80241C54) = {
|
||||
EVT_BIND_TRIGGER(N(exitWalk_80241B9C), TRIGGER_FLOOR_ABOVE, 0, 1, 0)
|
||||
|
@ -111,7 +111,7 @@ EvtScript N(80241680) = {
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(exitWalk_8024192C) = EXIT_WALK_SCRIPT(60, 0, "flo_24", 1);
|
||||
EvtScript N(exitWalk_8024192C) = EVT_EXIT_WALK(60, 0, "flo_24", 1);
|
||||
|
||||
EvtScript N(80241988) = {
|
||||
EVT_BIND_TRIGGER(N(exitWalk_8024192C), TRIGGER_FLOOR_ABOVE, 0, 1, 0)
|
||||
|
@ -81,9 +81,9 @@ EvtScript N(80240450) = {
|
||||
|
||||
#include "world/common/atomic/PipeData.inc.c"
|
||||
|
||||
EvtScript N(exitWalk_8024142C) = EXIT_WALK_SCRIPT(60, 0, "flo_23", 1);
|
||||
EvtScript N(exitWalk_8024142C) = EVT_EXIT_WALK(60, 0, "flo_23", 1);
|
||||
|
||||
EvtScript N(exitWalk_80241488) = EXIT_WALK_SCRIPT(60, 1, "flo_12", 0);
|
||||
EvtScript N(exitWalk_80241488) = EVT_EXIT_WALK(60, 1, "flo_12", 0);
|
||||
|
||||
EvtScript N(802414E4) = {
|
||||
EVT_SET_GROUP(EVT_GROUP_1B)
|
||||
|
@ -97,7 +97,7 @@ EvtScript N(80240870) = {
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(exitWalk_80240B1C) = EXIT_WALK_SCRIPT(60, 0, "flo_11", 1);
|
||||
EvtScript N(exitWalk_80240B1C) = EVT_EXIT_WALK(60, 0, "flo_11", 1);
|
||||
|
||||
EvtScript N(80240B78) = {
|
||||
EVT_BIND_TRIGGER(N(exitWalk_80240B1C), TRIGGER_FLOOR_ABOVE, 0, 1, 0)
|
||||
|
@ -159,9 +159,9 @@ EvtScript N(80243A40) = {
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(exitWalk_80243CEC) = EXIT_WALK_SCRIPT(60, 0, "flo_14", 1);
|
||||
EvtScript N(exitWalk_80243CEC) = EVT_EXIT_WALK(60, 0, "flo_14", 1);
|
||||
|
||||
EvtScript N(exitWalk_80243D48) = EXIT_WALK_SCRIPT(60, 1, "flo_15", 0);
|
||||
EvtScript N(exitWalk_80243D48) = EVT_EXIT_WALK(60, 1, "flo_15", 0);
|
||||
|
||||
EvtScript N(80243DA4) = {
|
||||
EVT_BIND_TRIGGER(N(exitWalk_80243D48), TRIGGER_FLOOR_ABOVE, 0, 1, 0)
|
||||
@ -475,7 +475,7 @@ EvtScript N(idle_80244BF8) = {
|
||||
EVT_CALL(SetNpcPos, 0, -250, 120, 45)
|
||||
EVT_CALL(SetMusicTrack, 0, SONG_LAKILESTER_THEME, 0, 8)
|
||||
EVT_CALL(ShowMessageAtScreenPos, MSG_CH6_00A0, 160, 40)
|
||||
EVT_CALL(func_802D2B6C)
|
||||
EVT_CALL(InterruptUsePartner)
|
||||
EVT_CALL(SetPlayerAnimation, 65578)
|
||||
EVT_WAIT(20)
|
||||
EVT_CALL(InterpPlayerYaw, 270, 1)
|
||||
|
@ -42,9 +42,9 @@ EvtScript N(updateTexturePan_80242460) = {
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(exitWalk_802424FC) = EXIT_WALK_SCRIPT(60, 0, "flo_00", 1);
|
||||
EvtScript N(exitWalk_802424FC) = EVT_EXIT_WALK(60, 0, "flo_00", 1);
|
||||
|
||||
EvtScript N(exitWalk_80242558) = EXIT_WALK_SCRIPT(60, 1, "flo_13", 0);
|
||||
EvtScript N(exitWalk_80242558) = EVT_EXIT_WALK(60, 1, "flo_13", 0);
|
||||
|
||||
EvtScript N(802425B4) = {
|
||||
EVT_BIND_TRIGGER(N(exitWalk_80242558), TRIGGER_FLOOR_ABOVE, 0, 1, 0)
|
||||
@ -318,7 +318,7 @@ EvtScript N(8024352C) = {
|
||||
EVT_CALL(DisablePlayerInput, TRUE)
|
||||
EVT_CALL(GetCurrentPartner, LVar0)
|
||||
EVT_IF_NE(LVar0, 0)
|
||||
EVT_CALL(func_802D2B6C)
|
||||
EVT_CALL(InterruptUsePartner)
|
||||
EVT_WAIT(20)
|
||||
EVT_END_IF
|
||||
EVT_CALL(DisablePlayerPhysics, TRUE)
|
||||
|
@ -41,7 +41,7 @@ static s32 N(pad_11C) = {
|
||||
0x00000000,
|
||||
};
|
||||
|
||||
EvtScript N(exitWalk_80240120) = EXIT_WALK_SCRIPT(60, 0, "flo_13", 1);
|
||||
EvtScript N(exitWalk_80240120) = EVT_EXIT_WALK(60, 0, "flo_13", 1);
|
||||
|
||||
EvtScript N(8024017C) = {
|
||||
EVT_BIND_TRIGGER(N(exitWalk_80240120), TRIGGER_FLOOR_ABOVE, 0, 1, 0)
|
||||
|
@ -26,9 +26,9 @@ EvtScript N(802429D0) = {
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(exitWalk_80242A40) = EXIT_WALK_SCRIPT(60, 0, "flo_00", 4);
|
||||
EvtScript N(exitWalk_80242A40) = EVT_EXIT_WALK(60, 0, "flo_00", 4);
|
||||
|
||||
EvtScript N(exitWalk_80242A9C) = EXIT_WALK_SCRIPT(60, 1, "flo_17", 0);
|
||||
EvtScript N(exitWalk_80242A9C) = EVT_EXIT_WALK(60, 1, "flo_17", 0);
|
||||
|
||||
EvtScript N(80242AF8) = {
|
||||
EVT_BIND_TRIGGER(N(exitWalk_80242A40), TRIGGER_FLOOR_ABOVE, 0, 1, 0)
|
||||
@ -240,7 +240,7 @@ static s32 N(pad_36FC) = {
|
||||
|
||||
#define SUPER_BLOCK_MAPVAR MapVar(0)
|
||||
#define SUPER_BLOCK_GAMEFLAG GF_FLO16_SuperBlock
|
||||
#include "world/common/atomic/SuperBlockData.inc.c"
|
||||
#include "world/common/atomic/SuperBlock.data.inc.c"
|
||||
|
||||
EvtScript N(80243D48) = {
|
||||
EVT_LABEL(0)
|
||||
|
@ -78,9 +78,9 @@ EvtScript N(802432F0) = {
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(exitWalk_8024359C) = EXIT_WALK_SCRIPT(60, 0, "flo_16", 1);
|
||||
EvtScript N(exitWalk_8024359C) = EVT_EXIT_WALK(60, 0, "flo_16", 1);
|
||||
|
||||
EvtScript N(exitWalk_802435F8) = EXIT_WALK_SCRIPT(60, 1, "flo_18", 0);
|
||||
EvtScript N(exitWalk_802435F8) = EVT_EXIT_WALK(60, 1, "flo_18", 0);
|
||||
|
||||
EvtScript N(80243654) = {
|
||||
EVT_BIND_TRIGGER(N(exitWalk_8024359C), TRIGGER_FLOOR_ABOVE, 0, 1, 0)
|
||||
|
@ -60,7 +60,7 @@ EvtScript N(updateTexturePan_802408C0) = {
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(exitWalk_8024095C) = EXIT_WALK_SCRIPT(60, 0, "flo_17", 1);
|
||||
EvtScript N(exitWalk_8024095C) = EVT_EXIT_WALK(60, 0, "flo_17", 1);
|
||||
|
||||
EvtScript N(802409B8) = {
|
||||
EVT_BIND_TRIGGER(N(exitWalk_8024095C), TRIGGER_FLOOR_ABOVE, 0, 1, 0)
|
||||
|
@ -94,7 +94,7 @@ EvtScript N(updateTexturePan_80240B00) = {
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(exitWalk_80240B9C) = EXIT_WALK_SCRIPT(60, 1, "flo_21", 0);
|
||||
EvtScript N(exitWalk_80240B9C) = EVT_EXIT_WALK(60, 1, "flo_21", 0);
|
||||
|
||||
EvtScript N(80240BF8) = {
|
||||
EVT_BIND_TRIGGER(N(exitWalk_80240B9C), TRIGGER_FLOOR_ABOVE, 0, 1, 0)
|
||||
@ -512,7 +512,7 @@ EvtScript N(80241CC4) = {
|
||||
EvtScript N(802423F8) = {
|
||||
EVT_IF_EQ(AreaFlag(44), 0)
|
||||
EVT_CALL(DisablePlayerInput, TRUE)
|
||||
EVT_CALL(func_802D2B6C)
|
||||
EVT_CALL(InterruptUsePartner)
|
||||
EVT_WAIT(15)
|
||||
EVT_CALL(DisablePartnerAI, 0)
|
||||
EVT_SET(AreaFlag(44), 1)
|
||||
|
@ -144,7 +144,7 @@ EvtScript N(80240E3C) = {
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(exitWalk_802412F4) = EXIT_WALK_SCRIPT(60, 0, "flo_19", 1);
|
||||
EvtScript N(exitWalk_802412F4) = EVT_EXIT_WALK(60, 0, "flo_19", 1);
|
||||
|
||||
EvtScript N(80241350) = {
|
||||
EVT_BIND_TRIGGER(N(exitWalk_802412F4), TRIGGER_FLOOR_ABOVE, 0, 1, 0)
|
||||
@ -343,7 +343,7 @@ EvtScript N(80241B98) = {
|
||||
EVT_EXEC_GET_TID(N(802418C0), LVar9)
|
||||
EVT_CALL(GetCurrentPartner, LVar0)
|
||||
EVT_IF_NE(LVar0, 0)
|
||||
EVT_CALL(func_802D2B6C)
|
||||
EVT_CALL(InterruptUsePartner)
|
||||
EVT_WAIT(20)
|
||||
EVT_END_IF
|
||||
EVT_CALL(DisablePlayerPhysics, TRUE)
|
||||
|
@ -31,7 +31,7 @@ EvtScript N(802402E0) = {
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(exitWalk_80240350) = EXIT_WALK_SCRIPT(60, 0, "flo_03", 1);
|
||||
EvtScript N(exitWalk_80240350) = EVT_EXIT_WALK(60, 0, "flo_03", 1);
|
||||
|
||||
EvtScript N(802403AC) = {
|
||||
EVT_BIND_TRIGGER(N(exitWalk_80240350), TRIGGER_FLOOR_ABOVE, 0, 1, 0)
|
||||
|
@ -80,9 +80,9 @@ EvtScript N(80240DA0) = {
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(exitWalk_8024104C) = EXIT_WALK_SCRIPT(60, 0, "flo_00", 2);
|
||||
EvtScript N(exitWalk_8024104C) = EVT_EXIT_WALK(60, 0, "flo_00", 2);
|
||||
|
||||
EvtScript N(exitWalk_802410A8) = EXIT_WALK_SCRIPT(60, 1, "flo_11", 0);
|
||||
EvtScript N(exitWalk_802410A8) = EVT_EXIT_WALK(60, 1, "flo_11", 0);
|
||||
|
||||
EvtScript N(80241104) = {
|
||||
EVT_BIND_TRIGGER(N(exitWalk_802410A8), TRIGGER_FLOOR_ABOVE, 0, 1, 0)
|
||||
|
@ -70,9 +70,9 @@ EvtScript N(80240690) = {
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(exitWalk_8024093C) = EXIT_WALK_SCRIPT(60, 0, "flo_08", 1);
|
||||
EvtScript N(exitWalk_8024093C) = EVT_EXIT_WALK(60, 0, "flo_08", 1);
|
||||
|
||||
EvtScript N(exitWalk_80240998) = EXIT_WALK_SCRIPT(60, 1, "flo_10", 0);
|
||||
EvtScript N(exitWalk_80240998) = EVT_EXIT_WALK(60, 1, "flo_10", 0);
|
||||
|
||||
EvtScript N(802409F4) = {
|
||||
EVT_BIND_TRIGGER(N(exitWalk_8024093C), TRIGGER_FLOOR_ABOVE, 0, 1, 0)
|
||||
|
@ -80,9 +80,9 @@ EvtScript N(802423A0) = {
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(exitWalk_8024264C) = EXIT_WALK_SCRIPT(60, 0, "flo_00", 3);
|
||||
EvtScript N(exitWalk_8024264C) = EVT_EXIT_WALK(60, 0, "flo_00", 3);
|
||||
|
||||
EvtScript N(exitWalk_802426A8) = EXIT_WALK_SCRIPT(60, 1, "flo_07", 0);
|
||||
EvtScript N(exitWalk_802426A8) = EVT_EXIT_WALK(60, 1, "flo_07", 0);
|
||||
|
||||
EvtScript N(80242704) = {
|
||||
EVT_BIND_TRIGGER(N(exitWalk_802426A8), TRIGGER_FLOOR_ABOVE, 0, 1, 0)
|
||||
|
@ -22,4 +22,6 @@ enum {
|
||||
|
||||
#define AF_GV(index) AreaFlag(index)
|
||||
|
||||
extern MapSettings gv_01_settings;
|
||||
|
||||
#endif
|
||||
|
@ -1,62 +0,0 @@
|
||||
#include "gv_01.h"
|
||||
#include "sprite.h"
|
||||
#include "hud_element.h"
|
||||
|
||||
#include "world/common/atomic/Pipe.inc.c"
|
||||
|
||||
#include "world/common/atomic/TexturePan.inc.c"
|
||||
|
||||
ApiStatus func_802405EC_E1EA4C(Evt* script, s32 isInitialCall) {
|
||||
if (isInitialCall) {
|
||||
script->functionTemp[0] = 0;
|
||||
set_curtain_scale_goal(1.0);
|
||||
set_curtain_fade(0);
|
||||
}
|
||||
|
||||
script->functionTemp[0] += 5;
|
||||
if (script->functionTemp[0] > 255) {
|
||||
script->functionTemp[0] = 255;
|
||||
}
|
||||
|
||||
set_screen_overlay_color(1, 208, 208, 208);
|
||||
set_screen_overlay_params_back(0, script->functionTemp[0]);
|
||||
set_screen_overlay_alpha(1, 0);
|
||||
return script->functionTemp[0] == 255;
|
||||
}
|
||||
|
||||
ApiStatus func_80240688_E1EAE8(Evt* script, s32 isInitialCall) {
|
||||
gGameStatusPtr->isBattle = FALSE;
|
||||
gGameStatusPtr->unk_76 = 0;
|
||||
gGameStatusPtr->disableScripts = 0;
|
||||
gGameStatusPtr->keepUsingPartnerOnMapChange = 0;
|
||||
gOverrideFlags &= ~GLOBAL_OVERRIDES_8;
|
||||
general_heap_create();
|
||||
clear_render_tasks();
|
||||
clear_generic_entity_list();
|
||||
clear_script_list();
|
||||
create_cameras_a();
|
||||
spr_init_sprites(0);
|
||||
clear_entity_models();
|
||||
clear_animator_list();
|
||||
clear_model_data();
|
||||
clear_sprite_shading_data();
|
||||
reset_background_settings();
|
||||
hud_element_clear_cache();
|
||||
clear_trigger_data();
|
||||
clear_printers();
|
||||
clear_entity_data(0);
|
||||
clear_screen_overlays();
|
||||
clear_player_status();
|
||||
clear_npcs();
|
||||
clear_player_data();
|
||||
reset_battle_status();
|
||||
init_encounter_status();
|
||||
clear_effect_data();
|
||||
clear_item_entity_data();
|
||||
clear_saved_variables();
|
||||
initialize_collision();
|
||||
intro_logos_set_fade_alpha(255);
|
||||
intro_logos_set_fade_color(208);
|
||||
set_game_mode(GAME_MODE_TITLE_SCREEN);
|
||||
return ApiStatus_FINISH;
|
||||
}
|
199
src/world/area_gv/gv_01/gv_01.c
Normal file
199
src/world/area_gv/gv_01/gv_01.c
Normal file
@ -0,0 +1,199 @@
|
||||
#include "gv_01.h"
|
||||
#include "sprite.h"
|
||||
#include "hud_element.h"
|
||||
|
||||
extern EvtScript N(EVS_Main);
|
||||
void reset_battle_status(void);
|
||||
|
||||
EntryList N(Entrances) = {
|
||||
{ 0.0, 0.0, 0.0, 90.0 }, /* gv_01_ENTRY_0 */
|
||||
};
|
||||
|
||||
MapSettings N(settings) = {
|
||||
.main = &N(EVS_Main),
|
||||
.entryList = &N(Entrances),
|
||||
.entryCount = ENTRY_COUNT(N(Entrances)),
|
||||
};
|
||||
|
||||
#include "world/common/atomic/Pipe.inc.c"
|
||||
#include "world/common/atomic/Pipe.data.inc.c"
|
||||
|
||||
#include "world/common/atomic/TexturePan.inc.c"
|
||||
#include "world/common/atomic/TexturePan.data.inc.c"
|
||||
|
||||
s32 N(DropLetterYCurve)[] = {
|
||||
200, 170, 140, 110, 80, 50, 20, 10,
|
||||
26, 29, 30, 29, 26, 10, 0, 12,
|
||||
15, 16, 15, 11, 6, 0, 4, 3,
|
||||
1, 0,
|
||||
};
|
||||
|
||||
s32 N(DropLastLetterYCurve)[] = {
|
||||
200, 170, 140, 110, 80, 50, 20, 0,
|
||||
12, 15, 16, 15, 11, 6, 0, 4,
|
||||
3, 1, 0,
|
||||
};
|
||||
|
||||
API_CALLABLE(N(FadeToTitleScreen));
|
||||
API_CALLABLE(N(ChangeStateToTitleScreen));
|
||||
|
||||
EvtScript N(EVS_DropLetter) = {
|
||||
EVT_USE_BUF(N(DropLetterYCurve))
|
||||
EVT_LOOP(ARRAY_COUNT(N(DropLetterYCurve)))
|
||||
EVT_BUF_READ1(LVar1)
|
||||
EVT_CALL(TranslateGroup, LVar0, 0, LVar1, 0)
|
||||
EVT_WAIT(1)
|
||||
EVT_END_LOOP
|
||||
EVT_RETURN
|
||||
//@bug not terminated!
|
||||
};
|
||||
|
||||
EvtScript N(EVS_DropLastLetter) = {
|
||||
EVT_USE_BUF(N(DropLastLetterYCurve))
|
||||
EVT_LOOP(ARRAY_COUNT(N(DropLastLetterYCurve)))
|
||||
EVT_BUF_READ1(LVar1)
|
||||
EVT_CALL(TranslateGroup, LVar0, 0, LVar1, 0)
|
||||
EVT_WAIT(1)
|
||||
EVT_END_LOOP
|
||||
EVT_RETURN
|
||||
//@bug not terminated!
|
||||
};
|
||||
|
||||
EvtScript N(EVS_Main) = {
|
||||
EVT_CALL(DisablePlayerInput, TRUE)
|
||||
EVT_CALL(ModifyGlobalOverrideFlags, 0, GLOBAL_OVERRIDES_20000)
|
||||
EVT_SETUP_CAMERA_DEFAULT()
|
||||
EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE)
|
||||
EVT_THREAD
|
||||
EVT_CALL(GetCurrentPartnerID, LVar0)
|
||||
EVT_IF_NE(LVar0, PARTNER_NONE)
|
||||
EVT_CALL(DisablePartnerAI, 0)
|
||||
EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE)
|
||||
EVT_CALL(SetNpcPos, NPC_PARTNER, NPC_DISPOSE_LOCATION)
|
||||
EVT_END_IF
|
||||
EVT_CALL(SetPlayerFlagBits, PS_FLAGS_200000, TRUE)
|
||||
EVT_CALL(InterpPlayerYaw, 90, 0)
|
||||
EVT_WAIT(2)
|
||||
EVT_CALL(RandInt, 4, LVar0)
|
||||
EVT_SWITCH(LVar0)
|
||||
EVT_CASE_EQ(0)
|
||||
EVT_CALL(SetPlayerAnimation, ANIM_Mario_1000D)
|
||||
EVT_CASE_EQ(1)
|
||||
EVT_CALL(SetPlayerAnimation, ANIM_Mario_Crouch)
|
||||
EVT_CASE_EQ(2)
|
||||
EVT_CALL(SetPlayerAnimation, ANIM_Mario_ShockStill)
|
||||
EVT_CASE_EQ(3)
|
||||
EVT_CALL(SetPlayerAnimation, ANIM_Mario_AnimPray)
|
||||
EVT_CASE_EQ(4)
|
||||
EVT_CALL(SetPlayerAnimation, ANIM_Mario_DeadStill)
|
||||
EVT_END_SWITCH
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(SetMusicTrack, 0, SONG_GAME_OVER, 0, 8)
|
||||
EVT_CALL(ClearAmbientSounds, 0)
|
||||
EVT_THREAD
|
||||
EVT_WAIT(200)
|
||||
EVT_CALL(N(FadeToTitleScreen))
|
||||
EVT_CALL(N(ChangeStateToTitleScreen))
|
||||
EVT_WAIT(100)
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(SetMotionBlurParams, 0, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 128, 10)
|
||||
EVT_CALL(TranslateGroup, MODEL_g, 0, 200, 0)
|
||||
EVT_CALL(TranslateGroup, MODEL_a, 0, 200, 0)
|
||||
EVT_CALL(TranslateGroup, MODEL_m, 0, 200, 0)
|
||||
EVT_CALL(TranslateGroup, MODEL_e, 0, 200, 0)
|
||||
EVT_CALL(TranslateGroup, MODEL_o, 0, 200, 0)
|
||||
EVT_CALL(TranslateGroup, MODEL_v, 0, 200, 0)
|
||||
EVT_CALL(TranslateGroup, MODEL_e2, 0, 200, 0)
|
||||
EVT_CALL(TranslateGroup, MODEL_r, 0, 200, 0)
|
||||
EVT_THREAD
|
||||
EVT_WAIT(6)
|
||||
EVT_SET(LVar0, MODEL_g)
|
||||
EVT_EXEC(N(EVS_DropLetter))
|
||||
EVT_WAIT(6)
|
||||
EVT_SET(LVar0, MODEL_a)
|
||||
EVT_EXEC(N(EVS_DropLetter))
|
||||
EVT_WAIT(12)
|
||||
EVT_SET(LVar0, MODEL_m)
|
||||
EVT_EXEC(N(EVS_DropLetter))
|
||||
EVT_WAIT(6)
|
||||
EVT_SET(LVar0, MODEL_e)
|
||||
EVT_EXEC(N(EVS_DropLetter))
|
||||
EVT_WAIT(6)
|
||||
EVT_SET(LVar0, MODEL_o)
|
||||
EVT_EXEC(N(EVS_DropLetter))
|
||||
EVT_WAIT(6)
|
||||
EVT_SET(LVar0, MODEL_v)
|
||||
EVT_EXEC(N(EVS_DropLetter))
|
||||
EVT_WAIT(6)
|
||||
EVT_SET(LVar0, MODEL_e2)
|
||||
EVT_EXEC(N(EVS_DropLetter))
|
||||
EVT_WAIT(18)
|
||||
EVT_SET(LVar0, MODEL_r)
|
||||
EVT_EXEC(N(EVS_DropLastLetter))
|
||||
EVT_END_THREAD
|
||||
EVT_THREAD
|
||||
EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 0, 10, 0)
|
||||
EVT_CALL(SetPanTarget, CAM_DEFAULT, 0, 0, 0)
|
||||
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(0.3))
|
||||
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
|
||||
EVT_WAIT(94)
|
||||
EVT_CALL(SetPanTarget, CAM_DEFAULT, 0, 0, 1000)
|
||||
EVT_END_THREAD
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
ApiStatus N(FadeToTitleScreen)(Evt* script, s32 isInitialCall) {
|
||||
if (isInitialCall) {
|
||||
script->functionTemp[0] = 0;
|
||||
set_curtain_scale_goal(1.0);
|
||||
set_curtain_fade(0);
|
||||
}
|
||||
|
||||
script->functionTemp[0] += 5;
|
||||
if (script->functionTemp[0] > 255) {
|
||||
script->functionTemp[0] = 255;
|
||||
}
|
||||
|
||||
set_screen_overlay_color(1, 208, 208, 208);
|
||||
set_screen_overlay_params_back(0, script->functionTemp[0]);
|
||||
set_screen_overlay_alpha(1, 0);
|
||||
return script->functionTemp[0] == 255;
|
||||
}
|
||||
|
||||
ApiStatus N(ChangeStateToTitleScreen)(Evt* script, s32 isInitialCall) {
|
||||
gGameStatusPtr->isBattle = FALSE;
|
||||
gGameStatusPtr->unk_76 = 0;
|
||||
gGameStatusPtr->disableScripts = 0;
|
||||
gGameStatusPtr->keepUsingPartnerOnMapChange = 0;
|
||||
gOverrideFlags &= ~GLOBAL_OVERRIDES_8;
|
||||
general_heap_create();
|
||||
clear_render_tasks();
|
||||
clear_generic_entity_list();
|
||||
clear_script_list();
|
||||
create_cameras_a();
|
||||
spr_init_sprites(0);
|
||||
clear_entity_models();
|
||||
clear_animator_list();
|
||||
clear_model_data();
|
||||
clear_sprite_shading_data();
|
||||
reset_background_settings();
|
||||
hud_element_clear_cache();
|
||||
clear_trigger_data();
|
||||
clear_printers();
|
||||
clear_entity_data(0);
|
||||
clear_screen_overlays();
|
||||
clear_player_status();
|
||||
clear_npcs();
|
||||
clear_player_data();
|
||||
reset_battle_status();
|
||||
init_encounter_status();
|
||||
clear_effect_data();
|
||||
clear_item_entity_data();
|
||||
clear_saved_variables();
|
||||
initialize_collision();
|
||||
intro_logos_set_fade_alpha(255);
|
||||
intro_logos_set_fade_color(208);
|
||||
set_game_mode(GAME_MODE_TITLE_SCREEN);
|
||||
return ApiStatus_FINISH;
|
||||
}
|
@ -2,8 +2,11 @@
|
||||
/// @brief - Game Over Screen
|
||||
|
||||
#include "common.h"
|
||||
#include "../gv.h"
|
||||
#include "message_ids.h"
|
||||
#include "map.h"
|
||||
|
||||
#include "../gv.h"
|
||||
#include "mapfs/gv_01_shape.h"
|
||||
#include "mapfs/gv_01_hit.h"
|
||||
|
||||
#define NAMESPACE gv_01
|
||||
|
@ -14,6 +14,6 @@ static char* N(exit_str_1) = "";
|
||||
|
||||
ApiStatus func_802402BC_98679C(Evt* script, s32 isInitialCall) {
|
||||
Entity* bigChest = get_entity_by_index(script->varTable[0]);
|
||||
bigChest->dataBuf.chest->unk_30 = TRUE;
|
||||
bigChest->dataBuf.chest->gotItemDone = TRUE;
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user