mirror of
https://github.com/pmret/papermario.git
synced 2024-11-08 12:02:30 +01:00
area_dro (#821)
* dro work * nok varstash dupes * p1 * rest * documentin * fixes * imports sorted * dro_01 cleaned up * dro done * kmr_06 * cleanup * mergin * warnings * really fix warnings * git subrepo pull --force tools/splat subrepo: subdir: "tools/splat" merged: "ebadd64f07" upstream: origin: "https://github.com/ethteck/splat.git" branch: "master" commit: "ebadd64f07" git-subrepo: version: "0.4.5" origin: "https://github.com/ingydotnet/git-subrepo" commit: "aa416e4" * dead map reorg I * dead reorg II * dead reorg III * dead reorg IV * got a func * part of area_kmr * oops Co-authored-by: HailSanta <Hail2Santa@gmail.com> Co-authored-by: Ethan Roseman <ethteck@gmail.com>
This commit is contained in:
parent
c1c1dfd533
commit
fab07c1c8c
@ -338,7 +338,7 @@ typedef struct PlayerData {
|
||||
/* 0x2C4 */ s32 partnerUnlockedTime[12];
|
||||
/* 0x2F4 */ s32 partnerUsedTime[12];
|
||||
/* 0x324 */ s32 tradeEventStartTime;
|
||||
/* 0x328 */ s32 droTreeOrbitTime;
|
||||
/* 0x328 */ s32 droTreeHintTime;
|
||||
/* 0x32C */ s16 starPiecesCollected;
|
||||
/* 0x32E */ u16 jumpGamePlays;
|
||||
/* 0x330 */ u32 jumpGameTotal; /* all-time winnings, max = 99999 */
|
||||
|
@ -788,6 +788,7 @@ enum SoundIDs {
|
||||
SOUND_203 = 0x00000203,
|
||||
SOUND_204 = 0x00000204,
|
||||
SOUND_205 = 0x00000205,
|
||||
SOUND_206 = 0x00000206,
|
||||
SOUND_207 = 0x00000207,
|
||||
SOUND_208 = 0x00000208,
|
||||
SOUND_209 = 0x00000209,
|
||||
@ -2375,6 +2376,14 @@ enum EncounterOutcomes {
|
||||
OUTCOME_ENEMY_FLED = 3,
|
||||
};
|
||||
|
||||
enum MerleeSpellType {
|
||||
MERLEE_SPELL_0 = 0,
|
||||
MERLEE_SPELL_1 = 1,
|
||||
MERLEE_SPELL_2 = 2,
|
||||
MERLEE_SPELL_3 = 3,
|
||||
MERLEE_SPELL_4 = 4, // extra coins
|
||||
};
|
||||
|
||||
enum NpcDecorationIDs {
|
||||
NPC_DECORATION_NONE = 0x00000000,
|
||||
NPC_DECORATION_BOWSER_AURA = 0x00000001,
|
||||
@ -4832,7 +4841,7 @@ enum EffectInstanceFlags {
|
||||
EFFECT_INSTANCE_FLAGS_2 = 0x00000002,
|
||||
EFFECT_INSTANCE_FLAGS_4 = 0x00000004,
|
||||
EFFECT_INSTANCE_FLAGS_8 = 0x00000008,
|
||||
EFFECT_INSTANCE_FLAGS_10 = 0x00000010,
|
||||
EFFECT_INSTANCE_FLAGS_10 = 0x00000010, // mark ready for cleanup
|
||||
EFFECT_INSTANCE_FLAGS_20 = 0x00000020,
|
||||
EFFECT_INSTANCE_FLAGS_40 = 0x00000040,
|
||||
EFFECT_INSTANCE_FLAGS_80 = 0x00000080,
|
||||
|
@ -134,6 +134,7 @@
|
||||
#define ASCII_TO_U32(a, b, c, d) ((u32)((a << 24) | (b << 16) | (c << 8) | (d << 0)))
|
||||
|
||||
#define ITEM_VIS_GROUP(itemID, visGroupID) ((visGroupID) << 16 | (itemID))
|
||||
#define VIS_GROUP_PAIR(group1, group2) ((group1) << 12 | (group2))
|
||||
|
||||
// loads integrator with standard parameter set used for falling
|
||||
|
||||
|
@ -88,19 +88,19 @@ typedef struct MobileAISettings {
|
||||
/* 0x20 */ s32 chaseUpdateInterval; // how often to re-run chase init and re-acquire player position (frames)
|
||||
/* 0x24 */ f32 chaseRadius;
|
||||
/* 0x28 */ f32 chaseOffsetDist; // offset along npc->yaw of the test point for chase volume overlap, creates directionality to enemy 'sight'
|
||||
/* 0x2C */ s32 unk_AI_2C; // unk time
|
||||
/* 0x2C */ s32 unk_AI_2C; // probably a boolean for enable loitering after a wander movement
|
||||
} MobileAISettings; // size = 0x30
|
||||
|
||||
typedef struct StationaryAISettings {
|
||||
/* 0x00 */ f32 unk_00;
|
||||
/* 0x04 */ f32 unk_04;
|
||||
/* 0x00 */ f32 unk_00; // probably equivalent to alertRadius in MobileAISettings
|
||||
/* 0x04 */ f32 unk_04; // probably equivalent to alertOffsetDist in MobileAISettings
|
||||
/* 0x08 */ s32 playerSearchInterval; // how often to search for player (frames)
|
||||
/* 0x0C */ f32 chaseSpeed;
|
||||
/* 0x10 */ s32 chaseTurnRate; // how many degrees this NPC can turn per frame while chasing
|
||||
/* 0x14 */ s32 chaseUpdateInterval; // how often to re-run chase init and re-acquire player position (frames)
|
||||
/* 0x18 */ f32 chaseRadius;
|
||||
/* 0x1C */ f32 chaseOffsetDist; // offset along npc->yaw of the test point for alert volume overlap, creates directionality to enemy 'sight'
|
||||
/* 0x20 */ s32 unk_20;
|
||||
/* 0x20 */ s32 unk_20; // probably equivalent to unk_AI_2C in MobileAISettings
|
||||
} StationaryAISettings; // size = 0x24
|
||||
|
||||
struct FireBarData;
|
||||
@ -225,6 +225,7 @@ typedef union {
|
||||
|
||||
typedef union NpcInitialVars {
|
||||
/* 0x0 */ s32 value;
|
||||
/* 0x0 */ s8 bytes[4];
|
||||
/* 0x0 */ s32* array;
|
||||
} NpcInitialVars;
|
||||
|
||||
|
@ -290,7 +290,6 @@ ApiStatus CamPresetUpdate_L(Evt* script, s32 isInitialCall);
|
||||
ApiStatus SetBattleCamPos(Evt* script, s32 isInitialCall);
|
||||
ApiStatus SetBattleCamParam(Evt* script, s32 isInitialCall);
|
||||
ApiStatus func_8026DF88(Evt* script, s32 isInitialCall);
|
||||
ApiStatus InitVirtualEntityList(Evt* script, s32 isInitialCall);
|
||||
ApiStatus InitAnimatedModels(Evt* script, s32 isInitialCall);
|
||||
ApiStatus func_8024CE9C(Evt* script, s32 isInitialCall);
|
||||
ApiStatus func_802CABE8(Evt* script, s32 isInitialCall);
|
||||
|
@ -194,6 +194,7 @@ ApiStatus EnablePartner(Evt* script, s32 isInitialCall);
|
||||
ApiStatus DisablePartner(Evt* script, s32 isInitialCall);
|
||||
ApiStatus UseEntryHeading(Evt* script, s32 isInitialCall);
|
||||
ApiStatus UseExitHeading(Evt* script, s32 isInitialCall);
|
||||
ApiStatus InitVirtualEntityList(Evt* script, s32 isInitialCall);
|
||||
ApiStatus DisablePulseStone(Evt* script, s32 isInitialCall);
|
||||
ApiStatus GetCurrentPartner(Evt* script, s32 isInitialCall);
|
||||
ApiStatus Disable8bitMario(Evt* script, s32 isInitialCall);
|
||||
@ -208,6 +209,11 @@ ApiStatus AwaitPlayerApproach(Evt* script, s32 isInitialCall);
|
||||
ApiStatus IsPlayerWithin(Evt* script, s32 isInitialCall);
|
||||
ApiStatus AwaitPlayerLeave(Evt* script, s32 isInitialCall);
|
||||
ApiStatus AddVectorPolar(Evt* script, s32 isInitialCall);
|
||||
ApiStatus func_802D4BDC(Evt* script, s32 initialCall);
|
||||
ApiStatus func_802D4C4C(Evt* script, s32 initialCall);
|
||||
ApiStatus func_802D4CC4(Evt* script, s32 initialCall);
|
||||
ApiStatus func_802D4D14(Evt* script, s32 initialCall);
|
||||
ApiStatus func_802D4D88(Evt* script, s32 initialCall);
|
||||
ApiStatus LoadPath(Evt* script, s32 isInitialCall);
|
||||
ApiStatus GetNextPathPos(Evt* script, s32 isInitialCall);
|
||||
ApiStatus GetDist2D(Evt* script, s32 isInitialCall);
|
||||
@ -256,6 +262,8 @@ ApiStatus ShowGotItem(Evt* script, s32 isInitialCall);
|
||||
ApiStatus ShowEmote(Evt* script, s32 isInitialCall);
|
||||
ApiStatus ShowSleepBubble(Evt* script, s32 isInitialCall);
|
||||
ApiStatus RemoveEffect(Evt* script, s32 isInitialCall);
|
||||
ApiStatus func_802D7B10(Evt* script, s32 isInitialCall);
|
||||
ApiStatus func_802D7B44(Evt* script, s32 isInitialCall);
|
||||
ApiStatus PlayEffect(Evt* script, s32 isInitialCall);
|
||||
ApiStatus SetSpriteShading(Evt* script, s32 isInitialCall);
|
||||
ApiStatus EnableSpriteShading(Evt* script, s32 isInitialCall);
|
||||
@ -286,7 +294,6 @@ ApiStatus GetVirtualEntityPosition(Evt* script, s32 isInitialCall);
|
||||
ApiStatus VirtualEntityJumpTo(Evt* script, s32 isInitialCall);
|
||||
ApiStatus func_802D2884(Evt* script, s32 isInitialCall);
|
||||
ApiStatus func_802D2C14(Evt* script, s32 isInitialCall);
|
||||
ApiStatus func_802D7B10(Evt* script, s32 isInitialCall);
|
||||
ApiStatus ShowConsumableChoicePopup(Evt* script, s32 isInitialCall);
|
||||
ApiStatus func_800458CC(Evt* script, s32 isInitialCall);
|
||||
ApiStatus OnPlayerFled(Evt* script, s32 isInitialCall);
|
||||
|
@ -32,5 +32,6 @@ extern EvtScript ExitDoubleDoor;
|
||||
extern EvtScript EnterDoubleDoor;
|
||||
extern EvtScript ExitSplitDoubleDoor;
|
||||
extern EvtScript EnterSplitDoubleDoor;
|
||||
extern EvtScript EnterPostPipe;
|
||||
|
||||
#endif
|
||||
|
@ -2079,15 +2079,15 @@ void btl_state_update_end_battle(void) {
|
||||
|
||||
btl_delete_player_actor(battleStatus->playerActor);
|
||||
|
||||
if (battleStatus->nextMerleeSpellType == 4) {
|
||||
encounterStatus->merleeCoinBonus = 1;
|
||||
if (battleStatus->nextMerleeSpellType == MERLEE_SPELL_4) {
|
||||
encounterStatus->merleeCoinBonus = TRUE;
|
||||
battleStatus->nextMerleeSpellType = 0;
|
||||
}
|
||||
|
||||
encounterStatus->damageTaken = battleStatus->damageTaken;
|
||||
|
||||
if (gBattleStatus.flags2 & BS_FLAGS2_10000000) {
|
||||
encounterStatus->dropWhackaBump = 1;
|
||||
encounterStatus->dropWhackaBump = TRUE;
|
||||
}
|
||||
|
||||
remove_all_effects();
|
||||
|
@ -116,7 +116,7 @@ void clear_player_data(void) {
|
||||
playerData->partnerUsedTime[i] = 0;
|
||||
}
|
||||
|
||||
playerData->droTreeOrbitTime = 0;
|
||||
playerData->droTreeHintTime = 0;
|
||||
playerData->starPiecesCollected = 0;
|
||||
playerData->jumpGamePlays = 0;
|
||||
playerData->jumpGameTotal = 0;
|
||||
|
@ -1,7 +0,0 @@
|
||||
#include "dead.h"
|
||||
#include "common.h"
|
||||
|
||||
#define NAMESPACE EA0900
|
||||
|
||||
#include "world/common/atomic/TexturePan.inc.c"
|
||||
|
@ -1,7 +0,0 @@
|
||||
#include "dead.h"
|
||||
#include "common.h"
|
||||
|
||||
#define NAMESPACE EA7010
|
||||
|
||||
#include "world/common/atomic/TexturePan.inc.c"
|
||||
|
@ -1,7 +0,0 @@
|
||||
#include "dead.h"
|
||||
#include "common.h"
|
||||
|
||||
#define NAMESPACE EB0E60
|
||||
|
||||
#include "world/common/atomic/TexturePan.inc.c"
|
||||
|
@ -1,7 +0,0 @@
|
||||
#include "dead.h"
|
||||
#include "common.h"
|
||||
|
||||
#define NAMESPACE EB7230
|
||||
|
||||
#include "world/common/atomic/TexturePan.inc.c"
|
||||
|
@ -1,6 +0,0 @@
|
||||
#include "dead.h"
|
||||
#include "common.h"
|
||||
|
||||
#define NAMESPACE EC2200
|
||||
|
||||
#include "world/common/todo/DeadUnkFunc1.inc.c"
|
@ -1,6 +0,0 @@
|
||||
#include "dead.h"
|
||||
#include "common.h"
|
||||
|
||||
#define NAMESPACE EC2610
|
||||
|
||||
#include "common/foliage.inc.c"
|
@ -1,8 +0,0 @@
|
||||
#include "dead.h"
|
||||
#include "common.h"
|
||||
|
||||
// Copy of flo_08 (CAED40.c)
|
||||
|
||||
#define NAMESPACE EC9D00
|
||||
|
||||
#include "world/common/entity/SuperBlock.inc.c"
|
@ -1,6 +0,0 @@
|
||||
#include "dead.h"
|
||||
#include "common.h"
|
||||
|
||||
#define NAMESPACE ECAA40
|
||||
|
||||
#include "world/common/todo/DeadUnkFunc1.inc.c"
|
58
src/ECAA80.c
58
src/ECAA80.c
@ -1,58 +0,0 @@
|
||||
#include "dead.h"
|
||||
#include "common.h"
|
||||
#include "effects.h"
|
||||
#include "dead_structs.h"
|
||||
|
||||
// Copy of flo_08 (CAFAC0.c)
|
||||
|
||||
#define NAMESPACE ECAA80
|
||||
|
||||
extern s32 N(ItemChoiceList)[];
|
||||
extern s32 N(FlowerGuard_ItemChoiceList)[91];
|
||||
extern s32 ECAA80_ItemChoice_HasSelectedItem;
|
||||
extern s32 ECAA80_ItemChoice_SelectedItemID;
|
||||
|
||||
void ECAA80_UnkFloAI_Chase(Evt* script, MobileAISettings* aiSettings, EnemyDetectVolume* territory);
|
||||
|
||||
#include "world/common/enemy/ai/UnkFloAI.inc.c"
|
||||
|
||||
// following four functions can be folded into this combined include when the last two are done
|
||||
// #include "world/common/atomic/ItemChoice_PartA.inc.c"
|
||||
|
||||
#include "world/common/todo/GetNpcCollisionHeight.inc.c"
|
||||
|
||||
#include "world/common/todo/AddPlayerHandsOffset.inc.c"
|
||||
|
||||
// Needs data migrated
|
||||
#ifdef NON_MATCHING
|
||||
ApiStatus ECAA80_ItemChoice_WaitForSelection(Evt *script, s32 isInitialCall) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
|
||||
if (isInitialCall) {
|
||||
ECAA80_ItemChoice_HasSelectedItem = FALSE;
|
||||
}
|
||||
if (ECAA80_ItemChoice_HasSelectedItem) {
|
||||
ECAA80_ItemChoice_HasSelectedItem = FALSE;
|
||||
dead_evt_set_variable(script, *args++, ECAA80_ItemChoice_SelectedItemID);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
return ApiStatus_BLOCK;
|
||||
}
|
||||
#else
|
||||
INCLUDE_ASM(s32, "ECAA80", func_8024199C_ECB69C);
|
||||
#endif
|
||||
|
||||
// ECAA80_ItemChoice_SaveSelected (needs data?)
|
||||
|
||||
ApiStatus ECAA80_ItemChoice_SaveSelected(Evt *script, s32 isInitialCall) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
|
||||
ECAA80_ItemChoice_SelectedItemID = dead_evt_get_variable(script, *args++);
|
||||
ECAA80_ItemChoice_HasSelectedItem = TRUE;
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
|
||||
#include "world/common/atomic/MakeConsumableChoice.inc.c"
|
||||
|
||||
#include "world/common/atomic/ItemChoice_FlowerGuard.inc.c"
|
@ -1,6 +0,0 @@
|
||||
#include "dead.h"
|
||||
#include "common.h"
|
||||
|
||||
#define NAMESPACE ECB930
|
||||
|
||||
#include "common/foliage.inc.c"
|
@ -1,6 +0,0 @@
|
||||
#include "dead.h"
|
||||
#include "common.h"
|
||||
|
||||
#define NAMESPACE ECBB70
|
||||
|
||||
#include "world/common/todo/UnkFunc43.inc.c"
|
@ -1,6 +0,0 @@
|
||||
#include "dead.h"
|
||||
#include "common.h"
|
||||
|
||||
#define NAMESPACE ECFFF0
|
||||
|
||||
#include "world/common/todo/DeadUnkFunc1.inc.c"
|
@ -1,6 +0,0 @@
|
||||
#include "dead.h"
|
||||
#include "common.h"
|
||||
|
||||
#define NAMESPACE ED0030
|
||||
|
||||
#include "world/common/todo/UnkFunc43.inc.c"
|
@ -1,6 +0,0 @@
|
||||
#include "dead.h"
|
||||
#include "common.h"
|
||||
|
||||
#define NAMESPACE ED00D0
|
||||
|
||||
#include "common/foliage.inc.c"
|
@ -1,8 +0,0 @@
|
||||
#include "dead.h"
|
||||
#include "common.h"
|
||||
|
||||
// Copy of flo_09 (CB5320.c)
|
||||
|
||||
#define NAMESPACE ED0310
|
||||
|
||||
#include "world/common/enemy/ai/FlyingAI.inc.c"
|
@ -1,6 +0,0 @@
|
||||
#include "dead.h"
|
||||
#include "common.h"
|
||||
|
||||
#define NAMESPACE ED4260
|
||||
|
||||
#include "world/common/todo/DeadUnkFunc1.inc.c"
|
@ -1,6 +0,0 @@
|
||||
#include "dead.h"
|
||||
#include "common.h"
|
||||
|
||||
#define NAMESPACE ED5540
|
||||
|
||||
#include "common/foliage.inc.c"
|
11
src/EDBFE0.c
11
src/EDBFE0.c
@ -1,11 +0,0 @@
|
||||
#include "dead.h"
|
||||
#include "common.h"
|
||||
|
||||
#define NAMESPACE ED8FE0
|
||||
|
||||
void fx_sun_undeclared(s32, s32, s32, s32, s32, s32);
|
||||
|
||||
ApiStatus func_80240000_EDBFE0(Evt *script, s32 isInitialCall) {
|
||||
fx_sun_undeclared(0, 0, 0, 0, 0, 0);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
11
src/EDE9C0.c
11
src/EDE9C0.c
@ -1,11 +0,0 @@
|
||||
#include "dead.h"
|
||||
#include "common.h"
|
||||
|
||||
#define NAMESPACE EDE9C0
|
||||
|
||||
void fx_sun_undeclared(s32, s32, s32, s32, s32, s32);
|
||||
|
||||
ApiStatus func_80240000_EDE9C0(Evt *script, s32 isInitialCall) {
|
||||
fx_sun_undeclared(0, 0, 0, 0, 0, 0);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
70
src/EE70C0.c
70
src/EE70C0.c
File diff suppressed because one or more lines are too long
@ -1,6 +0,0 @@
|
||||
#include "dead.h"
|
||||
#include "common.h"
|
||||
|
||||
#define NAMESPACE EED100
|
||||
|
||||
#include "world/common/todo/DeadUnkFunc1.inc.c"
|
@ -1,6 +0,0 @@
|
||||
#include "dead.h"
|
||||
#include "common.h"
|
||||
|
||||
#define NAMESPACE EED140
|
||||
|
||||
#include "world/common/todo/UnkFunc43.inc.c"
|
@ -1,6 +0,0 @@
|
||||
#include "dead.h"
|
||||
#include "common.h"
|
||||
|
||||
#define NAMESPACE EF2610
|
||||
|
||||
#include "world/common/todo/DeadUnkFunc1.inc.c"
|
@ -1,6 +0,0 @@
|
||||
#include "dead.h"
|
||||
#include "common.h"
|
||||
|
||||
#define NAMESPACE EF7FB0
|
||||
|
||||
#include "world/common/todo/UnkFunc42.inc.c"
|
@ -1,6 +0,0 @@
|
||||
#include "dead.h"
|
||||
#include "common.h"
|
||||
|
||||
#define NAMESPACE EF8010
|
||||
|
||||
#include "common/foliage.inc.c"
|
@ -6,9 +6,9 @@ enum {
|
||||
AB_DRO_1 = AreaByte(1),
|
||||
AB_DRO_2 = AreaByte(2),
|
||||
AB_DRO_3 = AreaByte(3),
|
||||
AB_DRO_4 = AreaByte(4),
|
||||
AB_DRO_5 = AreaByte(5),
|
||||
AB_DRO_6 = AreaByte(6),
|
||||
AB_DRO_SHOP_PREV1 = AreaByte(4),
|
||||
AB_DRO_SHOP_PREV2 = AreaByte(5),
|
||||
AB_DRO_SHOP_PREV3 = AreaByte(6),
|
||||
AB_DRO_7 = AreaByte(7),
|
||||
AB_DRO_8 = AreaByte(8),
|
||||
AB_DRO_9 = AreaByte(9),
|
||||
@ -20,6 +20,15 @@ enum {
|
||||
AB_DRO_F = AreaByte(15),
|
||||
};
|
||||
|
||||
#define AF_DRO(index) AreaFlag(index)
|
||||
enum {
|
||||
AF_DRO_01 = AreaFlag(1),
|
||||
AF_DRO_DialogueToggle_Composer = AreaFlag(2),
|
||||
AF_DRO_03 = AreaFlag(3),
|
||||
AF_DRO_04 = AreaFlag(4),
|
||||
AF_DRO_05 = AreaFlag(5),
|
||||
};
|
||||
|
||||
extern MapSettings dro_01_settings;
|
||||
extern MapSettings dro_02_settings;
|
||||
|
||||
#endif
|
||||
|
@ -1,6 +0,0 @@
|
||||
#include "dro_01.h"
|
||||
|
||||
#include "world/common/entity/Pipe.inc.c"
|
||||
|
||||
#include "world/common/atomic/UnkFunc27.inc.c"
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,14 +0,0 @@
|
||||
#include "dro_01.h"
|
||||
|
||||
#define NAMESPACE dro_01_dup
|
||||
#include "world/common/todo/StashVars.inc.c"
|
||||
#define NAMESPACE dro_01
|
||||
|
||||
#define NAMESPACE dro_01_dup
|
||||
#include "world/common/todo/GetItemName.inc.c"
|
||||
#define NAMESPACE dro_01
|
||||
|
||||
ApiStatus N(func_80243578_95E778)(Evt* script, s32 isInitialCall) {
|
||||
hide_coin_counter_immediately();
|
||||
return ApiStatus_DONE2;
|
||||
}
|
@ -1,45 +0,0 @@
|
||||
#include "dro_01.h"
|
||||
|
||||
#define NAMESPACE dro_01_dup
|
||||
#include "world/common/entity/Pipe.inc.c"
|
||||
#define NAMESPACE dro_01
|
||||
|
||||
#include "common/foliage.inc.c"
|
||||
|
||||
FoliageModelList N(tree1_Leaves) = {
|
||||
.count = 1,
|
||||
.models = { 13 }
|
||||
};
|
||||
|
||||
FoliageModelList N(tree1_Trunk) = {
|
||||
.count = 1,
|
||||
.models = { 14 }
|
||||
};
|
||||
|
||||
FoliageDropList N(tree1_Drops) = {
|
||||
.count = 1,
|
||||
.drops = {
|
||||
{
|
||||
.itemID = ITEM_COIN,
|
||||
.pos = { 120, 92, -18 },
|
||||
.spawnMode = 0xF,
|
||||
.pickupFlag = GF_DRO01_Tree1_Coin,
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
ShakeTreeConfig N(tree1) = {
|
||||
.leaves = &N(tree1_Leaves),
|
||||
.trunk = &N(tree1_Trunk),
|
||||
.drops = &N(tree1_Drops),
|
||||
};
|
||||
|
||||
Vec4f N(triggerCoord_8024DD68) = { 120.0f, 0.0f, -43.0f, 0.0f };
|
||||
|
||||
EvtScript N(8024DD78) = {
|
||||
EVT_SET(LVar0, EVT_PTR(N(tree1)))
|
||||
EVT_BIND_TRIGGER(N(shakeTree), TRIGGER_WALL_HAMMER, 11, 1, 0)
|
||||
EVT_BIND_TRIGGER(N(shakeTree), TRIGGER_POINT_BOMB, EVT_PTR(N(triggerCoord_8024DD68)), 1, 0)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
@ -1,90 +1,68 @@
|
||||
#ifndef _DRO_01_H_
|
||||
#define _DRO_01_H_
|
||||
|
||||
/// @file dro_01.h
|
||||
/// @brief Dry Dry Outpost - Outpost 1
|
||||
|
||||
#include "common.h"
|
||||
#include "../dro.h"
|
||||
#include "message_ids.h"
|
||||
#include "map.h"
|
||||
|
||||
#include "../dro.h"
|
||||
#include "mapfs/dro_01_shape.h"
|
||||
#include "mapfs/dro_01_hit.h"
|
||||
|
||||
#include "sprite/npc/ChuckQuizmo.h"
|
||||
#include "sprite/npc/WorldParakarry.h"
|
||||
#include "sprite/npc/Mouser.h"
|
||||
#include "sprite/npc/Dryite.h"
|
||||
#include "sprite/npc/Musician.h"
|
||||
#include "sprite/npc/Toadette.h"
|
||||
|
||||
enum {
|
||||
NPC_Mouser_01 = 0,
|
||||
NPC_Dryite_01 = 1,
|
||||
NPC_Dryite_02 = 2,
|
||||
NPC_Dryite_03 = 3,
|
||||
NPC_Dryite_04 = 4,
|
||||
NPC_ArtistToad = 5,
|
||||
NPC_Mouser_ShopOwner = 6,
|
||||
NPC_ThreeSisters_01 = 7,
|
||||
NPC_ThreeSisters_02 = 8,
|
||||
NPC_ThreeSisters_03 = 9,
|
||||
NPC_ChuckQuizmo = 10,
|
||||
NPC_Dryite_05 = 11,
|
||||
NPC_Dryite_06 = 12,
|
||||
};
|
||||
|
||||
#define NAMESPACE dro_01
|
||||
|
||||
typedef struct {
|
||||
u32 itemID;
|
||||
u32 buyPrice;
|
||||
u32 descriptionID;
|
||||
} N(shopInventory);
|
||||
extern EvtScript N(EVS_Main);
|
||||
extern EvtScript N(EVS_SetupMusic);
|
||||
extern EvtScript N(EVS_MakeEntities);
|
||||
extern NpcGroupList N(DefaultNPCs);
|
||||
extern NpcGroupList N(Chapter3NPCs);
|
||||
|
||||
typedef struct {
|
||||
u32 itemID;
|
||||
u32 sellPrice;
|
||||
u32 unk_08;
|
||||
} N(shopPrice);
|
||||
extern EvtScript N(EVS_SetupBuildings);
|
||||
extern EvtScript N(EVS_SwingSign_Shop);
|
||||
extern EvtScript N(EVS_OpenShopDoor);
|
||||
extern EvtScript N(EVS_CloseShopDoor);
|
||||
|
||||
ApiStatus N(Quizmo_GetCamVfov)(Evt* script, s32 isInitialCall);
|
||||
ApiStatus N(Quizmo_ShouldQuizmoLeave)(Evt* script, s32 isInitialCall);
|
||||
ApiStatus N(Quizmo_NPC_Aux_Impl)(Evt* script, s32 isInitialCall);
|
||||
ApiStatus N(Quizmo_ShowEntities)(Evt* script, s32 isInitialCall);
|
||||
ApiStatus N(Quizmo_HideEntities)(Evt* script, s32 isInitialCall);
|
||||
ApiStatus N(Quizmo_SetCamVfov)(Evt* script, s32 isInitialCall);
|
||||
ApiStatus N(LetterDelivery_Init)(Evt* script, s32 isInitialCall);
|
||||
ApiStatus N(TransformFoliage)(Evt* script, s32 isInitialCall);
|
||||
ApiStatus N(AddPlayerHandsOffset)(Evt* script, s32 isInitialCall);
|
||||
ApiStatus N(Quizmo_HideWorld)(Evt* script, s32 isInitialCall);
|
||||
ApiStatus N(Quizmo_AddViewRelativeOffset)(Evt* script, s32 isInitialCall);
|
||||
ApiStatus N(Quizmo_UpdatePartnerPosition)(Evt* script, s32 isInitialCall);
|
||||
ApiStatus N(Quizmo_SpinPartner)(Evt* script, s32 isInitialCall);
|
||||
ApiStatus N(Quizmo_SpinPlayer)(Evt* script, s32 isInitialCall);
|
||||
ApiStatus N(LetterDelivery_CalcLetterPos)(Evt* script, s32 isInitialCall);
|
||||
ApiStatus N(UnkFunc27)(Evt* script, s32 isInitialCall);
|
||||
ApiStatus N(UnkFunc26)(Evt* script, s32 isInitialCall);
|
||||
ApiStatus N(PatrolNoAttackAI_Main)(Evt* script, s32 isInitialCall);
|
||||
ApiStatus N(Quizmo_ShouldAppear)(Evt* script, s32 isInitialCall);
|
||||
ApiStatus N(Quizmo_RenderInit)(Evt* script, s32 isInitialCall);
|
||||
ApiStatus N(Quizmo_FadeInWorld)(Evt* script, s32 isInitialCall);
|
||||
ApiStatus N(Quizmo_UpdateRecords)(Evt* script, s32 isInitialCall);
|
||||
ApiStatus N(Quizmo_CreateStage)(Evt* script, s32 isInitialCall);
|
||||
ApiStatus N(Quizmo_DestroyEffects)(Evt* script, s32 isInitialCall);
|
||||
ApiStatus N(Quizmo_SetStageLightsDelay)(Evt* script, s32 isInitialCall);
|
||||
ApiStatus N(Quizmo_UnkStageEffectMode)(Evt* script, s32 isInitialCall);
|
||||
ApiStatus N(Quizmo_SetVannaAnim_Idle)(Evt* script, s32 isInitialCall);
|
||||
ApiStatus N(Quizmo_SetVannaAnim_Clap)(Evt* script, s32 isInitialCall);
|
||||
ApiStatus N(Quizmo_SetVannaAnim_Wave)(Evt* script, s32 isInitialCall);
|
||||
ApiStatus N(Quizmo_CreateWorker)(Evt* script, s32 isInitialCall);
|
||||
ApiStatus N(func_80242730_95D930)(Evt* script, s32 isInitialCall);
|
||||
ApiStatus N(func_80242784_95D984)(Evt* script, s32 isInitialCall);
|
||||
ApiStatus N(BuildKeyItemChoiceList)(Evt* script, s32 isInitialCall);
|
||||
ApiStatus N(func_80242858_95DA58)(Evt* script, s32 isInitialCall);
|
||||
ApiStatus N(LetterDelivery_SaveNpcAnim)(Evt* script, s32 isInitialCall);
|
||||
ApiStatus N(LetterDelivery_RestoreNpcAnim)(Evt* script, s32 isInitialCall);
|
||||
ApiStatus N(func_80243084_95E284)(Evt* script, s32 isInitialCall);
|
||||
ApiStatus N(GetFloorCollider)(Evt* script, s32 isInitialCall);
|
||||
ApiStatus N(func_802431B4_95E3B4)(Evt* script, s32 isInitialCall);
|
||||
ApiStatus N(func_802431FC_95E3FC)(Evt* script, s32 isInitialCall);
|
||||
ApiStatus N(func_80243350_95E550)(Evt* script, s32 isInitialCall);
|
||||
ApiStatus N(func_80243578_95E778)(Evt* script, s32 isInitialCall);
|
||||
ApiStatus N(dup_Pipe_AwaitDownInput)(Evt* script, s32 isInitialCall);
|
||||
ApiStatus N(dup_Pipe_GetCameraYaw)(Evt* script, s32 isInitialCall);
|
||||
ApiStatus N(dup_Pipe_GetCurrentFloor)(Evt* script, s32 isInitialCall);
|
||||
ApiStatus N(dup_Pipe_GetEntryPos)(Evt* script, s32 isInitialCall);
|
||||
ApiStatus N(dup_Pipe_SetAnimFlag)(Evt* script, s32 isInitialCall);
|
||||
ApiStatus N(dup_Pipe_GetPointAheadOfPlayer)(Evt* script, s32 isInitialCall);
|
||||
extern ShopItemData N(Shop_Inventory)[];
|
||||
extern ShopSellPriceData N(Shop_PriceList)[];
|
||||
extern ShopItemLocation N(Shop_ItemPositions)[];
|
||||
extern ShopOwner N(Shop_Owner);
|
||||
|
||||
extern EvtScript ItemShopInteract;
|
||||
|
||||
extern s32** N(varStash);
|
||||
extern N(shopInventory) N(shopInventory_8024B4FC)[];
|
||||
extern N(shopPrice) N(shopPriceList_8024B550)[];
|
||||
|
||||
extern NpcGroupList N(npcGroupList_8024B464);
|
||||
extern NpcGroupList N(npcGroupList_8024B47C);
|
||||
extern EvtScript N(80244450);
|
||||
extern EvtScript N(8024C218);
|
||||
extern EvtScript N(8024C2EC);
|
||||
extern EvtScript N(8024C41C);
|
||||
extern EvtScript N(8024C4C8);
|
||||
|
||||
extern EvtScript N(8024CDA0);
|
||||
extern EvtScript N(8024DD78);
|
||||
extern EvtScript N(EVS_SetupFoliage);
|
||||
extern EvtScript N(main);
|
||||
extern EvtScript N(makeEntities);
|
||||
extern EvtScript N(shopItemPositions_8024BA68);
|
||||
extern ShopOwner N(shopOwnerNPC_8024BA80);
|
||||
extern EvtScript N(unk_80248088);
|
||||
extern EvtScript N(unk_8024884C);
|
||||
|
||||
#endif
|
||||
|
23
src/world/area_dro/dro_01/dro_01_0_header.c
Normal file
23
src/world/area_dro/dro_01/dro_01_0_header.c
Normal file
@ -0,0 +1,23 @@
|
||||
#include "dro_01.h"
|
||||
|
||||
EntryList N(Entrances) = {
|
||||
[dro_01_ENTRY_0] { -342.0, 0.0, 316.0, 45.0 },
|
||||
[dro_01_ENTRY_1] { 488.0, 1.0, 4.0, 270.0 },
|
||||
[dro_01_ENTRY_2] { 430.0, 35.0, -120.0, 180.0 },
|
||||
[dro_01_ENTRY_3] { 0.0, 0.0, 0.0, 0.0 },
|
||||
[dro_01_ENTRY_4] { 0.0, 0.0, 0.0, 0.0 },
|
||||
[dro_01_ENTRY_5] { 0.0, 0.0, 0.0, 0.0 },
|
||||
[dro_01_ENTRY_6] { 0.0, 0.0, 0.0, 0.0 },
|
||||
[dro_01_ENTRY_7] { 0.0, 0.0, 0.0, 0.0 },
|
||||
[dro_01_ENTRY_8] { 0.0, 0.0, 0.0, 0.0 },
|
||||
[dro_01_ENTRY_9] { 0.0, 0.0, 0.0, 0.0 },
|
||||
[dro_01_ENTRY_A] { -211.0, 50.0, -50.0, 120.0 },
|
||||
};
|
||||
|
||||
MapSettings N(settings) = {
|
||||
.main = &N(EVS_Main),
|
||||
.entryList = &N(Entrances),
|
||||
.entryCount = ENTRY_COUNT(N(Entrances)),
|
||||
.background = &gBackgroundImage,
|
||||
.tattle = { MSG_MapTattle_dro_01 },
|
||||
};
|
15
src/world/area_dro/dro_01/dro_01_1_music.c
Normal file
15
src/world/area_dro/dro_01/dro_01_1_music.c
Normal file
@ -0,0 +1,15 @@
|
||||
#include "dro_01.h"
|
||||
|
||||
EvtScript N(EVS_SetupMusic) = {
|
||||
EVT_CALL(GetEntryID, LVar0)
|
||||
EVT_SWITCH(LVar0)
|
||||
EVT_CASE_OR_EQ(dro_01_ENTRY_3)
|
||||
EVT_CASE_OR_EQ(dro_01_ENTRY_4)
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_CASE_DEFAULT
|
||||
EVT_CALL(SetMusicTrack, 0, SONG_DRY_DRY_OUTPOST, 0, 8)
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_END_SWITCH
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
125
src/world/area_dro/dro_01/dro_01_2_main.c
Normal file
125
src/world/area_dro/dro_01/dro_01_2_main.c
Normal file
@ -0,0 +1,125 @@
|
||||
#include "dro_01.h"
|
||||
|
||||
#include "world/common/entity/Pipe.inc.c"
|
||||
#include "world/common/entity/Pipe.data.inc.c"
|
||||
|
||||
#include "world/common/atomic/UnkFunc27.inc.c"
|
||||
|
||||
EvtScript N(EVS_ExitWalk_sbk_36_1) = {
|
||||
EVT_SET_GROUP(EVT_GROUP_1B)
|
||||
EVT_SET(GF_DRO01_HeardHintAboutSpinningRoof, 0)
|
||||
EVT_CALL(UseExitHeading, 60, 0)
|
||||
EVT_EXEC(ExitWalk)
|
||||
EVT_CALL(GotoMap, EVT_PTR("sbk_36"), 1)
|
||||
EVT_WAIT(100)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_ExitWalk_dro_02_0) = EVT_EXIT_WALK(60, dro_01_ENTRY_1, "dro_02", dro_02_ENTRY_0);
|
||||
|
||||
EvtScript N(EVS_BindExitTriggers) = {
|
||||
EVT_BIND_TRIGGER(N(EVS_ExitWalk_sbk_36_1), TRIGGER_FLOOR_ABOVE, 1, 1, 0)
|
||||
EVT_BIND_TRIGGER(N(EVS_ExitWalk_dro_02_0), TRIGGER_FLOOR_ABOVE, 5, 1, 0)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_Scene_RuinsRising) = {
|
||||
EVT_CALL(PlaySound, SOUND_80000060)
|
||||
EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 175, 0, -201)
|
||||
EVT_CALL(SetPanTarget, CAM_DEFAULT, 175, 0, -201)
|
||||
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0))
|
||||
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
|
||||
EVT_CALL(N(UnkFunc27), 2, 0, 3)
|
||||
EVT_CALL(N(UnkFunc27), 1, -1, 3)
|
||||
EVT_CALL(N(UnkFunc26), 3, 44, 32, 177, 0, 0, 0, 0, 0, 0)
|
||||
EVT_CALL(DisablePlayerInput, TRUE)
|
||||
EVT_THREAD
|
||||
EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 300, EVT_FLOAT(0.2))
|
||||
EVT_END_THREAD
|
||||
EVT_THREAD
|
||||
EVT_WAIT(60)
|
||||
EVT_CALL(GetEntryID, LVar0)
|
||||
EVT_IF_EQ(LVar0, dro_01_ENTRY_3)
|
||||
EVT_CALL(GotoMap, EVT_PTR("dro_02"), dro_02_ENTRY_2)
|
||||
EVT_ELSE
|
||||
EVT_CALL(GotoMap, EVT_PTR("dro_02"), dro_02_ENTRY_3)
|
||||
EVT_END_IF
|
||||
EVT_WAIT(100)
|
||||
EVT_END_THREAD
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_EnterMap) = {
|
||||
EVT_CALL(GetLoadType, LVar1)
|
||||
EVT_IF_EQ(LVar1, LOAD_FROM_FILE_SELECT)
|
||||
EVT_EXEC(EnterSavePoint)
|
||||
EVT_EXEC(N(EVS_BindExitTriggers))
|
||||
EVT_RETURN
|
||||
EVT_END_IF
|
||||
EVT_CALL(GetEntryID, LVar0)
|
||||
EVT_SWITCH(LVar0)
|
||||
EVT_CASE_EQ(dro_01_ENTRY_2)
|
||||
EVT_IF_EQ(GF_DRO01_WarpPipe, FALSE)
|
||||
EVT_CALL(DisablePlayerInput, TRUE)
|
||||
EVT_CALL(DisablePlayerPhysics, TRUE)
|
||||
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
|
||||
EVT_CALL(SetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2)
|
||||
EVT_CALL(SetPlayerPos, LVar0, NPC_DISPOSE_POS_Y, LVar2)
|
||||
EVT_WAIT(30)
|
||||
EVT_CALL(PlaySound, SOUND_208E)
|
||||
EVT_SET(GF_DRO01_WarpPipe, TRUE)
|
||||
EVT_WAIT(30)
|
||||
EVT_CALL(SetPlayerActionState, ACTION_STATE_IDLE)
|
||||
EVT_CALL(SetPlayerPos, LVar0, LVar1, LVar2)
|
||||
EVT_CALL(SetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2)
|
||||
EVT_CALL(DisablePlayerPhysics, FALSE)
|
||||
EVT_CALL(DisablePlayerInput, FALSE)
|
||||
EVT_END_IF
|
||||
EVT_SET(LVarA, EVT_PTR(N(EVS_BindExitTriggers)))
|
||||
EVT_EXEC_WAIT(N(EVS_Pipe_EnterVertical))
|
||||
EVT_CASE_OR_EQ(dro_01_ENTRY_3)
|
||||
EVT_CASE_OR_EQ(dro_01_ENTRY_4)
|
||||
EVT_EXEC_WAIT(N(EVS_Scene_RuinsRising))
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_CASE_EQ(dro_01_ENTRY_A)
|
||||
EVT_EXEC(EnterPostPipe)
|
||||
EVT_EXEC(N(EVS_BindExitTriggers))
|
||||
EVT_CASE_DEFAULT
|
||||
EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers)))
|
||||
EVT_EXEC(EnterWalk)
|
||||
EVT_END_SWITCH
|
||||
EVT_WAIT(1)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_Main) = {
|
||||
EVT_SET(GB_WorldLocation, LOCATION_DRY_DRY_OUTPOST)
|
||||
EVT_CALL(SetSpriteShading, SHADING_NONE)
|
||||
EVT_SETUP_CAMERA_NO_LEAD()
|
||||
EVT_SET(GF_MAP_DryDryOutpost, TRUE)
|
||||
EVT_IF_LT(GB_StoryProgress, STORY_CH2_ARRIVED_AT_DRY_DRY_OUTPOST)
|
||||
EVT_SET(GB_StoryProgress, STORY_CH2_ARRIVED_AT_DRY_DRY_OUTPOST)
|
||||
EVT_END_IF
|
||||
EVT_SWITCH(GB_StoryProgress)
|
||||
EVT_CASE_RANGE(STORY_CH2_STAR_SPRIT_DEPARTED, STORY_CH4_BEGAN_PEACH_MISSION)
|
||||
EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(Chapter3NPCs)))
|
||||
EVT_CASE_DEFAULT
|
||||
EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs)))
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(InitVirtualEntityList)
|
||||
EVT_EXEC_WAIT(N(EVS_MakeEntities))
|
||||
EVT_CALL(MakeShop, EVT_PTR(N(Shop_ItemPositions)), EVT_PTR(N(Shop_Inventory)), EVT_PTR(N(Shop_PriceList)), 0)
|
||||
EVT_CALL(MakeShopOwner, EVT_PTR(N(Shop_Owner)))
|
||||
EVT_EXEC_WAIT(N(EVS_SetupBuildings))
|
||||
EVT_EXEC(N(EVS_SwingSign_Shop))
|
||||
EVT_EXEC(N(EVS_SetupMusic))
|
||||
EVT_EXEC(N(EVS_EnterMap))
|
||||
EVT_WAIT(1)
|
||||
EVT_EXEC(N(EVS_SetupFoliage))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
438
src/world/area_dro/dro_01/dro_01_3_npc.c
Normal file
438
src/world/area_dro/dro_01/dro_01_3_npc.c
Normal file
@ -0,0 +1,438 @@
|
||||
#include "dro_01.h"
|
||||
#include "sprite/npc/Musician.h"
|
||||
#include "sprite/npc/ChuckQuizmo.h"
|
||||
|
||||
#include "world/common/npc/Dryite_Wander.inc.c"
|
||||
#include "world/common/npc/Dryite_Patrol.inc.c"
|
||||
#include "world/common/npc/Dryite_Stationary.inc.c"
|
||||
|
||||
#include "world/common/npc/Mouser.inc.c"
|
||||
#include "world/common/npc/ThreeSisters.inc.c"
|
||||
|
||||
// toad kid?
|
||||
NpcSettings N(NpcSettings_Unused1) = {
|
||||
.height = 23,
|
||||
.radius = 19,
|
||||
.level = 99,
|
||||
};
|
||||
|
||||
#define CHUCK_QUIZMO_NPC_ID NPC_ChuckQuizmo
|
||||
#include "world/common/complete/Quizmo.inc.c"
|
||||
|
||||
MAP_STATIC_PAD(1,pre_key_item); // or post-quizmo?
|
||||
#include "world/common/complete/KeyItemChoice.inc.c"
|
||||
|
||||
#include "world/common/util/MonitorPlayerOrbiting.inc.c"
|
||||
|
||||
#include "world/common/complete/LetterDelivery.inc.c"
|
||||
|
||||
s32 N(LetterList)[] = {
|
||||
ITEM_LETTER19,
|
||||
ITEM_NONE
|
||||
};
|
||||
|
||||
EvtScript N(EVS_ShopOwner_LetterDelivery) = {
|
||||
EVT_CALL(N(LetterDelivery_Init),
|
||||
NPC_Mouser_ShopOwner, ANIM_Mouser_Purple_Talk, ANIM_Mouser_Purple_Idle,
|
||||
ITEM_LETTER19, ITEM_LETTER12,
|
||||
MSG_CH2_0089, MSG_CH2_008A, MSG_CH2_008B, MSG_CH2_008C,
|
||||
EVT_PTR(N(LetterList)))
|
||||
EVT_EXEC_WAIT(N(EVS_DoLetterDelivery))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInteract_Mouser_01) = {
|
||||
EVT_IF_GE(GB_StoryProgress, STORY_CH2_STAR_SPRIT_DEPARTED)
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Mouser_Blue_Talk, ANIM_Mouser_Blue_Idle, 0, MSG_CH2_0062)
|
||||
EVT_RETURN
|
||||
EVT_END_IF
|
||||
EVT_SWITCH(AB_DRO_0)
|
||||
EVT_CASE_EQ(0)
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Mouser_Blue_Talk, ANIM_Mouser_Blue_Idle, 0, MSG_CH2_005F)
|
||||
EVT_ADD(AB_DRO_0, 1)
|
||||
EVT_CASE_EQ(1)
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Mouser_Blue_Talk, ANIM_Mouser_Blue_Idle, 0, MSG_CH2_0060)
|
||||
EVT_ADD(AB_DRO_0, 1)
|
||||
EVT_CASE_EQ(2)
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Mouser_Blue_Talk, ANIM_Mouser_Blue_Idle, 0, MSG_CH2_0061)
|
||||
EVT_SUB(AB_DRO_0, 1)
|
||||
EVT_END_SWITCH
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInit_Mouser_01) = {
|
||||
EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Mouser_01)))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInteract_Dryite_01) = {
|
||||
EVT_SWITCH(GB_StoryProgress)
|
||||
EVT_CASE_LT(STORY_CH2_STAR_SPRIT_DEPARTED)
|
||||
EVT_IF_GE(GB_StoryProgress, STORY_CH2_BOUGHT_SECRET_ITEMS)
|
||||
EVT_IF_EQ(AB_DRO_1, 2)
|
||||
EVT_SET(AB_DRO_1, 0)
|
||||
EVT_END_IF
|
||||
EVT_END_IF
|
||||
EVT_SWITCH(AB_DRO_1)
|
||||
EVT_CASE_EQ(0)
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Dryite_Yellow_Talk, ANIM_Dryite_Yellow_Idle, 0, MSG_CH2_0063)
|
||||
EVT_ADD(AB_DRO_1, 1)
|
||||
EVT_CASE_EQ(1)
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Dryite_Yellow_Talk, ANIM_Dryite_Yellow_Idle, 0, MSG_CH2_0064)
|
||||
EVT_ADD(AB_DRO_1, 1)
|
||||
EVT_CASE_EQ(2)
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Dryite_Yellow_Talk, ANIM_Dryite_Yellow_Idle, 0, MSG_CH2_0065)
|
||||
EVT_SET(AB_DRO_1, 0)
|
||||
EVT_END_SWITCH
|
||||
EVT_CASE_LT(STORY_CH5_STAR_SPRIT_DEPARTED)
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Dryite_Yellow_Talk, ANIM_Dryite_Yellow_Idle, 0, MSG_CH2_0066)
|
||||
EVT_CASE_DEFAULT
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Dryite_Yellow_Talk, ANIM_Dryite_Yellow_Idle, 0, MSG_CH2_0067)
|
||||
EVT_END_SWITCH
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInit_Dryite_01) = {
|
||||
EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Dryite_01)))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInteract_Dryite_02) = {
|
||||
//@bug this dialogue was probably supposed to cycle 0 --> 1 --> 2 --> 3 --> 0 ...
|
||||
EVT_SWITCH(AB_DRO_2)
|
||||
EVT_CASE_EQ(0)
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Dryite_Blue_Talk, ANIM_Dryite_Blue_Idle, 0, MSG_CH2_0068)
|
||||
EVT_ADD(AB_DRO_2, 1)
|
||||
EVT_CASE_EQ(1)
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Dryite_Blue_Talk, ANIM_Dryite_Blue_Idle, 0, MSG_CH2_0069)
|
||||
EVT_ADD(AB_DRO_2, 1)
|
||||
EVT_CASE_EQ(2)
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Dryite_Blue_Talk, ANIM_Dryite_Blue_Idle, 0, MSG_CH2_006A)
|
||||
EVT_ADD(AB_DRO_2, 1)
|
||||
EVT_CASE_EQ(3)
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Dryite_Blue_Talk, ANIM_Dryite_Blue_Idle, 0, MSG_CH2_006B)
|
||||
EVT_SET(AB_DRO_2, 0)
|
||||
EVT_END_SWITCH
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInit_Dryite_02) = {
|
||||
EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Dryite_02)))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
#include "npc_hint_dryite.c"
|
||||
#include "npc_hint_dryite_companion.c"
|
||||
#include "npc_composer.c"
|
||||
#include "npc_shop_owner.c"
|
||||
|
||||
EvtScript N(EVS_NpcInteract_ThreeSisters) = {
|
||||
EVT_CALL(SpeakToPlayer, NPC_ThreeSisters_01, ANIM_Toadette_Pink_Talk, ANIM_Toadette_Pink_Idle, 0, MSG_CH2_008E)
|
||||
EVT_CALL(SpeakToPlayer, NPC_ThreeSisters_02, ANIM_Toadette_Pink_Talk, ANIM_Toadette_Pink_Idle, 0, MSG_CH2_008F)
|
||||
EVT_CALL(SpeakToPlayer, NPC_ThreeSisters_03, ANIM_Toadette_Pink_Talk, ANIM_Toadette_Pink_Idle, 0, MSG_CH2_0090)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInit_ThreeSisters) = {
|
||||
EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_ThreeSisters)))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInteract_DojoGrad) = {
|
||||
EVT_CALL(FindKeyItem, ITEM_FIRST_DEGREE_CARD, LVar1)
|
||||
EVT_CALL(FindKeyItem, ITEM_SECOND_DEGREE_CARD, LVar2)
|
||||
EVT_CALL(FindKeyItem, ITEM_THIRD_DEGREE_CARD, LVar3)
|
||||
EVT_CALL(FindKeyItem, ITEM_FOURTH_DEGREE_CARD, LVar4)
|
||||
EVT_CALL(FindKeyItem, ITEM_DIPLOMA, LVar5)
|
||||
EVT_IF_NE(LVar1, -1)
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Dryite_Brown_Talk, ANIM_Dryite_Brown_Idle, 0, MSG_CH2_009A)
|
||||
EVT_RETURN
|
||||
EVT_END_IF
|
||||
EVT_IF_NE(LVar2, -1)
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Dryite_Brown_Talk, ANIM_Dryite_Brown_Idle, 0, MSG_CH2_009B)
|
||||
EVT_RETURN
|
||||
EVT_END_IF
|
||||
EVT_IF_NE(LVar3, -1)
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Dryite_Brown_Talk, ANIM_Dryite_Brown_Idle, 0, MSG_CH2_009C)
|
||||
EVT_RETURN
|
||||
EVT_END_IF
|
||||
EVT_IF_NE(LVar4, -1)
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Dryite_Brown_Talk, ANIM_Dryite_Brown_Idle, 0, MSG_CH2_009D)
|
||||
EVT_RETURN
|
||||
EVT_END_IF
|
||||
EVT_IF_NE(LVar5, -1)
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Dryite_Brown_Talk, ANIM_Dryite_Brown_Idle, 0, MSG_CH2_009E)
|
||||
EVT_RETURN
|
||||
EVT_END_IF
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Dryite_Brown_Talk, ANIM_Dryite_Brown_Idle, 0, MSG_CH2_0099)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInit_DojoGrad) = {
|
||||
EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_DojoGrad)))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInteract_Dryite_06) = {
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Dryite_Brown_Talk, ANIM_Dryite_Brown_Idle, 0, MSG_CH2_009F)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInit_Dryite_06) = {
|
||||
EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Dryite_06)))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
StaticNpc N(PassiveNPCs)[] = {
|
||||
{
|
||||
.id = NPC_Mouser_01,
|
||||
.settings = &N(NpcSettings_Mouser),
|
||||
.pos = { -332.0f, 0.0f, 188.0f },
|
||||
.flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING | NPC_FLAG_NO_PROJECT_SHADOW,
|
||||
.init = &N(EVS_NpcInit_Mouser_01),
|
||||
.yaw = 90,
|
||||
.drops = MOUSER_DROPS,
|
||||
.animations = MOUSER_BLUE_ANIMS,
|
||||
.tattle = MSG_NpcTattle_DRO_Greeter,
|
||||
},
|
||||
{
|
||||
.id = NPC_Dryite_01,
|
||||
.settings = &N(NpcSettings_Dryite_Wander),
|
||||
.pos = { -235.0f, 0.0f, 160.0f },
|
||||
.flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING | NPC_FLAG_NO_PROJECT_SHADOW,
|
||||
.init = &N(EVS_NpcInit_Dryite_01),
|
||||
.yaw = 90,
|
||||
.drops = DRYITE_DROPS,
|
||||
.territory = {
|
||||
.wander = {
|
||||
.isFlying = TRUE,
|
||||
.moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED,
|
||||
.wanderShape = SHAPE_CYLINDER,
|
||||
.centerPos = { -235, 0, 160 },
|
||||
.wanderSize = { 30 },
|
||||
.detectShape = SHAPE_CYLINDER,
|
||||
.detectPos = { 0, 0, 0 },
|
||||
.detectSize = { 0 },
|
||||
}
|
||||
},
|
||||
.animations = DRYITE_YELLOW_ANIMS,
|
||||
.tattle = MSG_NpcTattle_DRO_DryiteA,
|
||||
},
|
||||
{
|
||||
.id = NPC_Dryite_02,
|
||||
.settings = &N(NpcSettings_Dryite),
|
||||
.pos = { -380.0f, 0.0f, -15.0f },
|
||||
.flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING | NPC_FLAG_NO_PROJECT_SHADOW,
|
||||
.init = &N(EVS_NpcInit_Dryite_02),
|
||||
.yaw = 61,
|
||||
.drops = DRYITE_DROPS,
|
||||
.animations = DRYITE_BLUE_ANIMS,
|
||||
.tattle = MSG_NpcTattle_DRO_DryiteD,
|
||||
},
|
||||
{
|
||||
.id = NPC_Dryite_03,
|
||||
.settings = &N(NpcSettings_Dryite),
|
||||
.pos = { 195.0f, 0.0f, -75.0f },
|
||||
.flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING | NPC_FLAG_NO_PROJECT_SHADOW,
|
||||
.init = &N(EVS_NpcInit_HintDryite),
|
||||
.yaw = 74,
|
||||
.drops = DRYITE_DROPS,
|
||||
.animations = DRYITE_GREEN_ANIMS,
|
||||
.tattle = MSG_NpcTattle_DRO_DryiteB,
|
||||
},
|
||||
{
|
||||
.id = NPC_Dryite_04,
|
||||
.settings = &N(NpcSettings_Dryite),
|
||||
.pos = { 225.0f, 0.0f, -83.0f },
|
||||
.flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING | NPC_FLAG_NO_PROJECT_SHADOW,
|
||||
.init = &N(EVS_NpcInit_Dryite_04),
|
||||
.yaw = 257,
|
||||
.drops = DRYITE_DROPS,
|
||||
.animations = DRYITE_GREEN_ANIMS,
|
||||
.tattle = MSG_NpcTattle_DRO_DryiteC,
|
||||
},
|
||||
{
|
||||
.id = NPC_ArtistToad,
|
||||
.settings = &N(NpcSettings_Dryite),
|
||||
.pos = { 285.0f, 0.0f, -274.0f },
|
||||
.flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING | NPC_FLAG_NO_PROJECT_SHADOW,
|
||||
.init = &N(EVS_NpcInit_Composer),
|
||||
.yaw = 271,
|
||||
.drops = {
|
||||
.dropFlags = NPC_DROP_FLAGS_80,
|
||||
.heartDrops = NO_DROPS,
|
||||
.flowerDrops = NO_DROPS,
|
||||
},
|
||||
.animations = {
|
||||
ANIM_Musician_Composer_Idle,
|
||||
ANIM_Musician_Composer_Still,
|
||||
ANIM_Musician_Composer_Still,
|
||||
ANIM_Musician_Composer_Still,
|
||||
ANIM_Musician_Composer_Still,
|
||||
ANIM_Musician_Composer_Still,
|
||||
ANIM_Musician_Composer_Still,
|
||||
ANIM_Musician_Composer_Still,
|
||||
ANIM_Musician_Composer_Still,
|
||||
ANIM_Musician_Composer_Still,
|
||||
ANIM_Musician_Composer_Still,
|
||||
ANIM_Musician_Composer_Still,
|
||||
ANIM_Musician_Composer_Still,
|
||||
ANIM_Musician_Composer_Still,
|
||||
ANIM_Musician_Composer_Still,
|
||||
ANIM_Musician_Composer_Still,
|
||||
},
|
||||
.tattle = MSG_NpcTattle_Composer,
|
||||
},
|
||||
{
|
||||
.id = NPC_Mouser_ShopOwner,
|
||||
.settings = &N(NpcSettings_Mouser),
|
||||
.pos = { 31.0f, 0.0f, -374.0f },
|
||||
.flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING | NPC_FLAG_NO_PROJECT_SHADOW,
|
||||
.init = &N(EVS_NpcInit_ShopOwner),
|
||||
.yaw = 180,
|
||||
.drops = MOUSER_DROPS,
|
||||
.animations = MOUSER_PURPLE_ANIMS,
|
||||
.tattle = MSG_NpcTattle_DRO_ShopOwner,
|
||||
},
|
||||
{
|
||||
.id = NPC_ChuckQuizmo,
|
||||
.settings = &N(Quizmo_NpcSettings),
|
||||
.pos = { -400.0f, 0.0f, 100.0f },
|
||||
.flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING,
|
||||
.initVarCount = 1,
|
||||
.initVar = { .bytes = { 0, QUIZ_AREA_DRO, QUIZ_COUNT_DRO, QUIZ_MAP_DRO_01 }},
|
||||
.yaw = 263,
|
||||
.drops = {
|
||||
.dropFlags = NPC_DROP_FLAGS_80,
|
||||
.heartDrops = NO_DROPS,
|
||||
.flowerDrops = NO_DROPS,
|
||||
},
|
||||
.animations = {
|
||||
.idle = ANIM_ChuckQuizmo_Idle,
|
||||
.walk = ANIM_ChuckQuizmo_Walk,
|
||||
.run = ANIM_ChuckQuizmo_Run,
|
||||
.chase = ANIM_ChuckQuizmo_Run,
|
||||
.anim_4 = ANIM_ChuckQuizmo_Idle,
|
||||
.anim_5 = ANIM_ChuckQuizmo_Idle,
|
||||
.death = ANIM_ChuckQuizmo_Still,
|
||||
.hit = ANIM_ChuckQuizmo_Still,
|
||||
.anim_8 = ANIM_ChuckQuizmo_Run,
|
||||
.anim_9 = ANIM_ChuckQuizmo_Run,
|
||||
.anim_A = ANIM_ChuckQuizmo_Run,
|
||||
.anim_B = ANIM_ChuckQuizmo_Run,
|
||||
.anim_C = ANIM_ChuckQuizmo_Run,
|
||||
.anim_D = ANIM_ChuckQuizmo_Run,
|
||||
.anim_E = ANIM_ChuckQuizmo_Run,
|
||||
.anim_F = ANIM_ChuckQuizmo_Run,
|
||||
},
|
||||
.tattle = MSG_NpcTattle_ChuckQuizmo,
|
||||
},
|
||||
{
|
||||
.id = NPC_Dryite_05,
|
||||
.settings = &N(NpcSettings_Dryite_Wander),
|
||||
.pos = { -120.0f, 0.0f, 134.0f },
|
||||
.yaw = 257,
|
||||
.flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING | NPC_FLAG_NO_PROJECT_SHADOW,
|
||||
.init = &N(EVS_NpcInit_DojoGrad),
|
||||
.drops = DRYITE_DROPS,
|
||||
.territory = {
|
||||
.wander = {
|
||||
.isFlying = TRUE,
|
||||
.moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED,
|
||||
.wanderShape = SHAPE_CYLINDER,
|
||||
.centerPos = { -120, 0, 134 },
|
||||
.wanderSize = { 40 },
|
||||
.detectShape = SHAPE_CYLINDER,
|
||||
.detectPos = { 0, 0, 0 },
|
||||
.detectSize = { 0 },
|
||||
}
|
||||
},
|
||||
.animations = DRYITE_BROWN_ANIMS,
|
||||
.tattle = MSG_NpcTattle_DRO_DojoGraduate,
|
||||
},
|
||||
{
|
||||
.id = NPC_Dryite_06,
|
||||
.settings = &N(NpcSettings_Dryite_Patrol),
|
||||
.pos = { 40.0f, 0.0f, 105.0f },
|
||||
.yaw = 270,
|
||||
.flags = NPC_FLAG_PASSIVE | NPC_FLAG_ENABLE_HIT_SCRIPT | NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING | NPC_FLAG_NO_PROJECT_SHADOW,
|
||||
.init = &N(EVS_NpcInit_Dryite_06),
|
||||
.drops = DRYITE_DROPS,
|
||||
.territory = {
|
||||
.patrol = {
|
||||
.isFlying = TRUE,
|
||||
.moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED,
|
||||
.numPoints = 2,
|
||||
.points = {
|
||||
{ 40, 0, 105 },
|
||||
{ -30, 0, 125 },
|
||||
},
|
||||
.detectShape = SHAPE_CYLINDER,
|
||||
.detectPos = { 0, 0, 0 },
|
||||
.detectSize = { 0 },
|
||||
}
|
||||
},
|
||||
.animations = DRYITE_BROWN_ANIMS,
|
||||
.tattle = MSG_NpcTattle_DRO_WorriedDryite,
|
||||
},
|
||||
};
|
||||
|
||||
StaticNpc N(ThreeSisterNPCs)[] = {
|
||||
{
|
||||
.id = NPC_ThreeSisters_01,
|
||||
.settings = &N(NpcSettings_ThreeSisters),
|
||||
.pos = { -141.0f, 0.0f, -18.0f },
|
||||
.flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING | NPC_FLAG_NO_PROJECT_SHADOW,
|
||||
.init = &N(EVS_NpcInit_ThreeSisters),
|
||||
.yaw = 62,
|
||||
.drops = THREE_SISTER_DROPS,
|
||||
.animations = THREE_SISTER_ANIMS,
|
||||
.tattle = MSG_NpcTattle_TravelingMaidA,
|
||||
},
|
||||
{
|
||||
.id = NPC_ThreeSisters_02,
|
||||
.settings = &N(NpcSettings_ThreeSisters),
|
||||
.pos = { -124.0f, 0.0f, -61.0f },
|
||||
.flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING | NPC_FLAG_NO_PROJECT_SHADOW,
|
||||
.init = &N(EVS_NpcInit_ThreeSisters),
|
||||
.yaw = 63,
|
||||
.drops = THREE_SISTER_DROPS,
|
||||
.animations = THREE_SISTER_ANIMS,
|
||||
.tattle = MSG_NpcTattle_TravelingMaidB,
|
||||
},
|
||||
{
|
||||
.id = NPC_ThreeSisters_03,
|
||||
.settings = &N(NpcSettings_ThreeSisters),
|
||||
.pos = { -80.0f, 0.0f, -35.0f },
|
||||
.flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING | NPC_FLAG_NO_PROJECT_SHADOW,
|
||||
.init = &N(EVS_NpcInit_ThreeSisters),
|
||||
.yaw = 244,
|
||||
.drops = THREE_SISTER_DROPS,
|
||||
.animations = THREE_SISTER_ANIMS,
|
||||
.tattle = MSG_NpcTattle_TravelingMaidC,
|
||||
},
|
||||
};
|
||||
|
||||
NpcGroupList N(DefaultNPCs) = {
|
||||
NPC_GROUP(N(PassiveNPCs)),
|
||||
{},
|
||||
};
|
||||
|
||||
NpcGroupList N(Chapter3NPCs) = {
|
||||
NPC_GROUP(N(PassiveNPCs)),
|
||||
NPC_GROUP(N(ThreeSisterNPCs)),
|
||||
{},
|
||||
};
|
157
src/world/area_dro/dro_01/dro_01_4_shop.c
Normal file
157
src/world/area_dro/dro_01/dro_01_4_shop.c
Normal file
@ -0,0 +1,157 @@
|
||||
#include "dro_01.h"
|
||||
#define NAMESPACE dro_01_Shop
|
||||
|
||||
s32 N(ShopMessages)[] = {
|
||||
MSG_Shop_0049, MSG_Shop_004A, MSG_Shop_004B, MSG_Shop_004C,
|
||||
MSG_Shop_004D, MSG_Shop_004E, MSG_Shop_004F, MSG_Shop_0050,
|
||||
MSG_Shop_0051, MSG_Shop_0052, MSG_Shop_0053, MSG_Shop_0054,
|
||||
MSG_Shop_0055, MSG_Shop_0056, MSG_Shop_0057, MSG_Shop_0058,
|
||||
MSG_Shop_0059, MSG_Shop_005A, MSG_Shop_005B, MSG_Shop_005C,
|
||||
MSG_Shop_005D, MSG_Shop_005E, MSG_Shop_005F,
|
||||
};
|
||||
|
||||
ShopItemData N(Inventory)[] = {
|
||||
{ .itemID = ITEM_THUNDER_BOLT, .price = 5, .descMsg = MSG_ItemShopDesc_ThunderBolt },
|
||||
{ .itemID = ITEM_DUSTY_HAMMER, .price = 2, .descMsg = MSG_ItemShopDesc_DustyHammer },
|
||||
{ .itemID = ITEM_HONEY_SYRUP, .price = 5, .descMsg = MSG_ItemShopDesc_HoneySyrup },
|
||||
{ .itemID = ITEM_DRIED_SHROOM, .price = 2, .descMsg = MSG_ItemShopDesc_DriedShroom },
|
||||
{ .itemID = ITEM_DRIED_PASTA, .price = 3, .descMsg = MSG_ItemShopDesc_DriedPasta },
|
||||
{ .itemID = ITEM_MUSHROOM, .price = 3, .descMsg = MSG_ItemShopDesc_Mushroom },
|
||||
{},
|
||||
};
|
||||
|
||||
ShopSellPriceData N(PriceList)[] = {
|
||||
{ .itemID = ITEM_SNOWMAN_DOLL, .sellPrice = 12 },
|
||||
{ .itemID = ITEM_MELON, .sellPrice = 10 },
|
||||
{ .itemID = ITEM_ICED_POTATO, .sellPrice = 10 },
|
||||
{ .itemID = ITEM_TASTY_TONIC, .sellPrice = 5 },
|
||||
{ .itemID = ITEM_SUPER_SODA, .sellPrice = 6 },
|
||||
{ .itemID = ITEM_SPECIAL_SHAKE, .sellPrice = 15 },
|
||||
{ .itemID = ITEM_DRIED_PASTA, .sellPrice = 2 },
|
||||
{},
|
||||
};
|
||||
|
||||
#include "world/common/complete/GiveReward.inc.c"
|
||||
|
||||
API_CALLABLE(N(HideCoinCounter)) {
|
||||
hide_coin_counter_immediately();
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
EvtScript N(EVS_JumpToPlayer) = {
|
||||
EVT_CALL(NpcJump0, NPC_Mouser_ShopOwner, -31, 0, -283, 10)
|
||||
EVT_CALL(NpcJump0, NPC_Mouser_ShopOwner, -30, 0, -283, 8)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_JumpAway) = {
|
||||
EVT_CALL(NpcJump0, NPC_Mouser_ShopOwner, 20, 0, -259, 10)
|
||||
EVT_CALL(NpcJump0, NPC_Mouser_ShopOwner, 20, 0, -259, 4)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_SecretPurcahseOrder_Moustafa) = {
|
||||
EVT_CALL(N(HideCoinCounter))
|
||||
EVT_CALL(func_802D2C14, 1)
|
||||
EVT_EXEC_WAIT(N(EVS_JumpToPlayer))
|
||||
EVT_IF_LT(GB_StoryProgress, STORY_CH2_BOUGHT_SECRET_ITEMS)
|
||||
EVT_CALL(SpeakToPlayer, NPC_Mouser_ShopOwner, ANIM_Mouser_Purple_Talk, ANIM_Mouser_Purple_Idle, 0, MSG_CH2_0087)
|
||||
EVT_CALL(SetPlayerAnimation, ANIM_Mario_10002)
|
||||
EVT_WAIT(10)
|
||||
EVT_CALL(SetPlayerAnimation, ANIM_Mario_80007)
|
||||
EVT_WAIT(30)
|
||||
EVT_END_IF
|
||||
EVT_CALL(SpeakToPlayer, NPC_Mouser_ShopOwner, ANIM_Mouser_Purple_Talk, ANIM_Mouser_Purple_Idle, 0, MSG_CH2_0088)
|
||||
EVT_SET(GB_StoryProgress, STORY_CH2_BOUGHT_SECRET_ITEMS)
|
||||
EVT_CALL(func_802D2C14, 0)
|
||||
EVT_EXEC_WAIT(N(EVS_JumpAway))
|
||||
EVT_END_IF // @bug unmatched endif in script
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_SecretPurcahseOrder_RedJar) = {
|
||||
EVT_IF_EQ(GF_DRO01_Gift_RedJar, FALSE)
|
||||
EVT_CALL(N(HideCoinCounter))
|
||||
EVT_CALL(func_802D2C14, 1)
|
||||
EVT_EXEC_WAIT(N(EVS_JumpToPlayer))
|
||||
EVT_CALL(SpeakToPlayer, NPC_Mouser_ShopOwner, ANIM_Mouser_Purple_Talk, ANIM_Mouser_Purple_Idle, 0, MSG_CH2_008D)
|
||||
EVT_GIVE_KEY_REWARD(ITEM_KOOT_RED_JAR)
|
||||
EVT_SET(GF_DRO01_Gift_RedJar, TRUE)
|
||||
EVT_WAIT(20)
|
||||
EVT_CALL(func_802D2C14, 0)
|
||||
EVT_EXEC_WAIT(N(EVS_JumpAway))
|
||||
EVT_END_IF
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
enum {
|
||||
SEQ_NONE = 0,
|
||||
SEQ_DRIED_SHOOM = 1,
|
||||
SEQ_DUSTY_HAMMER = 2,
|
||||
SEQ_DRIED_PASTA = 3,
|
||||
};
|
||||
|
||||
EvtScript N(EVS_OnBuy) = {
|
||||
EVT_SWITCH(LVar0)
|
||||
EVT_CASE_EQ(3)
|
||||
EVT_CASE_EQ(4)
|
||||
EVT_CASE_EQ(1)
|
||||
EVT_SET(LVar2, AB_DRO_SHOP_PREV1)
|
||||
EVT_SET(LVar3, AB_DRO_SHOP_PREV2)
|
||||
EVT_SET(LVar4, AB_DRO_SHOP_PREV3)
|
||||
EVT_SET(AB_DRO_SHOP_PREV2, LVar2)
|
||||
EVT_SET(AB_DRO_SHOP_PREV3, LVar3)
|
||||
EVT_SWITCH(LVar1)
|
||||
EVT_CASE_EQ(ITEM_DRIED_SHROOM)
|
||||
// Dusty Hammer, Dried Pasta, Dusty Hammer, Dried Shroom -> Red jar
|
||||
EVT_SET(AB_DRO_SHOP_PREV1, SEQ_DRIED_SHOOM)
|
||||
EVT_IF_EQ(LVar2, SEQ_DUSTY_HAMMER)
|
||||
EVT_IF_EQ(LVar3, SEQ_DRIED_PASTA)
|
||||
EVT_IF_EQ(LVar4, SEQ_DUSTY_HAMMER)
|
||||
EVT_EXEC_WAIT(N(EVS_SecretPurcahseOrder_RedJar))
|
||||
EVT_SET(AB_DRO_SHOP_PREV1, SEQ_NONE)
|
||||
EVT_END_IF
|
||||
EVT_END_IF
|
||||
EVT_END_IF
|
||||
EVT_CASE_EQ(ITEM_DUSTY_HAMMER)
|
||||
// Dried Shroom, Dusty Hammer -> Moustafa information
|
||||
EVT_SET(AB_DRO_SHOP_PREV1, SEQ_DUSTY_HAMMER)
|
||||
EVT_IF_EQ(LVar2, SEQ_DRIED_SHOOM)
|
||||
EVT_IF_LT(GB_StoryProgress, STORY_CH2_GOT_PULSE_STONE)
|
||||
EVT_EXEC_WAIT(N(EVS_SecretPurcahseOrder_Moustafa))
|
||||
EVT_SET(AB_DRO_SHOP_PREV1, SEQ_NONE)
|
||||
EVT_END_IF
|
||||
EVT_END_IF
|
||||
EVT_CASE_EQ(ITEM_DRIED_PASTA)
|
||||
EVT_SET(AB_DRO_SHOP_PREV1, SEQ_DRIED_PASTA)
|
||||
EVT_CASE_DEFAULT
|
||||
EVT_SET(AB_DRO_SHOP_PREV1, SEQ_NONE)
|
||||
EVT_END_SWITCH
|
||||
EVT_CASE_EQ(2)
|
||||
EVT_END_SWITCH
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
ShopItemLocation N(ItemPositions)[] = {
|
||||
{ .posModelID = MODEL_o741, .triggerColliderID = COLLIDER_mono1 },
|
||||
{ .posModelID = MODEL_o740, .triggerColliderID = COLLIDER_mono2 },
|
||||
{ .posModelID = MODEL_o738, .triggerColliderID = COLLIDER_mono3 },
|
||||
{ .posModelID = MODEL_o739, .triggerColliderID = COLLIDER_mono4 },
|
||||
{ .posModelID = MODEL_o737, .triggerColliderID = COLLIDER_mono5 },
|
||||
{ .posModelID = MODEL_o736, .triggerColliderID = COLLIDER_mono6 },
|
||||
};
|
||||
|
||||
ShopOwner N(Owner) = {
|
||||
.npcID = NPC_Mouser_ShopOwner,
|
||||
.idleAnim = ANIM_Mouser_Purple_Idle,
|
||||
.talkAnim = ANIM_Mouser_Purple_Talk,
|
||||
.onBuyEvt = &N(EVS_OnBuy),
|
||||
.shopMsgIDs = N(ShopMessages),
|
||||
};
|
||||
|
||||
#define NAMESPACE dro_01
|
247
src/world/area_dro/dro_01/dro_01_5_building.c
Normal file
247
src/world/area_dro/dro_01/dro_01_5_building.c
Normal file
@ -0,0 +1,247 @@
|
||||
#include "dro_01.h"
|
||||
|
||||
EvtScript N(EVS_SetDoorRot_LeftHouse) = {
|
||||
EVT_CALL(RotateModel, MODEL_doa1, LVar0, 0, 1, 0)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_MoveWalls_LeftHouse) = {
|
||||
EVT_SET(LVar1, LVar0)
|
||||
EVT_DIVF(LVar1, 50)
|
||||
EVT_CALL(TranslateModel, MODEL_1_m_kabe, 0, LVar1, 0)
|
||||
EVT_CALL(TranslateModel, MODEL_mado1, 0, LVar1, 0)
|
||||
EVT_CALL(RotateModel, MODEL_1_m_kabe, LVar0, 1, 0, 0)
|
||||
EVT_CALL(RotateModel, MODEL_mado1, LVar0, 1, 0, 0)
|
||||
EVT_CALL(RotateModel, MODEL_1_m_moyou, LVar0, -1, 0, 0)
|
||||
EVT_CALL(RotateModel, MODEL_1_m_waku, LVar0, -1, 0, 0)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_DropDoor_LeftHouse) = {
|
||||
EVT_SET(LVar1, LVar0)
|
||||
EVT_DIVF(LVar1, 50)
|
||||
EVT_CALL(TranslateModel, MODEL_doa1, 0, LVar1, 0)
|
||||
EVT_CALL(RotateModel, MODEL_doa1, LVar0, 1, 0, 0)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_SetDoorRot_Shop) = {
|
||||
EVT_CALL(RotateModel, MODEL_m_m_doa, LVar0, 0, 1, 0)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_MoveWalls_Shop) = {
|
||||
EVT_SET(LVar1, LVar0)
|
||||
EVT_DIVF(LVar1, 50)
|
||||
EVT_CALL(TranslateModel, MODEL_m_m_kabe, 0, LVar1, 0)
|
||||
EVT_CALL(TranslateModel, MODEL_m_m_mado, 0, LVar1, 0)
|
||||
EVT_CALL(RotateModel, MODEL_m_m_kabe, LVar0, 1, 0, 0)
|
||||
EVT_CALL(RotateModel, MODEL_m_m_mado, LVar0, 1, 0, 0)
|
||||
EVT_CALL(RotateModel, MODEL_m_m_hari, LVar0, -1, 0, 0)
|
||||
EVT_CALL(RotateModel, MODEL_m_m_moyou, LVar0, -1, 0, 0)
|
||||
EVT_CALL(RotateModel, MODEL_m_m_waku, LVar0, -1, 0, 0)
|
||||
EVT_CALL(RotateModel, MODEL_m_m_mado2, LVar0, -1, 0, 0)
|
||||
EVT_CALL(RotateModel, MODEL_m_m_kabe2, LVar0, -1, 0, 0)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_SetDoorRot_RightHouse) = {
|
||||
EVT_CALL(RotateModel, MODEL_doa2, LVar0, 0, 1, 0)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_DropDoor_RightHouse) = {
|
||||
EVT_SET(LVar1, LVar0)
|
||||
EVT_DIV(LVar1, 45)
|
||||
EVT_CALL(TranslateModel, MODEL_doa2, 0, LVar1, 0)
|
||||
EVT_CALL(RotateModel, MODEL_doa2, LVar0, 1, 0, 0)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_MoveWalls_RightHouse) = {
|
||||
EVT_IF_EQ(LVar0, 90)
|
||||
EVT_CALL(EnableModel, MODEL_nuno, FALSE)
|
||||
EVT_ELSE
|
||||
EVT_CALL(EnableModel, MODEL_nuno, TRUE)
|
||||
EVT_END_IF
|
||||
EVT_SET(LVar1, LVar0)
|
||||
EVT_DIV(LVar1, 45)
|
||||
EVT_SET(LVar2, LVar0)
|
||||
EVT_SUB(LVar2, -90)
|
||||
EVT_DIV(LVar2, -90)
|
||||
EVT_CALL(TranslateModel, MODEL_si_ksbe, 0, LVar1, 0)
|
||||
EVT_CALL(RotateModel, MODEL_si_ksbe, LVar0, 1, 0, 0)
|
||||
EVT_CALL(RotateModel, MODEL_ue_waku, LVar0, -1, 0, 0)
|
||||
EVT_CALL(RotateModel, MODEL_mado2, LVar0, -1, 0, 0)
|
||||
EVT_CALL(RotateModel, MODEL_ue_kabe, LVar0, -1, 0, 0)
|
||||
EVT_CALL(RotateModel, MODEL_ue_moyou, LVar0, -1, 0, 0)
|
||||
EVT_CALL(RotateModel, MODEL_bou1, LVar0, 1, 0, 0)
|
||||
EVT_CALL(RotateModel, MODEL_nuno, LVar0, 1, 0, 0)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_ToggleVis_LeftHouse) = {
|
||||
EVT_SWITCH(LVar0)
|
||||
EVT_CASE_EQ(0)
|
||||
EVT_CALL(SetGroupEnabled, MODEL_ie_naka, TRUE)
|
||||
EVT_CASE_EQ(3)
|
||||
EVT_CALL(SetGroupEnabled, MODEL_ie_naka, FALSE)
|
||||
EVT_END_SWITCH
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_ToggleVis_Shop) = {
|
||||
EVT_SWITCH(LVar0)
|
||||
EVT_CASE_EQ(0)
|
||||
EVT_SWITCH(GB_StoryProgress)
|
||||
EVT_CASE_LT(STORY_CH2_SPOKE_WITH_SHEEK)
|
||||
EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_017B, 160, 40)
|
||||
EVT_SET(LVar0, -1)
|
||||
EVT_RETURN
|
||||
EVT_CASE_LT(STORY_CH2_SHADY_MOUSE_ENTERED_SHOP)
|
||||
EVT_SET(LVar0, -1)
|
||||
EVT_RETURN
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(SetGroupEnabled, MODEL_mise_naka, 1)
|
||||
EVT_CASE_EQ(2)
|
||||
EVT_THREAD
|
||||
EVT_WAIT(45)
|
||||
EVT_CALL(SetNpcPos, NPC_Mouser_ShopOwner, 33, 0, -375)
|
||||
EVT_CALL(SetNpcYaw, NPC_Mouser_ShopOwner, 180)
|
||||
EVT_END_THREAD
|
||||
EVT_CASE_EQ(3)
|
||||
EVT_CALL(SetGroupEnabled, MODEL_mise_naka, 0)
|
||||
EVT_SET(AB_DRO_SHOP_PREV1, 0)
|
||||
EVT_SET(AB_DRO_SHOP_PREV2, 0)
|
||||
EVT_END_SWITCH
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_ToggleVis_RightHouse) = {
|
||||
EVT_SWITCH(LVar0)
|
||||
EVT_CASE_EQ(0)
|
||||
EVT_CALL(SetGroupEnabled, MODEL_ie2_naka, 1)
|
||||
EVT_CASE_EQ(2)
|
||||
EVT_CASE_EQ(3)
|
||||
EVT_CALL(SetGroupEnabled, MODEL_ie2_naka, 0)
|
||||
EVT_END_SWITCH
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
s32 N(InteriorNPCs_LeftHouse)[] = {
|
||||
NPC_Dryite_02,
|
||||
-1
|
||||
};
|
||||
|
||||
s32 N(InteriorNPCs_Shop)[] = {
|
||||
NPC_Mouser_ShopOwner,
|
||||
-1
|
||||
};
|
||||
|
||||
s32 N(InteriorNPCs_RightHouse)[] = {
|
||||
NPC_ArtistToad,
|
||||
-1
|
||||
};
|
||||
|
||||
EvtScript N(EVS_SetupBuildings) = {
|
||||
EVT_CALL(MakeDoorAdvanced,
|
||||
VIS_GROUP_PAIR(0, 5),
|
||||
EVT_PTR(N(EVS_SetDoorRot_LeftHouse)),
|
||||
EVT_PTR(N(EVS_MoveWalls_LeftHouse)),
|
||||
EVT_PTR(N(EVS_DropDoor_LeftHouse)),
|
||||
EVT_PTR(N(EVS_ToggleVis_LeftHouse)),
|
||||
COLLIDER_ei1_1,
|
||||
COLLIDER_ei1_2,
|
||||
MODEL_k_i1,
|
||||
EVT_PTR(N(InteriorNPCs_LeftHouse)))
|
||||
EVT_CALL(MakeDoorAdvanced,
|
||||
VIS_GROUP_PAIR(0, 5),
|
||||
EVT_PTR(N(EVS_SetDoorRot_Shop)),
|
||||
EVT_PTR(N(EVS_MoveWalls_Shop)),
|
||||
NULL,
|
||||
EVT_PTR(N(EVS_ToggleVis_Shop)),
|
||||
COLLIDER_em_1,
|
||||
COLLIDER_em_2,
|
||||
MODEL_k_m1,
|
||||
EVT_PTR(N(InteriorNPCs_Shop)))
|
||||
EVT_CALL(MakeDoorAdvanced,
|
||||
VIS_GROUP_PAIR(0, 5),
|
||||
EVT_PTR(N(EVS_SetDoorRot_RightHouse)),
|
||||
EVT_PTR(N(EVS_MoveWalls_RightHouse)),
|
||||
EVT_PTR(N(EVS_DropDoor_RightHouse)),
|
||||
EVT_PTR(N(EVS_ToggleVis_RightHouse)),
|
||||
COLLIDER_ei2_1,
|
||||
COLLIDER_ei_2,
|
||||
MODEL_k_i2,
|
||||
EVT_PTR(N(InteriorNPCs_RightHouse)))
|
||||
EVT_SET(LVar0, 3)
|
||||
EVT_EXEC(N(EVS_ToggleVis_LeftHouse))
|
||||
EVT_EXEC(N(EVS_ToggleVis_Shop))
|
||||
EVT_EXEC(N(EVS_ToggleVis_RightHouse))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_SwingSign_Shop) = {
|
||||
EVT_LABEL(9)
|
||||
EVT_CALL(MakeLerp, 10, -10, 30, EASING_COS_IN_OUT)
|
||||
EVT_LABEL(10)
|
||||
EVT_CALL(UpdateLerp)
|
||||
EVT_CALL(RotateModel, MODEL_o499, LVar0, 1, 0, 0)
|
||||
EVT_WAIT(1)
|
||||
EVT_IF_EQ(LVar1, 1)
|
||||
EVT_GOTO(10)
|
||||
EVT_END_IF
|
||||
EVT_CALL(MakeLerp, -10, 10, 30, EASING_COS_IN_OUT)
|
||||
EVT_LABEL(11)
|
||||
EVT_CALL(UpdateLerp)
|
||||
EVT_CALL(RotateModel, MODEL_o499, LVar0, 1, 0, 0)
|
||||
EVT_WAIT(1)
|
||||
EVT_IF_EQ(LVar1, 1)
|
||||
EVT_GOTO(11)
|
||||
EVT_END_IF
|
||||
EVT_GOTO(9)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_OpenShopDoor) = {
|
||||
EVT_CALL(SetGroupEnabled, MODEL_mise_naka, 1)
|
||||
EVT_CALL(PlaySoundAtCollider, COLLIDER_em_1, SOUND_BASIC_DOOR_OPEN, 0)
|
||||
EVT_CALL(MakeLerp, 0, 100, 15, EASING_QUADRATIC_OUT)
|
||||
EVT_LABEL(10)
|
||||
EVT_CALL(UpdateLerp)
|
||||
EVT_EXEC(N(EVS_SetDoorRot_Shop))
|
||||
EVT_WAIT(1)
|
||||
EVT_IF_EQ(LVar1, 1)
|
||||
EVT_GOTO(10)
|
||||
EVT_END_IF
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_CloseShopDoor) = {
|
||||
EVT_CALL(MakeLerp, 100, 0, 15, EASING_QUADRATIC_OUT)
|
||||
EVT_LABEL(10)
|
||||
EVT_CALL(UpdateLerp)
|
||||
EVT_EXEC(N(EVS_SetDoorRot_Shop))
|
||||
EVT_WAIT(1)
|
||||
EVT_IF_EQ(LVar1, 1)
|
||||
EVT_GOTO(10)
|
||||
EVT_END_IF
|
||||
EVT_CALL(PlaySoundAtCollider, COLLIDER_em_1, SOUND_BASIC_DOOR_CLOSE, 0)
|
||||
EVT_CALL(SetGroupEnabled, MODEL_mise_naka, 0)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
32
src/world/area_dro/dro_01/dro_01_6_entity.c
Normal file
32
src/world/area_dro/dro_01/dro_01_6_entity.c
Normal file
@ -0,0 +1,32 @@
|
||||
#include "dro_01.h"
|
||||
#include "entity.h"
|
||||
|
||||
#define NAMESPACE dro_01_Entity
|
||||
#include "world/common/entity/Pipe.inc.c"
|
||||
#include "world/common/entity/Pipe.data.inc.c"
|
||||
#define NAMESPACE dro_01
|
||||
|
||||
EvtScript N(EVS_WarpPipeExit) = {
|
||||
EVT_SET(GF_DRO01_HeardHintAboutSpinningRoof, FALSE)
|
||||
EVT_CALL(GotoMap, EVT_PTR("tik_01"), tik_01_ENTRY_4)
|
||||
EVT_WAIT(100)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_MakeEntities) = {
|
||||
EVT_CALL(MakeEntity, EVT_PTR(Entity_SavePoint), -211, 60, -50, 30, MAKE_ENTITY_END)
|
||||
EVT_IF_EQ(GF_DRO01_WarpPipe, FALSE)
|
||||
EVT_IF_EQ(GF_TIK01_WarpPipes, TRUE)
|
||||
EVT_CALL(GetEntryID, LVar0)
|
||||
EVT_IF_NE(LVar0, dro_01_ENTRY_2)
|
||||
EVT_SET(GF_DRO01_WarpPipe, TRUE)
|
||||
EVT_END_IF
|
||||
EVT_END_IF
|
||||
EVT_END_IF
|
||||
EVT_CALL(MakeEntity, EVT_PTR(Entity_BlueWarpPipe), 430, 0, -120, 0,
|
||||
dro_01_ENTRY_2, EVT_PTR(N(EVS_WarpPipeExit)),
|
||||
EVT_INDEX_OF_GAME_FLAG(GF_DRO01_WarpPipe), MAKE_ENTITY_END)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
48
src/world/area_dro/dro_01/dro_01_7_foliage.c
Normal file
48
src/world/area_dro/dro_01/dro_01_7_foliage.c
Normal file
@ -0,0 +1,48 @@
|
||||
#include "dro_01.h"
|
||||
|
||||
#include "common/foliage.inc.c"
|
||||
|
||||
FoliageModelList N(Tree1_LeafModels) = {
|
||||
.count = 1,
|
||||
.models = {
|
||||
MODEL_o799,
|
||||
}
|
||||
};
|
||||
|
||||
FoliageModelList N(Tree1_TrunkModels) = {
|
||||
.count = 1,
|
||||
.models = {
|
||||
MODEL_o800,
|
||||
}
|
||||
};
|
||||
|
||||
FoliageDropList N(Tree1_Drops) = {
|
||||
.count = 1,
|
||||
.drops = {
|
||||
{
|
||||
.itemID = ITEM_COIN,
|
||||
.pos = { 120, 92, -18 },
|
||||
.spawnMode = ITEM_SPAWN_MODE_FALL_SPAWN_ONCE,
|
||||
.pickupFlag = GF_DRO01_Tree1_Coin,
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
ShakeTreeConfig N(ShakeTree_Tree1) = {
|
||||
.leaves = &N(Tree1_LeafModels),
|
||||
.trunk = &N(Tree1_TrunkModels),
|
||||
.drops = &N(Tree1_Drops),
|
||||
};
|
||||
|
||||
BombTrigger N(BombPos_Tree1) = {
|
||||
.pos = { 120.0f, 0.0f, -43.0f },
|
||||
.radius = 0.0f
|
||||
};
|
||||
|
||||
EvtScript N(EVS_SetupFoliage) = {
|
||||
EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree1)))
|
||||
EVT_BIND_TRIGGER(EVT_PTR(N(shakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_yasi, 1, 0)
|
||||
EVT_BIND_TRIGGER(EVT_PTR(N(shakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree1)), 1, 0)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
78
src/world/area_dro/dro_01/npc_composer.c
Normal file
78
src/world/area_dro/dro_01/npc_composer.c
Normal file
@ -0,0 +1,78 @@
|
||||
#include "dro_01.h"
|
||||
|
||||
s32 N(LyricsList)[] = {
|
||||
ITEM_LYRICS,
|
||||
ITEM_NONE,
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInteract_Composer) = {
|
||||
EVT_IF_EQ(GF_DRO01_Gift_Melody, TRUE)
|
||||
EVT_CALL(FindKeyItem, ITEM_MELODY, LVar0)
|
||||
EVT_IF_NE(LVar0, -1)
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Musician_Composer_Talk, ANIM_Musician_Composer_Idle, 0, MSG_CH2_0084)
|
||||
EVT_RETURN
|
||||
EVT_ELSE
|
||||
EVT_IF_EQ(GF_DRO01_Gift_ToldComposerAboutMelody, FALSE)
|
||||
EVT_IF_LT(GB_StoryProgress, STORY_CH7_BEGAN_PEACH_MISSION)
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Musician_Composer_Talk, ANIM_Musician_Composer_Idle, 0, MSG_CH2_0085)
|
||||
EVT_CALL(SetPlayerAnimation, ANIM_Mario_NodYes)
|
||||
EVT_WAIT(30)
|
||||
EVT_CALL(SetPlayerAnimation, ANIM_Mario_10002)
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Musician_Composer_Talk, ANIM_Musician_Composer_Idle, 0, MSG_CH2_0086)
|
||||
EVT_SET(GF_DRO01_Gift_ToldComposerAboutMelody, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END_IF
|
||||
EVT_END_IF
|
||||
EVT_END_IF
|
||||
EVT_END_IF
|
||||
EVT_SWITCH(GB_StoryProgress)
|
||||
EVT_CASE_LT(STORY_CH2_STAR_SPRIT_DEPARTED)
|
||||
EVT_IF_EQ(AF_DRO_DialogueToggle_Composer, FALSE)
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Musician_Composer_Talk, ANIM_Musician_Composer_Idle, 0, MSG_CH2_007C)
|
||||
EVT_SET(AF_DRO_DialogueToggle_Composer, TRUE)
|
||||
EVT_ELSE
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Musician_Composer_Talk, ANIM_Musician_Composer_Idle, 0, MSG_CH2_007D)
|
||||
EVT_SET(AF_DRO_DialogueToggle_Composer, FALSE)
|
||||
EVT_END_IF
|
||||
EVT_CASE_LT(STORY_CH5_STAR_SPRIT_DEPARTED)
|
||||
EVT_IF_EQ(AF_DRO_DialogueToggle_Composer, FALSE)
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Musician_Composer_Talk, ANIM_Musician_Composer_Idle, 0, MSG_CH2_007E)
|
||||
EVT_SET(AF_DRO_DialogueToggle_Composer, TRUE)
|
||||
EVT_ELSE
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Musician_Composer_Talk, ANIM_Musician_Composer_Idle, 0, MSG_CH2_007F)
|
||||
EVT_SET(AF_DRO_DialogueToggle_Composer, FALSE)
|
||||
EVT_END_IF
|
||||
EVT_CASE_DEFAULT
|
||||
EVT_IF_EQ(AF_DRO_DialogueToggle_Composer, FALSE)
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Musician_Composer_Talk, ANIM_Musician_Composer_Idle, 0, MSG_CH2_0080)
|
||||
EVT_SET(AF_DRO_DialogueToggle_Composer, TRUE)
|
||||
EVT_ELSE
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Musician_Composer_Talk, ANIM_Musician_Composer_Idle, 0, MSG_CH2_0081)
|
||||
EVT_SET(AF_DRO_DialogueToggle_Composer, FALSE)
|
||||
EVT_END_IF
|
||||
EVT_END_SWITCH
|
||||
EVT_SET(LVar0, EVT_PTR(N(LyricsList)))
|
||||
EVT_SET(LVar1, 5)
|
||||
EVT_EXEC_WAIT(N(EVS_ChooseKeyItem))
|
||||
EVT_SWITCH(LVar0)
|
||||
EVT_CASE_EQ(0)
|
||||
EVT_CASE_EQ(-1)
|
||||
EVT_CASE_DEFAULT
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Musician_Composer_Talk, ANIM_Musician_Composer_Idle, 0, MSG_CH2_0082)
|
||||
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Musician_Composer_Write)
|
||||
EVT_WAIT(60)
|
||||
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Musician_Composer_Idle)
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Musician_Composer_Talk, ANIM_Musician_Composer_Idle, 0, MSG_CH2_0083)
|
||||
EVT_GIVE_KEY_REWARD(ITEM_MELODY)
|
||||
EVT_SET(GF_DRO01_Gift_Melody, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END_SWITCH
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInit_Composer) = {
|
||||
EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Composer)))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
168
src/world/area_dro/dro_01/npc_hint_dryite.c
Normal file
168
src/world/area_dro/dro_01/npc_hint_dryite.c
Normal file
@ -0,0 +1,168 @@
|
||||
#include "dro_01.h"
|
||||
#include "world/common/util/MonitorPlayerOrbiting.h"
|
||||
|
||||
API_CALLABLE(N(SaveSpinningRoofHintTime)) {
|
||||
PlayerData* playerData = &gPlayerData;
|
||||
|
||||
playerData->droTreeHintTime = playerData->frameCounter;
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
API_CALLABLE(N(GetFloorCollider)) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 outVar = *args++;
|
||||
|
||||
evt_set_variable(script, outVar, gCollisionStatus.currentFloor);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
EvtScript N(EVS_Scene_TreeOrbitReaction) = {
|
||||
EVT_LOOP(0)
|
||||
EVT_CALL(N(GetFloorCollider), LVar0)
|
||||
EVT_IF_EQ(LVar0, COLLIDER_ground)
|
||||
EVT_BREAK_LOOP
|
||||
EVT_END_IF
|
||||
EVT_WAIT(1)
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(DisablePlayerInput, TRUE)
|
||||
EVT_CALL(func_802CF56C, 1)
|
||||
EVT_THREAD
|
||||
EVT_WAIT(20)
|
||||
EVT_CALL(func_802CF56C, 0)
|
||||
EVT_CALL(NpcFacePlayer, NPC_PARTNER, 0)
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(PlayerFaceNpc, NPC_Dryite_03, FALSE)
|
||||
EVT_CALL(SpeakToPlayer, NPC_Dryite_03, ANIM_Dryite_Green_Talk, ANIM_Dryite_Green_Idle, 0, MSG_CH2_0078)
|
||||
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
|
||||
EVT_CALL(GetNpcPos, NPC_Dryite_03, LVar3, LVar4, LVar5)
|
||||
EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2)
|
||||
EVT_ADDF(LVar0, LVar3)
|
||||
EVT_ADDF(LVar1, LVar4)
|
||||
EVT_ADDF(LVar2, LVar5)
|
||||
EVT_DIVF(LVar0, EVT_FLOAT(2.0))
|
||||
EVT_DIVF(LVar1, EVT_FLOAT(2.0))
|
||||
EVT_DIVF(LVar2, EVT_FLOAT(2.0))
|
||||
EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2)
|
||||
EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(-300.0))
|
||||
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(5.0))
|
||||
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
|
||||
EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0))
|
||||
EVT_CALL(SetPlayerAnimation, ANIM_Mario_10002)
|
||||
EVT_CALL(SpeakToPlayer, NPC_Dryite_03, ANIM_Dryite_Green_Talk, ANIM_Dryite_Green_Idle, 0, MSG_CH2_0079)
|
||||
EVT_CALL(SetPlayerAnimation, ANIM_Mario_80007)
|
||||
EVT_WAIT(30)
|
||||
EVT_CALL(SetPlayerAnimation, ANIM_Mario_10002)
|
||||
EVT_CALL(SpeakToPlayer, NPC_Dryite_03, ANIM_Dryite_Green_Talk, ANIM_Dryite_Green_Idle, 0, MSG_CH2_007A)
|
||||
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
|
||||
EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2)
|
||||
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0))
|
||||
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
|
||||
EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0))
|
||||
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0)
|
||||
EVT_CALL(N(SaveSpinningRoofHintTime))
|
||||
EVT_SET(GF_DRO01_HeardHintAboutSpinningRoof, TRUE)
|
||||
EVT_CALL(DisablePlayerInput, FALSE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
void N(red_tree_orbit_listener)(PlayerOrbitState* orbit, s32 event) {
|
||||
PlayerStatus* playerStatus = &gPlayerStatus;
|
||||
|
||||
switch (event) {
|
||||
case PLAYER_ORBIT_CONTINUE_ORBIT:
|
||||
if (orbit->numRotations >= 6) {
|
||||
// wait to be near NPC with at least 6 full rotations complete
|
||||
f32 angle1 = atan2(125.0f, -42.0f, 152.0f, -61.0f);
|
||||
f32 angle2 = atan2(125.0f, -42.0f, playerStatus->position.x, playerStatus->position.z);
|
||||
f32 deltaAngle = get_clamped_angle_diff(angle1, angle2);
|
||||
if (fabsf(deltaAngle) < 30.0f) {
|
||||
start_script(&N(EVS_Scene_TreeOrbitReaction), EVT_PRIORITY_1, 0);
|
||||
orbit->state = ORBIT_STATE_BREAK_ORBIT;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case PLAYER_ORBIT_BEGIN:
|
||||
case PLAYER_ORBIT_COMPLETE_ROTATION:
|
||||
case PLAYER_ORBIT_CHANGE_DIRECTION:
|
||||
case PLAYER_ORBIT_LEFT_REGION:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
API_CALLABLE(N(HasBeenHalfHourSinceTreeOrbit)) {
|
||||
PlayerData* playerData = &gPlayerData;
|
||||
s32 minutes = (playerData->frameCounter - playerData->droTreeHintTime) / 3600;
|
||||
|
||||
if (minutes < 30) {
|
||||
script->varTable[0] = TRUE;
|
||||
} else {
|
||||
script->varTable[0] = FALSE;
|
||||
}
|
||||
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
PlayerOrbitTarget N(RunAroundTarget) = {
|
||||
.pos = { 125, 0, -42 },
|
||||
.startRadius = 75,
|
||||
.orbitRadius = 75,
|
||||
.eventListener = N(red_tree_orbit_listener),
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInteract_HintDryite) = {
|
||||
EVT_IF_EQ(GF_MAC01_Merlon_HeardAboutDream, TRUE)
|
||||
EVT_IF_EQ(GF_DRO01_HeardHintAboutSpinningRoof, TRUE)
|
||||
// in case the player forgets, remind them after a half hour
|
||||
EVT_CALL(N(HasBeenHalfHourSinceTreeOrbit))
|
||||
EVT_IF_EQ(LVar0, TRUE)
|
||||
EVT_CALL(SpeakToPlayer, NPC_Dryite_03, ANIM_Dryite_Green_Talk, ANIM_Dryite_Green_Idle, 0, MSG_CH2_007B)
|
||||
EVT_RETURN
|
||||
EVT_END_IF
|
||||
EVT_END_IF
|
||||
EVT_END_IF
|
||||
EVT_SWITCH(GB_StoryProgress)
|
||||
EVT_CASE_LT(STORY_CH2_STAR_SPRIT_DEPARTED)
|
||||
EVT_IF_EQ(AF_DRO_01, FALSE)
|
||||
EVT_CALL(SpeakToPlayer, NPC_Dryite_03, ANIM_Dryite_Green_Talk, ANIM_Dryite_Green_Idle, 0, MSG_CH2_006C)
|
||||
EVT_CALL(SpeakToPlayer, NPC_Dryite_04, ANIM_Dryite_Green_Talk, ANIM_Dryite_Green_Idle, 0, MSG_CH2_006D)
|
||||
EVT_CALL(SpeakToPlayer, NPC_Dryite_03, ANIM_Dryite_Green_Talk, ANIM_Dryite_Green_Idle, 0, MSG_CH2_006E)
|
||||
EVT_SET(AF_DRO_01, TRUE)
|
||||
EVT_ELSE
|
||||
EVT_CALL(SpeakToPlayer, NPC_Dryite_03, ANIM_Dryite_Green_Talk, ANIM_Dryite_Green_Idle, 0, MSG_CH2_006F)
|
||||
EVT_CALL(SpeakToPlayer, NPC_Dryite_04, ANIM_Dryite_Green_Talk, ANIM_Dryite_Green_Idle, 0, MSG_CH2_0070)
|
||||
EVT_CALL(SpeakToPlayer, NPC_Dryite_03, ANIM_Dryite_Green_Talk, ANIM_Dryite_Green_Idle, 0, MSG_CH2_0071)
|
||||
EVT_SET(AF_DRO_01, FALSE)
|
||||
EVT_END_IF
|
||||
EVT_CASE_LT(STORY_CH5_STAR_SPRIT_DEPARTED)
|
||||
EVT_CALL(SpeakToPlayer, NPC_Dryite_03, ANIM_Dryite_Green_Talk, ANIM_Dryite_Green_Idle, 0, MSG_CH2_0072)
|
||||
EVT_CALL(SpeakToPlayer, NPC_Dryite_04, ANIM_Dryite_Green_Talk, ANIM_Dryite_Green_Idle, 0, MSG_CH2_0073)
|
||||
EVT_CALL(SpeakToPlayer, NPC_Dryite_03, ANIM_Dryite_Green_Talk, ANIM_Dryite_Green_Idle, 0, MSG_CH2_0074)
|
||||
EVT_CASE_DEFAULT
|
||||
EVT_CALL(SpeakToPlayer, NPC_Dryite_03, ANIM_Dryite_Green_Talk, ANIM_Dryite_Green_Idle, 0, MSG_CH2_0075)
|
||||
EVT_CALL(SpeakToPlayer, NPC_Dryite_04, ANIM_Dryite_Green_Talk, ANIM_Dryite_Green_Idle, 0, MSG_CH2_0076)
|
||||
EVT_CALL(SpeakToPlayer, NPC_Dryite_03, ANIM_Dryite_Green_Talk, ANIM_Dryite_Green_Idle, 0, MSG_CH2_0077)
|
||||
EVT_END_SWITCH
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInit_HintDryite) = {
|
||||
EVT_CALL(GetEntryID, LVar0)
|
||||
EVT_SWITCH(LVar0)
|
||||
EVT_CASE_OR_EQ(dro_01_ENTRY_3)
|
||||
EVT_CASE_OR_EQ(dro_01_ENTRY_4)
|
||||
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Dryite_Green_Talk)
|
||||
EVT_RETURN
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_HintDryite)))
|
||||
EVT_IF_EQ(GF_MAC01_Merlon_HeardAboutDream, TRUE)
|
||||
EVT_THREAD
|
||||
EVT_CALL(N(MonitorPlayerOrbiting), EVT_PTR(N(RunAroundTarget)))
|
||||
EVT_END_THREAD
|
||||
EVT_END_IF
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
60
src/world/area_dro/dro_01/npc_hint_dryite_companion.c
Normal file
60
src/world/area_dro/dro_01/npc_hint_dryite_companion.c
Normal file
@ -0,0 +1,60 @@
|
||||
#include "dro_01.h"
|
||||
|
||||
API_CALLABLE(N(GetRunToPos)) {
|
||||
PlayerStatus* playerStatus = &gPlayerStatus;
|
||||
Npc* npc = get_npc_safe(script->owner2.npcID);
|
||||
s32 rand;
|
||||
f32 temp_f22;
|
||||
f32 temp_f24;
|
||||
|
||||
temp_f24 = atan2(183.0f, -75.0f, playerStatus->position.x, playerStatus->position.z);
|
||||
temp_f22 = atan2(183.0f, -75.0f, npc->pos.x, npc->pos.z);
|
||||
temp_f24 = get_clamped_angle_diff(temp_f22, temp_f24);
|
||||
rand = rand_int(10) + 30;
|
||||
if (temp_f24 < 0.0f) {
|
||||
temp_f22 += rand;
|
||||
} else {
|
||||
temp_f22 -= rand;
|
||||
}
|
||||
rand = rand_int(20) + 30;
|
||||
script->varTable[0] = 183.0f + (sin_deg(temp_f22) * rand);
|
||||
script->varTable[1] = -75.0f - (cos_deg(temp_f22) * rand);
|
||||
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
// run away from, the player, orbiting around the hint-giving dryite
|
||||
EvtScript N(EVS_NpcInteract_Dryite_04) = {
|
||||
EVT_CHILD_THREAD
|
||||
EVT_LOOP(0)
|
||||
EVT_CALL(NpcFaceNpc, NPC_Dryite_03, NPC_Dryite_04, 1)
|
||||
EVT_END_LOOP
|
||||
EVT_END_CHILD_THREAD
|
||||
EVT_CALL(N(GetRunToPos))
|
||||
EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_100, TRUE)
|
||||
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Dryite_Green_Run)
|
||||
EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(3.5))
|
||||
EVT_CALL(NpcMoveTo, NPC_SELF, LVar0, LVar1, 0)
|
||||
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Dryite_Green_Idle)
|
||||
EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_100, FALSE)
|
||||
EVT_WAIT(5)
|
||||
EVT_CALL(GetNpcYaw, NPC_SELF, LVar0)
|
||||
EVT_ADD(LVar0, 180)
|
||||
EVT_CALL(InterpNpcYaw, NPC_SELF, LVar0, 0)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInit_Dryite_04) = {
|
||||
EVT_CALL(GetEntryID, LVar0)
|
||||
EVT_SWITCH(LVar0)
|
||||
EVT_CASE_OR_EQ(dro_01_ENTRY_3)
|
||||
EVT_CASE_OR_EQ(dro_01_ENTRY_4)
|
||||
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Dryite_Green_Talk)
|
||||
EVT_RETURN
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Dryite_04)))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
120
src/world/area_dro/dro_01/npc_shop_owner.c
Normal file
120
src/world/area_dro/dro_01/npc_shop_owner.c
Normal file
@ -0,0 +1,120 @@
|
||||
#include "dro_01.h"
|
||||
|
||||
API_CALLABLE(N(AwaitPlayerApproachShop)) {
|
||||
PlayerStatus* playerStatus = &gPlayerStatus;
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
f32 var1 = evt_get_variable(script, *args++);
|
||||
f32 var2 = evt_get_variable(script, *args++);
|
||||
f32 var3 = evt_get_variable(script, *args++);
|
||||
f32 var4 = evt_get_variable(script, *args++);
|
||||
f32 temp_f0 = (var4 - var2) / (var3 - var1);
|
||||
|
||||
if (playerStatus->position.z < ((temp_f0 * playerStatus->position.x) + (var2 - (temp_f0 * var1)))) {
|
||||
script->varTable[0] = 0;
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
script->varTable[0] = 1;
|
||||
return ApiStatus_BLOCK;
|
||||
}
|
||||
|
||||
EvtScript N(EVS_NpcIdle_ShopOwner) = {
|
||||
EVT_SWITCH(GB_StoryProgress)
|
||||
EVT_CASE_LT(STORY_CH2_SHADY_MOUSE_LEFT_SHOP)
|
||||
EVT_CALL(N(AwaitPlayerApproachShop), 16, 190, -134, -131)
|
||||
EVT_CALL(DisablePlayerInput, TRUE)
|
||||
EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_100, TRUE)
|
||||
EVT_CALL(SetNpcPos, NPC_SELF, 0, 0, -180)
|
||||
EVT_EXEC_WAIT(N(EVS_OpenShopDoor))
|
||||
EVT_WAIT(10)
|
||||
EVT_CALL(GetPlayerPos, LVarA, LVarB, LVarC)
|
||||
EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVarA, LVarB, LVarC)
|
||||
EVT_CALL(SetPanTarget, CAM_DEFAULT, 32, 0, -67)
|
||||
EVT_CALL(SetCamDistance, CAM_DEFAULT, -210)
|
||||
EVT_CALL(SetCamPitch, CAM_DEFAULT, 20, -12)
|
||||
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0))
|
||||
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
|
||||
EVT_WAIT(20)
|
||||
EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVarA, LVarB, LVarC)
|
||||
EVT_CALL(SetCamDistance, CAM_DEFAULT, -350)
|
||||
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(0.8))
|
||||
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
|
||||
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Mouser_Purple_Run)
|
||||
EVT_CALL(NpcMoveTo, NPC_SELF, -23, -105, 20)
|
||||
EVT_WAIT(10)
|
||||
EVT_CALL(InterpNpcYaw, NPC_SELF, 65, 0)
|
||||
EVT_WAIT(10)
|
||||
EVT_EXEC_WAIT(N(EVS_CloseShopDoor))
|
||||
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Mouser_Purple_Run)
|
||||
EVT_CALL(NpcMoveTo, NPC_SELF, 37, -27, 20)
|
||||
EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVarA, LVarB, LVarC)
|
||||
EVT_CALL(SetPanTarget, CAM_DEFAULT, 142, 0, -67)
|
||||
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
|
||||
EVT_CALL(NpcMoveTo, NPC_SELF, 62, -6, 20)
|
||||
EVT_CALL(NpcMoveTo, NPC_SELF, 103, 11, 20)
|
||||
EVT_CALL(NpcMoveTo, NPC_SELF, 150, 18, 20)
|
||||
EVT_CALL(EnableNpcBlur, NPC_SELF, TRUE)
|
||||
EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_174, 0)
|
||||
EVT_CALL(NpcMoveTo, NPC_SELF, 554, -12, 20)
|
||||
EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION)
|
||||
EVT_WAIT(30)
|
||||
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
|
||||
EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2)
|
||||
EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2)
|
||||
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(2.0))
|
||||
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
|
||||
EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0))
|
||||
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0)
|
||||
EVT_CALL(DisablePlayerInput, FALSE)
|
||||
EVT_SET(GB_StoryProgress, STORY_CH2_SHADY_MOUSE_LEFT_SHOP)
|
||||
EVT_CASE_LT(STORY_CH2_SPOKE_WITH_SHEEK)
|
||||
EVT_CASE_LT(STORY_CH2_SHADY_MOUSE_ENTERED_SHOP)
|
||||
EVT_CALL(EnableNpcBlur, NPC_SELF, TRUE)
|
||||
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Mouser_Purple_Run)
|
||||
EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_174, 0)
|
||||
EVT_CALL(SetNpcPos, NPC_SELF, 470, 0, 18)
|
||||
EVT_CALL(NpcMoveTo, NPC_SELF, 287, 9, 20)
|
||||
EVT_CALL(NpcMoveTo, NPC_SELF, 102, -14, 20)
|
||||
EVT_CALL(NpcMoveTo, NPC_SELF, -32, -96, 20)
|
||||
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Mouser_Purple_Idle)
|
||||
EVT_EXEC_WAIT(N(EVS_OpenShopDoor))
|
||||
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Mouser_Purple_Run)
|
||||
EVT_CALL(NpcMoveTo, NPC_SELF, 20, -375, 30)
|
||||
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Mouser_Purple_Idle)
|
||||
EVT_EXEC_WAIT(N(EVS_CloseShopDoor))
|
||||
EVT_CALL(EnableNpcBlur, NPC_SELF, FALSE)
|
||||
EVT_SET(GB_StoryProgress, STORY_CH2_SHADY_MOUSE_ENTERED_SHOP)
|
||||
EVT_CASE_DEFAULT
|
||||
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Mouser_Purple_Idle)
|
||||
EVT_CALL(SetNpcPos, NPC_SELF, 20, 0, -375)
|
||||
EVT_END_SWITCH
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInteract_ShopOwner) = {
|
||||
EVT_IF_EQ(AB_DRO_SHOP_PREV1, 4)
|
||||
EVT_IF_EQ(AB_DRO_SHOP_PREV2, 1)
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Mouser_Purple_Talk, ANIM_Mouser_Purple_Idle, 0, MSG_CH2_0088)
|
||||
EVT_EXEC_WAIT(N(EVS_ShopOwner_LetterDelivery))
|
||||
EVT_IF_NE(LVarC, 0)
|
||||
EVT_RETURN
|
||||
EVT_END_IF
|
||||
EVT_RETURN
|
||||
EVT_END_IF
|
||||
EVT_END_IF
|
||||
EVT_EXEC_WAIT(ItemShopInteract)
|
||||
EVT_EXEC_WAIT(N(EVS_ShopOwner_LetterDelivery))
|
||||
EVT_IF_NE(LVarC, 0)
|
||||
EVT_RETURN
|
||||
EVT_END_IF
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInit_ShopOwner) = {
|
||||
EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_ShopOwner)))
|
||||
EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_ShopOwner)))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
@ -1,4 +0,0 @@
|
||||
#include "dro_02.h"
|
||||
|
||||
#include "world/common/atomic/UnkFunc27.inc.c"
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,68 +1,60 @@
|
||||
#ifndef _DRO_02_H_
|
||||
#define _DRO_02_H_
|
||||
|
||||
/// @file dro_02.h
|
||||
/// @brief Dry Dry Outpost - Outpost 2
|
||||
|
||||
#include "common.h"
|
||||
#include "../dro.h"
|
||||
#include "message_ids.h"
|
||||
#include "map.h"
|
||||
|
||||
#include "../dro.h"
|
||||
#include "mapfs/dro_02_shape.h"
|
||||
#include "mapfs/dro_02_hit.h"
|
||||
|
||||
#include "sprite/npc/ChuckQuizmo.h"
|
||||
#include "sprite/npc/WorldMerlee.h"
|
||||
#include "sprite/npc/Toad.h"
|
||||
#include "sprite/npc/WorldParakarry.h"
|
||||
#include "sprite/npc/Archeologist.h"
|
||||
#include "sprite/npc/Dryite.h"
|
||||
#include "sprite/npc/Mouser.h"
|
||||
#include "sprite/npc/DisguisedMoustafa.h"
|
||||
#include "sprite/npc/Moustafa.h"
|
||||
|
||||
enum {
|
||||
NPC_Archeologist = 0,
|
||||
NPC_Dryite_01 = 1,
|
||||
NPC_DisguisedMoustafa = 2,
|
||||
NPC_Toad = 3,
|
||||
NPC_Merlee = 4,
|
||||
NPC_Moustafa = 5,
|
||||
NPC_Dryite_02 = 6,
|
||||
NPC_Mouser_01 = 7,
|
||||
NPC_Mouser_02 = 8,
|
||||
NPC_Mouser_03 = 9,
|
||||
NPC_ChuckQuizmo = 10,
|
||||
NPC_Dryite_03 = 11,
|
||||
};
|
||||
|
||||
enum {
|
||||
MF_Unk_00 = MapFlag(0),
|
||||
};
|
||||
|
||||
#define NAMESPACE dro_02
|
||||
|
||||
ApiStatus N(ToadHouse_DisableStatusMenu)(Evt* script, s32 isInitialCall);
|
||||
ApiStatus N(ToadHouse_ShowStatusMenu)(Evt* script, s32 isInitialCall);
|
||||
ApiStatus N(ToadHouse_GetPartnerBackOut)(Evt* script, s32 isInitialCall);
|
||||
ApiStatus N(Quizmo_GetCamVfov)(Evt* script, s32 isInitialCall);
|
||||
ApiStatus N(Quizmo_ShouldQuizmoLeave)(Evt* script, s32 isInitialCall);
|
||||
ApiStatus N(Quizmo_NPC_Aux_Impl)(Evt* script, s32 isInitialCall);
|
||||
ApiStatus N(ToadHouse_PutPartnerAway)(Evt* script, s32 isInitialCall);
|
||||
ApiStatus N(Quizmo_ShowEntities)(Evt* script, s32 isInitialCall);
|
||||
ApiStatus N(Quizmo_HideEntities)(Evt* script, s32 isInitialCall);
|
||||
ApiStatus N(Quizmo_SetCamVfov)(Evt* script, s32 isInitialCall);
|
||||
ApiStatus N(LetterDelivery_Init)(Evt* script, s32 isInitialCall);
|
||||
ApiStatus N(AddPlayerHandsOffset)(Evt* script, s32 isInitialCall);
|
||||
ApiStatus N(Quizmo_HideWorld)(Evt* script, s32 isInitialCall);
|
||||
ApiStatus N(Quizmo_AddViewRelativeOffset)(Evt* script, s32 isInitialCall);
|
||||
ApiStatus N(UnkFunc26)(Evt* script, s32 isInitialCall);
|
||||
ApiStatus N(UnkFunc27)(Evt* script, s32 isInitialCall);
|
||||
ApiStatus N(Quizmo_FadeInWorld)(Evt* script, s32 isInitialCall);
|
||||
ApiStatus N(Quizmo_UpdatePartnerPosition)(Evt* script, s32 isInitialCall);
|
||||
ApiStatus N(Quizmo_SpinPartner)(Evt* script, s32 isInitialCall);
|
||||
ApiStatus N(Quizmo_SpinPlayer)(Evt* script, s32 isInitialCall);
|
||||
ApiStatus N(LetterDelivery_CalcLetterPos)(Evt* script, s32 isInitialCall);
|
||||
ApiStatus N(Quizmo_ShouldAppear)(Evt* script, s32 isInitialCall);
|
||||
ApiStatus N(Quizmo_RenderInit)(Evt* script, s32 isInitialCall);
|
||||
ApiStatus N(Quizmo_UpdateRecords)(Evt* script, s32 isInitialCall);
|
||||
ApiStatus N(Quizmo_CreateStage)(Evt* script, s32 isInitialCall);
|
||||
ApiStatus N(Quizmo_DestroyEffects)(Evt* script, s32 isInitialCall);
|
||||
ApiStatus N(Quizmo_SetStageLightsDelay)(Evt* script, s32 isInitialCall);
|
||||
ApiStatus N(Quizmo_UnkStageEffectMode)(Evt* script, s32 isInitialCall);
|
||||
ApiStatus N(Quizmo_SetVannaAnim_Idle)(Evt* script, s32 isInitialCall);
|
||||
ApiStatus N(Quizmo_SetVannaAnim_Clap)(Evt* script, s32 isInitialCall);
|
||||
ApiStatus N(Quizmo_SetVannaAnim_Wave)(Evt* script, s32 isInitialCall);
|
||||
ApiStatus N(Quizmo_CreateWorker)(Evt* script, s32 isInitialCall);
|
||||
ApiStatus N(func_80241394_96A554)(Evt* script, s32 isInitialCall);
|
||||
ApiStatus N(func_802414C0_96A680)(Evt* script, s32 isInitialCall);
|
||||
ApiStatus N(func_802415CC_96A78C)(Evt* script, s32 isInitialCall);
|
||||
ApiStatus N(func_802416FC_96A8BC)(Evt* script, s32 isInitialCall);
|
||||
ApiStatus N(func_80241874_96AA34)(Evt* script, s32 isInitialCall);
|
||||
ApiStatus N(func_8024303C_96C1FC)(Evt* script, s32 isInitialCall);
|
||||
ApiStatus N(func_80243068_96C228)(Evt* script, s32 isInitialCall);
|
||||
ApiStatus N(ItemChoice_WaitForSelection)(Evt* script, s32 isInitialCall);
|
||||
ApiStatus N(ItemChoice_SaveSelected)(Evt* script, s32 isInitialCall);
|
||||
ApiStatus N(BuildKeyItemChoiceList)(Evt* script, s32 isInitialCall);
|
||||
ApiStatus N(BuildItemChoiceList)(Evt* script, s32 isInitialCall);
|
||||
ApiStatus N(ToadHouse_UpdateScreenOverlay)(Evt* script, s32 isInitialCall);
|
||||
ApiStatus N(ToadHouse_CamSetFOV)(Evt* script, s32 isInitialCall);
|
||||
ApiStatus N(ToadHouse_DoesPlayerNeedSleep)(Evt* script, s32 isInitialCall);
|
||||
ApiStatus N(ToadHouse_InitScreenOverlay)(Evt* script, s32 isInitialCall);
|
||||
ApiStatus N(LetterDelivery_SaveNpcAnim)(Evt* script, s32 isInitialCall);
|
||||
ApiStatus N(LetterDelivery_RestoreNpcAnim)(Evt* script, s32 isInitialCall);
|
||||
void N(func_8024240C_96B5CC)(Evt *script, s32 isInitialCall);
|
||||
void N(func_80242EAC_96C06C)(Evt *script, s32 isInitialCall);
|
||||
extern EvtScript N(EVS_Main);
|
||||
extern EvtScript N(EVS_MakeEntities);
|
||||
extern NpcGroupList N(DefaultNPCs);
|
||||
|
||||
extern NpcGroupList N(npcGroupList_8024EEF4);
|
||||
extern EvtScript N(80244C78);
|
||||
extern EvtScript N(EVS_SetupMusic);
|
||||
extern EvtScript N(EVS_PlayRestMusic);
|
||||
extern EvtScript N(EVS_PlayMoustafaMusic);
|
||||
|
||||
extern EvtScript N(EVS_SetupBuildings);
|
||||
extern EvtScript N(EVS_SetToadHouseDialogue);
|
||||
extern EvtScript N(8024D434);
|
||||
extern EvtScript N(8024D494);
|
||||
extern EvtScript N(8024D700);
|
||||
extern EvtScript N(main);
|
||||
extern EvtScript N(EVS_ToadHouse_GetInBed);
|
||||
extern EvtScript N(EVS_ToadHouse_ReturnFromRest);
|
||||
|
||||
#endif
|
||||
|
16
src/world/area_dro/dro_02/dro_02_0_header.c
Normal file
16
src/world/area_dro/dro_02/dro_02_0_header.c
Normal file
@ -0,0 +1,16 @@
|
||||
#include "dro_02.h"
|
||||
|
||||
EntryList N(Entrances) = {
|
||||
[dro_02_ENTRY_0] { -473.0, 0.0, 12.0, 90.0 },
|
||||
[dro_02_ENTRY_1] { 415.0, 35.0, -15.0, 180.0 },
|
||||
[dro_02_ENTRY_2] { 0.0, 0.0, 0.0, 0.0 },
|
||||
[dro_02_ENTRY_3] { 0.0, 0.0, 0.0, 0.0 },
|
||||
};
|
||||
|
||||
MapSettings N(settings) = {
|
||||
.main = &N(EVS_Main),
|
||||
.entryList = &N(Entrances),
|
||||
.entryCount = ENTRY_COUNT(N(Entrances)),
|
||||
.background = &gBackgroundImage,
|
||||
.tattle = { MSG_MapTattle_dro_02 },
|
||||
};
|
27
src/world/area_dro/dro_02/dro_02_1_music.c
Normal file
27
src/world/area_dro/dro_02/dro_02_1_music.c
Normal file
@ -0,0 +1,27 @@
|
||||
#include "dro_02.h"
|
||||
|
||||
EvtScript N(EVS_SetupMusic) = {
|
||||
EVT_CALL(GetEntryID, LVar0)
|
||||
EVT_SWITCH(LVar0)
|
||||
EVT_CASE_OR_EQ(dro_02_ENTRY_2)
|
||||
EVT_CASE_OR_EQ(dro_02_ENTRY_3)
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_CASE_DEFAULT
|
||||
EVT_CALL(SetMusicTrack, 0, SONG_DRY_DRY_OUTPOST, 0, 8)
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_END_SWITCH
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_PlayRestMusic) = {
|
||||
EVT_CALL(SetMusicTrack, 0, SONG_TAKING_REST, 0, 8)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_PlayMoustafaMusic) = {
|
||||
EVT_CALL(SetMusicTrack, 0, SONG_MOUSTAFA_THEME, 0, 8)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
10
src/world/area_dro/dro_02/dro_02_2_entity.c
Normal file
10
src/world/area_dro/dro_02/dro_02_2_entity.c
Normal file
@ -0,0 +1,10 @@
|
||||
#include "dro_02.h"
|
||||
#include "entity.h"
|
||||
|
||||
EvtScript N(EVS_MakeEntities) = {
|
||||
EVT_CALL(MakeItemEntity, ITEM_LETTER08, -135, 160, -245, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_DRO02_Item_Letter08)
|
||||
EVT_CALL(MakeEntity, EVT_PTR(Entity_HiddenPanel), 180, 173, -200, 0, MODEL_1_yane, MAKE_ENTITY_END)
|
||||
EVT_CALL(AssignPanelFlag, GF_DRO02_HiddenPanel)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
98
src/world/area_dro/dro_02/dro_02_3_main.c
Normal file
98
src/world/area_dro/dro_02/dro_02_3_main.c
Normal file
@ -0,0 +1,98 @@
|
||||
#include "dro_02.h"
|
||||
|
||||
#include "world/common/atomic/UnkFunc27.inc.c"
|
||||
|
||||
EvtScript N(EVS_ExitWalk_dro_01_1) = EVT_EXIT_WALK(60, dro_02_ENTRY_0, "dro_01", dro_01_ENTRY_1);
|
||||
|
||||
EvtScript N(EVS_BindExitTriggers) = {
|
||||
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_dro_01_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_OnReadPoster) = {
|
||||
EVT_CALL(DisablePlayerInput, TRUE)
|
||||
EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_017C, 160, 40)
|
||||
EVT_CALL(DisablePlayerInput, FALSE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_EnterMap) = {
|
||||
EVT_CALL(PlaySound, SOUND_80000060)
|
||||
EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 190, 0, -37)
|
||||
EVT_CALL(SetPanTarget, CAM_DEFAULT, 190, 0, -37)
|
||||
EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(200.0))
|
||||
EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(13.0), EVT_FLOAT(-10.0))
|
||||
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0))
|
||||
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
|
||||
EVT_CALL(N(UnkFunc27), 2, 0, 3)
|
||||
EVT_CALL(N(UnkFunc27), 1, -1, 3)
|
||||
EVT_CALL(N(UnkFunc26), 3, 44, 32, 177, 0, 0, 0, 0, 0, 0)
|
||||
EVT_CALL(DisablePlayerInput, TRUE)
|
||||
EVT_THREAD
|
||||
EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 300, EVT_FLOAT(0.2))
|
||||
EVT_END_THREAD
|
||||
EVT_THREAD
|
||||
EVT_WAIT(60)
|
||||
EVT_CALL(GetEntryID, LVar0)
|
||||
EVT_IF_EQ(LVar0, dro_02_ENTRY_2)
|
||||
EVT_CALL(GotoMap, EVT_PTR("sbk_02"), sbk_02_ENTRY_6)
|
||||
EVT_ELSE
|
||||
EVT_CALL(GotoMap, EVT_PTR("sbk_02"), sbk_02_ENTRY_7)
|
||||
EVT_END_IF
|
||||
EVT_WAIT(100)
|
||||
EVT_END_THREAD
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_Main) = {
|
||||
EVT_SET(GB_WorldLocation, LOCATION_DRY_DRY_OUTPOST)
|
||||
EVT_CALL(SetSpriteShading, SHADING_NONE)
|
||||
EVT_SETUP_CAMERA_NO_LEAD()
|
||||
EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs)))
|
||||
EVT_CALL(InitVirtualEntityList)
|
||||
EVT_EXEC_WAIT(N(EVS_MakeEntities))
|
||||
EVT_EXEC_WAIT(N(EVS_SetupBuildings))
|
||||
EVT_EXEC(N(EVS_SetupMusic))
|
||||
EVT_CALL(GetEntryID, LVar0)
|
||||
EVT_SWITCH(LVar0)
|
||||
EVT_CASE_OR_EQ(dro_02_ENTRY_2)
|
||||
EVT_CASE_OR_EQ(dro_02_ENTRY_3)
|
||||
EVT_EXEC_WAIT(N(EVS_EnterMap))
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_CASE_DEFAULT
|
||||
EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers)))
|
||||
EVT_EXEC(EnterWalk)
|
||||
EVT_END_SWITCH
|
||||
EVT_WAIT(1)
|
||||
EVT_THREAD
|
||||
EVT_CALL(SetTexPanner, MODEL_kemuri, 1)
|
||||
EVT_SET(LVar0, 0)
|
||||
EVT_LABEL(123)
|
||||
EVT_ADD(LVar0, 420)
|
||||
EVT_IF_GT(LVar0, 0x10000)
|
||||
EVT_ADD(LVar0, -0x10000)
|
||||
EVT_END_IF
|
||||
EVT_CALL(SetTexPanOffset, 1, 0, 0, LVar0)
|
||||
EVT_WAIT(1)
|
||||
EVT_GOTO(123)
|
||||
EVT_END_THREAD
|
||||
EVT_SET(MF_Unk_00, FALSE)
|
||||
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OnReadPoster)), TRIGGER_WALL_PRESS_A, COLLIDER_poster, 1, 0)
|
||||
EVT_THREAD
|
||||
EVT_LOOP(0)
|
||||
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
|
||||
EVT_IF_LT(LVar2, -200)
|
||||
EVT_CALL(EnableGroup, MODEL_mazinai, TRUE)
|
||||
EVT_ELSE
|
||||
EVT_CALL(EnableGroup, MODEL_mazinai, FALSE)
|
||||
EVT_END_IF
|
||||
EVT_WAIT(1)
|
||||
EVT_END_LOOP
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.3339844))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
247
src/world/area_dro/dro_02/dro_02_4_building.c
Normal file
247
src/world/area_dro/dro_02/dro_02_4_building.c
Normal file
@ -0,0 +1,247 @@
|
||||
#include "dro_02.h"
|
||||
|
||||
EvtScript N(EVS_SwingToadHouseSign) = {
|
||||
EVT_LABEL(9)
|
||||
EVT_CALL(MakeLerp, 10, -10, 30, EASING_COS_IN_OUT)
|
||||
EVT_LABEL(10)
|
||||
EVT_CALL(UpdateLerp)
|
||||
EVT_CALL(RotateModel, MODEL_o852, LVar0, 1, 0, 0)
|
||||
EVT_WAIT(1)
|
||||
EVT_IF_EQ(LVar1, 1)
|
||||
EVT_GOTO(10)
|
||||
EVT_END_IF
|
||||
EVT_CALL(MakeLerp, -10, 10, 30, EASING_COS_IN_OUT)
|
||||
EVT_LABEL(11)
|
||||
EVT_CALL(UpdateLerp)
|
||||
EVT_CALL(RotateModel, MODEL_o852, LVar0, 1, 0, 0)
|
||||
EVT_WAIT(1)
|
||||
EVT_IF_EQ(LVar1, 1)
|
||||
EVT_GOTO(11)
|
||||
EVT_END_IF
|
||||
EVT_GOTO(9)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_UnusedDoorSetup) = {
|
||||
EVT_DIV(LVar0, 2)
|
||||
EVT_ADD(LVar0, 18)
|
||||
EVT_CALL(RotateModel, MODEL_1_doa, LVar0, 0, 1, 0)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_OpenDoor_Hideout) = {
|
||||
EVT_CALL(RotateModel, MODEL_o769, LVar0, 0, -1, 0)
|
||||
EVT_CALL(RotateModel, MODEL_o770, LVar0, 0, 1, 0)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_MoveWalls_Hideout) = {
|
||||
EVT_SET(LVar1, LVar0)
|
||||
EVT_DIVF(LVar1, 50)
|
||||
EVT_CALL(TranslateModel, MODEL_6_kabe, 0, LVar1, 0)
|
||||
EVT_CALL(TranslateModel, MODEL_6_waku, 0, LVar1, 0)
|
||||
EVT_CALL(TranslateModel, MODEL_6_moyou, 0, LVar1, 0)
|
||||
EVT_CALL(RotateModel, MODEL_6_kabe, LVar0, 1, 0, 0)
|
||||
EVT_CALL(RotateModel, MODEL_6_waku, LVar0, 1, 0, 0)
|
||||
EVT_CALL(RotateModel, MODEL_6_moyou, LVar0, 1, 0, 0)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_DropDoor_Hideout) = {
|
||||
EVT_SET(LVar1, LVar0)
|
||||
EVT_DIVF(LVar1, 50)
|
||||
EVT_CALL(TranslateModel, MODEL_o769, 0, LVar1, 0)
|
||||
EVT_CALL(TranslateModel, MODEL_o770, 0, LVar1, 0)
|
||||
EVT_CALL(RotateModel, MODEL_o769, LVar0, 1, 0, 0)
|
||||
EVT_CALL(RotateModel, MODEL_o770, LVar0, 1, 0, 0)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_OpenDoor_ToadHouse) = {
|
||||
EVT_CALL(RotateModel, MODEL_4_doa, LVar0, 0, 1, 0)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_MoveWalls_ToadHouse) = {
|
||||
EVT_SET(LVar1, LVar0)
|
||||
EVT_DIVF(LVar1, 50)
|
||||
EVT_CALL(RotateGroup, MODEL_mobe, LVar0, 0, 0, -1)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_SetupCamSpeed) = {
|
||||
EVT_SWITCH(LVar0)
|
||||
EVT_CASE_EQ(0)
|
||||
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(3.0))
|
||||
EVT_CASE_EQ(3)
|
||||
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.3339844))
|
||||
EVT_END_SWITCH
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_ToggleVis_ToadHouse) = {
|
||||
EVT_SWITCH(LVar0)
|
||||
EVT_CASE_EQ(0)
|
||||
EVT_CALL(SetGroupEnabled, MODEL_ie4_naka, 1)
|
||||
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(3.0))
|
||||
EVT_CASE_EQ(3)
|
||||
EVT_CALL(SetGroupEnabled, MODEL_ie4_naka, 0)
|
||||
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.3339844))
|
||||
EVT_END_SWITCH
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_ToggleVis_Hideout) = {
|
||||
EVT_SWITCH(LVar0)
|
||||
EVT_CASE_EQ(0)
|
||||
EVT_CALL(SetGroupEnabled, MODEL_ie5_naka, 1)
|
||||
EVT_CALL(SetCamType, CAM_DEFAULT, 0, FALSE)
|
||||
EVT_CALL(SetCamDistance, CAM_DEFAULT, 260)
|
||||
EVT_CALL(SetCamPitch, CAM_DEFAULT, 22, -13)
|
||||
EVT_CALL(SetCamPosA, CAM_DEFAULT, 0, 290)
|
||||
EVT_CALL(SetCamPosB, CAM_DEFAULT, 0, -290)
|
||||
EVT_CALL(SetCamPosC, CAM_DEFAULT, 0, 0)
|
||||
EVT_CALL(SetPanTarget, CAM_DEFAULT, -395, 140, -150)
|
||||
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0))
|
||||
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
|
||||
EVT_CASE_EQ(2)
|
||||
EVT_CALL(SetPanTarget, CAM_DEFAULT, -365, 140, -145)
|
||||
EVT_CALL(SetCamPitch, CAM_DEFAULT, 20, -7)
|
||||
EVT_CALL(SetCamDistance, CAM_DEFAULT, 400)
|
||||
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0))
|
||||
EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0))
|
||||
EVT_CASE_EQ(3)
|
||||
EVT_CALL(SetGroupEnabled, MODEL_ie5_naka, 0)
|
||||
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0)
|
||||
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.3339844))
|
||||
EVT_END_SWITCH
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_OpenSecretDoor_FromOutside) = {
|
||||
EVT_SET_GROUP(EVT_GROUP_00)
|
||||
EVT_CALL(DisablePlayerInput, TRUE)
|
||||
EVT_CALL(func_802D2C14, 1)
|
||||
EVT_CALL(PlayerMoveTo, 230, 10, 20)
|
||||
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o1287, COLLIDER_FLAGS_UPPER_MASK)
|
||||
EVT_CALL(PlaySoundAtCollider, COLLIDER_o1287, SOUND_BASIC_DOOR_OPEN, 0)
|
||||
EVT_CALL(MakeLerp, 18, 80, 10, EASING_LINEAR)
|
||||
EVT_LOOP(0)
|
||||
EVT_CALL(UpdateLerp)
|
||||
EVT_CALL(RotateModel, MODEL_1_doa, LVar0, 0, 1, 0)
|
||||
EVT_WAIT(1)
|
||||
EVT_IF_EQ(LVar1, 0)
|
||||
EVT_BREAK_LOOP
|
||||
EVT_END_IF
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(PlayerMoveTo, 230, -70, 15)
|
||||
EVT_CALL(MakeLerp, 80, 18, 10, EASING_LINEAR)
|
||||
EVT_LOOP(0)
|
||||
EVT_CALL(UpdateLerp)
|
||||
EVT_CALL(RotateModel, MODEL_1_doa, LVar0, 0, 1, 0)
|
||||
EVT_WAIT(1)
|
||||
EVT_IF_EQ(LVar1, 0)
|
||||
EVT_BREAK_LOOP
|
||||
EVT_END_IF
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(PlaySoundAtCollider, COLLIDER_o1287, SOUND_BASIC_DOOR_CLOSE, 0)
|
||||
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o1287, COLLIDER_FLAGS_UPPER_MASK)
|
||||
EVT_CALL(func_802D2C14, 0)
|
||||
EVT_CALL(DisablePlayerInput, FALSE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_OpenSecretDoor_FromInside) = {
|
||||
EVT_SET_GROUP(EVT_GROUP_00)
|
||||
EVT_CALL(DisablePlayerInput, TRUE)
|
||||
EVT_CALL(func_802D2C14, 1)
|
||||
EVT_CALL(PlayerMoveTo, 230, -70, 20)
|
||||
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o1289, COLLIDER_FLAGS_UPPER_MASK)
|
||||
EVT_CALL(PlaySoundAtCollider, COLLIDER_o1289, SOUND_BASIC_DOOR_OPEN, 0)
|
||||
EVT_CALL(MakeLerp, 18, 80, 10, EASING_LINEAR)
|
||||
EVT_LOOP(0)
|
||||
EVT_CALL(UpdateLerp)
|
||||
EVT_CALL(RotateModel, MODEL_1_doa, LVar0, 0, 1, 0)
|
||||
EVT_WAIT(1)
|
||||
EVT_IF_EQ(LVar1, 0)
|
||||
EVT_BREAK_LOOP
|
||||
EVT_END_IF
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(PlayerMoveTo, 230, 10, 15)
|
||||
EVT_CALL(MakeLerp, 80, 18, 10, EASING_LINEAR)
|
||||
EVT_LOOP(0)
|
||||
EVT_CALL(UpdateLerp)
|
||||
EVT_CALL(RotateModel, MODEL_1_doa, LVar0, 0, 1, 0)
|
||||
EVT_WAIT(1)
|
||||
EVT_IF_EQ(LVar1, 0)
|
||||
EVT_BREAK_LOOP
|
||||
EVT_END_IF
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(PlaySoundAtCollider, COLLIDER_o1289, SOUND_BASIC_DOOR_CLOSE, 0)
|
||||
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o1289, COLLIDER_FLAGS_UPPER_MASK)
|
||||
EVT_CALL(func_802D2C14, 0)
|
||||
EVT_CALL(DisablePlayerInput, FALSE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
s32 N(InsideNPCs_Hideout)[] = {
|
||||
NPC_DisguisedMoustafa,
|
||||
NPC_Moustafa,
|
||||
-1
|
||||
};
|
||||
|
||||
s32 N(InsideNPCs_ToadHouse)[] = {
|
||||
NPC_Toad,
|
||||
-1
|
||||
};
|
||||
|
||||
EvtScript N(EVS_SetupBuildings) = {
|
||||
EVT_EXEC(N(EVS_SwingToadHouseSign))
|
||||
EVT_CALL(ParentColliderToModel, COLLIDER_o1287, MODEL_1_doa)
|
||||
EVT_IF_GE(GB_StoryProgress, STORY_CH2_BOUGHT_SECRET_ITEMS)
|
||||
EVT_CALL(RotateModel, MODEL_1_doa, 18, 0, 1, 0)
|
||||
EVT_CALL(UpdateColliderTransform, COLLIDER_o1287)
|
||||
EVT_END_IF
|
||||
EVT_CALL(MakeDoorAdvanced,
|
||||
VIS_GROUP_PAIR(0, 4),
|
||||
EVT_PTR(N(EVS_OpenDoor_Hideout)),
|
||||
EVT_PTR(N(EVS_MoveWalls_Hideout)),
|
||||
EVT_PTR(N(EVS_DropDoor_Hideout)),
|
||||
EVT_PTR(N(EVS_ToggleVis_Hideout)),
|
||||
COLLIDER_o1252,
|
||||
COLLIDER_o1253,
|
||||
MODEL_k_i5,
|
||||
EVT_PTR(N(InsideNPCs_Hideout)))
|
||||
EVT_IF_GE(GB_StoryProgress, STORY_CH2_BOUGHT_SECRET_ITEMS)
|
||||
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OpenSecretDoor_FromOutside)), TRIGGER_WALL_PRESS_A, COLLIDER_o1287, 1, 0)
|
||||
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OpenSecretDoor_FromInside)), TRIGGER_WALL_PRESS_A, COLLIDER_o1289, 1, 0)
|
||||
EVT_END_IF
|
||||
EVT_CALL(MakeDoorAdvanced,
|
||||
VIS_GROUP_PAIR(1, 5),
|
||||
EVT_PTR(N(EVS_OpenDoor_ToadHouse)),
|
||||
EVT_PTR(N(EVS_MoveWalls_ToadHouse)),
|
||||
NULL,
|
||||
EVT_PTR(N(EVS_ToggleVis_ToadHouse)),
|
||||
COLLIDER_o1204,
|
||||
COLLIDER_o1261,
|
||||
MODEL_k_i4,
|
||||
EVT_PTR(N(InsideNPCs_ToadHouse)))
|
||||
EVT_SET(LVar0, 3)
|
||||
EVT_EXEC(N(EVS_ToggleVis_Hideout))
|
||||
EVT_EXEC(N(EVS_SetupCamSpeed))
|
||||
EVT_EXEC(N(EVS_ToggleVis_ToadHouse))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
631
src/world/area_dro/dro_02/dro_02_5_npc.c
Normal file
631
src/world/area_dro/dro_02/dro_02_5_npc.c
Normal file
@ -0,0 +1,631 @@
|
||||
#include "dro_02.h"
|
||||
#include "effects.h"
|
||||
#include "script_api/battle.h"
|
||||
#include "entity.h"
|
||||
#include "sprite.h"
|
||||
|
||||
#define CHUCK_QUIZMO_NPC_ID NPC_ChuckQuizmo
|
||||
|
||||
static f32 N(D_8024EF80);
|
||||
static f32 N(D_8024EF84);
|
||||
static s32 N(RitualStateTime);
|
||||
static s8 N(pad_D_8024EF8C)[0x4];
|
||||
static EffectInstance* N(D_8024EF90)[4];
|
||||
|
||||
#include "world/common/complete/Quizmo.inc.c"
|
||||
|
||||
MobileAISettings N(AISettings_Archeologist) = {
|
||||
.moveSpeed = 1.5f,
|
||||
.moveTime = 60,
|
||||
.waitTime = 30,
|
||||
.playerSearchInterval = -1,
|
||||
.unk_AI_2C = 1,
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcAI_Archeologist) = {
|
||||
EVT_CALL(BasicAI_Main, EVT_PTR(N(AISettings_Archeologist)))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
NpcSettings N(NpcSettings_Archeologist_Wander) = {
|
||||
.height = 35,
|
||||
.radius = 24,
|
||||
.ai = &N(EVS_NpcAI_Archeologist),
|
||||
.level = 99,
|
||||
.actionFlags = ENEMY_AI_FLAGS_10,
|
||||
};
|
||||
|
||||
NpcSettings N(NpcSettings_Archeologist) = {
|
||||
.height = 42,
|
||||
.radius = 24,
|
||||
.ai = &N(EVS_NpcAI_Archeologist),
|
||||
.level = 99,
|
||||
};
|
||||
|
||||
#include "world/common/npc/Dryite_Wander.inc.c"
|
||||
#include "world/common/npc/Dryite_Stationary.inc.c"
|
||||
#include "world/common/npc/Mouser.inc.c"
|
||||
|
||||
NpcSettings N(NpcSettings_ToadHouseKeeper) = {
|
||||
.height = 30,
|
||||
.radius = 24,
|
||||
.level = 99,
|
||||
};
|
||||
|
||||
// toad kid?
|
||||
NpcSettings N(NpcSettings_Unused1) = {
|
||||
.height = 23,
|
||||
.radius = 19,
|
||||
.level = 99,
|
||||
};
|
||||
|
||||
#include "npc_merlee.c"
|
||||
|
||||
#include "world/common/complete/KeyItemChoice.inc.c"
|
||||
MAP_STATIC_PAD(1,key_item);
|
||||
#include "world/common/complete/NormalItemChoice.inc.c"
|
||||
|
||||
extern IMG_BIN N(toad_house_blanket_img)[];
|
||||
#include "dro_02_toad_house_blanket_skeleton.c"
|
||||
#include "world/area_dro/dro_02/toad_house_blanket.vtx.inc.c"
|
||||
#include "world/area_dro/dro_02/toad_house_blanket.gfx.inc.c"
|
||||
#include "world/area_dro/dro_02/toad_house_blanket.png.inc.c"
|
||||
#include "dro_02_toad_house_blanket_anim.c"
|
||||
|
||||
#include "world/common/atomic/ToadHouse.inc.c"
|
||||
#include "world/common/atomic/ToadHouse.data.inc.c"
|
||||
|
||||
#include "world/common/complete/LetterDelivery.inc.c"
|
||||
|
||||
s32 N(LetterList)[] = {
|
||||
ITEM_LETTER17,
|
||||
ITEM_NONE
|
||||
};
|
||||
|
||||
EvtScript N(EVS_MrE_LetterPrompt) = {
|
||||
EVT_CALL(N(LetterDelivery_Init),
|
||||
NPC_Dryite_01, ANIM_Dryite_Blue_Talk, ANIM_Dryite_Blue_Idle,
|
||||
ITEM_LETTER17, ITEM_LETTER18,
|
||||
MSG_CH2_0095, MSG_CH2_0096, MSG_CH2_0097, MSG_CH2_0098,
|
||||
EVT_PTR(N(LetterList)))
|
||||
EVT_EXEC_WAIT(N(EVS_DoLetterDelivery))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInteract_Archeologist) = {
|
||||
EVT_SWITCH(GB_StoryProgress)
|
||||
EVT_CASE_LT(STORY_CH2_STAR_SPRIT_DEPARTED)
|
||||
EVT_IF_EQ(GF_SBK30_Kolorado_SharedRumorAboutMoustafa, TRUE)
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Archeologist_Talk, ANIM_Archeologist_Idle, 0, MSG_CH2_00B2)
|
||||
EVT_ELSE
|
||||
EVT_SWITCH(AB_DRO_3)
|
||||
EVT_CASE_EQ(0)
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Archeologist_Talk, ANIM_Archeologist_Idle, 0, MSG_CH2_00AF)
|
||||
EVT_SET(AB_DRO_3, 1)
|
||||
EVT_CASE_EQ(1)
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Archeologist_Talk, ANIM_Archeologist_Idle, 0, MSG_CH2_00B0)
|
||||
EVT_SET(AB_DRO_3, 2)
|
||||
EVT_CASE_EQ(2)
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Archeologist_Talk, ANIM_Archeologist_Idle, 0, MSG_CH2_00B1)
|
||||
EVT_SET(AB_DRO_3, 1)
|
||||
EVT_END_SWITCH
|
||||
EVT_END_IF
|
||||
EVT_CASE_DEFAULT
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Archeologist_Talk, ANIM_Archeologist_Idle, 0, MSG_CH2_00B3)
|
||||
EVT_END_SWITCH
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInit_Archeologist) = {
|
||||
EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Archeologist)))
|
||||
EVT_IF_GE(GB_StoryProgress, STORY_UNUSED_FFFFFFCC)
|
||||
EVT_CALL(RemoveNpc, NPC_SELF)
|
||||
EVT_END_IF
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInteract_MrE) = {
|
||||
EVT_SWITCH(GB_StoryProgress)
|
||||
EVT_CASE_LT(STORY_CH2_STAR_SPRIT_DEPARTED)
|
||||
EVT_IF_EQ(GF_DRO02_Sheek_AskedAboutDesert, FALSE)
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Dryite_Blue_Talk, ANIM_Dryite_Blue_Idle, 0, MSG_CH2_0091)
|
||||
EVT_ELSE
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Dryite_Blue_Talk, ANIM_Dryite_Blue_Idle, 0, MSG_CH2_0092)
|
||||
EVT_END_IF
|
||||
EVT_CASE_LT(STORY_CH5_STAR_SPRIT_DEPARTED)
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Dryite_Blue_Talk, ANIM_Dryite_Blue_Idle, 0, MSG_CH2_0093)
|
||||
EVT_CASE_DEFAULT
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Dryite_Blue_Talk, ANIM_Dryite_Blue_Idle, 0, MSG_CH2_0094)
|
||||
EVT_END_SWITCH
|
||||
EVT_EXEC_WAIT(N(EVS_MrE_LetterPrompt))
|
||||
EVT_IF_NE(LVarC, 0)
|
||||
EVT_RETURN
|
||||
EVT_END_IF
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInit_MrE) = {
|
||||
EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_MrE)))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInteract_Dryite_02) = {
|
||||
EVT_SWITCH(GB_StoryProgress)
|
||||
EVT_CASE_LT(STORY_CH2_STAR_SPRIT_DEPARTED)
|
||||
EVT_IF_EQ(AF_DRO_03, FALSE)
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Dryite_Green_Talk, ANIM_Dryite_Green_Idle, 0, MSG_CH2_00A1)
|
||||
EVT_SET(AF_DRO_03, TRUE)
|
||||
EVT_ELSE
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Dryite_Green_Talk, ANIM_Dryite_Green_Idle, 0, MSG_CH2_00A2)
|
||||
EVT_SET(AF_DRO_03, FALSE)
|
||||
EVT_END_IF
|
||||
EVT_CASE_LT(STORY_CH5_STAR_SPRIT_DEPARTED)
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Dryite_Green_Talk, ANIM_Dryite_Green_Idle, 0, MSG_CH2_00A3)
|
||||
EVT_CASE_DEFAULT
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Dryite_Green_Talk, ANIM_Dryite_Green_Idle, 0, MSG_CH2_00A4)
|
||||
EVT_END_SWITCH
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInit_Dryite_02) = {
|
||||
EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Dryite_02)))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInteract_Dryite_03) = {
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Dryite_Green_Talk, ANIM_Dryite_Green_Idle, 0, MSG_CH2_00A0)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInit_Dryite_03) = {
|
||||
EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Dryite_03)))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInteract_Mouser_01) = {
|
||||
EVT_SWITCH(GB_StoryProgress)
|
||||
EVT_CASE_LT(STORY_CH2_STAR_SPRIT_DEPARTED)
|
||||
EVT_IF_EQ(AF_DRO_04, FALSE)
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Mouser_Blue_Talk, ANIM_Mouser_Blue_Idle, 0, MSG_CH2_00A5)
|
||||
EVT_SET(AF_DRO_04, TRUE)
|
||||
EVT_ELSE
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Mouser_Blue_Talk, ANIM_Mouser_Blue_Idle, 0, MSG_CH2_00A6)
|
||||
EVT_SET(AF_DRO_04, FALSE)
|
||||
EVT_END_IF
|
||||
EVT_CASE_LT(STORY_CH5_STAR_SPRIT_DEPARTED)
|
||||
EVT_IF_EQ(AF_DRO_04, FALSE)
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Mouser_Blue_Talk, ANIM_Mouser_Blue_Idle, 0, MSG_CH2_00A7)
|
||||
EVT_SET(AF_DRO_04, TRUE)
|
||||
EVT_ELSE
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Mouser_Blue_Talk, ANIM_Mouser_Blue_Idle, 0, MSG_CH2_00A8)
|
||||
EVT_SET(AF_DRO_04, FALSE)
|
||||
EVT_END_IF
|
||||
EVT_CASE_DEFAULT
|
||||
EVT_IF_EQ(AF_DRO_04, FALSE)
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Mouser_Blue_Talk, ANIM_Mouser_Blue_Idle, 0, MSG_CH2_00A9)
|
||||
EVT_SET(AF_DRO_04, TRUE)
|
||||
EVT_ELSE
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Mouser_Blue_Talk, ANIM_Mouser_Blue_Idle, 0, MSG_CH2_00AA)
|
||||
EVT_SET(AF_DRO_04, FALSE)
|
||||
EVT_END_IF
|
||||
EVT_END_SWITCH
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInit_Mouser_01) = {
|
||||
EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Mouser_01)))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInteract_Mouser_02) = {
|
||||
EVT_SWITCH(GB_StoryProgress)
|
||||
EVT_CASE_LT(STORY_CH2_STAR_SPRIT_DEPARTED)
|
||||
EVT_IF_EQ(AF_DRO_05, FALSE)
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Mouser_Blue_Talk, ANIM_Mouser_Blue_Idle, 0, MSG_CH2_00AB)
|
||||
EVT_SET(AF_DRO_05, TRUE)
|
||||
EVT_ELSE
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Mouser_Blue_Talk, ANIM_Mouser_Blue_Idle, 0, MSG_CH2_00AC)
|
||||
EVT_SET(AF_DRO_05, FALSE)
|
||||
EVT_END_IF
|
||||
EVT_CASE_LT(STORY_CH5_STAR_SPRIT_DEPARTED)
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Mouser_Blue_Talk, ANIM_Mouser_Blue_Idle, 0, MSG_CH2_00AD)
|
||||
EVT_CASE_DEFAULT
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Mouser_Blue_Talk, ANIM_Mouser_Blue_Idle, 0, MSG_CH2_00AE)
|
||||
EVT_END_SWITCH
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInit_Mouser_02) = {
|
||||
EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Mouser_02)))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
#include "npc_moustafa.c"
|
||||
|
||||
EvtScript N(EVS_NpcIdle_Mouser_03) = {
|
||||
EVT_CALL(InterpNpcYaw, NPC_DisguisedMoustafa, 270, 0)
|
||||
EVT_LABEL(10)
|
||||
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Mouser_Purple_Gossip)
|
||||
EVT_CALL(SetNpcAnimation, NPC_DisguisedMoustafa, ANIM_DisguisedMoustafa_Idle)
|
||||
EVT_LOOP(50)
|
||||
EVT_CALL(IsPlayerWithin, 200, 50, 100, LVar0)
|
||||
EVT_IF_EQ(LVar0, 1)
|
||||
EVT_GOTO(20)
|
||||
EVT_END_IF
|
||||
EVT_WAIT(1)
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Mouser_Purple_Idle)
|
||||
EVT_CALL(SetNpcAnimation, NPC_DisguisedMoustafa, ANIM_DisguisedMoustafa_TalkAlt)
|
||||
EVT_LOOP(50)
|
||||
EVT_CALL(IsPlayerWithin, 200, 50, 100, LVar0)
|
||||
EVT_IF_EQ(LVar0, 1)
|
||||
EVT_GOTO(20)
|
||||
EVT_END_IF
|
||||
EVT_WAIT(1)
|
||||
EVT_END_LOOP
|
||||
EVT_GOTO(10)
|
||||
EVT_LABEL(20)
|
||||
EVT_CALL(SetNpcAnimation, NPC_DisguisedMoustafa, ANIM_DisguisedMoustafa_Idle)
|
||||
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Mouser_Purple_Run)
|
||||
EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_100, TRUE)
|
||||
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Mouser_Purple_Run)
|
||||
EVT_CALL(NpcMoveTo, NPC_SELF, 150, 18, 20)
|
||||
EVT_CALL(EnableNpcBlur, NPC_SELF, TRUE)
|
||||
EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_174, 0)
|
||||
EVT_CALL(NpcMoveTo, NPC_SELF, -83, 11, 20)
|
||||
EVT_CALL(NpcMoveTo, NPC_SELF, -239, 5, 20)
|
||||
EVT_CALL(NpcMoveTo, NPC_SELF, -371, 5, 20)
|
||||
EVT_CALL(NpcMoveTo, NPC_SELF, -487, 5, 20)
|
||||
EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION)
|
||||
EVT_SET(GB_StoryProgress, STORY_CH2_SPOKE_WITH_SHEEK)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInit_Mouser_03) = {
|
||||
EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Mouser_03)))
|
||||
EVT_IF_GE(GB_StoryProgress, STORY_CH2_SPOKE_WITH_SHEEK)
|
||||
EVT_CALL(RemoveNpc, NPC_SELF)
|
||||
EVT_END_IF
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_SetToadHouseDialogue) = {
|
||||
EVT_SET(LVar0, MSG_CH2_00D1)
|
||||
EVT_SET(LVar8, MSG_CH2_00D2)
|
||||
EVT_SET(LVar1, MSG_CH2_00D3)
|
||||
EVT_SET(LVar2, MSG_CH2_00D4)
|
||||
EVT_SET(LVar3, MSG_CH2_00D5)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_ToadHouse_GetInBed) = {
|
||||
EVT_EXEC(N(EVS_PlayRestMusic))
|
||||
EVT_CALL(SetPlayerSpeed, EVT_FLOAT(3.0))
|
||||
EVT_CALL(PlayerMoveTo, -179, -198, 0)
|
||||
EVT_THREAD
|
||||
EVT_WAIT(15)
|
||||
EVT_CALL(N(ToadHouse_CamSetFOV), 0, 40)
|
||||
EVT_CALL(SetCamType, CAM_DEFAULT, 4, FALSE)
|
||||
EVT_CALL(SetCamPitch, CAM_DEFAULT, 95, -61)
|
||||
EVT_CALL(SetCamDistance, CAM_DEFAULT, 108)
|
||||
EVT_CALL(SetCamPosA, CAM_DEFAULT, 202, 62)
|
||||
EVT_CALL(SetCamPosB, CAM_DEFAULT, -89, -141)
|
||||
EVT_CALL(SetCamPosC, CAM_DEFAULT, 0, 0)
|
||||
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0))
|
||||
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(PlayerMoveTo, -187, -267, 0)
|
||||
EVT_CALL(InterpPlayerYaw, 230, 1)
|
||||
EVT_CALL(HidePlayerShadow, TRUE)
|
||||
EVT_CALL(SetPlayerAnimation, ANIM_Mario_10002)
|
||||
EVT_CALL(func_802D286C, 0x00000800)
|
||||
EVT_CALL(func_802D2520, ANIM_Mario_10002, 5, 7, 1, 1, 0)
|
||||
EVT_THREAD
|
||||
EVT_WAIT(60)
|
||||
EVT_CALL(SetPlayerAnimation, ANIM_Mario_8001D)
|
||||
EVT_END_THREAD
|
||||
EVT_WAIT(20)
|
||||
EVT_THREAD
|
||||
EVT_WAIT(81)
|
||||
EVT_CALL(N(ToadHouse_CamSetFOV), 0, 25)
|
||||
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
|
||||
EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2)
|
||||
EVT_WAIT(1)
|
||||
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0)
|
||||
EVT_END_THREAD
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_ToadHouse_ReturnFromRest) = {
|
||||
EVT_CALL(HidePlayerShadow, FALSE)
|
||||
EVT_CALL(func_802D2520, ANIM_Mario_10002, 0, 0, 0, 0, 0)
|
||||
EVT_CALL(SetPlayerPos, -187, 0, -240)
|
||||
EVT_CALL(SetPlayerSpeed, EVT_FLOAT(3.0))
|
||||
EVT_CALL(PlayerMoveTo, -168, -195, 0)
|
||||
EVT_EXEC(N(EVS_SetupMusic))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInit_ToadHouseKeeper) = {
|
||||
EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_ToadHouseKeeper)))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
StaticNpc N(PassiveNPCs)[] = {
|
||||
{
|
||||
.id = NPC_Archeologist,
|
||||
.settings = &N(NpcSettings_Archeologist),
|
||||
.pos = { -320.0f, 0.0f, -14.0f },
|
||||
.flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING | NPC_FLAG_NO_PROJECT_SHADOW,
|
||||
.init = &N(EVS_NpcInit_Archeologist),
|
||||
.yaw = 90,
|
||||
.drops = {
|
||||
.dropFlags = NPC_DROP_FLAGS_80,
|
||||
.heartDrops = NO_DROPS,
|
||||
.flowerDrops = NO_DROPS,
|
||||
},
|
||||
.territory = { .temp = { -303, 0, 22, 146, 38, -32767, 1, 0, 0, 0, 0, 0, 0, 1 }},
|
||||
.animations = {
|
||||
ANIM_Archeologist_Idle,
|
||||
ANIM_Archeologist_Walk,
|
||||
ANIM_Archeologist_Run,
|
||||
ANIM_Archeologist_Run,
|
||||
ANIM_Archeologist_Idle,
|
||||
ANIM_Archeologist_Idle,
|
||||
ANIM_Archeologist_Idle,
|
||||
ANIM_Archeologist_Idle,
|
||||
ANIM_Archeologist_Idle,
|
||||
ANIM_Archeologist_Idle,
|
||||
ANIM_Archeologist_Idle,
|
||||
ANIM_Archeologist_Idle,
|
||||
ANIM_Archeologist_Idle,
|
||||
ANIM_Archeologist_Idle,
|
||||
ANIM_Archeologist_Idle,
|
||||
ANIM_Archeologist_Idle,
|
||||
},
|
||||
.tattle = MSG_NpcTattle_Archeologist,
|
||||
},
|
||||
{
|
||||
.id = NPC_Dryite_01,
|
||||
.settings = &N(NpcSettings_Dryite_Wander),
|
||||
.pos = { -20.0f, 0.0f, 40.0f },
|
||||
.flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING | NPC_FLAG_NO_PROJECT_SHADOW,
|
||||
.init = &N(EVS_NpcInit_MrE),
|
||||
.yaw = 270,
|
||||
.drops = DRYITE_DROPS,
|
||||
.territory = { .temp = { -20, 0, 40, 60, 0, -32767, 0, 0, 0, 0, 0, 0, 0, 1 }},
|
||||
.animations = DRYITE_BLUE_ANIMS,
|
||||
.tattle = MSG_NpcTattle_DRO_DryiteE,
|
||||
},
|
||||
{
|
||||
.id = NPC_DisguisedMoustafa,
|
||||
.settings = &N(NpcSettings_Mouser),
|
||||
.pos = { 245.0f, 0.0f, -35.0f },
|
||||
.flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING | NPC_FLAG_NO_PROJECT_SHADOW,
|
||||
.init = &N(EVS_NpcInit_DisguisedMoustafa),
|
||||
.yaw = 90,
|
||||
.drops = {
|
||||
.dropFlags = NPC_DROP_FLAGS_80,
|
||||
.heartDrops = NO_DROPS,
|
||||
.flowerDrops = NO_DROPS,
|
||||
},
|
||||
.animations = {
|
||||
ANIM_DisguisedMoustafa_Idle,
|
||||
ANIM_DisguisedMoustafa_Idle,
|
||||
ANIM_DisguisedMoustafa_Idle,
|
||||
ANIM_DisguisedMoustafa_Idle,
|
||||
ANIM_DisguisedMoustafa_Idle,
|
||||
ANIM_DisguisedMoustafa_Idle,
|
||||
ANIM_DisguisedMoustafa_Idle,
|
||||
ANIM_DisguisedMoustafa_Idle,
|
||||
ANIM_DisguisedMoustafa_Idle,
|
||||
ANIM_DisguisedMoustafa_Idle,
|
||||
ANIM_DisguisedMoustafa_Idle,
|
||||
ANIM_DisguisedMoustafa_Idle,
|
||||
ANIM_DisguisedMoustafa_Idle,
|
||||
ANIM_DisguisedMoustafa_Idle,
|
||||
ANIM_DisguisedMoustafa_Idle,
|
||||
ANIM_DisguisedMoustafa_Idle,
|
||||
},
|
||||
.tattle = MSG_NpcTattle_Sheek,
|
||||
},
|
||||
{
|
||||
.id = NPC_Toad,
|
||||
.settings = &N(NpcSettings_ToadHouseKeeper),
|
||||
.pos = { -143.0f, 0.0f, -170.0f },
|
||||
.flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING | NPC_FLAG_NO_PROJECT_SHADOW,
|
||||
.init = &N(EVS_NpcInit_ToadHouseKeeper),
|
||||
.yaw = 180,
|
||||
.drops = {
|
||||
.dropFlags = NPC_DROP_FLAGS_80,
|
||||
.heartDrops = NO_DROPS,
|
||||
.flowerDrops = NO_DROPS,
|
||||
},
|
||||
.animations = {
|
||||
ANIM_Toad_Red_Idle,
|
||||
ANIM_Toad_Red_Walk,
|
||||
ANIM_Toad_Red_Run,
|
||||
ANIM_Toad_Red_Run,
|
||||
ANIM_Toad_Red_Idle,
|
||||
ANIM_Toad_Red_Idle,
|
||||
ANIM_Toad_Red_Disappointed,
|
||||
ANIM_Toad_Red_Disappointed,
|
||||
ANIM_Toad_Red_Run,
|
||||
ANIM_Toad_Red_Run,
|
||||
ANIM_Toad_Red_Run,
|
||||
ANIM_Toad_Red_Run,
|
||||
ANIM_Toad_Red_Run,
|
||||
ANIM_Toad_Red_Run,
|
||||
ANIM_Toad_Red_Run,
|
||||
ANIM_Toad_Red_Run,
|
||||
},
|
||||
.tattle = MSG_NpcTattle_DRO_ToadHouseToad,
|
||||
},
|
||||
{
|
||||
.id = NPC_Merlee,
|
||||
.settings = &N(NpcSettings_Merlee),
|
||||
.pos = { -130.0f, 0.0f, -400.0f },
|
||||
.flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING | NPC_FLAG_NO_PROJECT_SHADOW,
|
||||
.init = &N(EVS_NpcAuxAI_Merlee),
|
||||
.yaw = 180,
|
||||
.drops = {
|
||||
.dropFlags = NPC_DROP_FLAGS_80,
|
||||
.heartDrops = NO_DROPS,
|
||||
.flowerDrops = NO_DROPS,
|
||||
},
|
||||
.animations = {
|
||||
ANIM_WorldMerlee_Idle,
|
||||
ANIM_WorldMerlee_Walk,
|
||||
ANIM_WorldMerlee_Run,
|
||||
ANIM_WorldMerlee_Run,
|
||||
ANIM_WorldMerlee_Idle,
|
||||
ANIM_WorldMerlee_Idle,
|
||||
ANIM_WorldMerlee_Idle,
|
||||
ANIM_WorldMerlee_Idle,
|
||||
ANIM_WorldMerlee_Idle,
|
||||
ANIM_WorldMerlee_Idle,
|
||||
ANIM_WorldMerlee_Idle,
|
||||
ANIM_WorldMerlee_Idle,
|
||||
ANIM_WorldMerlee_Idle,
|
||||
ANIM_WorldMerlee_Idle,
|
||||
ANIM_WorldMerlee_Idle,
|
||||
ANIM_WorldMerlee_Idle,
|
||||
},
|
||||
.tattle = MSG_NpcTattle_Merlee,
|
||||
},
|
||||
{
|
||||
.id = NPC_Moustafa,
|
||||
.settings = &N(NpcSettings_Mouser),
|
||||
.pos = { NPC_DISPOSE_LOCATION },
|
||||
.flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING | NPC_FLAG_NO_PROJECT_SHADOW,
|
||||
.init = &N(EVS_NpcInit_Moustafa),
|
||||
.yaw = 0,
|
||||
.drops = {
|
||||
.dropFlags = NPC_DROP_FLAGS_80,
|
||||
.heartDrops = NO_DROPS,
|
||||
.flowerDrops = NO_DROPS,
|
||||
},
|
||||
.animations = {
|
||||
ANIM_Moustafa_Idle,
|
||||
ANIM_Moustafa_Idle,
|
||||
ANIM_Moustafa_Run,
|
||||
ANIM_Moustafa_Run,
|
||||
ANIM_Moustafa_Idle,
|
||||
ANIM_Moustafa_Idle,
|
||||
ANIM_Moustafa_Idle,
|
||||
ANIM_Moustafa_Idle,
|
||||
ANIM_Moustafa_Idle,
|
||||
ANIM_Moustafa_Idle,
|
||||
ANIM_Moustafa_Idle,
|
||||
ANIM_Moustafa_Idle,
|
||||
ANIM_Moustafa_Idle,
|
||||
ANIM_Moustafa_Idle,
|
||||
ANIM_Moustafa_Idle,
|
||||
ANIM_Moustafa_Idle,
|
||||
},
|
||||
.tattle = MSG_NpcTattle_Moustafa,
|
||||
},
|
||||
{
|
||||
.id = NPC_Dryite_02,
|
||||
.settings = &N(NpcSettings_Dryite),
|
||||
.pos = { 25.0f, 0.0f, -38.0f },
|
||||
.flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING | NPC_FLAG_NO_PROJECT_SHADOW,
|
||||
.init = &N(EVS_NpcInit_Dryite_02),
|
||||
.yaw = 270,
|
||||
.drops = DRYITE_DROPS,
|
||||
.animations = DRYITE_GREEN_ANIMS,
|
||||
.tattle = MSG_NpcTattle_DRO_DryiteF,
|
||||
},
|
||||
{
|
||||
.id = NPC_Dryite_03,
|
||||
.settings = &N(NpcSettings_Dryite),
|
||||
.pos = { -375.0f, 0.0f, -10.0f },
|
||||
.flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING | NPC_FLAG_NO_PROJECT_SHADOW,
|
||||
.init = &N(EVS_NpcInit_Dryite_03),
|
||||
.yaw = 270,
|
||||
.drops = DRYITE_DROPS,
|
||||
.animations = DRYITE_GREEN_ANIMS,
|
||||
.tattle = MSG_NpcTattle_DRO_VisitedShootingStarSummit,
|
||||
},
|
||||
{
|
||||
.id = NPC_Mouser_01,
|
||||
.settings = &N(NpcSettings_Mouser),
|
||||
.pos = { -50.0f, 0.0f, -470.0f },
|
||||
.flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING | NPC_FLAG_NO_PROJECT_SHADOW,
|
||||
.init = &N(EVS_NpcInit_Mouser_01),
|
||||
.yaw = 180,
|
||||
.drops = {
|
||||
.dropFlags = NPC_DROP_FLAGS_80,
|
||||
.heartDrops = NO_DROPS,
|
||||
.flowerDrops = NO_DROPS,
|
||||
},
|
||||
.animations = MOUSER_BLUE_ANIMS,
|
||||
.tattle = MSG_NpcTattle_DRO_CrushingOnMerlee,
|
||||
},
|
||||
{
|
||||
.id = NPC_Mouser_02,
|
||||
.settings = &N(NpcSettings_Mouser),
|
||||
.pos = { -270.0f, 0.0f, 91.0f },
|
||||
.flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING | NPC_FLAG_NO_PROJECT_SHADOW,
|
||||
.init = &N(EVS_NpcInit_Mouser_02),
|
||||
.yaw = 270,
|
||||
.drops = {
|
||||
.dropFlags = NPC_DROP_FLAGS_80,
|
||||
.heartDrops = NO_DROPS,
|
||||
.flowerDrops = NO_DROPS,
|
||||
},
|
||||
.animations = MOUSER_BLUE_ANIMS,
|
||||
.tattle = MSG_NpcTattle_DRO_TellsTales,
|
||||
},
|
||||
{
|
||||
.id = NPC_Mouser_03,
|
||||
.settings = &N(NpcSettings_Mouser),
|
||||
.pos = { 210.0f, 0.0f, -35.0f },
|
||||
.flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING | NPC_FLAG_NO_PROJECT_SHADOW,
|
||||
.init = &N(EVS_NpcInit_Mouser_03),
|
||||
.yaw = 90,
|
||||
.drops = {
|
||||
.dropFlags = NPC_DROP_FLAGS_80,
|
||||
.heartDrops = NO_DROPS,
|
||||
.flowerDrops = NO_DROPS,
|
||||
},
|
||||
.animations = MOUSER_PURPLE_ANIMS,
|
||||
},
|
||||
{
|
||||
.id = NPC_ChuckQuizmo,
|
||||
.settings = &N(Quizmo_NpcSettings),
|
||||
.pos = { -335.0f, 0.0f, 90.0f },
|
||||
.flags = NPC_FLAG_PASSIVE | NPC_FLAG_ENABLE_HIT_SCRIPT | NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING | NPC_FLAG_NO_PROJECT_SHADOW,
|
||||
.initVarCount = 1,
|
||||
.initVar = { .bytes = { 0, QUIZ_AREA_DRO, QUIZ_COUNT_DRO, QUIZ_MAP_DRO_02 } },
|
||||
.yaw = 270,
|
||||
.drops = QUIZMO_DROPS,
|
||||
.animations = QUIZMO_ANIMS,
|
||||
.tattle = MSG_NpcTattle_ChuckQuizmo,
|
||||
},
|
||||
};
|
||||
|
||||
NpcGroupList N(DefaultNPCs) = {
|
||||
NPC_GROUP(N(PassiveNPCs)),
|
||||
{},
|
||||
};
|
118
src/world/area_dro/dro_02/dro_02_toad_house_blanket_anim.c
Normal file
118
src/world/area_dro/dro_02/dro_02_toad_house_blanket_anim.c
Normal file
@ -0,0 +1,118 @@
|
||||
#include "animation_script.h"
|
||||
|
||||
AnimScript script = {
|
||||
AS_OP_19,
|
||||
AS_SET_ROTATION, 1, AS_F(0.0), AS_F(0.0), AS_F(0.0),
|
||||
AS_SET_POS, 1, 0, 0, 0,
|
||||
AS_SET_SCALE, 1, AS_F(1.0), AS_F(1.0), AS_F(1.0),
|
||||
AS_SET_ROTATION, 2, AS_F(0.0), AS_F(0.0), AS_F(0.0),
|
||||
AS_SET_POS, 2, 0, 0, 0,
|
||||
AS_SET_SCALE, 2, AS_F(1.0), AS_F(1.0), AS_F(1.0),
|
||||
AS_SET_ROTATION, 3, AS_F(0.0), AS_F(0.0), AS_F(0.0),
|
||||
AS_SET_POS, 3, 0, 0, 0,
|
||||
AS_SET_SCALE, 3, AS_F(1.0), AS_F(1.0), AS_F(1.0),
|
||||
AS_SET_ROTATION, 4, AS_F(0.0), AS_F(0.0), AS_F(0.0),
|
||||
AS_SET_POS, 4, 0, 0, 0,
|
||||
AS_SET_SCALE, 4, AS_F(1.0), AS_F(1.0), AS_F(1.0),
|
||||
AS_SET_ROTATION, 5, AS_F(0.0), AS_F(0.0), AS_F(0.0),
|
||||
AS_SET_POS, 5, 0, 0, 0,
|
||||
AS_SET_SCALE, 5, AS_F(1.0), AS_F(1.0), AS_F(1.0),
|
||||
AS_SET_ROTATION, 6, AS_F(0.0), AS_F(0.0), AS_F(0.0),
|
||||
AS_SET_POS, 6, 0, 0, 0,
|
||||
AS_SET_SCALE, 6, AS_F(1.0), AS_F(1.0), AS_F(1.0),
|
||||
AS_SET_ROTATION, 7, AS_F(0.0), AS_F(0.0), AS_F(0.0),
|
||||
AS_SET_POS, 7, 0, 0, 0,
|
||||
AS_SET_SCALE, 7, AS_F(1.0), AS_F(1.0), AS_F(1.0),
|
||||
AS_SET_ROTATION, 8, AS_F(0.0), AS_F(0.0), AS_F(0.0),
|
||||
AS_SET_POS, 8, 0, 0, 0,
|
||||
AS_SET_SCALE, 8, AS_F(1.0), AS_F(1.0), AS_F(1.0),
|
||||
AS_SET_ROTATION, 9, AS_F(0.0), AS_F(0.0), AS_F(0.0),
|
||||
AS_SET_POS, 9, 0, 0, 0,
|
||||
AS_SET_SCALE, 9, AS_F(1.0), AS_F(1.0), AS_F(1.0),
|
||||
AS_SET_ROTATION, 10, AS_F(0.0), AS_F(0.0), AS_F(0.0),
|
||||
AS_SET_POS, 10, 0, 0, 0,
|
||||
AS_SET_SCALE, 10, AS_F(1.0), AS_F(1.0), AS_F(1.0),
|
||||
AS_SET_ROTATION, 11, AS_F(0.0), AS_F(0.0), AS_F(0.0),
|
||||
AS_SET_POS, 11, 0, 0, 0,
|
||||
AS_SET_SCALE, 11, AS_F(1.0), AS_F(1.0), AS_F(1.0),
|
||||
AS_SET_ROTATION, 12, AS_F(0.0), AS_F(0.0), AS_F(0.0),
|
||||
AS_SET_POS, 12, 0, 0, 0,
|
||||
AS_SET_SCALE, 12, AS_F(1.0), AS_F(1.0), AS_F(1.0),
|
||||
AS_SET_ROTATION, 13, AS_F(0.0), AS_F(0.0), AS_F(0.0),
|
||||
AS_SET_POS, 13, 0, 0, 0,
|
||||
AS_SET_SCALE, 13, AS_F(1.0), AS_F(1.0), AS_F(1.0),
|
||||
AS_SET_ROTATION, 14, AS_F(0.0), AS_F(0.0), AS_F(0.0),
|
||||
AS_SET_POS, 14, 0, 0, 0,
|
||||
AS_SET_SCALE, 14, AS_F(1.0), AS_F(1.0), AS_F(1.0),
|
||||
AS_SET_ROTATION, 15, AS_F(0.0), AS_F(0.0), AS_F(0.0),
|
||||
AS_SET_POS, 15, 0, 0, 0,
|
||||
AS_SET_SCALE, 15, AS_F(1.0), AS_F(1.0), AS_F(1.0),
|
||||
AS_SET_ROTATION, 16, AS_F(0.0), AS_F(0.0), AS_F(0.0),
|
||||
AS_SET_POS, 16, 0, 0, 0,
|
||||
AS_SET_SCALE, 16, AS_F(1.0), AS_F(1.0), AS_F(1.0),
|
||||
AS_SET_ROTATION, 17, AS_F(0.0), AS_F(0.0), AS_F(0.0),
|
||||
AS_SET_POS, 17, 0, 0, 0,
|
||||
AS_SET_SCALE, 17, AS_F(1.0), AS_F(1.0), AS_F(1.0),
|
||||
AS_WAIT, 1,
|
||||
AS_WAIT, 1,
|
||||
AS_WAIT, 1,
|
||||
AS_WAIT, 1,
|
||||
AS_WAIT, 1,
|
||||
AS_WAIT, 1,
|
||||
AS_WAIT, 1,
|
||||
AS_WAIT, 1,
|
||||
AS_WAIT, 1,
|
||||
AS_WAIT, 1,
|
||||
AS_WAIT, 1,
|
||||
AS_WAIT, 1,
|
||||
AS_WAIT, 1,
|
||||
AS_WAIT, 1,
|
||||
AS_WAIT, 1,
|
||||
AS_WAIT, 1,
|
||||
AS_WAIT, 1,
|
||||
AS_WAIT, 1,
|
||||
AS_WAIT, 1,
|
||||
AS_WAIT, 1,
|
||||
AS_WAIT, 1,
|
||||
AS_WAIT, 1,
|
||||
AS_WAIT, 1,
|
||||
AS_WAIT, 1,
|
||||
AS_WAIT, 1,
|
||||
AS_WAIT, 1,
|
||||
AS_WAIT, 1,
|
||||
AS_WAIT, 1,
|
||||
AS_WAIT, 1,
|
||||
AS_WAIT, 1,
|
||||
AS_WAIT, 1,
|
||||
AS_WAIT, 1,
|
||||
AS_WAIT, 1,
|
||||
AS_WAIT, 1,
|
||||
AS_WAIT, 1,
|
||||
AS_WAIT, 1,
|
||||
AS_WAIT, 1,
|
||||
AS_WAIT, 1,
|
||||
AS_WAIT, 1,
|
||||
AS_WAIT, 1,
|
||||
AS_WAIT, 1,
|
||||
AS_WAIT, 1,
|
||||
AS_WAIT, 1,
|
||||
AS_WAIT, 1,
|
||||
AS_WAIT, 1,
|
||||
AS_WAIT, 1,
|
||||
AS_WAIT, 1,
|
||||
AS_WAIT, 1,
|
||||
AS_WAIT, 1,
|
||||
AS_WAIT, 1,
|
||||
AS_WAIT, 1,
|
||||
AS_WAIT, 1,
|
||||
AS_WAIT, 1,
|
||||
AS_WAIT, 1,
|
||||
AS_WAIT, 1,
|
||||
AS_WAIT, 1,
|
||||
AS_WAIT, 1,
|
||||
AS_WAIT, 1,
|
||||
AS_WAIT, 1,
|
||||
AS_WAIT, 1,
|
||||
AS_END_LOOP,
|
||||
AS_END,
|
||||
};
|
128
src/world/area_dro/dro_02/dro_02_toad_house_blanket_skeleton.c
Normal file
128
src/world/area_dro/dro_02/dro_02_toad_house_blanket_skeleton.c
Normal file
@ -0,0 +1,128 @@
|
||||
#include "animation_script.h"
|
||||
|
||||
extern Gfx N(toad_house_blanket_gfx)[];
|
||||
extern Vtx N(toad_house_blanket_vtx)[];
|
||||
|
||||
StaticAnimatorNode N(D_80248AA0_971C60) = {
|
||||
.displayList = N(toad_house_blanket_gfx),
|
||||
.vertexStartOffset = 0x02EE,
|
||||
.vtxList = N(toad_house_blanket_vtx),
|
||||
};
|
||||
|
||||
StaticAnimatorNode N(D_80248ACC_971C8C) = {
|
||||
.displayList = N(toad_house_blanket_gfx),
|
||||
.sibling = &N(D_80248AA0_971C60),
|
||||
.vertexStartOffset = 0x02BC,
|
||||
.vtxList = N(toad_house_blanket_vtx),
|
||||
};
|
||||
|
||||
StaticAnimatorNode N(D_80248AF8_971CB8) = {
|
||||
.displayList = N(toad_house_blanket_gfx),
|
||||
.sibling = &N(D_80248ACC_971C8C),
|
||||
.vertexStartOffset = 0x028A,
|
||||
.vtxList = N(toad_house_blanket_vtx),
|
||||
};
|
||||
|
||||
StaticAnimatorNode N(D_80248B24_971CE4) = {
|
||||
.displayList = N(toad_house_blanket_gfx),
|
||||
.sibling = &N(D_80248AF8_971CB8),
|
||||
.vertexStartOffset = 0x0258,
|
||||
.vtxList = N(toad_house_blanket_vtx),
|
||||
};
|
||||
|
||||
StaticAnimatorNode N(D_80248B50_971D10) = {
|
||||
.displayList = N(toad_house_blanket_gfx),
|
||||
.sibling = &N(D_80248B24_971CE4),
|
||||
.vertexStartOffset = 0x0226,
|
||||
.vtxList = N(toad_house_blanket_vtx),
|
||||
};
|
||||
|
||||
StaticAnimatorNode N(D_80248B7C_971D3C) = {
|
||||
.displayList = N(toad_house_blanket_gfx),
|
||||
.sibling = &N(D_80248B50_971D10),
|
||||
.vertexStartOffset = 0x01F4,
|
||||
.vtxList = N(toad_house_blanket_vtx),
|
||||
};
|
||||
|
||||
StaticAnimatorNode N(D_80248BA8_971D68) = {
|
||||
.displayList = N(toad_house_blanket_gfx),
|
||||
.sibling = &N(D_80248B7C_971D3C),
|
||||
.vertexStartOffset = 0x01C2,
|
||||
.vtxList = N(toad_house_blanket_vtx),
|
||||
};
|
||||
|
||||
StaticAnimatorNode N(D_80248BD4_971D94) = {
|
||||
.displayList = N(toad_house_blanket_gfx),
|
||||
.sibling = &N(D_80248BA8_971D68),
|
||||
.vertexStartOffset = 0x0190,
|
||||
.vtxList = N(toad_house_blanket_vtx),
|
||||
};
|
||||
|
||||
StaticAnimatorNode N(D_80248C00_971DC0) = {
|
||||
.displayList = N(toad_house_blanket_gfx),
|
||||
.sibling = &N(D_80248BD4_971D94),
|
||||
.vertexStartOffset = 0x015E,
|
||||
.vtxList = N(toad_house_blanket_vtx),
|
||||
};
|
||||
|
||||
StaticAnimatorNode N(D_80248C2C_971DEC) = {
|
||||
.displayList = N(toad_house_blanket_gfx),
|
||||
.sibling = &N(D_80248C00_971DC0),
|
||||
.vertexStartOffset = 0x012C,
|
||||
.vtxList = N(toad_house_blanket_vtx),
|
||||
};
|
||||
|
||||
StaticAnimatorNode N(D_80248C58_971E18) = {
|
||||
.displayList = N(toad_house_blanket_gfx),
|
||||
.sibling = &N(D_80248C2C_971DEC),
|
||||
.vertexStartOffset = 0x00FA,
|
||||
.vtxList = N(toad_house_blanket_vtx),
|
||||
};
|
||||
|
||||
StaticAnimatorNode N(D_80248C84_971E44) = {
|
||||
.displayList = N(toad_house_blanket_gfx),
|
||||
.sibling = &N(D_80248C58_971E18),
|
||||
.vertexStartOffset = 0x00C8,
|
||||
.vtxList = N(toad_house_blanket_vtx),
|
||||
};
|
||||
|
||||
StaticAnimatorNode N(D_80248CB0_971E70) = {
|
||||
.displayList = N(toad_house_blanket_gfx),
|
||||
.sibling = &N(D_80248C84_971E44),
|
||||
.vertexStartOffset = 0x0096,
|
||||
.vtxList = N(toad_house_blanket_vtx),
|
||||
};
|
||||
|
||||
StaticAnimatorNode N(D_80248CDC_971E9C) = {
|
||||
.displayList = N(toad_house_blanket_gfx),
|
||||
.sibling = &N(D_80248CB0_971E70),
|
||||
.vertexStartOffset = 0x0064,
|
||||
.vtxList = N(toad_house_blanket_vtx),
|
||||
};
|
||||
|
||||
StaticAnimatorNode N(D_80248D08_971EC8) = {
|
||||
.displayList = N(toad_house_blanket_gfx),
|
||||
.sibling = &N(D_80248CDC_971E9C),
|
||||
.vertexStartOffset = 0x0032,
|
||||
.vtxList = N(toad_house_blanket_vtx),
|
||||
};
|
||||
|
||||
StaticAnimatorNode N(D_80248D34_971EF4) = {
|
||||
.displayList = N(toad_house_blanket_gfx),
|
||||
.sibling = &N(D_80248D08_971EC8),
|
||||
.vertexStartOffset = 0,
|
||||
.vtxList = N(toad_house_blanket_vtx),
|
||||
};
|
||||
|
||||
StaticAnimatorNode N(D_80248D60_971F20) = {
|
||||
.child = &N(D_80248D34_971EF4),
|
||||
.vertexStartOffset = -1,
|
||||
};
|
||||
|
||||
StaticAnimatorNode* N(D_80248D8C_971F4C)[] = {
|
||||
&N(D_80248D60_971F20), &N(D_80248D34_971EF4), &N(D_80248D08_971EC8), &N(D_80248CDC_971E9C),
|
||||
&N(D_80248CB0_971E70), &N(D_80248C84_971E44), &N(D_80248C58_971E18), &N(D_80248C2C_971DEC),
|
||||
&N(D_80248C00_971DC0), &N(D_80248BD4_971D94), &N(D_80248BA8_971D68), &N(D_80248B7C_971D3C),
|
||||
&N(D_80248B50_971D10), &N(D_80248B24_971CE4), &N(D_80248AF8_971CB8), &N(D_80248ACC_971C8C),
|
||||
&N(D_80248AA0_971C60), 0x00000000, 0x00000000,
|
||||
};
|
842
src/world/area_dro/dro_02/npc_merlee.c
Normal file
842
src/world/area_dro/dro_02/npc_merlee.c
Normal file
@ -0,0 +1,842 @@
|
||||
#include "dro_02.h"
|
||||
|
||||
// cards used during Merlee's ritual
|
||||
typedef struct RitualCard {
|
||||
/* 0x00 */ s32 unk_00;
|
||||
/* 0x04 */ Vec3f pos;
|
||||
/* 0x10 */ f32 yaw;
|
||||
/* 0x14 */ f32 pitch;
|
||||
/* 0x18 */ s32 spriteID;
|
||||
/* 0x1C */ s32 rasterIndex;
|
||||
/* 0x20 */ s32 xoffset;
|
||||
} RitualCard; // size = 0x24
|
||||
|
||||
static Evt* N(CreatorScript);
|
||||
|
||||
// this buffer is used as an array in scripts managaing the ritual scene
|
||||
// values are enumerated below
|
||||
static s32 N(RitualBuffer)[16];
|
||||
|
||||
enum {
|
||||
RITUAL_VAR_FOLDER_1 = ArrayVar(0),
|
||||
RITUAL_VAR_FOLDER_2 = ArrayVar(1),
|
||||
RITUAL_VAR_FOLDER_3 = ArrayVar(2),
|
||||
RITUAL_VAR_FOLDER_4 = ArrayVar(3),
|
||||
RITUAL_VAR_POS_X = ArrayVar(4),
|
||||
RITUAL_VAR_POS_Y = ArrayVar(5),
|
||||
RITUAL_VAR_POS_Z = ArrayVar(6),
|
||||
RITUAL_VAR_WORKER = ArrayVar(7),
|
||||
RITUAL_VAR_ORB_EFFECT = ArrayVar(8),
|
||||
RITUAL_VAR_STATE = ArrayVar(9),
|
||||
};
|
||||
|
||||
enum {
|
||||
RITUAL_STATE_INIT = 0,
|
||||
RITUAL_STATE_APPEAR = 1,
|
||||
RITUAL_STATE_2 = 2,
|
||||
RITUAL_STATE_3 = 3,
|
||||
RITUAL_STATE_4 = 4,
|
||||
RITUAL_STATE_FLIP_LEFT = 5,
|
||||
RITUAL_STATE_FLIP_MIDDLE = 6,
|
||||
RITUAL_STATE_FLIP_RIGHT = 7,
|
||||
RITUAL_STATE_8 = 8,
|
||||
RITUAL_STATE_9 = 9,
|
||||
RITUAL_STATE_A = 10,
|
||||
RITUAL_STATE_B = 11,
|
||||
RITUAL_STATE_C = 12,
|
||||
RITUAL_STATE_D = 13,
|
||||
};
|
||||
|
||||
static RitualCard N(RitualCards)[3];
|
||||
MAP_STATIC_PAD(1,merlee)
|
||||
|
||||
s8 N(MerleeSpellCasts)[] = {
|
||||
20, 10, 5, 0,
|
||||
};
|
||||
|
||||
s8 N(MerleeCoinCosts)[] = {
|
||||
50, 20, 5, 0,
|
||||
};
|
||||
|
||||
s32 N(pad_XX111)[] = { 0 };
|
||||
|
||||
#include "world/area_dro/dro_02/card.png.inc.c"
|
||||
#include "world/area_dro/dro_02/card.pal.inc.c"
|
||||
#include "world/area_dro/dro_02/card_1.vtx.inc.c"
|
||||
#include "world/area_dro/dro_02/card_2.vtx.inc.c"
|
||||
#include "world/area_dro/dro_02/card_setup.gfx.inc.c"
|
||||
#include "world/area_dro/dro_02/card_1.gfx.inc.c"
|
||||
#include "world/area_dro/dro_02/card_2.gfx.inc.c"
|
||||
|
||||
void N(card_worker_update)(void);
|
||||
void N(card_worker_render)(void);
|
||||
|
||||
API_CALLABLE(N(TryEnchantPlayer)) {
|
||||
PlayerData* playerData = &gPlayerData;
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 tier = evt_get_variable(script, *args++);
|
||||
s32 outPrevented = *args++;
|
||||
u8 coins = N(MerleeCoinCosts)[tier];
|
||||
u8 casts = N(MerleeSpellCasts)[tier];
|
||||
|
||||
if (playerData->coins < coins) {
|
||||
evt_set_variable(script, outPrevented, TRUE);
|
||||
} else {
|
||||
playerData->coins = playerData->coins - coins;
|
||||
if (playerData->merleeCastsLeft < casts) {
|
||||
playerData->merleeCastsLeft = casts;
|
||||
}
|
||||
playerData->merleeTurnCount = rand_int(2) + 1;
|
||||
switch (rand_int(3)) {
|
||||
case 0:
|
||||
playerData->merleeSpellType = MERLEE_SPELL_1;
|
||||
break;
|
||||
case 1:
|
||||
playerData->merleeSpellType = MERLEE_SPELL_2;
|
||||
break;
|
||||
case 2:
|
||||
playerData->merleeSpellType = MERLEE_SPELL_3;
|
||||
break;
|
||||
case 3:
|
||||
playerData->merleeSpellType = MERLEE_SPELL_4;
|
||||
break;
|
||||
}
|
||||
evt_set_variable(script, outPrevented, FALSE);
|
||||
}
|
||||
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
API_CALLABLE(N(DarkenWorld)) {
|
||||
s32 i;
|
||||
|
||||
if (isInitialCall) {
|
||||
mdl_set_all_fog_mode(1);
|
||||
*gBgRenderTypePtr = BACKGROUND_RENDER_TYPE_1;
|
||||
set_background_color_blend(0, 0, 0, 0);
|
||||
|
||||
for (i = 0; i < MAX_NPCS; i++) {
|
||||
Npc* npc = get_npc_by_index(i);
|
||||
if (npc != 0 && npc->flags != 0 && npc->npcID != NPC_PARTNER && npc->npcID != NPC_Merlee) {
|
||||
npc->flags |= NPC_FLAG_NO_DROPS;
|
||||
}
|
||||
}
|
||||
script->functionTemp[0] = 0;
|
||||
}
|
||||
|
||||
script->functionTemp[0] += 8;
|
||||
if (script->functionTemp[0] > 255) {
|
||||
script->functionTemp[0] = 255;
|
||||
}
|
||||
set_background_color_blend(0, 0, 0, script->functionTemp[0]);
|
||||
|
||||
return (script->functionTemp[0] == 255) * ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
API_CALLABLE(N(UndarkenWorld)) {
|
||||
s32 i;
|
||||
|
||||
if (isInitialCall) {
|
||||
set_background_color_blend(0, 0, 0, 255);
|
||||
script->functionTemp[0] = 255;
|
||||
script->functionTemp[1] = 0;
|
||||
}
|
||||
script->functionTemp[0] -= 8;
|
||||
if (script->functionTemp[0] < 0) {
|
||||
script->functionTemp[0] = 0;
|
||||
}
|
||||
set_background_color_blend(0, 0, 0, script->functionTemp[0]);
|
||||
|
||||
if (script->functionTemp[0] == 0 && script->functionTemp[1] == 0) {
|
||||
script->functionTemp[1] = 1;
|
||||
} else if (script->functionTemp[1] == 1) {
|
||||
mdl_set_all_fog_mode(0);
|
||||
*gBgRenderTypePtr = BACKGROUND_RENDER_TYPE_0;
|
||||
for (i = 0; i < MAX_NPCS; i++) {
|
||||
Npc* npc = get_npc_by_index(i);
|
||||
|
||||
if (npc != NULL && npc->flags != 0 && npc->npcID != NPC_PARTNER && npc->npcID != NPC_Merlee) {
|
||||
npc->flags &= ~NPC_FLAG_NO_DROPS;
|
||||
}
|
||||
}
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
return ApiStatus_BLOCK;
|
||||
}
|
||||
|
||||
API_CALLABLE(N(CreateRitualCards)) {
|
||||
s32 ret;
|
||||
|
||||
N(CreatorScript) = script;
|
||||
|
||||
ret = func_8013A704(1);
|
||||
fold_update(ret, FOLD_TYPE_5, 0xF, 1, 1, 0, 0x800);
|
||||
evt_set_variable(script, RITUAL_VAR_FOLDER_1, ret);
|
||||
ret = func_8013A704(1);
|
||||
fold_update(ret, FOLD_TYPE_5, 0x10, 1, 1, 0, 0x800);
|
||||
evt_set_variable(script, RITUAL_VAR_FOLDER_2, ret);
|
||||
ret = func_8013A704(1);
|
||||
fold_update(ret, FOLD_TYPE_5, 0x11, 1, 1, 0, 0x800);
|
||||
evt_set_variable(script, RITUAL_VAR_FOLDER_3, ret);
|
||||
ret = func_8013A704(1);
|
||||
fold_update(ret, FOLD_TYPE_5, 0x12, 1, 1, 0, 0x800);
|
||||
evt_set_variable(script, RITUAL_VAR_FOLDER_4, ret);
|
||||
|
||||
evt_set_variable(script, RITUAL_VAR_WORKER, create_generic_entity_world(
|
||||
N(card_worker_update),
|
||||
N(card_worker_render)));
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
API_CALLABLE(N(DestroyRitualCards)) {
|
||||
func_8013A854(evt_get_variable(script, RITUAL_VAR_FOLDER_1));
|
||||
func_8013A854(evt_get_variable(script, RITUAL_VAR_FOLDER_2));
|
||||
func_8013A854(evt_get_variable(script, RITUAL_VAR_FOLDER_3));
|
||||
func_8013A854(evt_get_variable(script, RITUAL_VAR_FOLDER_4));
|
||||
free_generic_entity(evt_get_variable(script, RITUAL_VAR_WORKER));
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
u32 N(appendGfx_ritual_card)(RitualCard* card, Matrix4f mtxParent) {
|
||||
Matrix4f mtxTransform;
|
||||
Matrix4f mtxTemp;
|
||||
FoldImageRecPart foldImage;
|
||||
SpriteRasterInfo rasterInfo;
|
||||
s32 ret;
|
||||
|
||||
if (card->unk_00 == 0) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
gSPDisplayList(gMasterGfxPos++, N(card_setup_gfx));
|
||||
|
||||
if (card->unk_00 == 1 || card->unk_00 == 4 || card->unk_00 == 5) {
|
||||
guTranslateF(mtxTemp, card->pos.x, card->pos.y, card->pos.z);
|
||||
guMtxCatF(mtxTemp, mtxParent, mtxTransform);
|
||||
guRotateF(mtxTemp, card->yaw, 0.0f, 1.0f, 0.0f);
|
||||
guMtxCatF(mtxTemp, mtxTransform, mtxTransform);
|
||||
guRotateF(mtxTemp, card->pitch, 1.0f, 0.0f, 0.0f);
|
||||
guMtxCatF(mtxTemp, mtxTransform, mtxTransform);
|
||||
guMtxF2L(mtxTransform, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||
gSPMatrix(gMasterGfxPos++, VIRTUAL_TO_PHYSICAL(&gDisplayContext->matrixStack[gMatrixListPos++]), G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
|
||||
if (card->unk_00 == 1 || card->unk_00 == 4) {
|
||||
gSPDisplayList(gMasterGfxPos++, N(card_1_gfx));
|
||||
}
|
||||
|
||||
if (card->unk_00 == 1 || card->unk_00 == 5) {
|
||||
spr_get_player_raster_info(&rasterInfo, card->spriteID, card->rasterIndex);
|
||||
gDPSetTextureLUT(gMasterGfxPos++, G_TT_RGBA16);
|
||||
gDPLoadTLUT_pal16(gMasterGfxPos++, 0, rasterInfo.defaultPal);
|
||||
gDPLoadTextureTile_4b(gMasterGfxPos++, rasterInfo.raster, G_IM_FMT_CI, rasterInfo.width, rasterInfo.height,
|
||||
0, 0, rasterInfo.width - 1, rasterInfo.height - 1, 0,
|
||||
G_TX_CLAMP, G_TX_CLAMP, 8, 8, G_TX_NOLOD, G_TX_NOLOD);
|
||||
guTranslateF(mtxTransform, card->xoffset + 30 - rasterInfo.width / 2, 0.0f, 0.0f);
|
||||
guMtxF2L(mtxTransform, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||
gSPMatrix(gMasterGfxPos++, VIRTUAL_TO_PHYSICAL(&gDisplayContext->matrixStack[gMatrixListPos++]), G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(gMasterGfxPos++, N(card_2_gfx));
|
||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
||||
}
|
||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (card->unk_00 == 2) {
|
||||
gDPSetTileSize(gMasterGfxPos++, G_TX_RENDERTILE, 256 * 4, 256 * 4, 287 * 4, 287 * 4);
|
||||
guTranslateF(mtxTemp, N(RitualCards)[0].pos.x, N(RitualCards)[0].pos.y, N(RitualCards)[0].pos.z);
|
||||
guMtxCatF(mtxTemp, mtxParent, mtxTransform);
|
||||
guMtxF2L(mtxTransform, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||
gSPMatrix(gMasterGfxPos++, VIRTUAL_TO_PHYSICAL(&gDisplayContext->matrixStack[gMatrixListPos++]), G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
ret = fold_appendGfx_component(evt_get_variable(N(CreatorScript), RITUAL_VAR_FOLDER_1), &foldImage, FOLD_STATE_FLAG_10 | FOLD_STATE_FLAG_20, mtxTransform);
|
||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
||||
return ret;
|
||||
}
|
||||
|
||||
if (card->unk_00 == 3) {
|
||||
gDPSetTileSize(gMasterGfxPos++, G_TX_RENDERTILE, 256 * 4, 256 * 4, 287 * 4, 287 * 4);
|
||||
guTranslateF(mtxTemp, N(RitualCards)[0].pos.x, N(RitualCards)[0].pos.y, N(RitualCards)[0].pos.z);
|
||||
guMtxCatF(mtxTemp, mtxParent, mtxTransform);
|
||||
guMtxF2L(mtxTransform, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||
gSPMatrix(gMasterGfxPos++, VIRTUAL_TO_PHYSICAL(&gDisplayContext->matrixStack[gMatrixListPos++]), G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
fold_appendGfx_component(evt_get_variable(N(CreatorScript), RITUAL_VAR_FOLDER_2), &foldImage, FOLD_STATE_FLAG_10 | FOLD_STATE_FLAG_20, mtxTransform);
|
||||
fold_appendGfx_component(evt_get_variable(N(CreatorScript), RITUAL_VAR_FOLDER_3), &foldImage, FOLD_STATE_FLAG_10 | FOLD_STATE_FLAG_20, mtxTransform);
|
||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
||||
guTranslateF(mtxTemp, N(RitualCards)[0].pos.x, N(RitualCards)[0].pos.y, N(RitualCards)[0].pos.z);
|
||||
guMtxCatF(mtxTemp, mtxParent, mtxTransform);
|
||||
guMtxF2L(mtxTransform, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||
gSPMatrix(gMasterGfxPos++, VIRTUAL_TO_PHYSICAL(&gDisplayContext->matrixStack[gMatrixListPos++]), G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
spr_get_player_raster_info(&rasterInfo, card->spriteID, card->rasterIndex);
|
||||
foldImage.raster = rasterInfo.raster;
|
||||
foldImage.palette = rasterInfo.defaultPal;
|
||||
foldImage.width = rasterInfo.width;
|
||||
foldImage.height = rasterInfo.height;
|
||||
foldImage.xOffset = -(rasterInfo.width / 2);
|
||||
foldImage.yOffset = rasterInfo.height / 2;
|
||||
foldImage.opacity = 255;
|
||||
ret = fold_appendGfx_component(evt_get_variable(N(CreatorScript), RITUAL_VAR_FOLDER_4), &foldImage, FOLD_STATE_FLAG_10, mtxTransform);
|
||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
||||
return ret;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
void N(GetCardOrientation)(s32 index, f32* outX, f32* outY, f32* outZ, f32* outAngle) {
|
||||
RitualCard* card;
|
||||
Matrix4f mtxTranform;
|
||||
Matrix4f mtxTemp;
|
||||
Matrix4f mtxParent;
|
||||
|
||||
guPositionF(mtxParent, 0.0f, -gCameras[gCurrentCameraID].currentYaw, 0.0f, SPRITE_WORLD_SCALE_F,
|
||||
evt_get_variable(N(CreatorScript), RITUAL_VAR_POS_X),
|
||||
evt_get_variable(N(CreatorScript), RITUAL_VAR_POS_Y),
|
||||
evt_get_variable(N(CreatorScript), RITUAL_VAR_POS_Z));
|
||||
|
||||
card = &N(RitualCards)[index];
|
||||
guTranslateF(mtxTemp, card->pos.x, card->pos.y, card->pos.z);
|
||||
guMtxCatF(mtxTemp, mtxParent, mtxTranform);
|
||||
guRotateF(mtxTemp, card->yaw, 0.0f, 1.0f, 0.0f);
|
||||
guMtxCatF(mtxTemp, mtxTranform, mtxTranform);
|
||||
guTranslateF(mtxTemp, 0.0f, 0.0f, 1.0f);
|
||||
guMtxCatF(mtxTemp, mtxTranform, mtxTranform);
|
||||
*outX = mtxTranform[3][0];
|
||||
*outY = mtxTranform[3][1];
|
||||
*outZ = mtxTranform[3][2];
|
||||
*outAngle = clamp_angle(card->yaw);
|
||||
}
|
||||
|
||||
void N(card_worker_update)(void) {
|
||||
f32 posX5, posY5, posZ5, yaw5;
|
||||
f32 posX6, posY6, posZ6, yaw6;
|
||||
f32 posX7, posY7, posZ7, yaw7;
|
||||
f32 sp48, sp4C, sp50, sp54;
|
||||
f32 sp58, sp5C, sp60, sp64;
|
||||
f32 sp68, sp6C, sp70, sp74;
|
||||
EffectInstance* effect;
|
||||
EnergyInOutFXData* data;
|
||||
s32 i, j;
|
||||
|
||||
switch (evt_get_variable(N(CreatorScript), RITUAL_VAR_STATE)) {
|
||||
case RITUAL_STATE_INIT:
|
||||
N(RitualStateTime) = 0;
|
||||
evt_set_variable(N(CreatorScript), RITUAL_VAR_STATE, RITUAL_STATE_APPEAR);
|
||||
N(RitualCards)[0].unk_00 = 1;
|
||||
N(RitualCards)[0].pos.x = -200.0f;
|
||||
N(RitualCards)[0].pos.y = 0.0f;
|
||||
N(RitualCards)[0].pos.z = 0.0f;
|
||||
N(RitualCards)[0].pitch = 0.0f;
|
||||
N(RitualCards)[0].yaw = 0.0f;
|
||||
N(RitualCards)[0].spriteID = 1;
|
||||
N(RitualCards)[0].rasterIndex = 12;
|
||||
N(RitualCards)[0].xoffset = 2;
|
||||
|
||||
N(RitualCards)[1].unk_00 = 1;
|
||||
N(RitualCards)[1].pos.x = 200.0f;
|
||||
N(RitualCards)[1].pos.y = 0.0f;
|
||||
N(RitualCards)[1].pos.z = 1.0f;
|
||||
N(RitualCards)[1].pitch = 0.0f;
|
||||
N(RitualCards)[1].yaw = 0.0f;
|
||||
N(RitualCards)[1].spriteID = 1;
|
||||
N(RitualCards)[1].rasterIndex = 48;
|
||||
N(RitualCards)[1].xoffset = 0;
|
||||
|
||||
|
||||
N(RitualCards)[2].spriteID = 8;
|
||||
N(RitualCards)[2].rasterIndex = 5;
|
||||
N(RitualCards)[2].unk_00 = 1;
|
||||
N(RitualCards)[2].pos.x = 0.0f;
|
||||
N(RitualCards)[2].pos.y = 200.0f;
|
||||
N(RitualCards)[2].pos.z = 2.0f;
|
||||
N(RitualCards)[2].pitch = 0.0f;
|
||||
N(RitualCards)[2].yaw = 0.0f;
|
||||
N(RitualCards)[2].xoffset = 4;
|
||||
break;
|
||||
case RITUAL_STATE_APPEAR:
|
||||
N(RitualStateTime)++;
|
||||
N(RitualCards)[0].pos.x += 10.0f;
|
||||
N(RitualCards)[1].pos.x += -10.0f;
|
||||
N(RitualCards)[2].pos.y += -10.0f;
|
||||
if (N(RitualStateTime) == 18) {
|
||||
gPlayerStatus.position.y = NPC_DISPOSE_POS_Y;
|
||||
}
|
||||
if (N(RitualStateTime) == 20) {
|
||||
evt_set_variable(N(CreatorScript), RITUAL_VAR_STATE, RITUAL_STATE_2);
|
||||
N(RitualStateTime) = 0;
|
||||
}
|
||||
break;
|
||||
case RITUAL_STATE_2:
|
||||
N(RitualCards)[0].unk_00 = 2;
|
||||
N(RitualCards)[1].unk_00 = 0;
|
||||
N(RitualCards)[2].unk_00 = 0;
|
||||
N(RitualCards)[0].pos.x = 0.0f;
|
||||
N(RitualCards)[0].pos.y = 0.0f;
|
||||
N(RitualCards)[0].pos.z = 0;
|
||||
break;
|
||||
case RITUAL_STATE_3:
|
||||
N(RitualCards)[0].unk_00 = 1;
|
||||
N(RitualCards)[1].unk_00 = 1;
|
||||
N(RitualCards)[2].unk_00 = 1;
|
||||
N(RitualStateTime)++;
|
||||
N(RitualCards)[0].pos.x -= 10.0f;
|
||||
N(RitualCards)[1].pos.x += 10.0f;
|
||||
if (N(RitualStateTime) == 10) {
|
||||
N(RitualStateTime) = 0;
|
||||
evt_set_variable(N(CreatorScript), RITUAL_VAR_STATE, RITUAL_STATE_4);
|
||||
}
|
||||
break;
|
||||
case RITUAL_STATE_4:
|
||||
N(RitualCards)[0].pos.x = -100.0f;
|
||||
N(RitualCards)[0].pos.y = 0.0f;
|
||||
N(RitualCards)[0].pos.z = 0;
|
||||
N(RitualCards)[1].pos.x = 100.0f;
|
||||
N(RitualCards)[1].pos.y = 0.0f;
|
||||
N(RitualCards)[1].pos.z = 1.0f;
|
||||
N(RitualCards)[2].pos.x = 0;
|
||||
N(RitualCards)[2].pos.y = 0.0f;
|
||||
N(RitualCards)[2].pos.z = 2.0f;
|
||||
N(RitualStateTime)++;
|
||||
if (N(RitualStateTime) == 20) {
|
||||
N(RitualStateTime) = 0;
|
||||
evt_set_variable(N(CreatorScript), RITUAL_VAR_STATE, RITUAL_STATE_FLIP_LEFT);
|
||||
sfx_play_sound_with_params(SOUND_203, 0, 24, 0);
|
||||
}
|
||||
break;
|
||||
case RITUAL_STATE_FLIP_LEFT:
|
||||
N(RitualCards)[0].yaw += 18.0f;
|
||||
N(RitualCards)[1].yaw = 0.0f;
|
||||
N(RitualCards)[2].yaw = 0.0f;
|
||||
N(RitualStateTime)++;
|
||||
if (N(RitualStateTime) == 8) {
|
||||
N(GetCardOrientation)(0, &posX5, &posY5, &posZ5, &yaw5);
|
||||
fx_sparkles(0, posX5, posY5 + 20.0f, posZ5, 30.0f);
|
||||
}
|
||||
if (N(RitualStateTime) == 10) {
|
||||
N(RitualStateTime) = 0;
|
||||
evt_set_variable(N(CreatorScript), RITUAL_VAR_STATE, RITUAL_STATE_FLIP_MIDDLE);
|
||||
sfx_play_sound_with_params(SOUND_203, 0, 64, 0);
|
||||
}
|
||||
break;
|
||||
case RITUAL_STATE_FLIP_MIDDLE:
|
||||
N(RitualCards)[0].yaw += 18.0f;
|
||||
N(RitualCards)[1].yaw = 0.0f;
|
||||
N(RitualCards)[2].yaw += 18.0f;
|
||||
N(RitualStateTime)++;
|
||||
if (N(RitualStateTime) == 8) {
|
||||
N(GetCardOrientation)(2, &posX6, &posY6, &posZ6, &yaw6);
|
||||
fx_sparkles(0, posX6, posY6 + 20.0f, posZ6, 30.0f);
|
||||
}
|
||||
if (N(RitualStateTime) == 10) {
|
||||
N(RitualStateTime) = 0;
|
||||
evt_set_variable(N(CreatorScript), RITUAL_VAR_STATE, RITUAL_STATE_FLIP_RIGHT);
|
||||
sfx_play_sound_with_params(SOUND_203, 0, 104, 0);
|
||||
}
|
||||
break;
|
||||
case RITUAL_STATE_FLIP_RIGHT:
|
||||
N(RitualCards)[0].yaw = 0.0f;
|
||||
N(RitualCards)[1].yaw += 18.0f;
|
||||
N(RitualCards)[2].yaw += 18.0f;
|
||||
N(RitualStateTime)++;
|
||||
if (N(RitualStateTime) == 8) {
|
||||
N(GetCardOrientation)(1, &posX7, &posY7, &posZ7, &yaw7);
|
||||
fx_sparkles(0, posX7, posY7 + 20.0f, posZ7, 30.0f);
|
||||
}
|
||||
if (N(RitualStateTime) == 10) {
|
||||
N(RitualStateTime) = 0;
|
||||
evt_set_variable(N(CreatorScript), RITUAL_VAR_STATE, RITUAL_STATE_8);
|
||||
}
|
||||
break;
|
||||
case RITUAL_STATE_8:
|
||||
N(RitualCards)[0].yaw = 0.0f;
|
||||
N(RitualCards)[1].yaw += 18.0f;
|
||||
N(RitualCards)[2].yaw = 0.0f;
|
||||
N(RitualStateTime)++;
|
||||
if (N(RitualStateTime) == 10) {
|
||||
N(RitualStateTime) = 0;
|
||||
evt_set_variable(N(CreatorScript), RITUAL_VAR_STATE, RITUAL_STATE_9);
|
||||
}
|
||||
break;
|
||||
case RITUAL_STATE_9:
|
||||
N(RitualCards)[0].pos.x += 10.0f;
|
||||
N(RitualCards)[0].pos.y = 0.0f;
|
||||
N(RitualCards)[0].yaw = 0.0f;
|
||||
N(RitualCards)[1].pos.x -= 10.0f;
|
||||
N(RitualCards)[1].pos.y = 0.0f;
|
||||
N(RitualCards)[1].yaw = 0.0f;
|
||||
N(RitualCards)[2].pos.x = 0;
|
||||
N(RitualCards)[2].pos.y = 0.0f;
|
||||
N(RitualCards)[2].yaw = 0.0f;
|
||||
N(RitualStateTime)++;
|
||||
if (N(RitualStateTime) == 10) {
|
||||
N(RitualStateTime) = 0;
|
||||
evt_set_variable(N(CreatorScript), RITUAL_VAR_STATE, RITUAL_STATE_A);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case RITUAL_STATE_A:
|
||||
N(RitualCards)[0].unk_00 = 3;
|
||||
N(RitualCards)[0].spriteID = 8;
|
||||
N(RitualCards)[1].unk_00 = 0;
|
||||
N(RitualCards)[2].unk_00 = 0;
|
||||
N(RitualCards)[0].rasterIndex = 0x11;
|
||||
return;
|
||||
case RITUAL_STATE_B:
|
||||
N(RitualCards)[0].unk_00 = 4;
|
||||
N(RitualCards)[1].unk_00 = 5;
|
||||
N(RitualCards)[1].spriteID = 8;
|
||||
N(RitualCards)[0].pos.x = 0.0f;
|
||||
N(RitualCards)[0].pos.z = 0;
|
||||
N(RitualCards)[1].pos.x = 0.0f;
|
||||
N(RitualCards)[1].pos.z = 0;
|
||||
N(RitualCards)[1].rasterIndex = 10;
|
||||
N(RitualCards)[1].xoffset = 0;
|
||||
N(RitualStateTime) = 0;
|
||||
N(RitualCards)[0].pos.y = 68.0f;
|
||||
N(RitualCards)[0].yaw = 180.0f;
|
||||
N(RitualCards)[1].pos.y = 68.0f;
|
||||
N(RitualCards)[1].yaw = 180.0f;
|
||||
evt_set_variable(N(CreatorScript), RITUAL_VAR_STATE, RITUAL_STATE_C);
|
||||
N(D_8024EF80) = 0.0f;
|
||||
N(D_8024EF84) = 1.0f;
|
||||
|
||||
N(GetCardOrientation)(1, &sp48, &sp4C, &sp50, &sp54);
|
||||
|
||||
for (j = 0; j < ARRAY_COUNT(N(D_8024EF90)); j++) {
|
||||
s32 i;
|
||||
|
||||
N(D_8024EF90)[j] = fx_energy_in_out(2, sp48, sp4C + 20.0f, sp50, 8.0f, -1);
|
||||
N(D_8024EF90)[j]->data.energyInOut->unk_28 = 215;
|
||||
N(D_8024EF90)[j]->data.energyInOut->unk_2C = 55;
|
||||
N(D_8024EF90)[j]->data.energyInOut->unk_30 = 255;
|
||||
|
||||
for (i = 1; i < N(D_8024EF90)[j]->numParts; i++) {
|
||||
N(D_8024EF90)[j]->data.energyInOut[i].unk_38 *= 0.1;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case RITUAL_STATE_C:
|
||||
N(GetCardOrientation)(1, &sp58, &sp5C, &sp60, &sp64);
|
||||
|
||||
for (j = 0; j < ARRAY_COUNT(N(D_8024EF90)); j++) {
|
||||
s32 i;
|
||||
|
||||
N(D_8024EF90)[j]->data.energyInOut->pos.x = sp58;
|
||||
N(D_8024EF90)[j]->data.energyInOut->pos.y = sp5C + 20.0f;
|
||||
N(D_8024EF90)[j]->data.energyInOut->pos.z = sp60;
|
||||
N(D_8024EF90)[j]->data.energyInOut->scale -= 0.1;
|
||||
|
||||
if (N(D_8024EF90)[j]->data.energyInOut->scale < 0.1) {
|
||||
N(D_8024EF90)[j]->data.energyInOut->scale = 0.1f;
|
||||
}
|
||||
|
||||
for (i = 1; i < N(D_8024EF90)[j]->numParts; i++, data++) {
|
||||
N(D_8024EF90)[j]->data.energyInOut[i].unk_38 += 0.01;
|
||||
}
|
||||
}
|
||||
|
||||
N(RitualCards)[0].pos.y += N(D_8024EF80);
|
||||
N(RitualCards)[1].pos.y += N(D_8024EF84);
|
||||
N(D_8024EF80) += 0.4;
|
||||
N(D_8024EF84) -= 0.05;
|
||||
N(RitualStateTime)++;
|
||||
|
||||
if (N(RitualCards)[1].pos.y < -5.0f) {
|
||||
N(RitualCards)[1].pos.y = -5.0f;
|
||||
N(RitualStateTime) = 0;
|
||||
evt_set_variable(N(CreatorScript), RITUAL_VAR_STATE, RITUAL_STATE_D);
|
||||
N(RitualCards)[0].unk_00 = 0;
|
||||
N(RitualCards)[1].unk_00 = 0;
|
||||
N(GetCardOrientation)(1, &sp68, &sp6C, &sp70, &sp74);
|
||||
fx_sparkles(0, sp68, sp6C + 20.0f, sp70, 30.0f);
|
||||
sfx_play_sound(SOUND_206);
|
||||
|
||||
for (j = 0; j < ARRAY_COUNT(N(D_8024EF90)); j++) {
|
||||
N(D_8024EF90)[j]->flags |= EFFECT_INSTANCE_FLAGS_10;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 13:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void N(card_worker_render)(void) {
|
||||
Matrix4f mtx;
|
||||
u32 temp_s1;
|
||||
|
||||
guPositionF(mtx, 0.0f, -gCameras[gCurrentCameraID].currentYaw, 0.0f, SPRITE_WORLD_SCALE_F,
|
||||
evt_get_variable(N(CreatorScript), RITUAL_VAR_POS_X),
|
||||
evt_get_variable(N(CreatorScript), RITUAL_VAR_POS_Y),
|
||||
evt_get_variable(N(CreatorScript), RITUAL_VAR_POS_Z));
|
||||
|
||||
temp_s1 = N(appendGfx_ritual_card)(&N(RitualCards)[0], mtx);
|
||||
N(appendGfx_ritual_card)(&N(RitualCards)[1], mtx);
|
||||
N(appendGfx_ritual_card)(&N(RitualCards)[2], mtx);
|
||||
if ((N(RitualCards)[0].unk_00 == 2) && ((temp_s1 - 1) < 2)) {
|
||||
evt_set_variable(N(CreatorScript), RITUAL_VAR_STATE, RITUAL_STATE_3);
|
||||
}
|
||||
if ((N(RitualCards)[0].unk_00 == 3) && ((temp_s1 - 1) < 2)) {
|
||||
evt_set_variable(N(CreatorScript), RITUAL_VAR_STATE, RITUAL_STATE_B);
|
||||
}
|
||||
}
|
||||
|
||||
API_CALLABLE(N(func_8024303C_96C1FC)) {
|
||||
sfx_play_sound_with_params(SOUND_202A, 0, 24, 0);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
API_CALLABLE(N(func_80243068_96C228)) {
|
||||
sfx_play_sound_with_params(SOUND_202B, 0, 104, 0);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
EvtScript N(EVS_NpcAuxAI_Merlee) = {
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcAI_Merlee) = {
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_PerformRitual) = {
|
||||
EVT_USE_ARRAY(EVT_PTR(N(RitualBuffer)))
|
||||
EVT_SET(RITUAL_VAR_STATE, RITUAL_STATE_INIT)
|
||||
EVT_CALL(GetNpcPos, NPC_Merlee, RITUAL_VAR_POS_X, RITUAL_VAR_POS_Y, RITUAL_VAR_POS_Z)
|
||||
EVT_ADD(RITUAL_VAR_POS_X, 60)
|
||||
EVT_ADD(RITUAL_VAR_POS_Z, 0)
|
||||
EVT_CALL(PlaySoundAtNpc, NPC_Merlee, SOUND_201, 0)
|
||||
EVT_THREAD
|
||||
EVT_CALL(MakeLerp, 720, 0, 60, EASING_LINEAR)
|
||||
EVT_LOOP(0)
|
||||
EVT_CALL(UpdateLerp)
|
||||
EVT_CALL(SetNpcRotation, NPC_Merlee, 0, LVar0, 0)
|
||||
EVT_IF_GT(LVar0, 360)
|
||||
EVT_ADD(LVar0, -360)
|
||||
EVT_END_IF
|
||||
EVT_SWITCH(LVar0)
|
||||
EVT_CASE_RANGE(90, 270)
|
||||
EVT_SET(LVar2, ANIM_WorldMerlee_SpinBack)
|
||||
EVT_CASE_DEFAULT
|
||||
EVT_SET(LVar2, ANIM_WorldMerlee_SpinFront)
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(SetNpcAnimation, NPC_Merlee, LVar2)
|
||||
EVT_WAIT(1)
|
||||
EVT_IF_EQ(LVar1, 0)
|
||||
EVT_BREAK_LOOP
|
||||
EVT_END_IF
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(SetNpcRotation, NPC_Merlee, 0, 0, 0)
|
||||
EVT_CALL(SetNpcAnimation, NPC_Merlee, ANIM_WorldMerlee_Gather)
|
||||
EVT_WAIT(200)
|
||||
EVT_CALL(SetNpcAnimation, NPC_Merlee, ANIM_WorldMerlee_Bow)
|
||||
EVT_WAIT(40)
|
||||
EVT_CALL(SetNpcAnimation, NPC_Merlee, ANIM_WorldMerlee_Gather)
|
||||
EVT_WAIT(75)
|
||||
EVT_CALL(SetNpcAnimation, NPC_Merlee, ANIM_WorldMerlee_Release)
|
||||
EVT_END_THREAD
|
||||
EVT_WAIT(60)
|
||||
EVT_CALL(PlaySoundAtNpc, NPC_Merlee, SOUND_202, 0)
|
||||
EVT_SET(LVar0, RITUAL_VAR_POS_Y)
|
||||
EVT_ADD(LVar0, 25)
|
||||
EVT_PLAY_EFFECT(EFFECT_RADIATING_ENERGY_ORB, 0, RITUAL_VAR_POS_X, LVar0, RITUAL_VAR_POS_Z, 1, -1)
|
||||
EVT_SET(RITUAL_VAR_ORB_EFFECT, LVarF)
|
||||
EVT_THREAD
|
||||
EVT_WAIT(30)
|
||||
EVT_CALL(func_802D7B10, RITUAL_VAR_ORB_EFFECT)
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(N(DarkenWorld))
|
||||
EVT_CALL(DisablePlayerPhysics, TRUE)
|
||||
EVT_CALL(InterpPlayerYaw, 0, 0)
|
||||
EVT_CALL(N(CreateRitualCards))
|
||||
EVT_THREAD
|
||||
EVT_LOOP(0)
|
||||
EVT_IF_EQ(RITUAL_VAR_STATE, RITUAL_STATE_2)
|
||||
EVT_BREAK_LOOP
|
||||
EVT_END_IF
|
||||
EVT_WAIT(1)
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(PlaySound, SOUND_B000001D)
|
||||
EVT_WAIT(10)
|
||||
EVT_CALL(PlaySound, SOUND_B000001D)
|
||||
EVT_WAIT(9)
|
||||
EVT_CALL(PlaySound, SOUND_B000001D)
|
||||
EVT_WAIT(4)
|
||||
EVT_CALL(PlaySound, SOUND_B000001D)
|
||||
EVT_WAIT(4)
|
||||
EVT_CALL(PlaySound, SOUND_B000001D)
|
||||
EVT_WAIT(3)
|
||||
EVT_CALL(PlaySound, SOUND_B000001D)
|
||||
EVT_WAIT(2)
|
||||
EVT_CALL(PlaySound, SOUND_B000001D)
|
||||
EVT_WAIT(2)
|
||||
EVT_CALL(PlaySound, SOUND_B000001D)
|
||||
EVT_WAIT(2)
|
||||
EVT_CALL(PlaySound, SOUND_B000001D)
|
||||
EVT_WAIT(3)
|
||||
EVT_CALL(PlaySound, SOUND_B000001D)
|
||||
EVT_WAIT(2)
|
||||
EVT_CALL(PlaySound, SOUND_B000001D)
|
||||
EVT_WAIT(6)
|
||||
EVT_CALL(PlaySound, SOUND_B000001D)
|
||||
EVT_WAIT(3)
|
||||
EVT_CALL(PlaySound, SOUND_B000001D)
|
||||
EVT_WAIT(3)
|
||||
EVT_CALL(PlaySound, SOUND_B000001D)
|
||||
EVT_WAIT(3)
|
||||
EVT_CALL(PlaySound, SOUND_B000001D)
|
||||
EVT_WAIT(3)
|
||||
EVT_CALL(PlaySound, SOUND_B000001D)
|
||||
EVT_END_THREAD
|
||||
EVT_THREAD
|
||||
EVT_LOOP(0)
|
||||
EVT_IF_GE(RITUAL_VAR_STATE, RITUAL_STATE_3)
|
||||
EVT_BREAK_LOOP
|
||||
EVT_END_IF
|
||||
EVT_WAIT(1)
|
||||
EVT_END_LOOP
|
||||
EVT_WAIT(9)
|
||||
EVT_CALL(N(func_8024303C_96C1FC))
|
||||
EVT_WAIT(2)
|
||||
EVT_CALL(N(func_80243068_96C228))
|
||||
EVT_LOOP(0)
|
||||
EVT_IF_GE(RITUAL_VAR_STATE, RITUAL_STATE_A)
|
||||
EVT_BREAK_LOOP
|
||||
EVT_END_IF
|
||||
EVT_WAIT(1)
|
||||
EVT_END_LOOP
|
||||
EVT_WAIT(3)
|
||||
EVT_CALL(PlaySound, SOUND_204)
|
||||
EVT_LOOP(0)
|
||||
EVT_IF_GE(RITUAL_VAR_STATE, RITUAL_STATE_B)
|
||||
EVT_BREAK_LOOP
|
||||
EVT_END_IF
|
||||
EVT_WAIT(1)
|
||||
EVT_END_LOOP
|
||||
EVT_WAIT(15)
|
||||
EVT_CALL(PlaySound, SOUND_205)
|
||||
EVT_END_THREAD
|
||||
EVT_LOOP(0)
|
||||
EVT_IF_EQ(RITUAL_VAR_STATE, RITUAL_STATE_D)
|
||||
EVT_BREAK_LOOP
|
||||
EVT_END_IF
|
||||
EVT_WAIT(1)
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(SetPlayerPos, RITUAL_VAR_POS_X, RITUAL_VAR_POS_Y, RITUAL_VAR_POS_Z)
|
||||
EVT_CALL(SetPlayerAnimation, ANIM_Mario_GotItem)
|
||||
EVT_WAIT(1)
|
||||
EVT_CALL(SetPlayerPos, RITUAL_VAR_POS_X, RITUAL_VAR_POS_Y, RITUAL_VAR_POS_Z)
|
||||
EVT_WAIT(1)
|
||||
EVT_CALL(DisablePlayerPhysics, FALSE)
|
||||
EVT_CALL(N(DestroyRitualCards))
|
||||
EVT_THREAD
|
||||
EVT_CALL(N(UndarkenWorld))
|
||||
EVT_END_THREAD
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_BeginMerleeCamera) = {
|
||||
EVT_CALL(GetNpcPos, NPC_Merlee, LVar0, LVar1, LVar2)
|
||||
EVT_CALL(UseSettingsFrom, 0, LVar0, LVar1, LVar2)
|
||||
EVT_CALL(SetCamDistance, 0, 200)
|
||||
EVT_CALL(SetPanTarget, 0, LVar0, LVar1, LVar2)
|
||||
EVT_CALL(SetCamSpeed, 0, EVT_FLOAT(8.0))
|
||||
EVT_CALL(SetCamPitch, 0, 20, -15)
|
||||
EVT_CALL(PanToTarget, 0, 0, 1)
|
||||
EVT_CALL(WaitForCam, 0, EVT_FLOAT(1.0))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_EndMerleeCamera) = {
|
||||
EVT_CALL(PanToTarget, 0, 0, 0)
|
||||
EVT_CALL(SetCamSpeed, 0, EVT_FLOAT(3.0))
|
||||
EVT_CALL(WaitForCam, 0, EVT_FLOAT(1.0))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
|
||||
EvtScript N(EVS_NpcInteract_Merlee) = {
|
||||
EVT_CALL(func_802D2C14, 1)
|
||||
EVT_EXEC_WAIT(N(EVS_BeginMerleeCamera))
|
||||
EVT_SET(LVar0, 0)
|
||||
EVT_IF_EQ(GB_KootFavor_Current, 8)
|
||||
EVT_ADD(LVar0, 1)
|
||||
EVT_END_IF
|
||||
EVT_IF_EQ(GF_HOS06_MerluvleeRequestedCrystalBall, 1)
|
||||
EVT_ADD(LVar0, 1)
|
||||
EVT_END_IF
|
||||
EVT_IF_EQ(GF_DRO01_Gift_CrystalBall, 0)
|
||||
EVT_ADD(LVar0, 1)
|
||||
EVT_END_IF
|
||||
EVT_IF_EQ(LVar0, 3)
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldMerlee_Talk, ANIM_WorldMerlee_Idle, 0, MSG_CH2_00DC)
|
||||
EVT_SET(LVar0, 39)
|
||||
EVT_SET(LVar1, 1)
|
||||
EVT_EXEC_WAIT(N(GiveKeyReward))
|
||||
EVT_CALL(AddKeyItem, ITEM_CRYSTAL_BALL)
|
||||
EVT_SET(GF_DRO01_Gift_CrystalBall, 1)
|
||||
EVT_WAIT(20)
|
||||
EVT_CALL(func_802D2C14, 0)
|
||||
EVT_EXEC_WAIT(N(EVS_EndMerleeCamera))
|
||||
EVT_RETURN
|
||||
EVT_END_IF
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldMerlee_Talk, ANIM_WorldMerlee_Idle, 0, MSG_CH2_00D6)
|
||||
EVT_CALL(ShowChoice, MSG_Choice_0011)
|
||||
EVT_IF_NE(LVar0, 0)
|
||||
EVT_CALL(ContinueSpeech, -1, ANIM_WorldMerlee_Talk, ANIM_WorldMerlee_Idle, 0, MSG_CH2_00D7)
|
||||
EVT_CALL(func_802D2C14, 0)
|
||||
EVT_EXEC_WAIT(N(EVS_EndMerleeCamera))
|
||||
EVT_RETURN
|
||||
EVT_END_IF
|
||||
EVT_CALL(ContinueSpeech, -1, ANIM_WorldMerlee_Talk, ANIM_WorldMerlee_Idle, 0, MSG_CH2_00D8)
|
||||
EVT_CALL(ShowCoinCounter, 1)
|
||||
EVT_CALL(ShowChoice, MSG_Choice_0018)
|
||||
EVT_CALL(ShowCoinCounter, 0)
|
||||
EVT_IF_EQ(LVar0, 3)
|
||||
EVT_CALL(ContinueSpeech, -1, ANIM_WorldMerlee_Talk, ANIM_WorldMerlee_Idle, 0, MSG_CH2_00D7)
|
||||
EVT_CALL(func_802D2C14, 0)
|
||||
EVT_EXEC_WAIT(N(EVS_EndMerleeCamera))
|
||||
EVT_RETURN
|
||||
EVT_END_IF
|
||||
EVT_CALL(N(TryEnchantPlayer), LVar0, LVar1)
|
||||
EVT_IF_NE(LVar1, 0)
|
||||
EVT_CALL(ContinueSpeech, -1, ANIM_WorldMerlee_Talk, ANIM_WorldMerlee_Idle, 0, MSG_CH2_00D9)
|
||||
EVT_CALL(func_802D2C14, 0)
|
||||
EVT_EXEC_WAIT(N(EVS_EndMerleeCamera))
|
||||
EVT_RETURN
|
||||
EVT_END_IF
|
||||
EVT_CALL(ContinueSpeech, -1, ANIM_WorldMerlee_Talk, ANIM_WorldMerlee_Idle, 0, MSG_CH2_00DA)
|
||||
EVT_CALL(SetMusicTrack, 0, SONG_MERLEE_SPELL, 0, 8)
|
||||
EVT_CALL(DisablePartnerAI, 0)
|
||||
EVT_CALL(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_RUN)
|
||||
EVT_EXEC_GET_TID(N(EVS_PerformRitual), LVar9)
|
||||
EVT_LOOP(0)
|
||||
EVT_IS_THREAD_RUNNING(LVar9, LVar1)
|
||||
EVT_IF_EQ(LVar1, 0)
|
||||
EVT_BREAK_LOOP
|
||||
EVT_END_IF
|
||||
EVT_WAIT(1)
|
||||
EVT_END_LOOP
|
||||
EVT_WAIT(60)
|
||||
EVT_CALL(SetNpcAnimation, 4, ANIM_WorldMerlee_Idle)
|
||||
EVT_CALL(PlayerMoveTo, -100, -370, 8)
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldMerlee_Talk, ANIM_WorldMerlee_Idle, 0, MSG_CH2_00DB)
|
||||
EVT_EXEC(N(EVS_SetupMusic))
|
||||
EVT_CALL(EnablePartnerAI)
|
||||
EVT_CALL(func_802D2C14, 0)
|
||||
EVT_EXEC_WAIT(N(EVS_EndMerleeCamera))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
NpcSettings N(NpcSettings_Merlee) = {
|
||||
.height = 32,
|
||||
.radius = 32,
|
||||
.otherAI = &N(EVS_NpcAuxAI_Merlee),
|
||||
.onInteract = &N(EVS_NpcInteract_Merlee),
|
||||
.ai = &N(EVS_NpcAI_Merlee),
|
||||
.level = 99,
|
||||
};
|
273
src/world/area_dro/dro_02/npc_moustafa.c
Normal file
273
src/world/area_dro/dro_02/npc_moustafa.c
Normal file
@ -0,0 +1,273 @@
|
||||
#include "dro_02.h"
|
||||
|
||||
EvtScript N(EVS_PartyWatchingMousatafa) = {
|
||||
EVT_LOOP(0)
|
||||
EVT_CALL(PlayerFaceNpc, NPC_Moustafa, FALSE)
|
||||
EVT_CALL(NpcFaceNpc, NPC_PARTNER, NPC_Moustafa, 0)
|
||||
EVT_WAIT(1)
|
||||
EVT_END_LOOP
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_Moustafa_SetCamBetween) = {
|
||||
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
|
||||
EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2)
|
||||
EVT_CALL(SetCamDistance, CAM_DEFAULT, 275)
|
||||
EVT_CALL(GetNpcPos, NPC_DisguisedMoustafa, LVar3, LVar4, LVar5)
|
||||
EVT_ADD(LVar0, LVar3)
|
||||
EVT_ADD(LVar1, LVar4)
|
||||
EVT_ADD(LVar2, LVar5)
|
||||
EVT_DIV(LVar0, 2)
|
||||
EVT_DIV(LVar1, 2)
|
||||
EVT_DIV(LVar2, 2)
|
||||
EVT_ADD(LVar1, 15)
|
||||
EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2)
|
||||
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(8.0))
|
||||
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
|
||||
EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_Moustafa_ResetCam) = {
|
||||
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0)
|
||||
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(3.0))
|
||||
EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_Moustafa_Unveiling) = {
|
||||
EVT_CALL(SetNpcYaw, NPC_Moustafa, 270)
|
||||
EVT_CALL(SetNpcFlagBits, NPC_DisguisedMoustafa, NPC_FLAG_100, TRUE)
|
||||
EVT_CALL(SetNpcFlagBits, NPC_Moustafa, NPC_FLAG_100, TRUE)
|
||||
EVT_CALL(SetNpcAnimation, NPC_DisguisedMoustafa, ANIM_DisguisedMoustafa_GrabCloak)
|
||||
EVT_WAIT(30)
|
||||
EVT_CALL(SetNpcAnimation, NPC_DisguisedMoustafa, ANIM_DisguisedMoustafa_ThrownCloak)
|
||||
EVT_CALL(SetNpcAnimation, NPC_Moustafa, ANIM_Moustafa_Toss)
|
||||
EVT_CALL(SetNpcPos, NPC_Moustafa, -335, 163, -260)
|
||||
EVT_EXEC(N(EVS_PlayMoustafaMusic))
|
||||
EVT_CALL(MakeLerp, 0, 80, 30, EASING_CUBIC_OUT)
|
||||
EVT_LABEL(10)
|
||||
EVT_CALL(UpdateLerp)
|
||||
EVT_SET(LVar2, -335)
|
||||
EVT_SET(LVar3, 163)
|
||||
EVT_SUB(LVar2, LVar0)
|
||||
EVT_ADD(LVar3, LVar0)
|
||||
EVT_CALL(SetNpcPos, NPC_DisguisedMoustafa, LVar2, LVar3, -260)
|
||||
EVT_WAIT(1)
|
||||
EVT_IF_EQ(LVar1, 1)
|
||||
EVT_GOTO(10)
|
||||
EVT_END_IF
|
||||
EVT_CALL(SetNpcFlagBits, NPC_DisguisedMoustafa, NPC_FLAG_100, FALSE)
|
||||
EVT_CALL(SetNpcPos, NPC_DisguisedMoustafa, 0, NPC_DISPOSE_POS_Y, -250)
|
||||
EVT_CALL(SetNpcAnimation, NPC_Moustafa, ANIM_Moustafa_Idle)
|
||||
EVT_CALL(SetNpcFlagBits, NPC_DisguisedMoustafa, NPC_FLAG_100, FALSE)
|
||||
EVT_CALL(SetNpcFlagBits, NPC_Moustafa, NPC_FLAG_100, FALSE)
|
||||
EVT_WAIT(30)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcIdle_DisguisedMoustafa) = {
|
||||
EVT_SWITCH(GB_StoryProgress)
|
||||
EVT_CASE_LT(STORY_CH2_BOUGHT_SECRET_ITEMS)
|
||||
EVT_CASE_LT(STORY_CH2_GOT_PULSE_STONE)
|
||||
EVT_CALL(SetNpcPos, NPC_SELF, -335, 163, -260)
|
||||
EVT_CASE_GE(STORY_CH2_GOT_PULSE_STONE)
|
||||
EVT_CALL(SetNpcPos, NPC_SELF, 0, NPC_DISPOSE_POS_Y, -250)
|
||||
EVT_CALL(SetNpcPos, NPC_Moustafa, -335, 163, -260)
|
||||
EVT_END_SWITCH
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInteract_Moustafa) = {
|
||||
EVT_IF_EQ(GF_DRO02_Moustafa_UnusedDialogOverride, TRUE)
|
||||
EVT_CALL(SpeakToPlayer, NPC_Moustafa, ANIM_Moustafa_Shout, ANIM_Moustafa_Idle, 0, MSG_CH2_00CF)
|
||||
EVT_RETURN
|
||||
EVT_END_IF
|
||||
EVT_SWITCH(GB_StoryProgress)
|
||||
EVT_CASE_LT(STORY_CH2_BOUGHT_SECRET_ITEMS)
|
||||
EVT_SET(LVarB, 0)
|
||||
EVT_CALL(SpeakToPlayer, NPC_DisguisedMoustafa, ANIM_DisguisedMoustafa_Talk, ANIM_DisguisedMoustafa_Idle, 0, MSG_CH2_00B4)
|
||||
EVT_LABEL(0)
|
||||
EVT_CALL(ShowChoice, MSG_Choice_0019)
|
||||
EVT_IF_EQ(LVar0, 1)
|
||||
EVT_CALL(ContinueSpeech, NPC_DisguisedMoustafa, ANIM_DisguisedMoustafa_Talk, ANIM_DisguisedMoustafa_Idle, 0, MSG_CH2_00B6)
|
||||
EVT_EXEC(N(EVS_Moustafa_ResetCam))
|
||||
EVT_RETURN
|
||||
EVT_ELSE
|
||||
EVT_CALL(EndSpeech, NPC_DisguisedMoustafa, ANIM_DisguisedMoustafa_Talk, ANIM_DisguisedMoustafa_Idle, 0)
|
||||
EVT_END_IF
|
||||
EVT_LABEL(1)
|
||||
EVT_CHOOSE_ANY_CONSUMABLE()
|
||||
EVT_SWITCH(LVar0)
|
||||
EVT_CASE_EQ(0)
|
||||
EVT_CALL(SpeakToPlayer, NPC_DisguisedMoustafa, ANIM_DisguisedMoustafa_Talk, ANIM_DisguisedMoustafa_Idle, 0, MSG_CH2_00B8)
|
||||
EVT_EXEC(N(EVS_Moustafa_ResetCam))
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(-1)
|
||||
EVT_CALL(SpeakToPlayer, NPC_DisguisedMoustafa, ANIM_DisguisedMoustafa_Talk, ANIM_DisguisedMoustafa_Idle, 0, MSG_CH2_00B7)
|
||||
EVT_EXEC(N(EVS_Moustafa_ResetCam))
|
||||
EVT_RETURN
|
||||
EVT_END_SWITCH
|
||||
EVT_SET(LVarA, LVar0)
|
||||
EVT_IF_EQ(GB_DRO02_SheekLemonGiftCount, 0)
|
||||
EVT_IF_EQ(LVarA, ITEM_LEMON)
|
||||
EVT_SET(GB_DRO02_SheekLemonGiftCount, 1)
|
||||
EVT_SET(GB_DRO02_SheekGiftCount, 10)
|
||||
EVT_CALL(SpeakToPlayer, NPC_DisguisedMoustafa, ANIM_DisguisedMoustafa_Talk, ANIM_DisguisedMoustafa_Idle, 0, MSG_CH2_00BB)
|
||||
EVT_CALL(ShowChoice, MSG_Choice_001C)
|
||||
EVT_ELSE
|
||||
EVT_ADD(GB_DRO02_SheekGiftCount, 1)
|
||||
EVT_IF_LE(GB_DRO02_SheekGiftCount, 2)
|
||||
EVT_CALL(SpeakToPlayer, NPC_DisguisedMoustafa, ANIM_DisguisedMoustafa_Talk, ANIM_DisguisedMoustafa_Idle, 0, MSG_CH2_00B5)
|
||||
EVT_GOTO(0)
|
||||
EVT_END_IF
|
||||
EVT_IF_EQ(GB_DRO02_SheekGiftCount, 3)
|
||||
EVT_CALL(SpeakToPlayer, NPC_DisguisedMoustafa, ANIM_DisguisedMoustafa_Talk, ANIM_DisguisedMoustafa_Idle, 0, MSG_CH2_00B9)
|
||||
EVT_CALL(ShowChoice, MSG_Choice_001B)
|
||||
EVT_ELSE
|
||||
EVT_CALL(SpeakToPlayer, NPC_DisguisedMoustafa, ANIM_DisguisedMoustafa_Talk, ANIM_DisguisedMoustafa_Idle, 0, MSG_CH2_00BA)
|
||||
EVT_CALL(ShowChoice, MSG_Choice_001B)
|
||||
EVT_SET(GB_DRO02_SheekGiftCount, 10)
|
||||
EVT_END_IF
|
||||
EVT_END_IF
|
||||
EVT_ELSE
|
||||
EVT_CALL(SpeakToPlayer, NPC_DisguisedMoustafa, ANIM_DisguisedMoustafa_Talk, ANIM_DisguisedMoustafa_Idle, 0, MSG_CH2_00BA)
|
||||
EVT_CALL(ShowChoice, MSG_Choice_001C)
|
||||
EVT_END_IF
|
||||
EVT_SWITCH(LVar0)
|
||||
EVT_CASE_EQ(0)
|
||||
EVT_CALL(ContinueSpeech, NPC_DisguisedMoustafa, ANIM_DisguisedMoustafa_Talk, ANIM_DisguisedMoustafa_Idle, 0, MSG_CH2_00BC)
|
||||
EVT_CASE_EQ(1)
|
||||
EVT_EXEC_WAIT(N(EVS_Moustafa_SetCamBetween))
|
||||
EVT_CALL(ContinueSpeech, NPC_DisguisedMoustafa, ANIM_DisguisedMoustafa_Talk, ANIM_DisguisedMoustafa_Idle, 0, MSG_CH2_00BD)
|
||||
EVT_SET(GF_DRO02_Sheek_AskedAboutDesert, TRUE)
|
||||
EVT_CASE_EQ(2)
|
||||
EVT_EXEC_WAIT(N(EVS_Moustafa_SetCamBetween))
|
||||
EVT_CALL(ContinueSpeech, NPC_DisguisedMoustafa, ANIM_DisguisedMoustafa_Talk, ANIM_DisguisedMoustafa_Idle, 0, MSG_CH2_00BE)
|
||||
EVT_SET(GF_DRO02_Sheek_AskedAboutRuins, TRUE)
|
||||
EVT_CASE_EQ(3)
|
||||
EVT_EXEC_WAIT(N(EVS_Moustafa_SetCamBetween))
|
||||
EVT_CALL(ContinueSpeech, NPC_DisguisedMoustafa, ANIM_DisguisedMoustafa_Talk, ANIM_DisguisedMoustafa_Idle, 0, MSG_CH2_00BF)
|
||||
EVT_CASE_EQ(4)
|
||||
EVT_EXEC_WAIT(N(EVS_Moustafa_SetCamBetween))
|
||||
EVT_CALL(ContinueSpeech, NPC_DisguisedMoustafa, ANIM_DisguisedMoustafa_Talk, ANIM_DisguisedMoustafa_Idle, 0, MSG_CH2_00C1)
|
||||
EVT_SET(GF_DRO02_Sheek_AskedAboutMoustafa, TRUE)
|
||||
EVT_SET(LVarB, 1)
|
||||
EVT_END_SWITCH
|
||||
EVT_SET(GF_DRO02_Sheek_SpokeTo, TRUE)
|
||||
EVT_CALL(ContinueSpeech, NPC_DisguisedMoustafa, ANIM_DisguisedMoustafa_Talk, ANIM_DisguisedMoustafa_Idle, 0, MSG_CH2_00C0)
|
||||
EVT_CALL(ShowChoice, MSG_Choice_001A)
|
||||
EVT_IF_EQ(LVar0, 0)
|
||||
EVT_CALL(EndSpeech, NPC_DisguisedMoustafa, ANIM_DisguisedMoustafa_Talk, ANIM_DisguisedMoustafa_Idle, 0)
|
||||
EVT_GOTO(1)
|
||||
EVT_ELSE
|
||||
EVT_CALL(ContinueSpeech, NPC_DisguisedMoustafa, ANIM_DisguisedMoustafa_Talk, ANIM_DisguisedMoustafa_Idle, 0, MSG_CH2_00B6)
|
||||
EVT_END_IF
|
||||
EVT_IF_EQ(LVarB, 1)
|
||||
EVT_IF_EQ(MF_Unk_00, FALSE)
|
||||
EVT_SET(MF_Unk_00, TRUE)
|
||||
EVT_THREAD
|
||||
EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2)
|
||||
EVT_CALL(AwaitPlayerLeave, LVar0, LVar2, 50)
|
||||
EVT_CALL(DisablePlayerInput, TRUE)
|
||||
EVT_CALL(SpeakToPlayer, NPC_DisguisedMoustafa, ANIM_DisguisedMoustafa_Talk, ANIM_DisguisedMoustafa_Idle, 0, MSG_CH2_00C2)
|
||||
EVT_CALL(DisablePlayerInput, FALSE)
|
||||
EVT_SET(MF_Unk_00, FALSE)
|
||||
EVT_END_THREAD
|
||||
EVT_END_IF
|
||||
EVT_END_IF
|
||||
EVT_EXEC(N(EVS_Moustafa_ResetCam))
|
||||
EVT_CASE_LT(STORY_CH2_GOT_PULSE_STONE)
|
||||
EVT_THREAD
|
||||
EVT_WAIT(10)
|
||||
EVT_CALL(func_802D2C14, 1)
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(SetNpcFlagBits, NPC_DisguisedMoustafa, NPC_FLAG_100, TRUE)
|
||||
EVT_CALL(SetPlayerSpeed, EVT_FLOAT(3.0))
|
||||
EVT_CALL(PlayerMoveTo, -391, -260, 0)
|
||||
EVT_CALL(InterpPlayerYaw, 90, 3)
|
||||
EVT_CALL(SetNpcFlagBits, NPC_DisguisedMoustafa, NPC_FLAG_100, FALSE)
|
||||
EVT_EXEC_GET_TID(N(EVS_PartyWatchingMousatafa), LVarA)
|
||||
EVT_CALL(SetNpcFlagBits, NPC_Moustafa, NPC_FLAG_100, TRUE)
|
||||
EVT_CALL(FadeOutMusic, 0, 500)
|
||||
EVT_IF_EQ(GF_DRO02_Sheek_AskedAboutMoustafa, TRUE)
|
||||
EVT_CALL(SpeakToPlayer, NPC_DisguisedMoustafa, ANIM_DisguisedMoustafa_Talk, ANIM_DisguisedMoustafa_Idle, 0, MSG_CH2_00C3)
|
||||
EVT_EXEC_WAIT(N(EVS_Moustafa_Unveiling))
|
||||
EVT_CALL(func_802D2C14, 0)
|
||||
EVT_CALL(SetNpcJumpscale, NPC_Moustafa, EVT_FLOAT(1.0))
|
||||
EVT_CALL(NpcJump0, NPC_Moustafa, -425, 140, -206, 20)
|
||||
EVT_CALL(SpeakToPlayer, NPC_Moustafa, ANIM_Moustafa_Shout, ANIM_Moustafa_Idle, 0, MSG_CH2_00C4)
|
||||
EVT_ELSE
|
||||
EVT_CALL(SpeakToPlayer, NPC_DisguisedMoustafa, ANIM_DisguisedMoustafa_Talk, ANIM_DisguisedMoustafa_Idle, 0, MSG_CH2_00C5)
|
||||
EVT_EXEC_WAIT(N(EVS_Moustafa_Unveiling))
|
||||
EVT_CALL(func_802D2C14, 0)
|
||||
EVT_CALL(SetNpcJumpscale, NPC_Moustafa, EVT_FLOAT(1.0))
|
||||
EVT_CALL(NpcJump0, NPC_Moustafa, -425, 140, -206, 20)
|
||||
EVT_CALL(SpeakToPlayer, NPC_Moustafa, ANIM_Moustafa_Shout, ANIM_Moustafa_Idle, 0, MSG_CH2_00C6)
|
||||
EVT_END_IF
|
||||
EVT_CALL(SetNpcJumpscale, NPC_Moustafa, EVT_FLOAT(1.0))
|
||||
EVT_CALL(NpcJump0, NPC_Moustafa, -337, 140, -200, 20)
|
||||
EVT_CALL(SpeakToPlayer, NPC_Moustafa, ANIM_Moustafa_Shout, ANIM_Moustafa_Idle, 0, MSG_CH2_00C7)
|
||||
EVT_CALL(SpeakToPlayer, NPC_Moustafa, ANIM_Moustafa_Shout, ANIM_Moustafa_Idle, 0, MSG_CH2_00C8)
|
||||
EVT_CALL(SetNpcJumpscale, NPC_Moustafa, EVT_FLOAT(1.0))
|
||||
EVT_CALL(NpcJump0, NPC_Moustafa, -335, 163, -260, 20)
|
||||
EVT_CALL(SpeakToPlayer, NPC_Moustafa, ANIM_Moustafa_Shout, ANIM_Moustafa_Idle, 0, MSG_CH2_00C9)
|
||||
EVT_GIVE_KEY_REWARD(ITEM_PULSE_STONE)
|
||||
EVT_SET(GB_StoryProgress, STORY_CH2_GOT_PULSE_STONE)
|
||||
EVT_CALL(SpeakToPlayer, NPC_Moustafa, ANIM_Moustafa_Shout, ANIM_Moustafa_Idle, 0, MSG_CH2_00CA)
|
||||
EVT_KILL_THREAD(LVarA)
|
||||
EVT_EXEC(N(EVS_SetupMusic))
|
||||
EVT_CASE_GE(STORY_CH2_GOT_PULSE_STONE)
|
||||
EVT_SWITCH(GB_StoryProgress)
|
||||
EVT_CASE_LT(STORY_CH2_UNCOVERED_DRY_DRY_RUINS)
|
||||
EVT_CALL(SpeakToPlayer, NPC_Moustafa, ANIM_Moustafa_Shout, ANIM_Moustafa_Idle, 0, MSG_CH2_00CB)
|
||||
EVT_CASE_GE(STORY_CH2_UNCOVERED_DRY_DRY_RUINS)
|
||||
EVT_IF_GE(GB_StoryProgress, STORY_CH2_DEFEATED_TUTANKOOPA)
|
||||
EVT_IF_EQ(GF_DRO02_Moustafa_HeardAboutDryDryRuins, FALSE)
|
||||
EVT_CALL(SpeakToPlayer, NPC_Moustafa, ANIM_Moustafa_Shout, ANIM_Moustafa_Idle, 0, MSG_CH2_00CD)
|
||||
EVT_CALL(SetPlayerAnimation, ANIM_Mario_10002)
|
||||
EVT_WAIT(15)
|
||||
EVT_CALL(SetPlayerAnimation, ANIM_Mario_80007)
|
||||
EVT_WAIT(30)
|
||||
EVT_CALL(SpeakToPlayer, NPC_Moustafa, ANIM_Moustafa_Shout, ANIM_Moustafa_Idle, 0, MSG_CH2_00CE)
|
||||
EVT_SET(GF_DRO02_Moustafa_HeardAboutDryDryRuins, TRUE)
|
||||
EVT_ELSE
|
||||
EVT_CALL(SpeakToPlayer, NPC_Moustafa, ANIM_Moustafa_Shout, ANIM_Moustafa_Idle, 0, MSG_CH2_00D0)
|
||||
EVT_END_IF
|
||||
EVT_ELSE
|
||||
EVT_CALL(SpeakToPlayer, NPC_Moustafa, ANIM_Moustafa_Shout, ANIM_Moustafa_Idle, 0, MSG_CH2_00CC)
|
||||
EVT_END_IF
|
||||
EVT_END_SWITCH
|
||||
EVT_END_SWITCH
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInit_DisguisedMoustafa) = {
|
||||
EVT_CALL(GetEntryID, LVar0)
|
||||
EVT_SWITCH(LVar0)
|
||||
EVT_CASE_OR_EQ(dro_02_ENTRY_2)
|
||||
EVT_CASE_OR_EQ(dro_02_ENTRY_3)
|
||||
EVT_CALL(SetNpcPos, NPC_SELF, 200, 0, -15)
|
||||
EVT_CALL(InterpNpcYaw, NPC_SELF, 270, 0)
|
||||
EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_200000, TRUE)
|
||||
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_DisguisedMoustafa_GrabCloak)
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_CASE_DEFAULT
|
||||
EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_DisguisedMoustafa)))
|
||||
EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Moustafa)))
|
||||
EVT_END_SWITCH
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInit_Moustafa) = {
|
||||
EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Moustafa)))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
@ -25,4 +25,12 @@ enum {
|
||||
AF_IWA_SpokeWIthDryite = AreaFlag(2),
|
||||
};
|
||||
|
||||
extern MapSettings iwa_00_settings;
|
||||
extern MapSettings iwa_01_settings;
|
||||
extern MapSettings iwa_02_settings;
|
||||
extern MapSettings iwa_03_settings;
|
||||
extern MapSettings iwa_04_settings;
|
||||
extern MapSettings iwa_10_settings;
|
||||
extern MapSettings iwa_11_settings;
|
||||
|
||||
#endif
|
||||
|
@ -16,7 +16,6 @@ NpcSettings N(NpcSettings_Parakarry) = {
|
||||
#include "world/common/util/ChangeNpcToPartner.inc.c"
|
||||
|
||||
#include "world/common/complete/KeyItemChoice.inc.c"
|
||||
MAP_STATIC_PAD(4,unk);
|
||||
|
||||
EvtScript N(EVS_Scene_MeetParakarry) = {
|
||||
EVT_LABEL(0)
|
||||
|
@ -20,7 +20,12 @@ enum {
|
||||
AB_KMR_F = AreaByte(15),
|
||||
};
|
||||
|
||||
#define AF_KMR(index) AreaFlag(index)
|
||||
enum {
|
||||
AF_KMR_06 = AreaFlag(6),
|
||||
AF_KMR_07 = AreaFlag(7),
|
||||
AF_KMR_08 = AreaFlag(8),
|
||||
AF_KMR_09 = AreaFlag(9),
|
||||
};
|
||||
|
||||
extern MapSettings kmr_00_settings;
|
||||
extern MapSettings kmr_02_settings;
|
||||
|
@ -1,232 +0,0 @@
|
||||
#include "kmr_00.h"
|
||||
#include "effects.h"
|
||||
|
||||
static char* N(exit_str_0) = "kmr_02";
|
||||
static char* N(exit_str_1) = "kmr_02\0";
|
||||
|
||||
extern s16 D_80242D60_8AECF0[8];
|
||||
|
||||
void set_model_env_color_parameters(u8 primR, u8 primG, u8 primB, u8 envR, u8 envG, u8 envB);
|
||||
void get_model_env_color_parameters(u8* primR, u8* primG, u8* primB, u8* envR, u8* envG, u8* envB);
|
||||
|
||||
ApiStatus func_80240000_8ABF90(Evt* script, s32 isInitialCall) {
|
||||
Bytecode* args;
|
||||
static u8 oldPrimR, oldPrimG, oldPrimB;
|
||||
static u8 oldEnvR, oldEnvG, oldEnvB;
|
||||
static s32 newPrimR, newPrimG, newPrimB;
|
||||
static s32 newEnvR, newEnvG, newEnvB;
|
||||
static s32 duration, time;
|
||||
|
||||
args = script->ptrReadPos;
|
||||
if (isInitialCall) {
|
||||
get_model_env_color_parameters(&oldPrimR, &oldPrimG, &oldPrimB, &oldEnvR, &oldEnvG, &oldEnvB);
|
||||
newPrimR = evt_get_variable(script, *args++);
|
||||
newPrimG = evt_get_variable(script, *args++);
|
||||
newPrimB = evt_get_variable(script, *args++);
|
||||
newEnvR = evt_get_variable(script, *args++);
|
||||
newEnvG = evt_get_variable(script, *args++);
|
||||
newEnvB = evt_get_variable(script, *args++);
|
||||
duration = evt_get_variable(script, *args++);
|
||||
time = 0;
|
||||
}
|
||||
|
||||
if (duration > 0) {
|
||||
time++;
|
||||
set_model_env_color_parameters(
|
||||
(oldPrimR + ((newPrimR - oldPrimR) * time) / duration),
|
||||
(oldPrimG + ((newPrimG - oldPrimG) * time) / duration),
|
||||
(oldPrimB + ((newPrimB - oldPrimB) * time) / duration),
|
||||
(oldEnvR + ( (newEnvR - oldEnvR) * time) / duration),
|
||||
(oldEnvG + ( (newEnvG - oldEnvG) * time) / duration),
|
||||
(oldEnvB + ( (newEnvB - oldEnvB) * time) / duration));
|
||||
if (time >= duration) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
} else {
|
||||
set_model_env_color_parameters(newPrimR, newPrimG, newPrimB, newEnvR, newEnvG, newEnvB);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
return ApiStatus_BLOCK;
|
||||
}
|
||||
|
||||
ApiStatus func_80240388_8AC318(Evt* script, s32 isInitialCall) {
|
||||
mdl_set_all_fog_mode(3);
|
||||
*gBgRenderTypePtr = BACKGROUND_RENDER_TYPE_3;
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus func_802403B8_8AC348(Evt* script, s32 isInitialCall) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 var0 = evt_get_variable(script, *args++);
|
||||
s32 var1 = evt_get_variable(script, *args++);
|
||||
s32 var2 = evt_get_variable(script, *args++);
|
||||
s32 var3 = evt_get_variable(script, *args++);
|
||||
s32 var4 = evt_get_variable(script, *args++);
|
||||
|
||||
fx_sparkles(var0, var1, var2, var3, var4);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus func_802404A0_8AC430(Evt* script, s32 isInitialCall) {
|
||||
fx_energy_orb_wave(4, 0.0f, 0.0f, 0.0f, 0.3f, 30);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus func_802404E8_8AC478(Evt* script, s32 isInitialCall) {
|
||||
s32 pitch = evt_get_variable(script, script->varTable[0]);
|
||||
gCameras[CAM_DEFAULT].controlSettings.boomPitch = pitch * 0.001f;
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus func_80240530_8AC4C0(Evt* script, s32 isInitialCall) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 npcID = evt_get_variable(script, *args++);
|
||||
Npc* npc = get_npc_unsafe(npcID);
|
||||
|
||||
fx_sparkles(FX_SPARKLES_3, npc->pos.x, npc->pos.y + 10.0f, npc->pos.z, 10.0f);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus func_80240584_8AC514(Evt* script, s32 isInitialCall) {
|
||||
snd_ambient_8005553C(0, 2000);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus func_802405A8_8AC538(Evt* script, s32 isInitialCall) {
|
||||
snd_ambient_80055590(0, 2000);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus func_802405CC_8AC55C(Evt* script, s32 isInitialCall) {
|
||||
snd_ambient_slow_fade_out(0, 1000);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus func_802405F0_8AC580(Evt* script, s32 isInitialCall) {
|
||||
enum {
|
||||
FUNC_STATE_0 = 0,
|
||||
FUNC_STATE_1 = 1,
|
||||
FUNC_STATE_2 = 2,
|
||||
FUNC_STATE_3 = 3
|
||||
};
|
||||
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
ApiStatus retVal = ApiStatus_BLOCK;
|
||||
Npc* npc;
|
||||
|
||||
if (isInitialCall) {
|
||||
script->functionTemp[1] = evt_get_variable(script, *args++);
|
||||
script->functionTemp[2] = evt_get_variable(script, *args++);
|
||||
script->varTable[15] = evt_get_variable(script, *args++);
|
||||
script->functionTemp[0] = FUNC_STATE_0;
|
||||
script->functionTemp[3] = 0;
|
||||
}
|
||||
|
||||
npc = get_npc_unsafe(script->functionTemp[1]);
|
||||
switch (script->functionTemp[0]) {
|
||||
case FUNC_STATE_0:
|
||||
npc->pos.x = 0.0f;
|
||||
npc->pos.y = -1000.0f;
|
||||
npc->pos.z = -50.0f;
|
||||
npc->moveToPos.x = script->functionTemp[3] * 3;
|
||||
npc->moveToPos.y = 3.0f;
|
||||
if (script->functionTemp[3] >= script->varTable[15]) {
|
||||
npc->pos.y = 100.0f;
|
||||
add_vec2D_polar(&npc->pos.x, &npc->pos.z, 70.0f, npc->moveToPos.x + (script->functionTemp[2] * 51) + 153.0f);
|
||||
npc->pos.y += (-npc->pos.z + -50.0f + 70.0f) * 0.15f;
|
||||
sfx_play_sound_at_position(SOUND_B000001E, 0, npc->pos.x, npc->pos.y, npc->pos.z);
|
||||
fx_sparkles(FX_SPARKLES_0, npc->pos.x, npc->pos.y + 20.0f, npc->pos.z, 20.0f);
|
||||
script->functionTemp[0] = FUNC_STATE_1;
|
||||
}
|
||||
break;
|
||||
case FUNC_STATE_1:
|
||||
npc->pos.x = 0.0f;
|
||||
npc->pos.z = -50.0f;
|
||||
npc->pos.y = 100.0f;
|
||||
add_vec2D_polar(&npc->pos.x, &npc->pos.z, 70.0f, npc->moveToPos.x + (script->functionTemp[2] * 51) + 153.0f);
|
||||
npc->pos.y += (-npc->pos.z + -50.0f + 70.0f) * 0.15f;
|
||||
if ((script->functionTemp[3] + script->functionTemp[2]) ==
|
||||
(((script->functionTemp[3] + script->functionTemp[2]) / 13) * 13)) {
|
||||
fx_sparkles(FX_SPARKLES_3, npc->pos.x, npc->pos.y + 10.0f, npc->pos.z, 10.0f);
|
||||
}
|
||||
if (script->functionTemp[3] > 256) {
|
||||
script->functionTemp[0] = FUNC_STATE_2;
|
||||
script->varTable[14] = 0;
|
||||
}
|
||||
break;
|
||||
case FUNC_STATE_2:
|
||||
npc->pos.x = 0.0f;
|
||||
npc->pos.z = -50.0f;
|
||||
npc->pos.y = 100.0f - (script->varTable[14] * 0.3f);
|
||||
add_vec2D_polar(&npc->pos.x, &npc->pos.z, 70.0f, npc->moveToPos.x + (script->functionTemp[2] * 51) + 153.0f);
|
||||
npc->pos.y += (-npc->pos.z + -50.0f + 70.0f) * 0.15f;
|
||||
if ((script->functionTemp[3] + script->functionTemp[2]) ==
|
||||
(((script->functionTemp[3] + script->functionTemp[2]) / 13) * 13)) {
|
||||
fx_sparkles(FX_SPARKLES_3, npc->pos.x, npc->pos.y + 10.0f, npc->pos.z, 10.0f);
|
||||
}
|
||||
if (script->varTable[14]++ > 180) {
|
||||
script->functionTemp[0] = FUNC_STATE_3;
|
||||
script->varTable[14] = 0;
|
||||
}
|
||||
break;
|
||||
case FUNC_STATE_3:
|
||||
npc->moveToPos.y -= 0.03f;
|
||||
npc->pos.x = 0.0f;
|
||||
npc->pos.z = -50.0f;
|
||||
npc->pos.y = 45.999996f;
|
||||
add_vec2D_polar(&npc->pos.x, &npc->pos.z, 70.0f, npc->moveToPos.x + (script->functionTemp[2] * 51) + 153.0f);
|
||||
npc->pos.y += (-npc->pos.z + -50.0f + 70.0f) * 0.15f;
|
||||
if ((script->functionTemp[3] + script->functionTemp[2]) ==
|
||||
(((script->functionTemp[3] + script->functionTemp[2]) / 13) * 13)) {
|
||||
fx_sparkles(FX_SPARKLES_3, npc->pos.x, npc->pos.y + 10.0f, npc->pos.z, 10.0f);
|
||||
}
|
||||
if (npc->moveToPos.y < 0.0f) {
|
||||
retVal = ApiStatus_DONE2;
|
||||
}
|
||||
break;
|
||||
}
|
||||
script->functionTemp[3]++;
|
||||
npc->moveToPos.x += npc->moveToPos.y;
|
||||
return retVal;
|
||||
}
|
||||
|
||||
ApiStatus func_80240BD8_8ACB68(Evt* script, s32 isInitialCall) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
Npc* npc;
|
||||
|
||||
if (isInitialCall) {
|
||||
script->functionTemp[1] = evt_get_variable(script, *args);
|
||||
npc = get_npc_unsafe(script->functionTemp[1]);
|
||||
sfx_play_sound_at_position(SOUND_B000001E, 0, npc->pos.x, npc->pos.y, npc->pos.z);
|
||||
fx_sparkles(FX_SPARKLES_0, npc->pos.x, npc->pos.y + 20.0f, npc->pos.z, 10.0f);
|
||||
script->functionTemp[0] = 3;
|
||||
}
|
||||
|
||||
npc = get_npc_unsafe(script->functionTemp[1]);
|
||||
script->functionTemp[0]--;
|
||||
if (script->functionTemp[0] == -1) {
|
||||
npc->pos.y = -1000.0f;
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
return ApiStatus_BLOCK;
|
||||
}
|
||||
|
||||
ApiStatus func_80240CB0_8ACC40(Evt* script, s32 isInitialCall) {
|
||||
s32 retVal;
|
||||
if (isInitialCall) {
|
||||
script->functionTemp[1] = 0;
|
||||
script->functionTempPtr[2] = get_npc_safe(script->owner2.npcID);
|
||||
script->functionTemp[3] = D_80242D60_8AECF0[script->owner2.npcID - 1];
|
||||
}
|
||||
if (script->functionTemp[3] == 0) {
|
||||
Npc* npc = script->functionTempPtr[2];
|
||||
npc->verticalRenderOffset = sin_deg(script->functionTempF[1]) * 1.5f;
|
||||
script->functionTempF[1] = clamp_angle(script->functionTempF[1] + 18.0f);
|
||||
retVal = ApiStatus_BLOCK;
|
||||
} else {
|
||||
script->functionTemp[3]--;
|
||||
retVal = ApiStatus_BLOCK;
|
||||
}
|
||||
return retVal;
|
||||
}
|
@ -2,9 +2,41 @@
|
||||
/// @brief Goomba Region - Forest Clearing
|
||||
|
||||
#include "common.h"
|
||||
#include "../kmr.h"
|
||||
#include "message_ids.h"
|
||||
#include "map.h"
|
||||
|
||||
#include "../kmr.h"
|
||||
#include "mapfs/kmr_00_shape.h"
|
||||
#include "mapfs/kmr_00_hit.h"
|
||||
|
||||
#include "sprite/npc/WorldKalmar.h"
|
||||
#include "sprite/npc/WorldMamar.h"
|
||||
#include "sprite/npc/WorldEldstar.h"
|
||||
#include "sprite/npc/WorldSkolar.h"
|
||||
#include "sprite/npc/WorldMuskular.h"
|
||||
#include "sprite/npc/WorldMisstar.h"
|
||||
#include "sprite/npc/WorldKlevar.h"
|
||||
#include "sprite/npc/Goombaria.h"
|
||||
|
||||
enum {
|
||||
NPC_Goombaria = 0,
|
||||
NPC_Eldstar = 1,
|
||||
NPC_Mamar = 2,
|
||||
NPC_Skolar = 3,
|
||||
NPC_Muskular = 4,
|
||||
NPC_Misstar = 5,
|
||||
NPC_Klevar = 6,
|
||||
NPC_Kalmar = 7,
|
||||
};
|
||||
|
||||
enum {
|
||||
MV_Unk_01 = MapVar(1),
|
||||
};
|
||||
|
||||
#define NAMESPACE kmr_00
|
||||
|
||||
extern EvtScript N(EVS_Main);
|
||||
extern EvtScript N(EVS_SetupMusic);
|
||||
extern EvtScript N(EVS_MakeEntities);
|
||||
extern EvtScript N(EVS_Scene_MarioRevived);
|
||||
extern NpcGroupList N(DefaultNPCs);
|
||||
|
13
src/world/area_kmr/kmr_00/kmr_00_0_header.c
Normal file
13
src/world/area_kmr/kmr_00/kmr_00_0_header.c
Normal file
@ -0,0 +1,13 @@
|
||||
#include "kmr_00.h"
|
||||
|
||||
EntryList N(Entrances) = {
|
||||
[kmr_00_ENTRY_0] { 485.0, 0.0, 0.0, 270.0 },
|
||||
};
|
||||
|
||||
MapSettings N(settings) = {
|
||||
.main = &N(EVS_Main),
|
||||
.entryList = &N(Entrances),
|
||||
.entryCount = ENTRY_COUNT(N(Entrances)),
|
||||
.background = &gBackgroundImage,
|
||||
.tattle = { MSG_MapTattle_kmr_00 },
|
||||
};
|
10
src/world/area_kmr/kmr_00/kmr_00_1_music.c
Normal file
10
src/world/area_kmr/kmr_00/kmr_00_1_music.c
Normal file
@ -0,0 +1,10 @@
|
||||
#include "kmr_00.h"
|
||||
|
||||
EvtScript N(EVS_SetupMusic) = {
|
||||
EVT_IF_GE(GB_StoryProgress, STORY_CH0_WAKE_UP)
|
||||
EVT_CALL(SetMusicTrack, 0, SONG_GOOMBA_VILLAGE, 0, 8)
|
||||
EVT_CALL(PlayAmbientSounds, AMBIENT_BIRDS)
|
||||
EVT_END_IF
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
36
src/world/area_kmr/kmr_00/kmr_00_2_main.c
Normal file
36
src/world/area_kmr/kmr_00/kmr_00_2_main.c
Normal file
@ -0,0 +1,36 @@
|
||||
#include "kmr_00.h"
|
||||
|
||||
EvtScript N(EVS_ExitWalk_kmr_02_1) = EVT_EXIT_WALK(60, kmr_00_ENTRY_0, "kmr_02", kmr_02_ENTRY_1);
|
||||
|
||||
EvtScript N(EVS_BindExitTriggers) = {
|
||||
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_kmr_02_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili1, 1, 0)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_Main) = {
|
||||
EVT_SET(GB_WorldLocation, LOCATION_GOOMBA_VILLAGE)
|
||||
EVT_CALL(SetSpriteShading, SHADING_NONE)
|
||||
EVT_SETUP_CAMERA_NO_LEAD()
|
||||
EVT_SET(GF_MAP_GoombaVillage, TRUE)
|
||||
EVT_IF_LT(GB_StoryProgress, STORY_CH0_MET_INNKEEPER)
|
||||
EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs)))
|
||||
EVT_CALL(ClearDefeatedEnemies)
|
||||
EVT_END_IF
|
||||
EVT_EXEC_WAIT(N(EVS_MakeEntities))
|
||||
EVT_EXEC(N(EVS_SetupMusic))
|
||||
EVT_EXEC(N(EVS_Scene_MarioRevived))
|
||||
EVT_SWITCH(GB_StoryProgress)
|
||||
EVT_CASE_EQ(STORY_INTRO)
|
||||
EVT_CALL(EnableModel, MODEL_ji_3, FALSE)
|
||||
EVT_EXEC(N(EVS_BindExitTriggers))
|
||||
EVT_CASE_GE(STORY_CH0_WAKE_UP)
|
||||
EVT_CALL(EnableModel, MODEL_ji_1, FALSE)
|
||||
EVT_CALL(EnableModel, MODEL_ji_2, FALSE)
|
||||
EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers)))
|
||||
EVT_EXEC(EnterWalk)
|
||||
EVT_END_SWITCH
|
||||
EVT_WAIT(1)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
615
src/world/area_kmr/kmr_00/kmr_00_3_revival.c
Normal file
615
src/world/area_kmr/kmr_00/kmr_00_3_revival.c
Normal file
@ -0,0 +1,615 @@
|
||||
#include "kmr_00.h"
|
||||
#include "effects.h"
|
||||
|
||||
void set_model_env_color_parameters(u8 primR, u8 primG, u8 primB, u8 envR, u8 envG, u8 envB);
|
||||
void get_model_env_color_parameters(u8* primR, u8* primG, u8* primB, u8* envR, u8* envG, u8* envB);
|
||||
|
||||
API_CALLABLE(N(func_80240000_8ABF90)) {
|
||||
Bytecode* args;
|
||||
static u8 oldPrimR, oldPrimG, oldPrimB;
|
||||
static u8 oldEnvR, oldEnvG, oldEnvB;
|
||||
static s32 newPrimR, newPrimG, newPrimB;
|
||||
static s32 newEnvR, newEnvG, newEnvB;
|
||||
static s32 duration, time;
|
||||
|
||||
args = script->ptrReadPos;
|
||||
if (isInitialCall) {
|
||||
get_model_env_color_parameters(&oldPrimR, &oldPrimG, &oldPrimB, &oldEnvR, &oldEnvG, &oldEnvB);
|
||||
newPrimR = evt_get_variable(script, *args++);
|
||||
newPrimG = evt_get_variable(script, *args++);
|
||||
newPrimB = evt_get_variable(script, *args++);
|
||||
newEnvR = evt_get_variable(script, *args++);
|
||||
newEnvG = evt_get_variable(script, *args++);
|
||||
newEnvB = evt_get_variable(script, *args++);
|
||||
duration = evt_get_variable(script, *args++);
|
||||
time = 0;
|
||||
}
|
||||
|
||||
if (duration > 0) {
|
||||
time++;
|
||||
set_model_env_color_parameters(
|
||||
(oldPrimR + ((newPrimR - oldPrimR) * time) / duration),
|
||||
(oldPrimG + ((newPrimG - oldPrimG) * time) / duration),
|
||||
(oldPrimB + ((newPrimB - oldPrimB) * time) / duration),
|
||||
(oldEnvR + ( (newEnvR - oldEnvR) * time) / duration),
|
||||
(oldEnvG + ( (newEnvG - oldEnvG) * time) / duration),
|
||||
(oldEnvB + ( (newEnvB - oldEnvB) * time) / duration));
|
||||
if (time >= duration) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
} else {
|
||||
set_model_env_color_parameters(newPrimR, newPrimG, newPrimB, newEnvR, newEnvG, newEnvB);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
return ApiStatus_BLOCK;
|
||||
}
|
||||
|
||||
API_CALLABLE(N(func_80240388_8AC318)) {
|
||||
mdl_set_all_fog_mode(3);
|
||||
*gBgRenderTypePtr = BACKGROUND_RENDER_TYPE_3;
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
API_CALLABLE(N(func_802403B8_8AC348)) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 var0 = evt_get_variable(script, *args++);
|
||||
s32 var1 = evt_get_variable(script, *args++);
|
||||
s32 var2 = evt_get_variable(script, *args++);
|
||||
s32 var3 = evt_get_variable(script, *args++);
|
||||
s32 var4 = evt_get_variable(script, *args++);
|
||||
|
||||
fx_sparkles(var0, var1, var2, var3, var4);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
API_CALLABLE(N(func_802404A0_8AC430)) {
|
||||
fx_energy_orb_wave(4, 0.0f, 0.0f, 0.0f, 0.3f, 30);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
API_CALLABLE(N(func_802404E8_8AC478)) {
|
||||
s32 pitch = evt_get_variable(script, script->varTable[0]);
|
||||
gCameras[CAM_DEFAULT].controlSettings.boomPitch = pitch * 0.001f;
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
API_CALLABLE(N(func_80240530_8AC4C0)) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 npcID = evt_get_variable(script, *args++);
|
||||
Npc* npc = get_npc_unsafe(npcID);
|
||||
|
||||
fx_sparkles(FX_SPARKLES_3, npc->pos.x, npc->pos.y + 10.0f, npc->pos.z, 10.0f);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
API_CALLABLE(N(func_80240584_8AC514)) {
|
||||
snd_ambient_8005553C(0, 2000);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
API_CALLABLE(N(func_802405A8_8AC538)) {
|
||||
snd_ambient_80055590(0, 2000);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
API_CALLABLE(N(func_802405CC_8AC55C)) {
|
||||
snd_ambient_slow_fade_out(0, 1000);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
API_CALLABLE(N(func_802405F0_8AC580)) {
|
||||
enum {
|
||||
FUNC_STATE_0 = 0,
|
||||
FUNC_STATE_1 = 1,
|
||||
FUNC_STATE_2 = 2,
|
||||
FUNC_STATE_3 = 3
|
||||
};
|
||||
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
ApiStatus retVal = ApiStatus_BLOCK;
|
||||
Npc* npc;
|
||||
|
||||
if (isInitialCall) {
|
||||
script->functionTemp[1] = evt_get_variable(script, *args++);
|
||||
script->functionTemp[2] = evt_get_variable(script, *args++);
|
||||
script->varTable[15] = evt_get_variable(script, *args++);
|
||||
script->functionTemp[0] = FUNC_STATE_0;
|
||||
script->functionTemp[3] = 0;
|
||||
}
|
||||
|
||||
npc = get_npc_unsafe(script->functionTemp[1]);
|
||||
switch (script->functionTemp[0]) {
|
||||
case FUNC_STATE_0:
|
||||
npc->pos.x = 0.0f;
|
||||
npc->pos.y = NPC_DISPOSE_POS_Y;
|
||||
npc->pos.z = -50.0f;
|
||||
npc->moveToPos.x = script->functionTemp[3] * 3;
|
||||
npc->moveToPos.y = 3.0f;
|
||||
if (script->functionTemp[3] >= script->varTable[15]) {
|
||||
npc->pos.y = 100.0f;
|
||||
add_vec2D_polar(&npc->pos.x, &npc->pos.z, 70.0f, npc->moveToPos.x + (script->functionTemp[2] * 51) + 153.0f);
|
||||
npc->pos.y += (-npc->pos.z + -50.0f + 70.0f) * 0.15f;
|
||||
sfx_play_sound_at_position(SOUND_B000001E, 0, npc->pos.x, npc->pos.y, npc->pos.z);
|
||||
fx_sparkles(FX_SPARKLES_0, npc->pos.x, npc->pos.y + 20.0f, npc->pos.z, 20.0f);
|
||||
script->functionTemp[0] = FUNC_STATE_1;
|
||||
}
|
||||
break;
|
||||
case FUNC_STATE_1:
|
||||
npc->pos.x = 0.0f;
|
||||
npc->pos.z = -50.0f;
|
||||
npc->pos.y = 100.0f;
|
||||
add_vec2D_polar(&npc->pos.x, &npc->pos.z, 70.0f, npc->moveToPos.x + (script->functionTemp[2] * 51) + 153.0f);
|
||||
npc->pos.y += (-npc->pos.z + -50.0f + 70.0f) * 0.15f;
|
||||
if ((script->functionTemp[3] + script->functionTemp[2]) ==
|
||||
(((script->functionTemp[3] + script->functionTemp[2]) / 13) * 13)) {
|
||||
fx_sparkles(FX_SPARKLES_3, npc->pos.x, npc->pos.y + 10.0f, npc->pos.z, 10.0f);
|
||||
}
|
||||
if (script->functionTemp[3] > 256) {
|
||||
script->functionTemp[0] = FUNC_STATE_2;
|
||||
script->varTable[14] = 0;
|
||||
}
|
||||
break;
|
||||
case FUNC_STATE_2:
|
||||
npc->pos.x = 0.0f;
|
||||
npc->pos.z = -50.0f;
|
||||
npc->pos.y = 100.0f - (script->varTable[14] * 0.3f);
|
||||
add_vec2D_polar(&npc->pos.x, &npc->pos.z, 70.0f, npc->moveToPos.x + (script->functionTemp[2] * 51) + 153.0f);
|
||||
npc->pos.y += (-npc->pos.z + -50.0f + 70.0f) * 0.15f;
|
||||
if ((script->functionTemp[3] + script->functionTemp[2]) ==
|
||||
(((script->functionTemp[3] + script->functionTemp[2]) / 13) * 13)) {
|
||||
fx_sparkles(FX_SPARKLES_3, npc->pos.x, npc->pos.y + 10.0f, npc->pos.z, 10.0f);
|
||||
}
|
||||
if (script->varTable[14]++ > 180) {
|
||||
script->functionTemp[0] = FUNC_STATE_3;
|
||||
script->varTable[14] = 0;
|
||||
}
|
||||
break;
|
||||
case FUNC_STATE_3:
|
||||
npc->moveToPos.y -= 0.03f;
|
||||
npc->pos.x = 0.0f;
|
||||
npc->pos.z = -50.0f;
|
||||
npc->pos.y = 45.999996f;
|
||||
add_vec2D_polar(&npc->pos.x, &npc->pos.z, 70.0f, npc->moveToPos.x + (script->functionTemp[2] * 51) + 153.0f);
|
||||
npc->pos.y += (-npc->pos.z + -50.0f + 70.0f) * 0.15f;
|
||||
if ((script->functionTemp[3] + script->functionTemp[2]) ==
|
||||
(((script->functionTemp[3] + script->functionTemp[2]) / 13) * 13)) {
|
||||
fx_sparkles(FX_SPARKLES_3, npc->pos.x, npc->pos.y + 10.0f, npc->pos.z, 10.0f);
|
||||
}
|
||||
if (npc->moveToPos.y < 0.0f) {
|
||||
retVal = ApiStatus_DONE2;
|
||||
}
|
||||
break;
|
||||
}
|
||||
script->functionTemp[3]++;
|
||||
npc->moveToPos.x += npc->moveToPos.y;
|
||||
return retVal;
|
||||
}
|
||||
|
||||
API_CALLABLE(N(func_80240BD8_8ACB68)) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
Npc* npc;
|
||||
|
||||
if (isInitialCall) {
|
||||
script->functionTemp[1] = evt_get_variable(script, *args);
|
||||
npc = get_npc_unsafe(script->functionTemp[1]);
|
||||
sfx_play_sound_at_position(SOUND_B000001E, 0, npc->pos.x, npc->pos.y, npc->pos.z);
|
||||
fx_sparkles(FX_SPARKLES_0, npc->pos.x, npc->pos.y + 20.0f, npc->pos.z, 10.0f);
|
||||
script->functionTemp[0] = 3;
|
||||
}
|
||||
|
||||
npc = get_npc_unsafe(script->functionTemp[1]);
|
||||
script->functionTemp[0]--;
|
||||
if (script->functionTemp[0] == -1) {
|
||||
npc->pos.y = NPC_DISPOSE_POS_Y;
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
return ApiStatus_BLOCK;
|
||||
}
|
||||
|
||||
EvtScript N(EVS_Scene_MarioRevived) = {
|
||||
EVT_IF_GE(GB_StoryProgress, STORY_CH0_WAKE_UP)
|
||||
EVT_CALL(EnableModel, MODEL_reef_1, FALSE)
|
||||
EVT_CALL(EnableModel, MODEL_reef_2, FALSE)
|
||||
EVT_CALL(EnableModel, MODEL_reef_3, FALSE)
|
||||
EVT_CALL(EnableModel, MODEL_reef_4, FALSE)
|
||||
EVT_CALL(EnableModel, MODEL_moku1, FALSE)
|
||||
EVT_CALL(EnableModel, MODEL_moku2, FALSE)
|
||||
EVT_CALL(EnableModel, MODEL_ha1, FALSE)
|
||||
EVT_CALL(EnableModel, MODEL_ha2, FALSE)
|
||||
EVT_CALL(EnableModel, MODEL_ha2_1, FALSE)
|
||||
EVT_CALL(EnableModel, MODEL_ha2_2, FALSE)
|
||||
EVT_CALL(EnableModel, MODEL_ha2_3, FALSE)
|
||||
EVT_RETURN
|
||||
EVT_END_IF
|
||||
EVT_SETF(MV_Unk_01, EVT_FLOAT(0.0))
|
||||
EVT_CALL(N(func_80240388_8AC318))
|
||||
EVT_CALL(N(func_80240000_8ABF90), 255, 255, 255, 60, 60, 60, 0)
|
||||
EVT_CALL(FadeOutMusic, 0, 500)
|
||||
EVT_CALL(SetPlayerFlagBits, PS_FLAGS_200000, TRUE)
|
||||
EVT_CALL(InterpPlayerYaw, 90, 0)
|
||||
EVT_CALL(DisablePlayerInput, TRUE)
|
||||
EVT_CALL(DisablePlayerPhysics, TRUE)
|
||||
EVT_CALL(PlayAmbientSounds, AMBIENT_BIRDS)
|
||||
EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 0, 0, 0)
|
||||
EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(6.0), EVT_FLOAT(-7.5))
|
||||
EVT_CALL(SetCamDistance, CAM_DEFAULT, -540)
|
||||
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0))
|
||||
EVT_CALL(SetPanTarget, CAM_DEFAULT, 0, 15, 0)
|
||||
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
|
||||
EVT_WAIT(1)
|
||||
EVT_CALL(func_802D4D14, 180)
|
||||
EVT_CALL(SetPlayerPos, 0, 2, 0)
|
||||
EVT_CALL(SetPlayerAnimation, ANIM_Mario_DeadStill)
|
||||
EVT_WAIT(60)
|
||||
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(0.7))
|
||||
EVT_CALL(SetCamDistance, CAM_DEFAULT, -350)
|
||||
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
|
||||
EVT_THREAD
|
||||
EVT_WAIT(2)
|
||||
EVT_SETF(LVar0, 0)
|
||||
EVT_SETF(LVar1, 0)
|
||||
EVT_LOOP(90)
|
||||
EVT_CALL(TranslateModel, MODEL_reef_3, LVar0, 0, 0)
|
||||
EVT_CALL(TranslateModel, MODEL_reef_4, LVar1, 0, 0)
|
||||
EVT_ADDF(LVar0, EVT_FLOAT(-0.66))
|
||||
EVT_ADDF(LVar1, EVT_FLOAT(0.66))
|
||||
EVT_WAIT(1)
|
||||
EVT_END_LOOP
|
||||
EVT_END_THREAD
|
||||
EVT_THREAD
|
||||
EVT_WAIT(20)
|
||||
EVT_SETF(LVar0, 0)
|
||||
EVT_SETF(LVar1, 0)
|
||||
EVT_LOOP(120)
|
||||
EVT_CALL(TranslateModel, MODEL_reef_1, LVar0, 0, 0)
|
||||
EVT_CALL(TranslateModel, MODEL_reef_2, LVar1, 0, 0)
|
||||
EVT_CALL(TranslateModel, MODEL_moku2, LVar1, 0, 0)
|
||||
EVT_CALL(TranslateModel, MODEL_ha2_1, LVar1, 0, 0)
|
||||
EVT_CALL(TranslateModel, MODEL_ha2_2, LVar1, 0, 0)
|
||||
EVT_CALL(TranslateModel, MODEL_ha2_3, LVar1, 0, 0)
|
||||
EVT_ADDF(LVar0, EVT_FLOAT(-0.75))
|
||||
EVT_ADDF(LVar1, EVT_FLOAT(0.75))
|
||||
EVT_WAIT(1)
|
||||
EVT_END_LOOP
|
||||
EVT_END_THREAD
|
||||
EVT_THREAD
|
||||
EVT_WAIT(10)
|
||||
EVT_SETF(LVar0, 0)
|
||||
EVT_SETF(LVar1, 0)
|
||||
EVT_LOOP(120)
|
||||
EVT_CALL(TranslateModel, MODEL_moku1, LVar0, 0, 0)
|
||||
EVT_CALL(TranslateModel, MODEL_ha1, LVar0, 0, 0)
|
||||
EVT_CALL(TranslateModel, MODEL_ha2, LVar0, 0, 0)
|
||||
EVT_CALL(RotateModel, MODEL_moku1, LVar1, 0, 1, 0)
|
||||
EVT_CALL(RotateModel, MODEL_ha1, LVar1, 0, 1, 0)
|
||||
EVT_CALL(RotateModel, MODEL_ha2, LVar1, 0, 1, 0)
|
||||
EVT_ADDF(LVar0, EVT_FLOAT(-0.2))
|
||||
EVT_ADDF(LVar1, EVT_FLOAT(-0.4))
|
||||
EVT_WAIT(1)
|
||||
EVT_END_LOOP
|
||||
EVT_END_THREAD
|
||||
EVT_WAIT(140)
|
||||
EVT_CALL(N(func_80240584_8AC514))
|
||||
EVT_WAIT(30)
|
||||
EVT_CALL(SetMusicTrack, 0, SONG_STAR_SPIRIT_THEME, 0, 8)
|
||||
EVT_THREAD
|
||||
EVT_CALL(N(func_80240000_8ABF90), 50, 50, 50, 0, 0, 0, 50)
|
||||
EVT_END_THREAD
|
||||
EVT_WAIT(90)
|
||||
EVT_CALL(func_802D4D88)
|
||||
EVT_THREAD
|
||||
EVT_CALL(N(func_802405F0_8AC580), 1, 0, 180)
|
||||
EVT_END_THREAD
|
||||
EVT_THREAD
|
||||
EVT_CALL(N(func_802405F0_8AC580), 2, 1, 30)
|
||||
EVT_END_THREAD
|
||||
EVT_THREAD
|
||||
EVT_CALL(N(func_802405F0_8AC580), 3, 2, 90)
|
||||
EVT_END_THREAD
|
||||
EVT_THREAD
|
||||
EVT_CALL(N(func_802405F0_8AC580), 4, 3, 150)
|
||||
EVT_END_THREAD
|
||||
EVT_THREAD
|
||||
EVT_CALL(N(func_802405F0_8AC580), 5, 4, 0)
|
||||
EVT_END_THREAD
|
||||
EVT_THREAD
|
||||
EVT_CALL(N(func_802405F0_8AC580), 6, 5, 60)
|
||||
EVT_END_THREAD
|
||||
EVT_THREAD
|
||||
EVT_CALL(N(func_802405F0_8AC580), 7, 6, 120)
|
||||
EVT_END_THREAD
|
||||
EVT_THREAD
|
||||
EVT_WAIT(330)
|
||||
EVT_CALL(MakeLerp, 6000, 12000, 120, EASING_LINEAR)
|
||||
EVT_LABEL(25)
|
||||
EVT_CALL(UpdateLerp)
|
||||
EVT_CALL(N(func_802404E8_8AC478))
|
||||
EVT_WAIT(1)
|
||||
EVT_IF_NE(LVar1, 0)
|
||||
EVT_GOTO(25)
|
||||
EVT_END_IF
|
||||
EVT_END_THREAD
|
||||
EVT_WAIT(550)
|
||||
EVT_CALL(GetNpcPos, NPC_Kalmar, LVar6, LVar7, LVar8)
|
||||
EVT_CALL(GetNpcPos, NPC_Mamar, LVar9, LVarA, LVarB)
|
||||
EVT_WAIT(15)
|
||||
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(3.0))
|
||||
EVT_CALL(SetCamDistance, CAM_DEFAULT, -200)
|
||||
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
|
||||
EVT_THREAD
|
||||
EVT_CALL(SetNpcAnimation, NPC_Kalmar, ANIM_WorldKalmar_LeanLeft)
|
||||
EVT_CALL(NpcFlyTo, NPC_Kalmar, 20, 10, -5, 25, -10, EASING_QUADRATIC_OUT)
|
||||
EVT_WAIT(10)
|
||||
EVT_CALL(SetNpcAnimation, NPC_Kalmar, ANIM_WorldKalmar_LeanLeftAlt)
|
||||
EVT_WAIT(35)
|
||||
EVT_CALL(SetNpcAnimation, NPC_Kalmar, ANIM_WorldKalmar_LeanRight)
|
||||
EVT_END_THREAD
|
||||
EVT_THREAD
|
||||
EVT_LOOP(3)
|
||||
EVT_CALL(N(func_80240530_8AC4C0), NPC_Kalmar)
|
||||
EVT_WAIT(6)
|
||||
EVT_END_LOOP
|
||||
EVT_END_THREAD
|
||||
EVT_WAIT(10)
|
||||
EVT_THREAD
|
||||
EVT_CALL(N(func_80240530_8AC4C0), NPC_Mamar)
|
||||
EVT_CALL(SetNpcAnimation, NPC_Mamar, ANIM_WorldMamar_LeanLeft)
|
||||
EVT_CALL(NpcFlyTo, NPC_Mamar, -20, 10, -5, 25, -10, EASING_QUADRATIC_OUT)
|
||||
EVT_WAIT(5)
|
||||
EVT_CALL(SetNpcAnimation, NPC_Mamar, ANIM_WorldMamar_LeanLeftAlt)
|
||||
EVT_WAIT(30)
|
||||
EVT_CALL(SetNpcAnimation, NPC_Mamar, ANIM_WorldMamar_LeanRight)
|
||||
EVT_END_THREAD
|
||||
EVT_THREAD
|
||||
EVT_LOOP(3)
|
||||
EVT_CALL(N(func_80240530_8AC4C0), NPC_Mamar)
|
||||
EVT_WAIT(6)
|
||||
EVT_END_LOOP
|
||||
EVT_END_THREAD
|
||||
EVT_WAIT(35)
|
||||
EVT_CALL(SpeakToPlayer, NPC_Mamar, ANIM_WorldMamar_TalkHappy, ANIM_WorldMamar_Idle, 5, MSG_CH0_0000)
|
||||
EVT_WAIT(15)
|
||||
EVT_CALL(SpeakToPlayer, NPC_Kalmar, ANIM_WorldMamar_TalkHappy, ANIM_WorldMamar_Idle, 5, MSG_CH0_0001)
|
||||
EVT_WAIT(3)
|
||||
EVT_THREAD
|
||||
EVT_CALL(SetNpcAnimation, NPC_Kalmar, ANIM_WorldKalmar_LeanLeftAlt)
|
||||
EVT_WAIT(30)
|
||||
EVT_CALL(SetNpcAnimation, NPC_Kalmar, ANIM_WorldKalmar_LeanRight)
|
||||
EVT_WAIT(10)
|
||||
EVT_CALL(NpcFlyTo, NPC_Kalmar, LVar6, LVar7, LVar8, 15, -10, EASING_CUBIC_OUT)
|
||||
EVT_CALL(SetNpcAnimation, NPC_Kalmar, ANIM_WorldKalmar_Idle)
|
||||
EVT_END_THREAD
|
||||
EVT_THREAD
|
||||
EVT_WAIT(40)
|
||||
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(3.0))
|
||||
EVT_CALL(SetCamDistance, CAM_DEFAULT, -350)
|
||||
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
|
||||
EVT_LOOP(3)
|
||||
EVT_CALL(N(func_80240530_8AC4C0), NPC_Kalmar)
|
||||
EVT_WAIT(4)
|
||||
EVT_END_LOOP
|
||||
EVT_END_THREAD
|
||||
EVT_THREAD
|
||||
EVT_CALL(SetNpcAnimation, NPC_Mamar, ANIM_WorldMamar_LeanLeftAlt)
|
||||
EVT_WAIT(30)
|
||||
EVT_CALL(SetNpcAnimation, NPC_Mamar, ANIM_WorldMamar_LeanRight)
|
||||
EVT_WAIT(10)
|
||||
EVT_CALL(NpcFlyTo, NPC_Mamar, LVar9, LVarA, LVarB, 15, -10, EASING_CUBIC_OUT)
|
||||
EVT_CALL(SetNpcAnimation, NPC_Mamar, ANIM_WorldMamar_Idle)
|
||||
EVT_END_THREAD
|
||||
EVT_THREAD
|
||||
EVT_WAIT(40)
|
||||
EVT_LOOP(3)
|
||||
EVT_CALL(N(func_80240530_8AC4C0), NPC_Mamar)
|
||||
EVT_WAIT(4)
|
||||
EVT_END_LOOP
|
||||
EVT_END_THREAD
|
||||
EVT_WAIT(90)
|
||||
EVT_CALL(SpeakToPlayer, NPC_Eldstar, ANIM_WorldEldstar_Wave, ANIM_WorldEldstar_Wave, 5, MSG_CH0_0002)
|
||||
EVT_WAIT(15)
|
||||
EVT_THREAD
|
||||
EVT_CALL(SetNpcFlagBits, NPC_Eldstar, NPC_FLAG_400000, FALSE)
|
||||
EVT_CALL(SetNpcAnimation, NPC_Eldstar, ANIM_WorldEldstar_Leap)
|
||||
EVT_CALL(SetNpcJumpscale, NPC_Eldstar, EVT_FLOAT(3.2))
|
||||
EVT_CALL(GetNpcPos, NPC_Eldstar, LVar6, LVar7, LVar8)
|
||||
EVT_CALL(NpcJump0, NPC_Eldstar, LVar6, LVar7, LVar8, 5)
|
||||
EVT_CALL(SetNpcAnimation, NPC_Eldstar, ANIM_WorldEldstar_Idle)
|
||||
EVT_CALL(PlaySoundAtPlayer, SOUND_B000001F, 0)
|
||||
EVT_CALL(N(func_802403B8_8AC348), 0, 0, 0, 3, 10)
|
||||
EVT_END_THREAD
|
||||
EVT_THREAD
|
||||
EVT_WAIT(20)
|
||||
EVT_CALL(SetNpcAnimation, NPC_Mamar, ANIM_WorldMamar_Leap)
|
||||
EVT_CALL(SetNpcFlagBits, NPC_Mamar, NPC_FLAG_400000, FALSE)
|
||||
EVT_CALL(SetNpcJumpscale, NPC_Mamar, EVT_FLOAT(3.2))
|
||||
EVT_CALL(GetNpcPos, NPC_Mamar, LVar6, LVar7, LVar8)
|
||||
EVT_CALL(NpcJump0, NPC_Mamar, LVar6, LVar7, LVar8, 5)
|
||||
EVT_CALL(SetNpcAnimation, NPC_Mamar, ANIM_WorldMamar_Idle)
|
||||
EVT_END_THREAD
|
||||
EVT_THREAD
|
||||
EVT_WAIT(21)
|
||||
EVT_CALL(SetNpcAnimation, NPC_Skolar, ANIM_WorldSkolar_Leap)
|
||||
EVT_CALL(SetNpcFlagBits, NPC_Skolar, NPC_FLAG_400000, FALSE)
|
||||
EVT_CALL(SetNpcJumpscale, NPC_Skolar, EVT_FLOAT(3.2))
|
||||
EVT_CALL(GetNpcPos, NPC_Skolar, LVar6, LVar7, LVar8)
|
||||
EVT_CALL(NpcJump0, NPC_Skolar, LVar6, LVar7, LVar8, 5)
|
||||
EVT_CALL(SetNpcAnimation, NPC_Skolar, ANIM_WorldSkolar_Idle)
|
||||
EVT_END_THREAD
|
||||
EVT_THREAD
|
||||
EVT_WAIT(22)
|
||||
EVT_CALL(SetNpcAnimation, NPC_Muskular, ANIM_WorldMuskular_Leap)
|
||||
EVT_CALL(SetNpcFlagBits, NPC_Muskular, NPC_FLAG_400000, FALSE)
|
||||
EVT_CALL(SetNpcJumpscale, NPC_Muskular, EVT_FLOAT(3.2))
|
||||
EVT_CALL(GetNpcPos, NPC_Muskular, LVar6, LVar7, LVar8)
|
||||
EVT_CALL(NpcJump0, NPC_Muskular, LVar6, LVar7, LVar8, 5)
|
||||
EVT_CALL(SetNpcAnimation, NPC_Muskular, ANIM_WorldMuskular_Idle)
|
||||
EVT_END_THREAD
|
||||
EVT_THREAD
|
||||
EVT_WAIT(20)
|
||||
EVT_CALL(SetNpcAnimation, NPC_Misstar, ANIM_WorldMisstar_Leap)
|
||||
EVT_CALL(SetNpcFlagBits, NPC_Misstar, NPC_FLAG_400000, FALSE)
|
||||
EVT_CALL(SetNpcJumpscale, NPC_Misstar, EVT_FLOAT(3.2))
|
||||
EVT_CALL(GetNpcPos, NPC_Misstar, LVar6, LVar7, LVar8)
|
||||
EVT_CALL(NpcJump0, NPC_Misstar, LVar6, LVar7, LVar8, 5)
|
||||
EVT_CALL(SetNpcAnimation, NPC_Misstar, ANIM_WorldMisstar_Idle)
|
||||
EVT_END_THREAD
|
||||
EVT_THREAD
|
||||
EVT_WAIT(21)
|
||||
EVT_CALL(SetNpcAnimation, NPC_Klevar, ANIM_WorldKlevar_Leap)
|
||||
EVT_CALL(SetNpcFlagBits, NPC_Klevar, NPC_FLAG_400000, FALSE)
|
||||
EVT_CALL(SetNpcJumpscale, NPC_Klevar, EVT_FLOAT(3.2))
|
||||
EVT_CALL(GetNpcPos, NPC_Klevar, LVar6, LVar7, LVar8)
|
||||
EVT_CALL(NpcJump0, NPC_Klevar, LVar6, LVar7, LVar8, 5)
|
||||
EVT_CALL(SetNpcAnimation, NPC_Klevar, ANIM_WorldKlevar_Idle)
|
||||
EVT_END_THREAD
|
||||
EVT_THREAD
|
||||
EVT_WAIT(22)
|
||||
EVT_CALL(SetNpcAnimation, NPC_Kalmar, ANIM_WorldKalmar_Leap)
|
||||
EVT_CALL(SetNpcFlagBits, NPC_Kalmar, NPC_FLAG_400000, FALSE)
|
||||
EVT_CALL(SetNpcJumpscale, NPC_Kalmar, EVT_FLOAT(3.2))
|
||||
EVT_CALL(GetNpcPos, NPC_Kalmar, LVar6, LVar7, LVar8)
|
||||
EVT_CALL(NpcJump0, NPC_Kalmar, LVar6, LVar7, LVar8, 5)
|
||||
EVT_CALL(SetNpcAnimation, NPC_Kalmar, ANIM_WorldKalmar_Idle)
|
||||
EVT_END_THREAD
|
||||
EVT_WAIT(30)
|
||||
EVT_THREAD
|
||||
EVT_WAIT(45)
|
||||
EVT_CALL(PlaySoundAtPlayer, SOUND_188, 0)
|
||||
EVT_CALL(N(func_802404A0_8AC430))
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(PlaySoundAtPlayer, SOUND_B000001F, 0)
|
||||
EVT_CALL(N(func_802403B8_8AC348), 0, 10, 10, 3, 10)
|
||||
EVT_WAIT(6)
|
||||
EVT_CALL(PlaySoundAtPlayer, SOUND_B000001F, 0)
|
||||
EVT_CALL(N(func_802403B8_8AC348), 0, 0, 10, 3, 15)
|
||||
EVT_WAIT(6)
|
||||
EVT_CALL(PlaySoundAtPlayer, SOUND_B000001F, 0)
|
||||
EVT_CALL(N(func_802403B8_8AC348), 0, -10, 10, 3, 20)
|
||||
EVT_WAIT(6)
|
||||
EVT_CALL(PlaySoundAtPlayer, SOUND_B000001F, 0)
|
||||
EVT_CALL(N(func_802403B8_8AC348), 0, 10, 10, 3, 25)
|
||||
EVT_WAIT(6)
|
||||
EVT_LOOP(3)
|
||||
EVT_CALL(PlaySoundAtPlayer, SOUND_B000001F, 0)
|
||||
EVT_CALL(N(func_802403B8_8AC348), 0, 0, 10, 3, 30)
|
||||
EVT_WAIT(6)
|
||||
EVT_CALL(PlaySoundAtPlayer, SOUND_B000001F, 0)
|
||||
EVT_CALL(N(func_802403B8_8AC348), 0, -10, 10, 3, 30)
|
||||
EVT_WAIT(6)
|
||||
EVT_CALL(PlaySoundAtPlayer, SOUND_B000001F, 0)
|
||||
EVT_CALL(N(func_802403B8_8AC348), 0, 10, 10, 3, 30)
|
||||
EVT_WAIT(6)
|
||||
EVT_END_LOOP
|
||||
EVT_WAIT(40)
|
||||
EVT_CALL(SpeakToPlayer, NPC_Eldstar, ANIM_WorldEldstar_Wave, ANIM_WorldEldstar_Wave, 5, MSG_CH0_0003)
|
||||
EVT_THREAD
|
||||
EVT_WAIT(15)
|
||||
EVT_CALL(N(func_80240BD8_8ACB68), 5)
|
||||
EVT_WAIT(2)
|
||||
EVT_CALL(N(func_80240BD8_8ACB68), 2)
|
||||
EVT_WAIT(2)
|
||||
EVT_CALL(N(func_80240BD8_8ACB68), 6)
|
||||
EVT_WAIT(2)
|
||||
EVT_CALL(N(func_80240BD8_8ACB68), 3)
|
||||
EVT_WAIT(2)
|
||||
EVT_CALL(N(func_80240BD8_8ACB68), 7)
|
||||
EVT_WAIT(2)
|
||||
EVT_CALL(N(func_80240BD8_8ACB68), 4)
|
||||
EVT_WAIT(2)
|
||||
EVT_CALL(N(func_80240BD8_8ACB68), 1)
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(FadeOutMusic, 0, 0x00001388)
|
||||
EVT_THREAD
|
||||
EVT_WAIT(90)
|
||||
EVT_CALL(N(func_802405A8_8AC538))
|
||||
EVT_END_THREAD
|
||||
EVT_WAIT(60)
|
||||
EVT_CALL(N(func_80240000_8ABF90), 255, 255, 255, 0, 0, 0, 50)
|
||||
EVT_CALL(SetNpcSpeed, NPC_Goombaria, EVT_FLOAT(3.0))
|
||||
EVT_CALL(SetNpcFlagBits, NPC_Goombaria, NPC_FLAG_100 | NPC_FLAG_GRAVITY, TRUE)
|
||||
EVT_CALL(SetNpcFlagBits, NPC_Goombaria, NPC_FLAG_ENABLE_HIT_SCRIPT | NPC_FLAG_40, FALSE)
|
||||
EVT_CALL(EnableNpcShadow, NPC_Goombaria, TRUE)
|
||||
EVT_CALL(SetNpcAnimation, NPC_Goombaria, ANIM_Goombaria_Walk)
|
||||
EVT_CALL(SetNpcPos, NPC_Goombaria, 300, 0, 0)
|
||||
EVT_CALL(NpcMoveTo, NPC_Goombaria, 110, 0, 0)
|
||||
EVT_CALL(SetNpcAnimation, NPC_Goombaria, ANIM_Goombaria_Stand)
|
||||
EVT_CALL(InterpNpcYaw, NPC_Goombaria, 90, 1)
|
||||
EVT_WAIT(10)
|
||||
EVT_CALL(InterpNpcYaw, NPC_Goombaria, 270, 1)
|
||||
EVT_WAIT(15)
|
||||
EVT_CALL(InterpNpcYaw, NPC_Goombaria, 90, 1)
|
||||
EVT_WAIT(18)
|
||||
EVT_CALL(InterpNpcYaw, NPC_Goombaria, 270, 1)
|
||||
EVT_WAIT(10)
|
||||
EVT_WAIT(6)
|
||||
EVT_CALL(SetCamDistance, CAM_DEFAULT, 200)
|
||||
EVT_CALL(SetCamPitch, CAM_DEFAULT, 15, -12)
|
||||
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0))
|
||||
EVT_CALL(GetNpcPos, NPC_Goombaria, LVar3, LVar4, LVar5)
|
||||
EVT_ADD(LVar3, -20)
|
||||
EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar3, LVar4, LVar5)
|
||||
EVT_WAIT(25)
|
||||
EVT_CALL(SetNpcAnimation, NPC_Goombaria, ANIM_Goombaria_LeanOver)
|
||||
EVT_CALL(PlaySoundAtNpc, NPC_Goombaria, SOUND_263, 0)
|
||||
EVT_CALL(ShowEmote, NPC_Goombaria, EMOTE_QUESTION, 0, 20, TRUE, 0, 0, 0, 0)
|
||||
EVT_WAIT(25)
|
||||
EVT_CALL(SetNpcAnimation, NPC_Goombaria, ANIM_Goombaria_Stand)
|
||||
EVT_CALL(SpeakToPlayer, NPC_Goombaria, ANIM_Goombaria_Talk, ANIM_Goombaria_Stand, 5, MSG_CH0_0004)
|
||||
EVT_CALL(SetCamSpeed, CAM_DEFAULT, 1)
|
||||
EVT_CALL(SetPanTarget, CAM_DEFAULT, 0, 0, 0)
|
||||
EVT_CALL(SetNpcSpeed, NPC_Goombaria, EVT_FLOAT(3.0))
|
||||
EVT_CALL(SetNpcAnimation, NPC_Goombaria, ANIM_Goombaria_Run)
|
||||
EVT_CALL(NpcMoveTo, NPC_Goombaria, 30, -10, 0)
|
||||
EVT_WAIT(2)
|
||||
EVT_CALL(SetNpcAnimation, NPC_Goombaria, ANIM_Goombaria_Inspect)
|
||||
EVT_WAIT(15)
|
||||
EVT_CALL(SpeakToPlayer, NPC_Goombaria, ANIM_Goombaria_Inspect, ANIM_Goombaria_Inspect, 5, MSG_CH0_0005)
|
||||
EVT_CALL(SetNpcAnimation, NPC_Goombaria, ANIM_Goombaria_Talk)
|
||||
EVT_CALL(NpcJump0, NPC_Goombaria, 30, 0, -10, 4)
|
||||
EVT_WAIT(5)
|
||||
EVT_CALL(SetNpcAnimation, NPC_Goombaria, ANIM_Goombaria_LeanOver)
|
||||
EVT_CALL(NpcJump0, NPC_Goombaria, 30, 0, -10, 4)
|
||||
EVT_WAIT(10)
|
||||
EVT_CALL(SpeakToPlayer, NPC_Goombaria, ANIM_Goombaria_Talk, ANIM_Goombaria_Stand, 5, MSG_CH0_0006)
|
||||
EVT_CALL(SetNpcAnimation, NPC_Goombaria, ANIM_Goombaria_Run)
|
||||
EVT_CALL(SetNpcSpeed, NPC_Goombaria, EVT_FLOAT(6.0))
|
||||
EVT_CALL(NpcMoveTo, NPC_Goombaria, -30, -5, 0)
|
||||
EVT_CALL(NpcFacePlayer, NPC_Goombaria, 5)
|
||||
EVT_CALL(SetNpcJumpscale, NPC_Goombaria, EVT_FLOAT(4.0))
|
||||
EVT_CALL(NpcJump0, NPC_Goombaria, -29, 0, 5, 4)
|
||||
EVT_CALL(SetNpcAnimation, NPC_Goombaria, ANIM_Goombaria_Run)
|
||||
EVT_CALL(SetNpcSpeed, NPC_Goombaria, EVT_FLOAT(6.0))
|
||||
EVT_CALL(NpcMoveTo, NPC_Goombaria, 34, 5, 0)
|
||||
EVT_CALL(NpcFacePlayer, NPC_Goombaria, 5)
|
||||
EVT_CALL(SetNpcJumpscale, NPC_Goombaria, EVT_FLOAT(4.0))
|
||||
EVT_CALL(NpcJump0, NPC_Goombaria, 33, 0, 5, 4)
|
||||
EVT_CALL(SetNpcAnimation, NPC_Goombaria, ANIM_Goombaria_Run)
|
||||
EVT_CALL(SetNpcSpeed, NPC_Goombaria, EVT_FLOAT(6.0))
|
||||
EVT_CALL(NpcMoveTo, NPC_Goombaria, -30, 5, 0)
|
||||
EVT_CALL(NpcFacePlayer, NPC_Goombaria, 5)
|
||||
EVT_CALL(SetNpcJumpscale, NPC_Goombaria, EVT_FLOAT(4.0))
|
||||
EVT_CALL(NpcJump0, NPC_Goombaria, -29, 0, 5, 4)
|
||||
EVT_CALL(SetNpcAnimation, NPC_Goombaria, ANIM_Goombaria_Run)
|
||||
EVT_CALL(SetNpcSpeed, NPC_Goombaria, EVT_FLOAT(6.0))
|
||||
EVT_CALL(NpcMoveTo, NPC_Goombaria, 34, 5, 0)
|
||||
EVT_CALL(NpcFacePlayer, NPC_Goombaria, 5)
|
||||
EVT_CALL(SetNpcJumpscale, NPC_Goombaria, EVT_FLOAT(4.0))
|
||||
EVT_CALL(NpcJump0, NPC_Goombaria, 33, 0, 5, 4)
|
||||
EVT_WAIT(20)
|
||||
EVT_CALL(SpeakToPlayer, NPC_Goombaria, ANIM_Goombaria_Talk, ANIM_Goombaria_Stand, 5, MSG_CH0_0007)
|
||||
EVT_WAIT(20)
|
||||
EVT_THREAD
|
||||
EVT_CALL(SetNpcSpeed, NPC_Goombaria, EVT_FLOAT(4.0))
|
||||
EVT_CALL(NpcMoveTo, NPC_Goombaria, 450, 0, 0)
|
||||
EVT_END_THREAD
|
||||
EVT_WAIT(15)
|
||||
EVT_CALL(SpeakToPlayer, NPC_Goombaria, ANIM_Goombaria_Talk, ANIM_Goombaria_Stand, 5, MSG_CH0_0008)
|
||||
EVT_WAIT(30)
|
||||
EVT_SET(GB_StoryProgress, STORY_CH0_WAKE_UP)
|
||||
EVT_CALL(DisablePlayerPhysics, FALSE)
|
||||
EVT_CALL(N(func_802405CC_8AC55C))
|
||||
EVT_CALL(GotoMapSpecial, EVT_PTR("kmr_02"), kmr_02_ENTRY_5, TRANSITION_10)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
386
src/world/area_kmr/kmr_00/kmr_00_4_npc.c
Normal file
386
src/world/area_kmr/kmr_00/kmr_00_4_npc.c
Normal file
@ -0,0 +1,386 @@
|
||||
#include "kmr_00.h"
|
||||
|
||||
NpcSettings N(NpcSettings_StarSpirit) = {
|
||||
.height = 26,
|
||||
.radius = 24,
|
||||
.level = 99,
|
||||
};
|
||||
|
||||
NpcSettings N(NpcSettings_Unused1) = {
|
||||
.height = 20,
|
||||
.radius = 20,
|
||||
.level = 99,
|
||||
};
|
||||
|
||||
NpcSettings N(NpcSettings_Unused2) = {
|
||||
.height = 22,
|
||||
.radius = 24,
|
||||
.level = 99,
|
||||
};
|
||||
|
||||
NpcSettings N(NpcSettings_Goombaria) = {
|
||||
.height = 24,
|
||||
.radius = 24,
|
||||
.level = 99,
|
||||
};
|
||||
|
||||
// initial delay to start bobbing, ensuring star spirits motions are desync'd from one another
|
||||
s16 N(StarSpiritBobDelays)[] = {
|
||||
[NPC_Eldstar - 1] 1,
|
||||
[NPC_Mamar - 1] 3,
|
||||
[NPC_Skolar - 1] 5,
|
||||
[NPC_Muskular - 1] 7,
|
||||
[NPC_Misstar - 1] 7,
|
||||
[NPC_Klevar - 1] 5,
|
||||
[NPC_Kalmar - 1] 3,
|
||||
};
|
||||
|
||||
API_CALLABLE(N(UpdateStarSpiritBobbing)) {
|
||||
s32 retVal;
|
||||
if (isInitialCall) {
|
||||
script->functionTemp[1] = 0;
|
||||
script->functionTempPtr[2] = get_npc_safe(script->owner2.npcID);
|
||||
script->functionTemp[3] = N(StarSpiritBobDelays)[script->owner2.npcID - 1];
|
||||
}
|
||||
if (script->functionTemp[3] == 0) {
|
||||
Npc* npc = script->functionTempPtr[2];
|
||||
npc->verticalRenderOffset = sin_deg(script->functionTempF[1]) * 1.5f;
|
||||
script->functionTempF[1] = clamp_angle(script->functionTempF[1] + 18.0f);
|
||||
retVal = ApiStatus_BLOCK;
|
||||
} else {
|
||||
script->functionTemp[3]--;
|
||||
retVal = ApiStatus_BLOCK;
|
||||
}
|
||||
return retVal;
|
||||
}
|
||||
|
||||
EvtScript N(EVS_NpcAux_StarSpirit) = {
|
||||
EVT_THREAD
|
||||
EVT_CALL(N(UpdateStarSpiritBobbing))
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(RandInt, 100, LVar0)
|
||||
EVT_ADD(LVar0, 1)
|
||||
EVT_WAIT(LVar0)
|
||||
EVT_MALLOC_ARRAY(1, LVarA)
|
||||
EVT_USE_ARRAY(LVarA)
|
||||
EVT_THREAD
|
||||
EVT_USE_ARRAY(LVarA)
|
||||
EVT_LABEL(0)
|
||||
EVT_CALL(RandInt, 90, LVar0)
|
||||
EVT_ADD(LVar0, 30)
|
||||
EVT_SETF(ArrayVar(0), EVT_FLOAT(10.0))
|
||||
EVT_WAIT(LVar0)
|
||||
EVT_CALL(RandInt, 100, LVar1)
|
||||
EVT_IF_LT(LVar1, 80)
|
||||
EVT_SET(LVar1, 1)
|
||||
EVT_ELSE
|
||||
EVT_SET(LVar1, 2)
|
||||
EVT_END_IF
|
||||
EVT_LOOP(LVar1)
|
||||
EVT_SETF(ArrayVar(0), EVT_FLOAT(40.0))
|
||||
EVT_WAIT(1)
|
||||
EVT_SETF(ArrayVar(0), EVT_FLOAT(50.0))
|
||||
EVT_WAIT(1)
|
||||
EVT_SETF(ArrayVar(0), EVT_FLOAT(80.0))
|
||||
EVT_WAIT(1)
|
||||
EVT_SETF(ArrayVar(0), EVT_FLOAT(70.0))
|
||||
EVT_WAIT(1)
|
||||
EVT_SETF(ArrayVar(0), EVT_FLOAT(60.0))
|
||||
EVT_WAIT(1)
|
||||
EVT_SETF(ArrayVar(0), EVT_FLOAT(50.0))
|
||||
EVT_WAIT(1)
|
||||
EVT_END_LOOP
|
||||
EVT_GOTO(0)
|
||||
EVT_END_THREAD
|
||||
EVT_SETF(LVar0, EVT_FLOAT(100.0))
|
||||
EVT_LABEL(1)
|
||||
EVT_LOOP(50)
|
||||
EVT_ADDF(LVar0, EVT_FLOAT(0.8))
|
||||
EVT_CALL(func_802CFD30, -1, 13, 0, ArrayVar(0), MV_Unk_01, LVar0)
|
||||
EVT_WAIT(1)
|
||||
EVT_END_LOOP
|
||||
EVT_LOOP(50)
|
||||
EVT_ADDF(LVar0, EVT_FLOAT(-0.8))
|
||||
EVT_CALL(func_802CFD30, -1, 13, 0, ArrayVar(0), MV_Unk_01, LVar0)
|
||||
EVT_WAIT(1)
|
||||
EVT_END_LOOP
|
||||
EVT_GOTO(1)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInit_StarSpirit) = {
|
||||
EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE)
|
||||
EVT_CALL(BindNpcAux, NPC_SELF, EVT_PTR(N(EVS_NpcAux_StarSpirit)))
|
||||
EVT_IF_GE(GB_StoryProgress, STORY_CH0_WAKE_UP)
|
||||
EVT_CALL(RemoveNpc, NPC_SELF)
|
||||
EVT_END_IF
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInit_Goombaria) = {
|
||||
EVT_IF_GE(GB_StoryProgress, STORY_CH0_WAKE_UP)
|
||||
EVT_CALL(RemoveNpc, NPC_SELF)
|
||||
EVT_END_IF
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
StaticNpc N(NpcData_Goombaria) = {
|
||||
.id = NPC_Goombaria,
|
||||
.settings = &N(NpcSettings_Goombaria),
|
||||
.pos = { NPC_DISPOSE_LOCATION },
|
||||
.yaw = 0,
|
||||
.flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_GRAVITY | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING,
|
||||
.init = &N(EVS_NpcInit_Goombaria),
|
||||
.drops = {
|
||||
.dropFlags = NPC_DROP_FLAGS_80,
|
||||
.heartDrops = NO_DROPS,
|
||||
.flowerDrops = NO_DROPS,
|
||||
},
|
||||
.animations = {
|
||||
.idle = ANIM_Goombaria_Idle,
|
||||
.walk = ANIM_Goombaria_Walk,
|
||||
.run = ANIM_Goombaria_Run,
|
||||
.chase = ANIM_Goombaria_Run,
|
||||
.anim_4 = ANIM_Goombaria_Idle,
|
||||
.anim_5 = ANIM_Goombaria_Idle,
|
||||
.death = ANIM_Goombaria_Still,
|
||||
.hit = ANIM_Goombaria_Still,
|
||||
.anim_8 = ANIM_Goombaria_Run,
|
||||
.anim_9 = ANIM_Goombaria_Run,
|
||||
.anim_A = ANIM_Goombaria_Run,
|
||||
.anim_B = ANIM_Goombaria_Run,
|
||||
.anim_C = ANIM_Goombaria_Run,
|
||||
.anim_D = ANIM_Goombaria_Run,
|
||||
.anim_E = ANIM_Goombaria_Run,
|
||||
.anim_F = ANIM_Goombaria_Run,
|
||||
},
|
||||
};
|
||||
|
||||
StaticNpc N(NpcData_Eldstar)[] = {
|
||||
{
|
||||
.id = NPC_Eldstar,
|
||||
.settings = &N(NpcSettings_StarSpirit),
|
||||
.pos = { NPC_DISPOSE_LOCATION },
|
||||
.yaw = 0,
|
||||
.flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_GRAVITY | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING,
|
||||
.init = &N(EVS_NpcInit_StarSpirit),
|
||||
.drops = {
|
||||
.dropFlags = NPC_DROP_FLAGS_80,
|
||||
.heartDrops = NO_DROPS,
|
||||
.flowerDrops = NO_DROPS,
|
||||
},
|
||||
.animations = {
|
||||
.idle = ANIM_WorldEldstar_Idle,
|
||||
.walk = ANIM_WorldEldstar_Idle,
|
||||
.run = ANIM_WorldEldstar_Idle,
|
||||
.chase = ANIM_WorldEldstar_Idle,
|
||||
.anim_4 = ANIM_WorldEldstar_Idle,
|
||||
.anim_5 = ANIM_WorldEldstar_Idle,
|
||||
.death = ANIM_WorldEldstar_Idle,
|
||||
.hit = ANIM_WorldEldstar_Idle,
|
||||
.anim_8 = ANIM_WorldEldstar_Still,
|
||||
.anim_9 = ANIM_WorldEldstar_Idle,
|
||||
.anim_A = ANIM_WorldEldstar_Idle,
|
||||
.anim_B = ANIM_WorldEldstar_Idle,
|
||||
.anim_C = ANIM_WorldEldstar_Idle,
|
||||
.anim_D = ANIM_WorldEldstar_Idle,
|
||||
.anim_E = ANIM_WorldEldstar_Idle,
|
||||
.anim_F = ANIM_WorldEldstar_Idle,
|
||||
},
|
||||
},
|
||||
{
|
||||
.id = NPC_Mamar,
|
||||
.settings = &N(NpcSettings_StarSpirit),
|
||||
.pos = { NPC_DISPOSE_LOCATION },
|
||||
.yaw = 0,
|
||||
.flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_GRAVITY | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING,
|
||||
.init = &N(EVS_NpcInit_StarSpirit),
|
||||
.drops = {
|
||||
.dropFlags = NPC_DROP_FLAGS_80,
|
||||
.heartDrops = NO_DROPS,
|
||||
.flowerDrops = NO_DROPS,
|
||||
},
|
||||
.animations = {
|
||||
.idle = ANIM_WorldMamar_Idle,
|
||||
.walk = ANIM_WorldMamar_Idle,
|
||||
.run = ANIM_WorldMamar_Idle,
|
||||
.chase = ANIM_WorldMamar_Idle,
|
||||
.anim_4 = ANIM_WorldMamar_Idle,
|
||||
.anim_5 = ANIM_WorldMamar_Idle,
|
||||
.death = ANIM_WorldMamar_Idle,
|
||||
.hit = ANIM_WorldMamar_Idle,
|
||||
.anim_8 = ANIM_WorldMamar_Still,
|
||||
.anim_9 = ANIM_WorldMamar_Idle,
|
||||
.anim_A = ANIM_WorldMamar_Idle,
|
||||
.anim_B = ANIM_WorldMamar_Idle,
|
||||
.anim_C = ANIM_WorldMamar_Idle,
|
||||
.anim_D = ANIM_WorldMamar_Idle,
|
||||
.anim_E = ANIM_WorldMamar_Idle,
|
||||
.anim_F = ANIM_WorldMamar_Idle,
|
||||
},
|
||||
},
|
||||
{
|
||||
.id = NPC_Skolar,
|
||||
.settings = &N(NpcSettings_StarSpirit),
|
||||
.pos = { NPC_DISPOSE_LOCATION },
|
||||
.yaw = 0,
|
||||
.flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_GRAVITY | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING,
|
||||
.init = &N(EVS_NpcInit_StarSpirit),
|
||||
.drops = {
|
||||
.dropFlags = NPC_DROP_FLAGS_80,
|
||||
.heartDrops = NO_DROPS,
|
||||
.flowerDrops = NO_DROPS,
|
||||
},
|
||||
.animations = {
|
||||
.idle = ANIM_WorldSkolar_Idle,
|
||||
.walk = ANIM_WorldSkolar_Idle,
|
||||
.run = ANIM_WorldSkolar_Idle,
|
||||
.chase = ANIM_WorldSkolar_Idle,
|
||||
.anim_4 = ANIM_WorldSkolar_Idle,
|
||||
.anim_5 = ANIM_WorldSkolar_Idle,
|
||||
.death = ANIM_WorldSkolar_Idle,
|
||||
.hit = ANIM_WorldSkolar_Idle,
|
||||
.anim_8 = ANIM_WorldSkolar_Still,
|
||||
.anim_9 = ANIM_WorldSkolar_Idle,
|
||||
.anim_A = ANIM_WorldSkolar_Idle,
|
||||
.anim_B = ANIM_WorldSkolar_Idle,
|
||||
.anim_C = ANIM_WorldSkolar_Idle,
|
||||
.anim_D = ANIM_WorldSkolar_Idle,
|
||||
.anim_E = ANIM_WorldSkolar_Idle,
|
||||
.anim_F = ANIM_WorldSkolar_Idle,
|
||||
},
|
||||
},
|
||||
{
|
||||
.id = NPC_Muskular,
|
||||
.settings = &N(NpcSettings_StarSpirit),
|
||||
.pos = { NPC_DISPOSE_LOCATION },
|
||||
.yaw = 0,
|
||||
.flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_GRAVITY | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING,
|
||||
.init = &N(EVS_NpcInit_StarSpirit),
|
||||
.drops = {
|
||||
.dropFlags = NPC_DROP_FLAGS_80,
|
||||
.heartDrops = NO_DROPS,
|
||||
.flowerDrops = NO_DROPS,
|
||||
},
|
||||
.animations = {
|
||||
.idle = ANIM_WorldMuskular_Idle,
|
||||
.walk = ANIM_WorldMuskular_Idle,
|
||||
.run = ANIM_WorldMuskular_Idle,
|
||||
.chase = ANIM_WorldMuskular_Idle,
|
||||
.anim_4 = ANIM_WorldMuskular_Idle,
|
||||
.anim_5 = ANIM_WorldMuskular_Idle,
|
||||
.death = ANIM_WorldMuskular_Idle,
|
||||
.hit = ANIM_WorldMuskular_Idle,
|
||||
.anim_8 = ANIM_WorldMuskular_Still,
|
||||
.anim_9 = ANIM_WorldMuskular_Idle,
|
||||
.anim_A = ANIM_WorldMuskular_Idle,
|
||||
.anim_B = ANIM_WorldMuskular_Idle,
|
||||
.anim_C = ANIM_WorldMuskular_Idle,
|
||||
.anim_D = ANIM_WorldMuskular_Idle,
|
||||
.anim_E = ANIM_WorldMuskular_Idle,
|
||||
.anim_F = ANIM_WorldMuskular_Idle,
|
||||
},
|
||||
},
|
||||
{
|
||||
.id = NPC_Misstar,
|
||||
.settings = &N(NpcSettings_StarSpirit),
|
||||
.pos = { NPC_DISPOSE_LOCATION },
|
||||
.yaw = 0,
|
||||
.flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_GRAVITY | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING,
|
||||
.init = &N(EVS_NpcInit_StarSpirit),
|
||||
.drops = {
|
||||
.dropFlags = NPC_DROP_FLAGS_80,
|
||||
.heartDrops = NO_DROPS,
|
||||
.flowerDrops = NO_DROPS,
|
||||
},
|
||||
.animations = {
|
||||
.idle = ANIM_WorldMisstar_Idle,
|
||||
.walk = ANIM_WorldMisstar_Idle,
|
||||
.run = ANIM_WorldMisstar_Idle,
|
||||
.chase = ANIM_WorldMisstar_Idle,
|
||||
.anim_4 = ANIM_WorldMisstar_Idle,
|
||||
.anim_5 = ANIM_WorldMisstar_Idle,
|
||||
.death = ANIM_WorldMisstar_Idle,
|
||||
.hit = ANIM_WorldMisstar_Idle,
|
||||
.anim_8 = ANIM_WorldMisstar_Still,
|
||||
.anim_9 = ANIM_WorldMisstar_Idle,
|
||||
.anim_A = ANIM_WorldMisstar_Idle,
|
||||
.anim_B = ANIM_WorldMisstar_Idle,
|
||||
.anim_C = ANIM_WorldMisstar_Idle,
|
||||
.anim_D = ANIM_WorldMisstar_Idle,
|
||||
.anim_E = ANIM_WorldMisstar_Idle,
|
||||
.anim_F = ANIM_WorldMisstar_Idle,
|
||||
},
|
||||
},
|
||||
{
|
||||
.id = NPC_Klevar,
|
||||
.settings = &N(NpcSettings_StarSpirit),
|
||||
.pos = { NPC_DISPOSE_LOCATION },
|
||||
.yaw = 0,
|
||||
.flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_GRAVITY | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING,
|
||||
.init = &N(EVS_NpcInit_StarSpirit),
|
||||
.drops = {
|
||||
.dropFlags = NPC_DROP_FLAGS_80,
|
||||
.heartDrops = NO_DROPS,
|
||||
.flowerDrops = NO_DROPS,
|
||||
},
|
||||
.animations = {
|
||||
.idle = ANIM_WorldKlevar_Idle,
|
||||
.walk = ANIM_WorldKlevar_Idle,
|
||||
.run = ANIM_WorldKlevar_Idle,
|
||||
.chase = ANIM_WorldKlevar_Idle,
|
||||
.anim_4 = ANIM_WorldKlevar_Idle,
|
||||
.anim_5 = ANIM_WorldKlevar_Idle,
|
||||
.death = ANIM_WorldKlevar_Idle,
|
||||
.hit = ANIM_WorldKlevar_Idle,
|
||||
.anim_8 = ANIM_WorldKlevar_Still,
|
||||
.anim_9 = ANIM_WorldKlevar_Idle,
|
||||
.anim_A = ANIM_WorldKlevar_Idle,
|
||||
.anim_B = ANIM_WorldKlevar_Idle,
|
||||
.anim_C = ANIM_WorldKlevar_Idle,
|
||||
.anim_D = ANIM_WorldKlevar_Idle,
|
||||
.anim_E = ANIM_WorldKlevar_Idle,
|
||||
.anim_F = ANIM_WorldKlevar_Idle,
|
||||
},
|
||||
},
|
||||
{
|
||||
.id = NPC_Kalmar,
|
||||
.settings = &N(NpcSettings_StarSpirit),
|
||||
.pos = { NPC_DISPOSE_LOCATION },
|
||||
.yaw = 0,
|
||||
.flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_GRAVITY | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING,
|
||||
.init = &N(EVS_NpcInit_StarSpirit),
|
||||
.drops = {
|
||||
.dropFlags = NPC_DROP_FLAGS_80,
|
||||
.heartDrops = NO_DROPS,
|
||||
.flowerDrops = NO_DROPS,
|
||||
},
|
||||
.animations = {
|
||||
.idle = ANIM_WorldKalmar_Idle,
|
||||
.walk = ANIM_WorldKalmar_Idle,
|
||||
.run = ANIM_WorldKalmar_Idle,
|
||||
.chase = ANIM_WorldKalmar_Idle,
|
||||
.anim_4 = ANIM_WorldKalmar_Idle,
|
||||
.anim_5 = ANIM_WorldKalmar_Idle,
|
||||
.death = ANIM_WorldKalmar_Idle,
|
||||
.hit = ANIM_WorldKalmar_Idle,
|
||||
.anim_8 = ANIM_WorldKalmar_Still,
|
||||
.anim_9 = ANIM_WorldKalmar_Idle,
|
||||
.anim_A = ANIM_WorldKalmar_Idle,
|
||||
.anim_B = ANIM_WorldKalmar_Idle,
|
||||
.anim_C = ANIM_WorldKalmar_Idle,
|
||||
.anim_D = ANIM_WorldKalmar_Idle,
|
||||
.anim_E = ANIM_WorldKalmar_Idle,
|
||||
.anim_F = ANIM_WorldKalmar_Idle,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
NpcGroupList N(DefaultNPCs) = {
|
||||
NPC_GROUP(N(NpcData_Goombaria)),
|
||||
NPC_GROUP(N(NpcData_Eldstar)),
|
||||
{}
|
||||
};
|
9
src/world/area_kmr/kmr_00/kmr_00_5_entity.c
Normal file
9
src/world/area_kmr/kmr_00/kmr_00_5_entity.c
Normal file
@ -0,0 +1,9 @@
|
||||
#include "kmr_00.h"
|
||||
#include "entity.h"
|
||||
|
||||
EvtScript N(EVS_MakeEntities) = {
|
||||
EVT_CALL(MakeEntity, EVT_PTR(Entity_HiddenPanel), 0, 0, 0, 0, MODEL_ji_3, MAKE_ENTITY_END)
|
||||
EVT_CALL(AssignPanelFlag, GF_KMR00_HiddenPanel)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
@ -1,27 +0,0 @@
|
||||
#include "kmr_03.h"
|
||||
#include "message_ids.h"
|
||||
#include "../../partners.h"
|
||||
|
||||
#include "world/common/util/ChangeNpcToPartner.inc.c"
|
||||
|
||||
#include "world/common/todo/CheckPartnerFlags1000.inc.c"
|
||||
|
||||
EntryList N(entryList) = {
|
||||
{ -340.0f, 0.0f, 348.0f, 48.0f },
|
||||
{ 480.0f, 0.0f, 0.0f, 270.0f },
|
||||
{ -310.0f, 20.0f, -80.0f, 135.0f },
|
||||
};
|
||||
|
||||
MapSettings N(settings) = {
|
||||
.main = &N(main),
|
||||
.entryList = &N(entryList),
|
||||
.entryCount = ENTRY_COUNT(N(entryList)),
|
||||
.background = &gBackgroundImage,
|
||||
.tattle = { MSG_MapTattle_kmr_03 },
|
||||
};
|
||||
|
||||
EvtScript N(802406C0) = {
|
||||
EVT_CALL(SetMusicTrack, 0, SONG_PLEASANT_PATH, 0, 8)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
@ -1,302 +0,0 @@
|
||||
#include "kmr_03.h"
|
||||
#include "sprite/npc/Goompa.h"
|
||||
#include "entity.h"
|
||||
|
||||
enum {
|
||||
NPC_GOOMPA,
|
||||
};
|
||||
|
||||
ApiStatus N(func_802401B0_8C8140)(Evt* script, s32 isInitialCall) {
|
||||
Npc* npc = get_npc_unsafe(0);
|
||||
|
||||
script->varTable[1] = get_xz_dist_to_player(npc->pos.x, npc->pos.z) / npc->moveSpeed * 0.8f;
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
#include "world/common/todo/UnkPositionFunc.inc.c"
|
||||
|
||||
EvtScript N(exitWalk_802406F0) = EVT_EXIT_WALK(60, 0, "kmr_04", 0);
|
||||
|
||||
EvtScript N(exitWalk_8024074C) = EVT_EXIT_WALK(60, 1, "kmr_05", 0);
|
||||
|
||||
EvtScript N(802407A8) = {
|
||||
EVT_BIND_TRIGGER(N(exitWalk_802406F0), TRIGGER_FLOOR_ABOVE, 3, 1, 0)
|
||||
EVT_BIND_TRIGGER(N(exitWalk_8024074C), TRIGGER_FLOOR_ABOVE, 5, 1, 0)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(main) = {
|
||||
EVT_SET(GB_WorldLocation, 30)
|
||||
EVT_CALL(SetSpriteShading, -1)
|
||||
EVT_CALL(SetCamPerspective, 0, 3, 25, 16, 4096)
|
||||
EVT_CALL(SetCamBGColor, 0, 0, 0, 0)
|
||||
EVT_CALL(SetCamEnabled, 0, 1)
|
||||
EVT_CALL(SetCamLeadPlayer, 0, 0)
|
||||
EVT_SET(AreaFlag(8), 0)
|
||||
EVT_CALL(MakeNpcs, 0, EVT_PTR(N(npcGroupList_80241450)))
|
||||
EVT_CALL(ClearDefeatedEnemies)
|
||||
EVT_EXEC_WAIT(N(makeEntities))
|
||||
EVT_EXEC_WAIT(N(802422B8))
|
||||
EVT_EXEC(N(802406C0))
|
||||
EVT_CALL(GetEntryID, LVar0)
|
||||
EVT_IF_NE(LVar0, 2)
|
||||
EVT_SET(LVar0, EVT_PTR(N(802407A8)))
|
||||
EVT_EXEC(EnterWalk)
|
||||
EVT_ELSE
|
||||
EVT_EXEC(N(802407A8))
|
||||
EVT_EXEC(N(80242340))
|
||||
EVT_END_IF
|
||||
EVT_WAIT(1)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
static s32 N(pad_948)[] = {
|
||||
0x00000000, 0x00000000,
|
||||
};
|
||||
|
||||
NpcSettings N(npcSettings_80240950) = {
|
||||
.height = 22,
|
||||
.radius = 24,
|
||||
.level = 99,
|
||||
.actionFlags = 16,
|
||||
};
|
||||
|
||||
EvtScript N(8024097C) = {
|
||||
EVT_LABEL(1)
|
||||
EVT_IF_EQ(AreaFlag(8), 1)
|
||||
EVT_LABEL(100)
|
||||
EVT_CALL(AwaitPlayerLeave, 294, 123, 170)
|
||||
EVT_CALL(EnableNpcAI, 0, 0)
|
||||
EVT_CALL(DisablePlayerInput, TRUE)
|
||||
EVT_CALL(SetNpcSpeed, 0, EVT_FLOAT(4.0))
|
||||
EVT_CALL(SetNpcAnimation, 0, ANIM_Goompa_Run)
|
||||
EVT_CALL(N(func_802401B0_8C8140))
|
||||
EVT_CALL(GetAngleToPlayer, 0, LVar2)
|
||||
EVT_LOOP(LVar1)
|
||||
EVT_CALL(GetNpcPos, 0, LVar7, LVar8, LVar9)
|
||||
EVT_CALL(AddVectorPolar, LVar7, LVar9, EVT_FLOAT(4.0), LVar2)
|
||||
EVT_CALL(SetNpcPos, 0, LVar7, LVar8, LVar9)
|
||||
EVT_WAIT(1)
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(PlayerFaceNpc, 0, 3)
|
||||
EVT_CALL(SetPlayerSpeed, EVT_FLOAT(3.0))
|
||||
EVT_CALL(PlayerMoveTo, 243, 243, 0)
|
||||
EVT_CALL(SetNpcVar, 0, 0, 1)
|
||||
EVT_CALL(EnableNpcAI, 0, 1)
|
||||
EVT_CALL(DisablePlayerInput, FALSE)
|
||||
EVT_GOTO(100)
|
||||
EVT_END_IF
|
||||
EVT_WAIT(1)
|
||||
EVT_GOTO(1)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(npcAI_80240B50) = {
|
||||
EVT_LABEL(1)
|
||||
EVT_SWITCH(GB_StoryProgress)
|
||||
EVT_CASE_EQ(-122)
|
||||
EVT_LABEL(89)
|
||||
EVT_CALL(N(UnkPositionFunc), -118, 86, -70, -15)
|
||||
EVT_WAIT(1)
|
||||
EVT_IF_EQ(LVar0, 0)
|
||||
EVT_GOTO(89)
|
||||
EVT_END_IF
|
||||
EVT_CALL(DisablePlayerInput, TRUE)
|
||||
EVT_CALL(SetNpcAux, 0, 0)
|
||||
EVT_CALL(PlaySoundAtNpc, 0, SOUND_262, 0)
|
||||
EVT_CALL(ShowEmote, 0, EMOTE_EXCLAMATION, 45, 15, 1, 0, 0, 0, 0)
|
||||
EVT_WAIT(15)
|
||||
EVT_CALL(NpcFacePlayer, NPC_SELF, 5)
|
||||
EVT_WAIT(10)
|
||||
EVT_CALL(SpeakToPlayer, 0, ANIM_Goompa_Talk, ANIM_Goompa_Idle, 0, MSG_CH0_00A6)
|
||||
EVT_CALL(UseSettingsFrom, 0, -220, 20, -72)
|
||||
EVT_CALL(SetPanTarget, 0, -20, 0, 68)
|
||||
EVT_CALL(SetCamPitch, 0, EVT_FLOAT(15.0), EVT_FLOAT(-8.5))
|
||||
EVT_CALL(SetCamDistance, 0, 275)
|
||||
EVT_CALL(SetCamSpeed, 0, EVT_FLOAT(1.5))
|
||||
EVT_CALL(PanToTarget, 0, 0, 1)
|
||||
EVT_THREAD
|
||||
EVT_WAIT(20)
|
||||
EVT_CALL(SetPlayerSpeed, EVT_FLOAT(2.0))
|
||||
EVT_CALL(PlayerMoveTo, -38, 68, 0)
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(GetNpcPos, 0, LVar7, LVar8, LVar9)
|
||||
EVT_CALL(SetNpcSpeed, 0, EVT_FLOAT(4.0))
|
||||
EVT_CALL(SetNpcAnimation, 0, ANIM_Goompa_Run)
|
||||
EVT_CALL(NpcMoveTo, 0, 0, 70, 0)
|
||||
EVT_CALL(SetNpcAnimation, 0, ANIM_Goompa_Idle)
|
||||
EVT_CALL(InterpNpcYaw, 0, 276, 20)
|
||||
EVT_WAIT(30)
|
||||
EVT_CALL(SpeakToPlayer, 0, ANIM_Goompa_Talk, ANIM_Goompa_Idle, 0, MSG_CH0_00A7)
|
||||
EVT_WAIT(5)
|
||||
EVT_CALL(SetPlayerAnimation, ANIM_Mario_80007)
|
||||
EVT_WAIT(30)
|
||||
EVT_CALL(SpeakToPlayer, 0, ANIM_Goompa_Talk, ANIM_Goompa_Idle, 0, MSG_CH0_00A8)
|
||||
EVT_CALL(N(ChangeNpcToPartner), 0, 5)
|
||||
EVT_SET(GB_StoryProgress, -121)
|
||||
EVT_CALL(UseSettingsFrom, 0, -220, 20, -72)
|
||||
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
|
||||
EVT_CALL(SetPanTarget, 0, LVar0, LVar1, LVar2)
|
||||
EVT_CALL(SetCamSpeed, 0, EVT_FLOAT(3.0))
|
||||
EVT_CALL(PanToTarget, 0, 0, 1)
|
||||
EVT_CALL(WaitForCam, 0, EVT_FLOAT(1.0))
|
||||
EVT_CALL(PanToTarget, 0, 0, 0)
|
||||
EVT_CALL(EnablePartnerAI)
|
||||
EVT_CALL(DisablePlayerInput, FALSE)
|
||||
EVT_WAIT(1)
|
||||
EVT_END_SWITCH
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(hit_80240F64) = {
|
||||
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Goompa_Injured)
|
||||
EVT_WAIT(10)
|
||||
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Goompa_Idle)
|
||||
EVT_ADD(MapVar(0), 1)
|
||||
EVT_IF_LT(MapVar(0), 3)
|
||||
EVT_CALL(GetOwnerEncounterTrigger, LVar0)
|
||||
EVT_SWITCH(LVar0)
|
||||
EVT_CASE_EQ(2)
|
||||
EVT_CALL(SetNpcVar, 0, 0, 1)
|
||||
EVT_IF_EQ(AreaFlag(6), 1)
|
||||
EVT_ELSE
|
||||
EVT_SET(AreaFlag(6), 1)
|
||||
EVT_SET(AreaFlag(7), 0)
|
||||
EVT_END_IF
|
||||
EVT_CASE_EQ(4)
|
||||
EVT_CALL(SetNpcVar, 0, 0, 1)
|
||||
EVT_IF_EQ(AreaFlag(7), 1)
|
||||
EVT_ELSE
|
||||
EVT_SET(AreaFlag(6), 0)
|
||||
EVT_SET(AreaFlag(7), 1)
|
||||
EVT_END_IF
|
||||
EVT_END_SWITCH
|
||||
EVT_WAIT(10)
|
||||
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Goompa_Run)
|
||||
EVT_ELSE
|
||||
EVT_WAIT(10)
|
||||
EVT_CALL(GetNpcPos, 0, LVar0, LVar1, LVar2)
|
||||
EVT_CALL(SetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2)
|
||||
EVT_CALL(SetNpcFlagBits, NPC_PARTNER, ((NPC_FLAG_GRAVITY)), TRUE)
|
||||
EVT_CALL(SetNpcPos, 0, 0, -1000, 0)
|
||||
EVT_CALL(SetNpcFlagBits, 0, ((NPC_FLAG_100)), FALSE)
|
||||
EVT_CALL(EnablePartnerAI)
|
||||
EVT_CALL(SetNpcAux, NPC_SELF, EVT_PTR(N(8024097C)))
|
||||
EVT_CALL(BindNpcAI, NPC_SELF, EVT_PTR(N(npcAI_80240B50)))
|
||||
EVT_END_IF
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(init_802411A8) = {
|
||||
EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(npcAI_80240B50)))
|
||||
EVT_CALL(BindNpcAux, -1, EVT_PTR(N(8024097C)))
|
||||
EVT_CALL(BindNpcHit, -1, EVT_PTR(N(hit_80240F64)))
|
||||
EVT_SWITCH(GB_StoryProgress)
|
||||
EVT_CASE_GE(-121)
|
||||
EVT_CALL(SetNpcFlagBits, NPC_SELF, ((NPC_FLAG_GRAVITY)), FALSE)
|
||||
EVT_CALL(SetNpcFlagBits, NPC_SELF, ((NPC_FLAG_ENABLE_HIT_SCRIPT)), TRUE)
|
||||
EVT_CALL(SetNpcPos, NPC_SELF, 0, -1000, 0)
|
||||
EVT_END_SWITCH
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
StaticNpc N(npcGroup_80241260) = {
|
||||
.id = NPC_GOOMPA,
|
||||
.settings = &N(npcSettings_80240950),
|
||||
.pos = { -50.0f, 0.0f, 80.0f },
|
||||
.flags = NPC_FLAG_PASSIVE | NPC_FLAG_4 | NPC_FLAG_100 | NPC_FLAG_400000,
|
||||
.init = &N(init_802411A8),
|
||||
.yaw = 45,
|
||||
.drops = {
|
||||
.dropFlags = NPC_DROP_FLAGS_80,
|
||||
.heartDrops = NO_DROPS,
|
||||
.flowerDrops = NO_DROPS,
|
||||
},
|
||||
.animations = {
|
||||
ANIM_Goompa_Idle,
|
||||
ANIM_Goompa_Walk,
|
||||
ANIM_Goompa_Run,
|
||||
ANIM_Goompa_Run,
|
||||
ANIM_Goompa_Idle,
|
||||
ANIM_Goompa_Idle,
|
||||
ANIM_Goompa_Still,
|
||||
ANIM_Goompa_Still,
|
||||
ANIM_Goompa_Run,
|
||||
ANIM_Goompa_Run,
|
||||
ANIM_Goompa_Run,
|
||||
ANIM_Goompa_Run,
|
||||
ANIM_Goompa_Run,
|
||||
ANIM_Goompa_Run,
|
||||
ANIM_Goompa_Run,
|
||||
ANIM_Goompa_Run,
|
||||
},
|
||||
.tattle = MSG_NpcTattle_Goompa,
|
||||
};
|
||||
|
||||
NpcGroupList N(npcGroupList_80241450) = {
|
||||
NPC_GROUP(N(npcGroup_80241260), 0x0002, BTL_DEFAULT_STAGE),
|
||||
{},
|
||||
};
|
||||
|
||||
static s32 N(pad_1468)[] = {
|
||||
0x00000000, 0x00000000,
|
||||
};
|
||||
|
||||
EvtScript N(80241470) = {
|
||||
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, 9, 0x7FFFFE00)
|
||||
EVT_SET(GB_StoryProgress, -117)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(802414A8) = {
|
||||
EVT_SET(GF_KMR03_Hammer1Block, 1)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(802414C8) = {
|
||||
EVT_LABEL(0)
|
||||
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
|
||||
EVT_CALL(SetCamTarget, 0, LVar0, LVar1, LVar2)
|
||||
EVT_WAIT(1)
|
||||
EVT_GOTO(0)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(makeEntities) = {
|
||||
EVT_IF_LT(GB_StoryProgress, -117)
|
||||
EVT_CALL(MakeEntity, EVT_PTR(Entity_Hammer1Block), 45, 0, 70, 15, MAKE_ENTITY_END)
|
||||
EVT_CALL(AssignScript, EVT_PTR(N(80241470)))
|
||||
EVT_ELSE
|
||||
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, 9, 0x7FFFFE00)
|
||||
EVT_END_IF
|
||||
EVT_IF_EQ(GF_KMR03_Hammer1Block, 0)
|
||||
EVT_CALL(MakeEntity, EVT_PTR(Entity_Hammer2Block), 230, 0, 310, 15, MAKE_ENTITY_END)
|
||||
EVT_CALL(AssignScript, EVT_PTR(N(802414A8)))
|
||||
EVT_END_IF
|
||||
EVT_CALL(MakeEntity, EVT_PTR(Entity_HiddenYellowBlock), 230, 60, 310, 15, 151, MAKE_ENTITY_END)
|
||||
EVT_CALL(AssignBlockFlag, GF_KMR03_HiddenItem_RepelGel)
|
||||
EVT_CALL(MakeEntity, EVT_PTR(Entity_BrickBlock), 230, 50, -160, 15, MAKE_ENTITY_END)
|
||||
EVT_CALL(MakeEntity, EVT_PTR(Entity_BrickBlock), 165, 0, 380, 20, MAKE_ENTITY_END)
|
||||
EVT_CALL(MakeEntity, EVT_PTR(Entity_YellowBlock), -170, 0, 370, 43, 343, MAKE_ENTITY_END)
|
||||
EVT_CALL(AssignBlockFlag, GF_KMR03_ItemBlock_Coin)
|
||||
EVT_CALL(MakeEntity, EVT_PTR(Entity_SimpleSpring), 345, 75, -250, 0, 100, MAKE_ENTITY_END)
|
||||
EVT_CALL(MakeItemEntity, ITEM_COIN, 345, 205, -250, 17, GF_KMR03_Item_CoinA)
|
||||
EVT_CALL(MakeItemEntity, ITEM_COIN, 345, 230, -250, 17, GF_KMR03_Item_CoinB)
|
||||
EVT_CALL(MakeItemEntity, ITEM_COIN, 345, 255, -250, 17, GF_KMR03_Item_CoinC)
|
||||
EVT_CALL(MakeItemEntity, ITEM_COIN, 345, 280, -250, 17, GF_KMR03_Item_CoinD)
|
||||
EVT_CALL(MakeItemEntity, ITEM_FIRE_FLOWER, 229, 250, -156, 17, GF_KMR02_Item_FireFlower)
|
||||
EVT_CALL(MakeEntity, &Entity_HiddenPanel, 300, 0, 150, 0, 18, MAKE_ENTITY_END)
|
||||
EVT_CALL(AssignPanelFlag, GF_KMR03_HiddenPanel)
|
||||
EVT_CALL(MakeEntity, EVT_PTR(Entity_HeartBlock), 130, 60, 0, 0, MAKE_ENTITY_END)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
@ -1,17 +0,0 @@
|
||||
#include "kmr_03.h"
|
||||
|
||||
#include "world/common/todo/UnsetCamera0MoveFlag1.inc.c"
|
||||
|
||||
#include "world/common/todo/SetCamera0MoveFlag1.inc.c"
|
||||
|
||||
ApiStatus func_80240358_8C82E8(Evt* script, s32 isInitialCall) {
|
||||
PlayerStatus* playerStatus = &gPlayerStatus;
|
||||
|
||||
f32 xDelta = playerStatus->currentSpeed * 5.0f * sin_deg(playerStatus->targetYaw);
|
||||
f32 zDelta = playerStatus->currentSpeed * 5.0f * -cos_deg(playerStatus->targetYaw);
|
||||
|
||||
script->varTable[0] = playerStatus->position.x + xDelta;
|
||||
script->varTable[1] = playerStatus->position.z + zDelta;
|
||||
|
||||
return ApiStatus_DONE2;
|
||||
}
|
@ -1,77 +0,0 @@
|
||||
#include "kmr_03.h"
|
||||
|
||||
#include "common/foliage.inc.c"
|
||||
|
||||
FoliageModelList N(treeModelList_Bush1_Bush) = {
|
||||
.count = 1,
|
||||
.models = { 64 },
|
||||
};
|
||||
|
||||
FoliageVectorList N(treeEffectVectors_Bush1) = {
|
||||
.count = 1,
|
||||
.vectors = {
|
||||
{ 143, 16, 462 },
|
||||
},
|
||||
};
|
||||
|
||||
SearchBushConfig N(bush1) = {
|
||||
.bush = &N(treeModelList_Bush1_Bush),
|
||||
.vectors = &N(treeEffectVectors_Bush1),
|
||||
};
|
||||
|
||||
FoliageModelList N(treeModelList_Tree1_Leaves) = {
|
||||
.count = 1,
|
||||
.models = { 62 },
|
||||
};
|
||||
|
||||
FoliageModelList N(treeModelList_Tree1_Trunk) = {
|
||||
.count = 1,
|
||||
.models = { 61 },
|
||||
};
|
||||
|
||||
FoliageVectorList N(treeEffectVectors_Tree1) = {
|
||||
.count = 2,
|
||||
.vectors = {
|
||||
{ -80, 130, 18 },
|
||||
{ 28, 130, 39 },
|
||||
},
|
||||
};
|
||||
|
||||
EvtScript N(tree1_Callback) = {
|
||||
EVT_IF_EQ(GF_KMR03_Tree1_Mushroom, 1)
|
||||
EVT_RETURN
|
||||
EVT_END_IF
|
||||
EVT_IF_EQ(MapFlag(10), 1)
|
||||
EVT_RETURN
|
||||
EVT_END_IF
|
||||
EVT_WAIT(10)
|
||||
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
|
||||
EVT_IF_LT(LVar0, -30)
|
||||
EVT_CALL(MakeItemEntity, ITEM_MUSHROOM, -23, 100, 35, 13, GF_KMR03_Tree1_Mushroom)
|
||||
EVT_ELSE
|
||||
EVT_CALL(MakeItemEntity, ITEM_MUSHROOM, -85, 100, 16, 13, GF_KMR03_Tree1_Mushroom)
|
||||
EVT_END_IF
|
||||
EVT_SET(MapFlag(10), 1)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
ShakeTreeConfig N(tree1) = {
|
||||
.leaves = &N(treeModelList_Tree1_Leaves),
|
||||
.trunk = &N(treeModelList_Tree1_Trunk),
|
||||
.vectors = &N(treeEffectVectors_Tree1),
|
||||
.callback = &N(tree1_Callback),
|
||||
};
|
||||
|
||||
Vec4f N(tree1Point) = { -42.0f, 0.0f, -13.0f, 0.0f };
|
||||
|
||||
EvtScript N(802422B8) = {
|
||||
EVT_SET(LVar0, EVT_PTR(N(bush1)))
|
||||
EVT_BIND_TRIGGER(N(searchBush), TRIGGER_WALL_PRESS_A, 53, 1, 0)
|
||||
EVT_SET(LVar0, EVT_PTR(N(tree1)))
|
||||
EVT_BIND_TRIGGER(N(shakeTree), TRIGGER_WALL_HAMMER, 52, 1, 0)
|
||||
EVT_BIND_TRIGGER(N(shakeTree), TRIGGER_POINT_BOMB, EVT_PTR(N(tree1Point)), 1, 0)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
@ -1,88 +0,0 @@
|
||||
#include "kmr_03.h"
|
||||
|
||||
EvtScript N(80242340) = {
|
||||
EVT_CALL(UseSettingsFrom, 0, -270, 20, -80)
|
||||
EVT_CALL(SetPanTarget, 0, -270, 20, -80)
|
||||
EVT_CALL(SetCamDistance, 0, EVT_FLOAT(700.0))
|
||||
EVT_CALL(SetCamSpeed, 0, EVT_FLOAT(90.0))
|
||||
EVT_CALL(PanToTarget, 0, 0, 1)
|
||||
EVT_IF_GE(GB_StoryProgress, -119)
|
||||
EVT_CALL(SetPlayerPos, 0, -1000, 0)
|
||||
EVT_CALL(DisablePlayerInput, TRUE)
|
||||
EVT_CALL(SetPlayerPos, -224, 20, -80)
|
||||
EVT_CALL(SetNpcPos, NPC_PARTNER, -224, 20, -80)
|
||||
EVT_WAIT(20)
|
||||
EVT_CALL(SetCamSpeed, 0, EVT_FLOAT(3.0))
|
||||
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
|
||||
EVT_CALL(UseSettingsFrom, 0, LVar0, LVar1, LVar2)
|
||||
EVT_CALL(SetPanTarget, 0, LVar0, LVar1, LVar2)
|
||||
EVT_CALL(PanToTarget, 0, 0, 1)
|
||||
EVT_CALL(WaitForCam, 0, EVT_FLOAT(1.0))
|
||||
EVT_CALL(PanToTarget, 0, 0, 0)
|
||||
EVT_CALL(DisablePlayerInput, FALSE)
|
||||
EVT_RETURN
|
||||
EVT_END_IF
|
||||
EVT_CALL(DisablePlayerInput, TRUE)
|
||||
EVT_CALL(DisablePlayerPhysics, TRUE)
|
||||
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
|
||||
EVT_CALL(SetPlayerPos, LVar0, -1000, LVar2)
|
||||
EVT_WAIT(30)
|
||||
EVT_CALL(SetCamDistance, 0, 220)
|
||||
EVT_CALL(SetCamSpeed, 0, EVT_FLOAT(1.0))
|
||||
EVT_CALL(PanToTarget, 0, 0, 1)
|
||||
EVT_CALL(WaitForCam, 0, EVT_FLOAT(1.0))
|
||||
EVT_THREAD
|
||||
EVT_WAIT(18)
|
||||
EVT_CALL(PlaySoundAtPlayer, 373, 0)
|
||||
EVT_WAIT(30)
|
||||
EVT_CALL(PlaySoundAtPlayer, 374, 0)
|
||||
EVT_WAIT(28)
|
||||
EVT_CALL(PlaySoundAtPlayer, 373, 0)
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(HidePlayerShadow, TRUE)
|
||||
EVT_CALL(SetPlayerAnimation, ANIM_Mario_10002)
|
||||
EVT_CALL(SetPlayerPos, -224, 120, -80)
|
||||
EVT_CALL(InterpPlayerYaw, 90, 0)
|
||||
EVT_LABEL(0)
|
||||
EVT_WAIT(1)
|
||||
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
|
||||
EVT_ADD(LVar1, -2)
|
||||
EVT_CALL(SetPlayerPos, LVar0, LVar1, LVar2)
|
||||
EVT_IF_GT(LVar1, 86)
|
||||
EVT_GOTO(0)
|
||||
EVT_END_IF
|
||||
EVT_CALL(SetPlayerPos, -310, 20, -80)
|
||||
EVT_THREAD
|
||||
EVT_WAIT(20)
|
||||
EVT_CALL(SetPanTarget, 0, -310, 20, -80)
|
||||
EVT_CALL(SetCamSpeed, 0, EVT_FLOAT(0.2))
|
||||
EVT_CALL(PanToTarget, 0, 0, 1)
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(func_802D286C, 10240)
|
||||
EVT_CALL(func_802D2520, ANIM_Mario_10002, 5, 5, 1, 1, 0)
|
||||
EVT_WAIT(100)
|
||||
EVT_CALL(WaitForCam, 0, EVT_FLOAT(1.0))
|
||||
EVT_CALL(func_802D2520, ANIM_Mario_10002, 0, 0, 0, 0, 0)
|
||||
EVT_CALL(HidePlayerShadow, FALSE)
|
||||
EVT_CALL(SetPlayerAnimation, ANIM_Mario_BeforeJump)
|
||||
EVT_WAIT(10)
|
||||
EVT_CALL(SetPlayerAnimation, ANIM_Mario_AnimMidairStill)
|
||||
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
|
||||
EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(1.0))
|
||||
EVT_CALL(PlayerJump, LVar0, LVar1, LVar2, 10)
|
||||
EVT_CALL(SetPlayerAnimation, ANIM_Mario_10002)
|
||||
EVT_THREAD
|
||||
EVT_CALL(SetCamSpeed, 0, EVT_FLOAT(3.0))
|
||||
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
|
||||
EVT_CALL(UseSettingsFrom, 0, LVar0, LVar1, LVar2)
|
||||
EVT_CALL(SetPanTarget, 0, LVar0, LVar1, LVar2)
|
||||
EVT_CALL(PanToTarget, 0, 0, 1)
|
||||
EVT_CALL(WaitForCam, 0, EVT_FLOAT(1.0))
|
||||
EVT_CALL(PanToTarget, 0, 0, 0)
|
||||
EVT_END_THREAD
|
||||
EVT_WAIT(30)
|
||||
EVT_CALL(DisablePlayerPhysics, FALSE)
|
||||
EVT_CALL(DisablePlayerInput, FALSE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
@ -2,20 +2,32 @@
|
||||
/// @brief Goomba Region - Bottom of the Cliff
|
||||
|
||||
#include "common.h"
|
||||
#include "../kmr.h"
|
||||
#include "message_ids.h"
|
||||
#include "map.h"
|
||||
|
||||
#include "../kmr.h"
|
||||
#include "mapfs/kmr_03_shape.h"
|
||||
#include "mapfs/kmr_03_hit.h"
|
||||
|
||||
#include "sprite/npc/Goompa.h"
|
||||
|
||||
enum {
|
||||
NPC_Goompa = 0,
|
||||
};
|
||||
|
||||
enum {
|
||||
MV_Unk_00 = MapVar(0),
|
||||
};
|
||||
|
||||
enum {
|
||||
MF_Unk_0A = MapFlag(10),
|
||||
};
|
||||
|
||||
#define NAMESPACE kmr_03
|
||||
|
||||
ApiStatus N(UnkPositionFunc)(Evt* script, s32 isInitialCall);
|
||||
ApiStatus N(ChangeNpcToPartner)(Evt* script, s32 isInitialCall);
|
||||
ApiStatus N(func_802401B0_8C8140)(Evt* script, s32 isInitialCall);
|
||||
|
||||
extern NpcGroupList N(npcGroupList_80241450);
|
||||
extern EvtScript N(802422B8);
|
||||
extern EvtScript N(80242340);
|
||||
extern EvtScript N(802406C0);
|
||||
extern EvtScript N(main);
|
||||
extern EvtScript N(makeEntities);
|
||||
extern EvtScript N(EVS_Main);
|
||||
extern EvtScript N(EVS_SetupFoliage);
|
||||
extern EvtScript N(EVS_SetupMusic);
|
||||
extern EvtScript N(EVS_MakeEntities);
|
||||
extern EvtScript N(EVS_Scene_FallingDown);
|
||||
extern NpcGroupList N(DefaultNPCs);
|
||||
|
15
src/world/area_kmr/kmr_03/kmr_03_0_header.c
Normal file
15
src/world/area_kmr/kmr_03/kmr_03_0_header.c
Normal file
@ -0,0 +1,15 @@
|
||||
#include "kmr_03.h"
|
||||
|
||||
EntryList N(Entrances) = {
|
||||
[kmr_03_ENTRY_0] { -340.0, 0.0, 348.0, 48.0 },
|
||||
[kmr_03_ENTRY_1] { 480.0, 0.0, 0.0, 270.0 },
|
||||
[kmr_03_ENTRY_2] { -310.0, 20.0, -80.0, 135.0 },
|
||||
};
|
||||
|
||||
MapSettings N(settings) = {
|
||||
.main = &N(EVS_Main),
|
||||
.entryList = &N(Entrances),
|
||||
.entryCount = ENTRY_COUNT(N(Entrances)),
|
||||
.background = &gBackgroundImage,
|
||||
.tattle = { MSG_MapTattle_kmr_03 },
|
||||
};
|
7
src/world/area_kmr/kmr_03/kmr_03_1_music.c
Normal file
7
src/world/area_kmr/kmr_03/kmr_03_1_music.c
Normal file
@ -0,0 +1,7 @@
|
||||
#include "kmr_03.h"
|
||||
|
||||
EvtScript N(EVS_SetupMusic) = {
|
||||
EVT_CALL(SetMusicTrack, 0, SONG_PLEASANT_PATH, 0, 8)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
34
src/world/area_kmr/kmr_03/kmr_03_2_main.c
Normal file
34
src/world/area_kmr/kmr_03/kmr_03_2_main.c
Normal file
@ -0,0 +1,34 @@
|
||||
#include "kmr_03.h"
|
||||
|
||||
EvtScript N(EVS_ExitWalk_kmr_04_0) = EVT_EXIT_WALK(60, kmr_03_ENTRY_0, "kmr_04", kmr_04_ENTRY_0);
|
||||
EvtScript N(EVS_ExitWalk_kmr_05_0) = EVT_EXIT_WALK(60, kmr_03_ENTRY_1, "kmr_05", kmr_05_ENTRY_0);
|
||||
|
||||
EvtScript N(EVS_BindExitTriggers) = {
|
||||
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_kmr_04_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili1, 1, 0)
|
||||
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_kmr_05_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili2, 1, 0)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_Main) = {
|
||||
EVT_SET(GB_WorldLocation, LOCATION_GOOMBA_VILLAGE)
|
||||
EVT_CALL(SetSpriteShading, SHADING_NONE)
|
||||
EVT_SETUP_CAMERA_NO_LEAD()
|
||||
EVT_SET(AF_KMR_08, FALSE)
|
||||
EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs)))
|
||||
EVT_CALL(ClearDefeatedEnemies)
|
||||
EVT_EXEC_WAIT(N(EVS_MakeEntities))
|
||||
EVT_EXEC_WAIT(N(EVS_SetupFoliage))
|
||||
EVT_EXEC(N(EVS_SetupMusic))
|
||||
EVT_CALL(GetEntryID, LVar0)
|
||||
EVT_IF_NE(LVar0, kmr_03_ENTRY_2)
|
||||
EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers)))
|
||||
EVT_EXEC(EnterWalk)
|
||||
EVT_ELSE
|
||||
EVT_EXEC(N(EVS_BindExitTriggers))
|
||||
EVT_EXEC(N(EVS_Scene_FallingDown))
|
||||
EVT_END_IF
|
||||
EVT_WAIT(1)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
202
src/world/area_kmr/kmr_03/kmr_03_3_npc.c
Normal file
202
src/world/area_kmr/kmr_03/kmr_03_3_npc.c
Normal file
@ -0,0 +1,202 @@
|
||||
#include "kmr_03.h"
|
||||
|
||||
#include "world/common/util/ChangeNpcToPartner.inc.c"
|
||||
|
||||
#include "world/common/todo/CheckPartnerFlags1000.inc.c"
|
||||
|
||||
API_CALLABLE(N(func_802401B0_8C8140)) {
|
||||
Npc* npc = get_npc_unsafe(0);
|
||||
|
||||
script->varTable[1] = get_xz_dist_to_player(npc->pos.x, npc->pos.z) / npc->moveSpeed * 0.8f;
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
#include "world/common/todo/UnkPositionFunc.inc.c"
|
||||
|
||||
NpcSettings N(NpcSettings_Goompa) = {
|
||||
.height = 22,
|
||||
.radius = 24,
|
||||
.level = 99,
|
||||
.actionFlags = AI_ACTION_LOOK_AROUND_DURING_LOITER,
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcAux_Goompa) = {
|
||||
EVT_LABEL(1)
|
||||
EVT_IF_EQ(AF_KMR_08, TRUE)
|
||||
EVT_LABEL(100)
|
||||
EVT_CALL(AwaitPlayerLeave, 294, 123, 170)
|
||||
EVT_CALL(EnableNpcAI, NPC_Goompa, FALSE)
|
||||
EVT_CALL(DisablePlayerInput, TRUE)
|
||||
EVT_CALL(SetNpcSpeed, NPC_Goompa, EVT_FLOAT(4.0))
|
||||
EVT_CALL(SetNpcAnimation, NPC_Goompa, ANIM_Goompa_Run)
|
||||
EVT_CALL(N(func_802401B0_8C8140))
|
||||
EVT_CALL(GetAngleToPlayer, NPC_Goompa, LVar2)
|
||||
EVT_LOOP(LVar1)
|
||||
EVT_CALL(GetNpcPos, NPC_Goompa, LVar7, LVar8, LVar9)
|
||||
EVT_CALL(AddVectorPolar, LVar7, LVar9, EVT_FLOAT(4.0), LVar2)
|
||||
EVT_CALL(SetNpcPos, NPC_Goompa, LVar7, LVar8, LVar9)
|
||||
EVT_WAIT(1)
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(PlayerFaceNpc, NPC_Goompa, 3)
|
||||
EVT_CALL(SetPlayerSpeed, EVT_FLOAT(3.0))
|
||||
EVT_CALL(PlayerMoveTo, 243, 243, 0)
|
||||
EVT_CALL(SetNpcVar, NPC_Goompa, 0, 1)
|
||||
EVT_CALL(EnableNpcAI, NPC_Goompa, TRUE)
|
||||
EVT_CALL(DisablePlayerInput, FALSE)
|
||||
EVT_GOTO(100)
|
||||
EVT_END_IF
|
||||
EVT_WAIT(1)
|
||||
EVT_GOTO(1)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcAI_Goompa) = {
|
||||
EVT_LABEL(1)
|
||||
EVT_SWITCH(GB_StoryProgress)
|
||||
EVT_CASE_EQ(STORY_CH0_FELL_OFF_CLIFF)
|
||||
EVT_LABEL(89)
|
||||
EVT_CALL(N(UnkPositionFunc), -118, 86, -70, -15)
|
||||
EVT_WAIT(1)
|
||||
EVT_IF_EQ(LVar0, 0)
|
||||
EVT_GOTO(89)
|
||||
EVT_END_IF
|
||||
EVT_CALL(DisablePlayerInput, TRUE)
|
||||
EVT_CALL(SetNpcAux, NPC_Goompa, 0)
|
||||
EVT_CALL(PlaySoundAtNpc, NPC_Goompa, SOUND_262, 0)
|
||||
EVT_CALL(ShowEmote, NPC_Goompa, EMOTE_EXCLAMATION, 45, 15, TRUE, 0, 0, 0, 0)
|
||||
EVT_WAIT(15)
|
||||
EVT_CALL(NpcFacePlayer, NPC_SELF, 5)
|
||||
EVT_WAIT(10)
|
||||
EVT_CALL(SpeakToPlayer, NPC_Goompa, ANIM_Goompa_Talk, ANIM_Goompa_Idle, 0, MSG_CH0_00A6)
|
||||
EVT_CALL(UseSettingsFrom, CAM_DEFAULT, -220, 20, -72)
|
||||
EVT_CALL(SetPanTarget, CAM_DEFAULT, -20, 0, 68)
|
||||
EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(15.0), EVT_FLOAT(-8.5))
|
||||
EVT_CALL(SetCamDistance, CAM_DEFAULT, 275)
|
||||
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.5))
|
||||
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
|
||||
EVT_THREAD
|
||||
EVT_WAIT(20)
|
||||
EVT_CALL(SetPlayerSpeed, EVT_FLOAT(2.0))
|
||||
EVT_CALL(PlayerMoveTo, -38, 68, 0)
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(GetNpcPos, NPC_Goompa, LVar7, LVar8, LVar9)
|
||||
EVT_CALL(SetNpcSpeed, NPC_Goompa, EVT_FLOAT(4.0))
|
||||
EVT_CALL(SetNpcAnimation, NPC_Goompa, ANIM_Goompa_Run)
|
||||
EVT_CALL(NpcMoveTo, NPC_Goompa, 0, 70, 0)
|
||||
EVT_CALL(SetNpcAnimation, NPC_Goompa, ANIM_Goompa_Idle)
|
||||
EVT_CALL(InterpNpcYaw, NPC_Goompa, 276, 20)
|
||||
EVT_WAIT(30)
|
||||
EVT_CALL(SpeakToPlayer, NPC_Goompa, ANIM_Goompa_Talk, ANIM_Goompa_Idle, 0, MSG_CH0_00A7)
|
||||
EVT_WAIT(5)
|
||||
EVT_CALL(SetPlayerAnimation, ANIM_Mario_80007)
|
||||
EVT_WAIT(30)
|
||||
EVT_CALL(SpeakToPlayer, NPC_Goompa, ANIM_Goompa_Talk, ANIM_Goompa_Idle, 0, MSG_CH0_00A8)
|
||||
EVT_CALL(N(ChangeNpcToPartner), 0, 5)
|
||||
EVT_SET(GB_StoryProgress, STORY_CH0_GOOMPA_JOINED_PARTY)
|
||||
EVT_CALL(UseSettingsFrom, CAM_DEFAULT, -220, 20, -72)
|
||||
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
|
||||
EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2)
|
||||
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(3.0))
|
||||
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
|
||||
EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0))
|
||||
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0)
|
||||
EVT_CALL(EnablePartnerAI)
|
||||
EVT_CALL(DisablePlayerInput, FALSE)
|
||||
EVT_WAIT(1)
|
||||
EVT_END_SWITCH
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcHit_Goompa) = {
|
||||
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Goompa_Injured)
|
||||
EVT_WAIT(10)
|
||||
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Goompa_Idle)
|
||||
EVT_ADD(MV_Unk_00, 1)
|
||||
EVT_IF_LT(MV_Unk_00, 3)
|
||||
EVT_CALL(GetOwnerEncounterTrigger, LVar0)
|
||||
EVT_SWITCH(LVar0)
|
||||
EVT_CASE_EQ(ENCOUNTER_TRIGGER_JUMP)
|
||||
EVT_CALL(SetNpcVar, NPC_Goompa, 0, 1)
|
||||
EVT_IF_EQ(AF_KMR_06, TRUE)
|
||||
EVT_ELSE
|
||||
EVT_SET(AF_KMR_06, TRUE)
|
||||
EVT_SET(AF_KMR_07, FALSE)
|
||||
EVT_END_IF
|
||||
EVT_CASE_EQ(ENCOUNTER_TRIGGER_HAMMER)
|
||||
EVT_CALL(SetNpcVar, NPC_Goompa, 0, 1)
|
||||
EVT_IF_EQ(AF_KMR_07, TRUE)
|
||||
EVT_ELSE
|
||||
EVT_SET(AF_KMR_06, FALSE)
|
||||
EVT_SET(AF_KMR_07, TRUE)
|
||||
EVT_END_IF
|
||||
EVT_END_SWITCH
|
||||
EVT_WAIT(10)
|
||||
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Goompa_Run)
|
||||
EVT_ELSE
|
||||
EVT_WAIT(10)
|
||||
EVT_CALL(GetNpcPos, NPC_Goompa, LVar0, LVar1, LVar2)
|
||||
EVT_CALL(SetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2)
|
||||
EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, TRUE)
|
||||
EVT_CALL(SetNpcPos, NPC_Goompa, NPC_DISPOSE_LOCATION)
|
||||
EVT_CALL(SetNpcFlagBits, NPC_Goompa, NPC_FLAG_100, FALSE)
|
||||
EVT_CALL(EnablePartnerAI)
|
||||
EVT_CALL(SetNpcAux, NPC_SELF, EVT_PTR(N(EVS_NpcAux_Goompa)))
|
||||
EVT_CALL(BindNpcAI, NPC_SELF, EVT_PTR(N(EVS_NpcAI_Goompa)))
|
||||
EVT_END_IF
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInit_Goompa) = {
|
||||
EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcAI_Goompa)))
|
||||
EVT_CALL(BindNpcAux, NPC_SELF, EVT_PTR(N(EVS_NpcAux_Goompa)))
|
||||
EVT_CALL(BindNpcHit, NPC_SELF, EVT_PTR(N(EVS_NpcHit_Goompa)))
|
||||
EVT_SWITCH(GB_StoryProgress)
|
||||
EVT_CASE_GE(STORY_CH0_GOOMPA_JOINED_PARTY)
|
||||
EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_GRAVITY, FALSE)
|
||||
EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_ENABLE_HIT_SCRIPT, TRUE)
|
||||
EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION)
|
||||
EVT_END_SWITCH
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
StaticNpc N(NpcData_Goompa) = {
|
||||
.id = NPC_Goompa,
|
||||
.settings = &N(NpcSettings_Goompa),
|
||||
.pos = { -50.0f, 0.0f, 80.0f },
|
||||
.yaw = 45,
|
||||
.flags = NPC_FLAG_PASSIVE | NPC_FLAG_4 | NPC_FLAG_100 | NPC_FLAG_400000,
|
||||
.init = &N(EVS_NpcInit_Goompa),
|
||||
.drops = {
|
||||
.dropFlags = NPC_DROP_FLAGS_80,
|
||||
.heartDrops = NO_DROPS,
|
||||
.flowerDrops = NO_DROPS,
|
||||
},
|
||||
.animations = {
|
||||
.idle = ANIM_Goompa_Idle,
|
||||
.walk = ANIM_Goompa_Walk,
|
||||
.run = ANIM_Goompa_Run,
|
||||
.chase = ANIM_Goompa_Run,
|
||||
.anim_4 = ANIM_Goompa_Idle,
|
||||
.anim_5 = ANIM_Goompa_Idle,
|
||||
.death = ANIM_Goompa_Still,
|
||||
.hit = ANIM_Goompa_Still,
|
||||
.anim_8 = ANIM_Goompa_Run,
|
||||
.anim_9 = ANIM_Goompa_Run,
|
||||
.anim_A = ANIM_Goompa_Run,
|
||||
.anim_B = ANIM_Goompa_Run,
|
||||
.anim_C = ANIM_Goompa_Run,
|
||||
.anim_D = ANIM_Goompa_Run,
|
||||
.anim_E = ANIM_Goompa_Run,
|
||||
.anim_F = ANIM_Goompa_Run,
|
||||
},
|
||||
.tattle = MSG_NpcTattle_Goompa,
|
||||
};
|
||||
|
||||
NpcGroupList N(DefaultNPCs) = {
|
||||
NPC_GROUP(N(NpcData_Goompa), BTL_KMR_PART_1_FORMATION_02),
|
||||
{}
|
||||
};
|
71
src/world/area_kmr/kmr_03/kmr_03_4_entity.c
Normal file
71
src/world/area_kmr/kmr_03/kmr_03_4_entity.c
Normal file
@ -0,0 +1,71 @@
|
||||
#include "kmr_03.h"
|
||||
#include "entity.h"
|
||||
|
||||
EvtScript N(EVS_OnSmashBlock1) = {
|
||||
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt1, COLLIDER_FLAGS_UPPER_MASK)
|
||||
EVT_SET(GB_StoryProgress, STORY_CH0_LEFT_THE_PLAYGROUND)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_OnSmashBlock2) = {
|
||||
EVT_SET(GF_KMR03_Hammer1Block, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
#include "world/common/todo/UnsetCamera0MoveFlag1.inc.c"
|
||||
|
||||
#include "world/common/todo/SetCamera0MoveFlag1.inc.c"
|
||||
|
||||
API_CALLABLE(func_80240358_8C82E8) {
|
||||
PlayerStatus* playerStatus = &gPlayerStatus;
|
||||
|
||||
f32 xDelta = playerStatus->currentSpeed * 5.0f * sin_deg(playerStatus->targetYaw);
|
||||
f32 zDelta = playerStatus->currentSpeed * 5.0f * -cos_deg(playerStatus->targetYaw);
|
||||
|
||||
script->varTable[0] = playerStatus->position.x + xDelta;
|
||||
script->varTable[1] = playerStatus->position.z + zDelta;
|
||||
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
EvtScript N(EVS_TetherCameraToPlayer) = {
|
||||
EVT_LABEL(0)
|
||||
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
|
||||
EVT_CALL(SetCamTarget, CAM_DEFAULT, LVar0, LVar1, LVar2)
|
||||
EVT_WAIT(1)
|
||||
EVT_GOTO(0)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_MakeEntities) = {
|
||||
EVT_IF_LT(GB_StoryProgress, STORY_CH0_LEFT_THE_PLAYGROUND)
|
||||
EVT_CALL(MakeEntity, EVT_PTR(Entity_Hammer1Block), 45, 0, 70, 15, MAKE_ENTITY_END)
|
||||
EVT_CALL(AssignScript, EVT_PTR(N(EVS_OnSmashBlock1)))
|
||||
EVT_ELSE
|
||||
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt1, COLLIDER_FLAGS_UPPER_MASK)
|
||||
EVT_END_IF
|
||||
EVT_IF_EQ(GF_KMR03_Hammer1Block, FALSE)
|
||||
EVT_CALL(MakeEntity, EVT_PTR(Entity_Hammer2Block), 230, 0, 310, 15, MAKE_ENTITY_END)
|
||||
EVT_CALL(AssignScript, EVT_PTR(N(EVS_OnSmashBlock2)))
|
||||
EVT_END_IF
|
||||
EVT_CALL(MakeEntity, EVT_PTR(Entity_HiddenYellowBlock), 230, 60, 310, 15, ITEM_REPEL_GEL, MAKE_ENTITY_END)
|
||||
EVT_CALL(AssignBlockFlag, GF_KMR03_HiddenItem_RepelGel)
|
||||
EVT_CALL(MakeEntity, EVT_PTR(Entity_BrickBlock), 230, 50, -160, 15, MAKE_ENTITY_END)
|
||||
EVT_CALL(MakeEntity, EVT_PTR(Entity_BrickBlock), 165, 0, 380, 20, MAKE_ENTITY_END)
|
||||
EVT_CALL(MakeEntity, EVT_PTR(Entity_YellowBlock), -170, 0, 370, 43, ITEM_COIN, MAKE_ENTITY_END)
|
||||
EVT_CALL(AssignBlockFlag, GF_KMR03_ItemBlock_Coin)
|
||||
EVT_CALL(MakeEntity, EVT_PTR(Entity_SimpleSpring), 345, 75, -250, 0, 100, MAKE_ENTITY_END)
|
||||
EVT_CALL(MakeItemEntity, ITEM_COIN, 345, 205, -250, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_KMR03_Item_CoinA)
|
||||
EVT_CALL(MakeItemEntity, ITEM_COIN, 345, 230, -250, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_KMR03_Item_CoinB)
|
||||
EVT_CALL(MakeItemEntity, ITEM_COIN, 345, 255, -250, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_KMR03_Item_CoinC)
|
||||
EVT_CALL(MakeItemEntity, ITEM_COIN, 345, 280, -250, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_KMR03_Item_CoinD)
|
||||
EVT_CALL(MakeItemEntity, ITEM_FIRE_FLOWER, 229, 250, -156, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_KMR02_Item_FireFlower)
|
||||
EVT_CALL(MakeEntity, EVT_PTR(Entity_HiddenPanel), 300, 0, 150, 0, MODEL_jimen_1, MAKE_ENTITY_END)
|
||||
EVT_CALL(AssignPanelFlag, GF_KMR03_HiddenPanel)
|
||||
EVT_CALL(MakeEntity, EVT_PTR(Entity_HeartBlock), 130, 60, 0, 0, MAKE_ENTITY_END)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
85
src/world/area_kmr/kmr_03/kmr_03_5_foliage.c
Normal file
85
src/world/area_kmr/kmr_03/kmr_03_5_foliage.c
Normal file
@ -0,0 +1,85 @@
|
||||
#include "kmr_03.h"
|
||||
|
||||
#include "common/foliage.inc.c"
|
||||
|
||||
FoliageModelList N(Bush1_BushModels) = {
|
||||
.count = 1,
|
||||
.models = {
|
||||
MODEL_km,
|
||||
}
|
||||
};
|
||||
|
||||
FoliageVectorList N(Bush1_Effects) = {
|
||||
.count = 1,
|
||||
.vectors = {
|
||||
{ 143.0f, 16.0f, 462.0f },
|
||||
}
|
||||
};
|
||||
|
||||
SearchBushConfig N(SearchBush_Bush1) = {
|
||||
.bush = &N(Bush1_BushModels),
|
||||
.vectors = &N(Bush1_Effects),
|
||||
};
|
||||
|
||||
FoliageModelList N(Tree1_LeafModels) = {
|
||||
.count = 1,
|
||||
.models = {
|
||||
MODEL_ue,
|
||||
}
|
||||
};
|
||||
|
||||
FoliageModelList N(Tree1_TrunkModels) = {
|
||||
.count = 1,
|
||||
.models = {
|
||||
MODEL_sita,
|
||||
}
|
||||
};
|
||||
|
||||
FoliageVectorList N(Tree1_Effects) = {
|
||||
.count = 2,
|
||||
.vectors = {
|
||||
{ -80.0f, 130.0f, 18.0f },
|
||||
{ 28.0f, 130.0f, 39.0f },
|
||||
}
|
||||
};
|
||||
|
||||
EvtScript N(Tree1_CallbackScript) = {
|
||||
EVT_IF_EQ(GF_KMR03_Tree1_Mushroom, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END_IF
|
||||
EVT_IF_EQ(MF_Unk_0A, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END_IF
|
||||
EVT_WAIT(10)
|
||||
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
|
||||
EVT_IF_LT(LVar0, -30)
|
||||
EVT_CALL(MakeItemEntity, ITEM_MUSHROOM, -23, 100, 35, ITEM_SPAWN_MODE_FALL_NEVER_VANISH, GF_KMR03_Tree1_Mushroom)
|
||||
EVT_ELSE
|
||||
EVT_CALL(MakeItemEntity, ITEM_MUSHROOM, -85, 100, 16, ITEM_SPAWN_MODE_FALL_NEVER_VANISH, GF_KMR03_Tree1_Mushroom)
|
||||
EVT_END_IF
|
||||
EVT_SET(MF_Unk_0A, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
ShakeTreeConfig N(ShakeTree_Tree1) = {
|
||||
.leaves = &N(Tree1_LeafModels),
|
||||
.trunk = &N(Tree1_TrunkModels),
|
||||
.vectors = &N(Tree1_Effects),
|
||||
.callback = &N(Tree1_CallbackScript),
|
||||
};
|
||||
|
||||
BombTrigger N(BombPos_Tree1) = {
|
||||
.pos = { -42.0f, 0.0f, -13.0f },
|
||||
.radius = 0.0f
|
||||
};
|
||||
|
||||
EvtScript N(EVS_SetupFoliage) = {
|
||||
EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush1)))
|
||||
EVT_BIND_TRIGGER(EVT_PTR(N(searchBush)), TRIGGER_WALL_PRESS_A, COLLIDER_km, 1, 0)
|
||||
EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree1)))
|
||||
EVT_BIND_TRIGGER(EVT_PTR(N(shakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_ki, 1, 0)
|
||||
EVT_BIND_TRIGGER(EVT_PTR(N(shakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree1)), 1, 0)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
88
src/world/area_kmr/kmr_03/kmr_03_6_fall_down.c
Normal file
88
src/world/area_kmr/kmr_03/kmr_03_6_fall_down.c
Normal file
@ -0,0 +1,88 @@
|
||||
#include "kmr_03.h"
|
||||
|
||||
EvtScript N(EVS_Scene_FallingDown) = {
|
||||
EVT_CALL(UseSettingsFrom, CAM_DEFAULT, -270, 20, -80)
|
||||
EVT_CALL(SetPanTarget, CAM_DEFAULT, -270, 20, -80)
|
||||
EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(700.0))
|
||||
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0))
|
||||
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
|
||||
EVT_IF_GE(GB_StoryProgress, STORY_CH0_FOUND_HAMMER)
|
||||
EVT_CALL(SetPlayerPos, NPC_DISPOSE_LOCATION)
|
||||
EVT_CALL(DisablePlayerInput, TRUE)
|
||||
EVT_CALL(SetPlayerPos, -224, 20, -80)
|
||||
EVT_CALL(SetNpcPos, NPC_PARTNER, -224, 20, -80)
|
||||
EVT_WAIT(20)
|
||||
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(3.0))
|
||||
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
|
||||
EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2)
|
||||
EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2)
|
||||
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
|
||||
EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0))
|
||||
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0)
|
||||
EVT_CALL(DisablePlayerInput, FALSE)
|
||||
EVT_RETURN
|
||||
EVT_END_IF
|
||||
EVT_CALL(DisablePlayerInput, TRUE)
|
||||
EVT_CALL(DisablePlayerPhysics, TRUE)
|
||||
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
|
||||
EVT_CALL(SetPlayerPos, LVar0, NPC_DISPOSE_POS_Y, LVar2)
|
||||
EVT_WAIT(30)
|
||||
EVT_CALL(SetCamDistance, CAM_DEFAULT, 220)
|
||||
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.0))
|
||||
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
|
||||
EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0))
|
||||
EVT_THREAD
|
||||
EVT_WAIT(18)
|
||||
EVT_CALL(PlaySoundAtPlayer, SOUND_175, 0)
|
||||
EVT_WAIT(30)
|
||||
EVT_CALL(PlaySoundAtPlayer, SOUND_176, 0)
|
||||
EVT_WAIT(28)
|
||||
EVT_CALL(PlaySoundAtPlayer, SOUND_175, 0)
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(HidePlayerShadow, TRUE)
|
||||
EVT_CALL(SetPlayerAnimation, ANIM_Mario_10002)
|
||||
EVT_CALL(SetPlayerPos, -224, 120, -80)
|
||||
EVT_CALL(InterpPlayerYaw, 90, 0)
|
||||
EVT_LABEL(0)
|
||||
EVT_WAIT(1)
|
||||
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
|
||||
EVT_ADD(LVar1, -2)
|
||||
EVT_CALL(SetPlayerPos, LVar0, LVar1, LVar2)
|
||||
EVT_IF_GT(LVar1, 86)
|
||||
EVT_GOTO(0)
|
||||
EVT_END_IF
|
||||
EVT_CALL(SetPlayerPos, -310, 20, -80)
|
||||
EVT_THREAD
|
||||
EVT_WAIT(20)
|
||||
EVT_CALL(SetPanTarget, CAM_DEFAULT, -310, 20, -80)
|
||||
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(0.2))
|
||||
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(func_802D286C, 0x00002800)
|
||||
EVT_CALL(func_802D2520, ANIM_Mario_10002, 5, 5, 1, 1, 0)
|
||||
EVT_WAIT(100)
|
||||
EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0))
|
||||
EVT_CALL(func_802D2520, ANIM_Mario_10002, 0, 0, 0, 0, 0)
|
||||
EVT_CALL(HidePlayerShadow, FALSE)
|
||||
EVT_CALL(SetPlayerAnimation, ANIM_Mario_BeforeJump)
|
||||
EVT_WAIT(10)
|
||||
EVT_CALL(SetPlayerAnimation, ANIM_Mario_AnimMidairStill)
|
||||
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
|
||||
EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(1.0))
|
||||
EVT_CALL(PlayerJump, LVar0, LVar1, LVar2, 10)
|
||||
EVT_CALL(SetPlayerAnimation, ANIM_Mario_10002)
|
||||
EVT_THREAD
|
||||
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(3.0))
|
||||
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
|
||||
EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2)
|
||||
EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2)
|
||||
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
|
||||
EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0))
|
||||
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0)
|
||||
EVT_END_THREAD
|
||||
EVT_WAIT(30)
|
||||
EVT_CALL(DisablePlayerPhysics, FALSE)
|
||||
EVT_CALL(DisablePlayerInput, FALSE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
@ -1,12 +0,0 @@
|
||||
#include "kmr_04.h"
|
||||
|
||||
static char* N(exit_str_0) = "kmr_03";
|
||||
static char* N(exit_str_1) = "";
|
||||
|
||||
#include "world/common/todo/CheckPartnerFlags1000.inc.c"
|
||||
|
||||
ApiStatus N(func_8024002C_8CA92C)(Evt* script, s32 isInitialCall) {
|
||||
script->varTable[0] = get_player_data()->curHP;
|
||||
|
||||
return ApiStatus_DONE2;
|
||||
}
|
@ -1,25 +0,0 @@
|
||||
#include "kmr_04.h"
|
||||
|
||||
#include "common/foliage.inc.c"
|
||||
|
||||
#define NAMESPACE dup_kmr_04
|
||||
#include "world/common/todo/CheckPartnerFlags1000.inc.c"
|
||||
#define NAMESPACE kmr_04
|
||||
|
||||
#include "world/common/todo/StashVars.inc.c"
|
||||
|
||||
#include "world/common/todo/GetItemName.inc.c"
|
||||
|
||||
INCLUDE_ASM(s32, "world/area_kmr/kmr_04/8CA960", func_802403E0_8CACE0);
|
||||
|
||||
ApiStatus N(func_80240434_8CAD34)(Evt* script, s32 isInitialCall) {
|
||||
gPlayerData.hammerLevel = 0;
|
||||
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus N(func_80240444_8CAD44)(Evt* script, s32 isInitialCall) {
|
||||
exec_entity_commandlist(get_entity_by_index(script->varTable[0]));
|
||||
|
||||
return ApiStatus_DONE2;
|
||||
}
|
@ -2,9 +2,37 @@
|
||||
/// @brief Goomba Region - Jr. Troopa's Playground
|
||||
|
||||
#include "common.h"
|
||||
#include "../kmr.h"
|
||||
#include "message_ids.h"
|
||||
#include "map.h"
|
||||
|
||||
#include "../kmr.h"
|
||||
#include "mapfs/kmr_04_shape.h"
|
||||
#include "mapfs/kmr_04_hit.h"
|
||||
|
||||
#include "sprite/npc/Goompa.h"
|
||||
#include "sprite/npc/JrTroopa.h"
|
||||
|
||||
enum {
|
||||
NPC_JrTroopa = 0,
|
||||
NPC_Goompa = 1,
|
||||
};
|
||||
|
||||
enum {
|
||||
MF_Unk_0A = MapFlag(10),
|
||||
MF_Unk_0B = MapFlag(11),
|
||||
MF_Unk_0C = MapFlag(12),
|
||||
MF_Unk_0D = MapFlag(13),
|
||||
MF_Unk_0E = MapFlag(14),
|
||||
MF_Unk_0F = MapFlag(15),
|
||||
MF_Unk_12 = MapFlag(18),
|
||||
};
|
||||
|
||||
#define NAMESPACE kmr_04
|
||||
|
||||
extern EvtScript N(EVS_Main);
|
||||
extern EvtScript N(EVS_SetNormalMusic);
|
||||
extern EvtScript N(EVS_SetJrTroopaMusic);
|
||||
extern EvtScript N(EVS_PushPopMusic);
|
||||
extern EvtScript N(EVS_SetupFoliage);
|
||||
extern EvtScript N(EVS_MakeEntities);
|
||||
extern NpcGroupList N(DefaultNPCs);
|
||||
|
23
src/world/area_kmr/kmr_04/kmr_04_0_header.c
Normal file
23
src/world/area_kmr/kmr_04/kmr_04_0_header.c
Normal file
@ -0,0 +1,23 @@
|
||||
#include "kmr_04.h"
|
||||
|
||||
EntryList N(Entrances) = {
|
||||
[kmr_04_ENTRY_0] { 485.0, 0.0, 9.0, 270.0 },
|
||||
[kmr_04_ENTRY_1] { 198.0, 100.0, -25.0, 270.0 },
|
||||
[kmr_04_ENTRY_2] { 0.0, 0.0, 0.0, 0.0 },
|
||||
[kmr_04_ENTRY_3] { 0.0, 0.0, 0.0, 0.0 },
|
||||
[kmr_04_ENTRY_4] { 0.0, 0.0, 0.0, 0.0 },
|
||||
[kmr_04_ENTRY_5] { 0.0, 0.0, 0.0, 0.0 },
|
||||
[kmr_04_ENTRY_6] { 0.0, 0.0, 0.0, 0.0 },
|
||||
[kmr_04_ENTRY_7] { 0.0, 0.0, 0.0, 0.0 },
|
||||
[kmr_04_ENTRY_8] { 0.0, 0.0, 0.0, 0.0 },
|
||||
[kmr_04_ENTRY_9] { 0.0, 0.0, 0.0, 0.0 },
|
||||
[kmr_04_ENTRY_A] { 43.0, 0.0, -376.0, 90.0 },
|
||||
};
|
||||
|
||||
MapSettings N(settings) = {
|
||||
.main = &N(EVS_Main),
|
||||
.entryList = &N(Entrances),
|
||||
.entryCount = ENTRY_COUNT(N(Entrances)),
|
||||
.background = &gBackgroundImage,
|
||||
.tattle = { MSG_MapTattle_kmr_04 },
|
||||
};
|
21
src/world/area_kmr/kmr_04/kmr_04_1_music.c
Normal file
21
src/world/area_kmr/kmr_04/kmr_04_1_music.c
Normal file
@ -0,0 +1,21 @@
|
||||
#include "kmr_04.h"
|
||||
|
||||
EvtScript N(EVS_SetNormalMusic) = {
|
||||
EVT_CALL(SetMusicTrack, 0, SONG_PLEASANT_PATH, 0, 8)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_SetJrTroopaMusic) = {
|
||||
EVT_CALL(SetMusicTrack, 0, SONG_JR_TROOPA_THEME, 0, 8)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_PushPopMusic) = {
|
||||
EVT_CALL(PushSong, 66, 0)
|
||||
EVT_WAIT(130)
|
||||
EVT_CALL(PopSong)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
45
src/world/area_kmr/kmr_04/kmr_04_2_main.c
Normal file
45
src/world/area_kmr/kmr_04/kmr_04_2_main.c
Normal file
@ -0,0 +1,45 @@
|
||||
#include "kmr_04.h"
|
||||
|
||||
EvtScript N(EVS_ExitWalk_kmr_03_0) = EVT_EXIT_WALK(60, kmr_04_ENTRY_0, "kmr_03", kmr_03_ENTRY_0);
|
||||
|
||||
EvtScript N(EVS_BindExitTriggers) = {
|
||||
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_kmr_03_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili1, 1, 0)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_EnterMap) = {
|
||||
EVT_CALL(GetLoadType, LVar1)
|
||||
EVT_IF_EQ(LVar1, 1)
|
||||
EVT_EXEC(EnterSavePoint)
|
||||
EVT_EXEC(N(EVS_BindExitTriggers))
|
||||
EVT_RETURN
|
||||
EVT_END_IF
|
||||
EVT_CALL(GetEntryID, LVar0)
|
||||
EVT_IF_NE(LVar0, kmr_04_ENTRY_A)
|
||||
EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers)))
|
||||
EVT_EXEC(EnterWalk)
|
||||
EVT_ELSE
|
||||
EVT_EXEC(EnterPostPipe)
|
||||
EVT_EXEC(N(EVS_BindExitTriggers))
|
||||
EVT_END_IF
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_Main) = {
|
||||
EVT_SET(GB_WorldLocation, LOCATION_GOOMBA_VILLAGE)
|
||||
EVT_CALL(SetSpriteShading, SHADING_NONE)
|
||||
EVT_SETUP_CAMERA_NO_LEAD()
|
||||
EVT_SET(AF_KMR_09, FALSE)
|
||||
EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs)))
|
||||
EVT_CALL(ClearDefeatedEnemies)
|
||||
EVT_EXEC_WAIT(N(EVS_MakeEntities))
|
||||
EVT_EXEC_WAIT(N(EVS_SetupFoliage))
|
||||
EVT_EXEC(N(EVS_SetNormalMusic))
|
||||
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilit1, COLLIDER_FLAGS_UPPER_MASK)
|
||||
EVT_EXEC(N(EVS_EnterMap))
|
||||
EVT_WAIT(1)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
307
src/world/area_kmr/kmr_04/kmr_04_3_npc.c
Normal file
307
src/world/area_kmr/kmr_04/kmr_04_3_npc.c
Normal file
@ -0,0 +1,307 @@
|
||||
#include "kmr_04.h"
|
||||
#include "effects.h"
|
||||
|
||||
NpcSettings N(NpcSettings_JrTroopa) = {
|
||||
.height = 32,
|
||||
.radius = 24,
|
||||
.level = 99,
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcAuxAI_Goompa) = {
|
||||
EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_GRAVITY, FALSE)
|
||||
EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_ENABLE_HIT_SCRIPT | NPC_FLAG_40, TRUE)
|
||||
EVT_CALL(SetNpcPos, NPC_SELF, 0, -1000, 0)
|
||||
EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcAux_Goompa) = {
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
#include "world/common/todo/CheckPartnerFlags1000.inc.c"
|
||||
|
||||
API_CALLABLE(N(GetPlayerHP)) {
|
||||
script->varTable[0] = get_player_data()->curHP;
|
||||
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
EvtScript N(EVS_NpcAI_Goompa) = {
|
||||
EVT_LABEL(1)
|
||||
EVT_SWITCH(GB_StoryProgress)
|
||||
EVT_CASE_EQ(STORY_CH0_GOOMPA_JOINED_PARTY)
|
||||
EVT_LOOP(0)
|
||||
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
|
||||
EVT_WAIT(1)
|
||||
EVT_IF_LE(LVar0, 370)
|
||||
EVT_BREAK_LOOP
|
||||
EVT_END_IF
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(DisablePlayerInput, TRUE)
|
||||
EVT_CALL(func_802CF56C, 0)
|
||||
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
|
||||
EVT_ADD(LVar0, 30)
|
||||
EVT_CALL(SetNpcSpeed, NPC_PARTNER, EVT_FLOAT(2.0))
|
||||
EVT_CALL(NpcMoveTo, LVar0, LVar1, LVar2, 0)
|
||||
EVT_WAIT(5)
|
||||
EVT_CALL(DisablePartnerAI, 0)
|
||||
EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_Goompa_Talk, ANIM_Goompa_Idle, 0, MSG_CH0_00A9)
|
||||
EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_Goompa_Idle)
|
||||
EVT_CALL(EnablePartnerAI)
|
||||
EVT_WAIT(10)
|
||||
EVT_CALL(DisablePlayerInput, FALSE)
|
||||
EVT_SET(GB_StoryProgress, STORY_CH0_LOOKING_FOR_HAMMER)
|
||||
EVT_CASE_EQ(STORY_CH0_FOUND_HAMMER)
|
||||
EVT_IF_EQ(AB_KMR_0, 0)
|
||||
EVT_LABEL(10)
|
||||
EVT_WAIT(1)
|
||||
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
|
||||
EVT_IF_LT(LVar0, 360)
|
||||
EVT_GOTO(10)
|
||||
EVT_END_IF
|
||||
EVT_IF_GT(LVar0, 400)
|
||||
EVT_GOTO(10)
|
||||
EVT_END_IF
|
||||
EVT_IF_LT(LVar2, -36)
|
||||
EVT_GOTO(10)
|
||||
EVT_END_IF
|
||||
EVT_IF_GT(LVar2, 85)
|
||||
EVT_GOTO(10)
|
||||
EVT_END_IF
|
||||
EVT_CALL(DisablePlayerInput, TRUE)
|
||||
EVT_CALL(N(CheckPartnerFlags1000))
|
||||
EVT_CALL(DisablePartnerAI, 0)
|
||||
EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_40, TRUE)
|
||||
EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_Goompa_Walk)
|
||||
EVT_CALL(SetNpcSpeed, NPC_PARTNER, EVT_FLOAT(3.0))
|
||||
EVT_CALL(NpcMoveTo, NPC_PARTNER, 420, 6, 0)
|
||||
EVT_THREAD
|
||||
EVT_WAIT(3)
|
||||
EVT_CALL(PlayerFaceNpc, NPC_PARTNER, 3)
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_Goompa_Talk, ANIM_Goompa_Idle, 0, MSG_CH0_00AC)
|
||||
EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_Goompa_Idle)
|
||||
EVT_WAIT(10)
|
||||
EVT_THREAD
|
||||
EVT_CALL(SetPlayerSpeed, EVT_FLOAT(3.0))
|
||||
EVT_CALL(PlayerMoveTo, 395, 0, 0)
|
||||
EVT_CALL(InterpPlayerYaw, 90, 0)
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_ENABLE_HIT_SCRIPT, TRUE)
|
||||
EVT_CALL(SetNpcSpeed, NPC_PARTNER, EVT_FLOAT(6.0))
|
||||
EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_Goompa_Run)
|
||||
EVT_CALL(NpcMoveTo, NPC_PARTNER, 582, 6, 0)
|
||||
EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_Goompa_Idle)
|
||||
EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_ENABLE_HIT_SCRIPT, FALSE)
|
||||
EVT_CALL(PlaySoundAtNpc, NPC_PARTNER, SOUND_61, 0)
|
||||
EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_Goompa_Talk, ANIM_Goompa_Idle, 0, MSG_CH0_00AD)
|
||||
EVT_WAIT(10)
|
||||
EVT_THREAD
|
||||
EVT_SET(LVar0, 0)
|
||||
EVT_CALL(func_802CDE68, -4, 10)
|
||||
EVT_LOOP(60)
|
||||
EVT_ADD(LVar0, 53)
|
||||
EVT_CALL(SetNpcRotation, NPC_PARTNER, 0, 0, LVar0)
|
||||
EVT_CALL(PlayerFaceNpc, NPC_PARTNER, FALSE)
|
||||
EVT_WAIT(1)
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(func_802CDE68, -4, 0)
|
||||
EVT_CALL(SetNpcRotation, NPC_PARTNER, 0, 0, 0)
|
||||
EVT_END_THREAD
|
||||
EVT_THREAD
|
||||
EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 15, EVT_FLOAT(1.0))
|
||||
EVT_END_THREAD
|
||||
EVT_PLAY_EFFECT(EFFECT_DAMAGE_STARS, 1, 495, 15, 9, 460, 15, 9, 6)
|
||||
EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_Goompa_Injured)
|
||||
EVT_CALL(NpcMoveTo, NPC_PARTNER, 250, 6, 60)
|
||||
EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_Goompa_Injured)
|
||||
EVT_CALL(SetNpcRotation, NPC_PARTNER, 0, 0, 0)
|
||||
EVT_THREAD
|
||||
EVT_LOOP(20)
|
||||
EVT_CALL(SetNpcPos, NPC_PARTNER, 250, 0, 6)
|
||||
EVT_WAIT(3)
|
||||
EVT_CALL(SetNpcPos, NPC_PARTNER, 250, 0, 0)
|
||||
EVT_WAIT(3)
|
||||
EVT_END_LOOP
|
||||
EVT_END_THREAD
|
||||
EVT_SET(AB_KMR_0, 1)
|
||||
EVT_END_IF
|
||||
EVT_END_SWITCH
|
||||
EVT_WAIT(1)
|
||||
EVT_GOTO(1)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInteract_Goompa) = {
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcDefeat_Goompa) = {
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcIdle_JrTroopa) = {
|
||||
EVT_CALL(func_800445D4, LVar0)
|
||||
EVT_SWITCH(LVar0)
|
||||
EVT_CASE_EQ(100)
|
||||
EVT_LABEL(0)
|
||||
EVT_SWITCH(AB_KMR_0)
|
||||
EVT_CASE_EQ(1)
|
||||
EVT_EXEC(N(EVS_SetJrTroopaMusic))
|
||||
EVT_THREAD
|
||||
EVT_WAIT(20)
|
||||
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
|
||||
EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2)
|
||||
EVT_CALL(SetPanTarget, CAM_DEFAULT, 430, LVar1, LVar2)
|
||||
EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(275.0))
|
||||
EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.5), EVT_FLOAT(-7.5))
|
||||
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(2.0))
|
||||
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
|
||||
EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0))
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(SetNpcPos, NPC_JrTroopa, 630, 0, 0)
|
||||
EVT_CALL(EnableNpcShadow, NPC_SELF, TRUE)
|
||||
EVT_WAIT(1)
|
||||
EVT_CALL(PlayerFaceNpc, NPC_JrTroopa, 3)
|
||||
EVT_CALL(SetNpcSpeed, NPC_JrTroopa, EVT_FLOAT(3.0))
|
||||
EVT_CALL(SetNpcAnimation, NPC_JrTroopa, ANIM_JrTroopa_Run)
|
||||
EVT_CALL(NpcMoveTo, NPC_JrTroopa, 465, 0, 0)
|
||||
EVT_CALL(SetNpcAnimation, NPC_JrTroopa, ANIM_JrTroopa_PointIdle)
|
||||
EVT_CALL(PlayerFaceNpc, NPC_JrTroopa, 3)
|
||||
EVT_CALL(SpeakToPlayer, NPC_JrTroopa, ANIM_JrTroopa_PointTalk, ANIM_JrTroopa_PointIdle, 0, MSG_CH0_00AE)
|
||||
EVT_WAIT(10)
|
||||
EVT_THREAD
|
||||
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
|
||||
EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2)
|
||||
EVT_CALL(SetPanTarget, CAM_DEFAULT, 430, LVar1, LVar2)
|
||||
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0))
|
||||
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
|
||||
EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0))
|
||||
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0)
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(StartBossBattle, SONG_JR_TROOPA_BATTLE)
|
||||
EVT_END_SWITCH
|
||||
EVT_WAIT(1)
|
||||
EVT_GOTO(0)
|
||||
EVT_CASE_OR_EQ(101)
|
||||
EVT_CASE_OR_EQ(102)
|
||||
EVT_CASE_OR_EQ(3)
|
||||
EVT_CASE_OR_EQ(103)
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_END_SWITCH
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcDefeat_JrTroopa) = {
|
||||
EVT_CALL(GetBattleOutcome, LVar0)
|
||||
EVT_SWITCH(LVar0)
|
||||
EVT_CASE_EQ(OUTCOME_PLAYER_WON)
|
||||
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
|
||||
EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2)
|
||||
EVT_CALL(SetPanTarget, CAM_DEFAULT, 400, LVar1, LVar2)
|
||||
EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(275.0))
|
||||
EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(15.0), EVT_FLOAT(-7.5))
|
||||
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0))
|
||||
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
|
||||
EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0))
|
||||
EVT_CALL(PlayerFaceNpc, NPC_SELF, FALSE)
|
||||
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_JrTroopa_Hurt)
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_JrTroopa_Hurt, ANIM_JrTroopa_Hurt, 0, MSG_CH0_00B5)
|
||||
EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(6.0))
|
||||
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_JrTroopa_Run)
|
||||
EVT_CALL(NpcMoveTo, NPC_SELF, 564, 10, 0)
|
||||
EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION)
|
||||
EVT_WAIT(60)
|
||||
EVT_CALL(SetNpcPos, NPC_SELF, 564, 0, 10)
|
||||
EVT_CALL(NpcMoveTo, NPC_SELF, 435, 10, 0)
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_JrTroopa_PointTalk, ANIM_JrTroopa_PointIdle, 0, MSG_CH0_00B6)
|
||||
EVT_CALL(NpcMoveTo, NPC_SELF, 564, 10, 0)
|
||||
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_JrTroopa_Idle)
|
||||
EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION)
|
||||
EVT_THREAD
|
||||
EVT_CALL(ResetCam, CAM_DEFAULT, 4)
|
||||
EVT_END_THREAD
|
||||
EVT_EXEC(N(EVS_SetNormalMusic))
|
||||
EVT_SET(AB_KMR_0, 0)
|
||||
EVT_SET(GB_StoryProgress, STORY_CH0_DEFEATED_JR_TROOPA)
|
||||
EVT_CALL(DisablePlayerInput, FALSE)
|
||||
EVT_END_SWITCH
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
NpcSettings N(NpcSettings_Goompa) = {
|
||||
.defaultAnim = ANIM_Goompa_Idle,
|
||||
.height = 24,
|
||||
.radius = 24,
|
||||
.otherAI = &N(EVS_NpcAuxAI_Goompa),
|
||||
.onInteract = &N(EVS_NpcInteract_Goompa),
|
||||
.ai = &N(EVS_NpcAI_Goompa),
|
||||
.aux = &N(EVS_NpcAux_Goompa),
|
||||
.onDefeat = &N(EVS_NpcDefeat_Goompa),
|
||||
.flags = ENEMY_FLAGS_1 | ENEMY_FLAGS_4 | ENEMY_FLAGS_100,
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInit_JrTroopa) = {
|
||||
EVT_CALL(SetNpcPos, NPC_SELF, 0, -1000, 0)
|
||||
EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE)
|
||||
EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_JrTroopa)))
|
||||
EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_JrTroopa)))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
StaticNpc N(NpcData_JrTroopa) = {
|
||||
.id = NPC_JrTroopa,
|
||||
.settings = &N(NpcSettings_JrTroopa),
|
||||
.pos = { NPC_DISPOSE_LOCATION },
|
||||
.yaw = 0,
|
||||
.flags = NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING | NPC_FLAG_40000 | NPC_FLAG_200000 | NPC_FLAG_NO_DROPS,
|
||||
.init = &N(EVS_NpcInit_JrTroopa),
|
||||
.drops = {
|
||||
.dropFlags = NPC_DROP_FLAGS_80,
|
||||
.heartDrops = NO_DROPS,
|
||||
.flowerDrops = NO_DROPS,
|
||||
},
|
||||
.animations = {
|
||||
.idle = ANIM_JrTroopa_Idle,
|
||||
.walk = ANIM_JrTroopa_Walk,
|
||||
.run = ANIM_JrTroopa_Walk,
|
||||
.chase = ANIM_JrTroopa_Walk,
|
||||
.anim_4 = ANIM_JrTroopa_Idle,
|
||||
.anim_5 = ANIM_JrTroopa_Idle,
|
||||
.death = ANIM_JrTroopa_Idle,
|
||||
.hit = ANIM_JrTroopa_Idle,
|
||||
.anim_8 = ANIM_JrTroopa_Idle,
|
||||
.anim_9 = ANIM_JrTroopa_Idle,
|
||||
.anim_A = ANIM_JrTroopa_Idle,
|
||||
.anim_B = ANIM_JrTroopa_Idle,
|
||||
.anim_C = ANIM_JrTroopa_Idle,
|
||||
.anim_D = ANIM_JrTroopa_Idle,
|
||||
.anim_E = ANIM_JrTroopa_Idle,
|
||||
.anim_F = ANIM_JrTroopa_Idle,
|
||||
},
|
||||
};
|
||||
|
||||
StaticNpc N(NpcData_Goompa) = {
|
||||
.id = NPC_Goompa,
|
||||
.settings = &N(NpcSettings_Goompa),
|
||||
.pos = { -58.0f, 0.0f, 130.0f },
|
||||
.yaw = 0,
|
||||
.flags = NPC_FLAG_100 | NPC_FLAG_200000,
|
||||
.animations = {
|
||||
},
|
||||
};
|
||||
|
||||
NpcGroupList N(DefaultNPCs) = {
|
||||
NPC_GROUP(N(NpcData_JrTroopa), BTL_KMR_PART_3_FORMATION_02),
|
||||
NPC_GROUP(N(NpcData_Goompa)),
|
||||
{}
|
||||
};
|
24
src/world/area_kmr/kmr_04/kmr_04_4_entity.c
Normal file
24
src/world/area_kmr/kmr_04/kmr_04_4_entity.c
Normal file
@ -0,0 +1,24 @@
|
||||
#include "kmr_04.h"
|
||||
#include "entity.h"
|
||||
|
||||
EvtScript N(EVS_OnSmashBlock) = {
|
||||
EVT_SET(GF_KMR04_Hammer1Block, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_MakeEntities) = {
|
||||
EVT_IF_EQ(GF_KMR04_Hammer1Block, FALSE)
|
||||
EVT_CALL(MakeEntity, EVT_PTR(Entity_Hammer1Block), -80, 0, 400, 0, MAKE_ENTITY_END)
|
||||
EVT_CALL(AssignScript, EVT_PTR(N(EVS_OnSmashBlock)))
|
||||
EVT_END_IF
|
||||
EVT_CALL(MakeEntity, EVT_PTR(Entity_BrickBlock), -230, 60, -140, 0, MAKE_ENTITY_END)
|
||||
EVT_CALL(MakeEntity, EVT_PTR(Entity_BrickBlock), -440, 60, 20, 0, MAKE_ENTITY_END)
|
||||
EVT_CALL(MakeEntity, EVT_PTR(Entity_BrickBlock), 60, 0, 370, 0, MAKE_ENTITY_END)
|
||||
EVT_CALL(MakeEntity, EVT_PTR(Entity_BrickBlock), 85, 0, 395, 0, MAKE_ENTITY_END)
|
||||
EVT_CALL(MakeEntity, EVT_PTR(Entity_MulticoinBlock), 100, 0, -70, 0, MAKE_ENTITY_END)
|
||||
EVT_CALL(AssignBlockFlag, GF_KMR04_MultiCoinBrick)
|
||||
EVT_CALL(MakeEntity, EVT_PTR(Entity_SavePoint), 0, 60, 0, 0, MAKE_ENTITY_END)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
562
src/world/area_kmr/kmr_04/kmr_04_5_foliage.c
Normal file
562
src/world/area_kmr/kmr_04/kmr_04_5_foliage.c
Normal file
@ -0,0 +1,562 @@
|
||||
#include "kmr_04.h"
|
||||
|
||||
#include "world/area_kmr/kmr_04/hammer_block_message.png.h"
|
||||
#include "world/area_kmr/kmr_04/hammer_block_message.png.inc.c"
|
||||
#include "world/area_kmr/kmr_04/hammer_block_message.pal.inc.c"
|
||||
|
||||
#include "common/foliage.inc.c"
|
||||
|
||||
#define NAMESPACE dup_kmr_04
|
||||
#include "world/common/todo/CheckPartnerFlags1000.inc.c"
|
||||
#define NAMESPACE kmr_04
|
||||
|
||||
#include "world/common/complete/GiveReward.inc.c"
|
||||
|
||||
static MessageImageData MessageImage;
|
||||
|
||||
API_CALLABLE(N(SetMessageImage_HammerBlock)) {
|
||||
MessageImage.raster = N(hammer_block_message_img);
|
||||
MessageImage.palette = N(hammer_block_message_pal);
|
||||
MessageImage.width = N(hammer_block_message_img_width);
|
||||
MessageImage.height = N(hammer_block_message_img_height);
|
||||
MessageImage.format = G_IM_FMT_CI;
|
||||
MessageImage.bitDepth = G_IM_SIZ_4b;
|
||||
set_message_images(&MessageImage);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
API_CALLABLE(N(GiveWoodenHammer)) {
|
||||
gPlayerData.hammerLevel = 0;
|
||||
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
API_CALLABLE(N(func_80240444_8CAD44)) {
|
||||
exec_entity_commandlist(get_entity_by_index(script->varTable[0]));
|
||||
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
EvtScript N(EVS_GotHammer) = {
|
||||
EVT_CALL(SetPlayerAnimation, ANIM_Mario_6000C)
|
||||
EVT_CALL(GetPlayerPos, LVar5, LVar6, LVar7)
|
||||
EVT_ADD(LVar6, 40)
|
||||
EVT_CALL(MakeItemEntity, ITEM_HAMMER, LVar5, LVar6, LVar7, ITEM_SPAWN_MODE_DECORATION, 0)
|
||||
EVT_SET(LVarC, LVar0)
|
||||
EVT_ADD(LVar6, 16)
|
||||
EVT_PLAY_EFFECT(EFFECT_GOT_ITEM_OUTLINE, 0, LVar5, LVar6, LVar7, EVT_FLOAT(1.0), LVar8)
|
||||
EVT_PLAY_EFFECT(EFFECT_RADIAL_SHIMMER, 9, LVar5, LVar6, LVar7, EVT_FLOAT(1.0), 100)
|
||||
EVT_EXEC(N(EVS_PushPopMusic))
|
||||
EVT_THREAD
|
||||
EVT_WAIT(4)
|
||||
EVT_CALL(GetPlayerPos, LVar3, LVar4, LVar5)
|
||||
EVT_ADD(LVar4, 50)
|
||||
EVT_ADD(LVar5, 2)
|
||||
EVT_ADD(LVar3, 8)
|
||||
EVT_PLAY_EFFECT(EFFECT_SPARKLES, 3, LVar3, LVar4, LVar5, 20)
|
||||
EVT_ADD(LVar3, -16)
|
||||
EVT_PLAY_EFFECT(EFFECT_SPARKLES, 3, LVar3, LVar4, LVar5, 20)
|
||||
EVT_END_THREAD
|
||||
EVT_LOOP(0)
|
||||
EVT_WAIT(1)
|
||||
EVT_IF_EQ(MF_Unk_12, TRUE)
|
||||
EVT_BREAK_LOOP
|
||||
EVT_END_IF
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(func_802D7B44, LVar8)
|
||||
EVT_CALL(RemoveItemEntity, LVarC)
|
||||
EVT_CALL(SetPlayerAnimation, ANIM_Mario_10002)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_OnSearch_HammerBush) = {
|
||||
EVT_CALL(AdjustCam, CAM_DEFAULT, EVT_FLOAT(8.0), 0, EVT_FLOAT(300.0), EVT_FLOAT(19.0), EVT_FLOAT(-9.0))
|
||||
EVT_SET(MF_Unk_12, FALSE)
|
||||
EVT_EXEC(N(EVS_GotHammer))
|
||||
EVT_CALL(N(GiveWoodenHammer))
|
||||
EVT_WAIT(30)
|
||||
EVT_CALL(N(SetMessageImage_HammerBlock))
|
||||
EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_Inspect_FoundHammer, 160, 40)
|
||||
EVT_SET(MF_Unk_12, TRUE)
|
||||
EVT_CALL(DisablePartnerAI, 0)
|
||||
EVT_WAIT(10)
|
||||
EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_Goompa_Talk, ANIM_Goompa_Idle, 0, MSG_CH0_00AA)
|
||||
EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_Goompa_Idle)
|
||||
EVT_SET(GB_StoryProgress, STORY_CH0_FOUND_HAMMER)
|
||||
EVT_CALL(ClearPartnerMoveHistory, NPC_PARTNER)
|
||||
EVT_CALL(EnablePartnerAI)
|
||||
EVT_THREAD
|
||||
EVT_CALL(ResetCam, CAM_DEFAULT, 3)
|
||||
EVT_END_THREAD
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(Bush7_CallbackScript) = {
|
||||
EVT_IF_GE(GB_StoryProgress, STORY_CH0_FOUND_HAMMER)
|
||||
EVT_RETURN
|
||||
EVT_END_IF
|
||||
EVT_CALL(DisablePlayerInput, TRUE)
|
||||
EVT_EXEC_WAIT(N(EVS_OnSearch_HammerBush))
|
||||
EVT_CALL(DisablePlayerInput, FALSE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(Bush8_CallbackScript) = {
|
||||
EVT_IF_GE(GB_StoryProgress, STORY_CH0_FOUND_HAMMER)
|
||||
EVT_RETURN
|
||||
EVT_END_IF
|
||||
EVT_CALL(DisablePlayerInput, TRUE)
|
||||
EVT_CALL(MakeLerp, 0, 85, 20, EASING_COS_IN_OUT)
|
||||
EVT_LABEL(0)
|
||||
EVT_CALL(UpdateLerp)
|
||||
EVT_CALL(RotateModel, MODEL_o213, LVar0, 1, 0, 0)
|
||||
EVT_WAIT(1)
|
||||
EVT_IF_EQ(LVar1, 1)
|
||||
EVT_GOTO(0)
|
||||
EVT_END_IF
|
||||
EVT_EXEC_WAIT(N(EVS_OnSearch_HammerBush))
|
||||
EVT_CALL(MakeLerp, 85, 0, 20, EASING_COS_IN_OUT)
|
||||
EVT_LABEL(10)
|
||||
EVT_CALL(UpdateLerp)
|
||||
EVT_CALL(RotateModel, MODEL_o213, LVar0, 1, 0, 0)
|
||||
EVT_WAIT(1)
|
||||
EVT_IF_EQ(LVar1, 1)
|
||||
EVT_GOTO(10)
|
||||
EVT_END_IF
|
||||
EVT_CALL(DisablePlayerInput, FALSE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
FoliageModelList N(Bush1_BushModels) = {
|
||||
.count = 1,
|
||||
.models = {
|
||||
MODEL_o181,
|
||||
}
|
||||
};
|
||||
|
||||
FoliageDropList N(Bush1_Drops) = {
|
||||
.count = 1,
|
||||
.drops = {
|
||||
{
|
||||
.itemID = ITEM_COIN,
|
||||
.pos = { 248, 17, 97 },
|
||||
.spawnMode = ITEM_SPAWN_MODE_TOSS_SPAWN_ONCE,
|
||||
.pickupFlag = GF_KMR04_Bush1_Coin,
|
||||
.spawnFlag = MF_Unk_0A,
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
FoliageVectorList N(Bush1_Effects) = {
|
||||
.count = 1,
|
||||
.vectors = {
|
||||
{ 248.0f, 17.0f, 97.0f },
|
||||
}
|
||||
};
|
||||
|
||||
SearchBushConfig N(SearchBush_Bush1) = {
|
||||
.bush = &N(Bush1_BushModels),
|
||||
.drops = &N(Bush1_Drops),
|
||||
.vectors = &N(Bush1_Effects),
|
||||
};
|
||||
|
||||
FoliageModelList N(Bush2_BushModels) = {
|
||||
.count = 1,
|
||||
.models = {
|
||||
MODEL_o212,
|
||||
}
|
||||
};
|
||||
|
||||
FoliageDropList N(Bush2_Drops) = {
|
||||
.count = 1,
|
||||
.drops = {
|
||||
{
|
||||
.itemID = ITEM_COIN,
|
||||
.pos = { 99, 17, 237 },
|
||||
.spawnMode = ITEM_SPAWN_MODE_TOSS,
|
||||
.pickupFlag = GF_KMR04_Bush2_Coin,
|
||||
.spawnFlag = MF_Unk_0B,
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
FoliageVectorList N(Bush2_Effects) = {
|
||||
.count = 1,
|
||||
.vectors = {
|
||||
{ 100.0f, 19.0f, 246.0f },
|
||||
}
|
||||
};
|
||||
|
||||
SearchBushConfig N(SearchBush_Bush2) = {
|
||||
.bush = &N(Bush2_BushModels),
|
||||
.drops = &N(Bush2_Drops),
|
||||
.vectors = &N(Bush2_Effects),
|
||||
};
|
||||
|
||||
FoliageModelList N(Bush3_BushModels) = {
|
||||
.count = 1,
|
||||
.models = {
|
||||
MODEL_o235,
|
||||
}
|
||||
};
|
||||
|
||||
FoliageDropList N(Bush3_Drops) = {
|
||||
.count = 2,
|
||||
.drops = {
|
||||
{
|
||||
.itemID = ITEM_COIN,
|
||||
.pos = { 50, 18, -200 },
|
||||
.spawnMode = ITEM_SPAWN_MODE_TOSS_SPAWN_ONCE,
|
||||
.pickupFlag = GF_KMR04_Bush3_CoinA,
|
||||
.spawnFlag = MF_Unk_0C,
|
||||
},
|
||||
{
|
||||
.itemID = ITEM_COIN,
|
||||
.pos = { 50, 18, -200 },
|
||||
.spawnMode = ITEM_SPAWN_MODE_TOSS_SPAWN_ONCE,
|
||||
.pickupFlag = GF_KMR04_Bush3_CoinB,
|
||||
.spawnFlag = MF_Unk_0D,
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
FoliageVectorList N(Bush3_Effects) = {
|
||||
.count = 1,
|
||||
.vectors = {
|
||||
{ 50.0f, 18.0f, -200.0f },
|
||||
}
|
||||
};
|
||||
|
||||
SearchBushConfig N(SearchBush_Bush3) = {
|
||||
.bush = &N(Bush3_BushModels),
|
||||
.drops = &N(Bush3_Drops),
|
||||
.vectors = &N(Bush3_Effects),
|
||||
};
|
||||
|
||||
FoliageModelList N(Bush4_BushModels) = {
|
||||
.count = 1,
|
||||
.models = {
|
||||
MODEL_o182,
|
||||
}
|
||||
};
|
||||
|
||||
FoliageDropList N(Bush4_Drops) = {
|
||||
.count = 1,
|
||||
.drops = {
|
||||
{
|
||||
.itemID = ITEM_COIN,
|
||||
.pos = { -49, 20, 146 },
|
||||
.spawnMode = ITEM_SPAWN_MODE_TOSS_SPAWN_ONCE,
|
||||
.pickupFlag = GF_KMR04_Bush4_Coin,
|
||||
.spawnFlag = MF_Unk_0E,
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
FoliageVectorList N(Bush4_Effects) = {
|
||||
.count = 1,
|
||||
.vectors = {
|
||||
{ -49.0f, 20.0f, 146.0f },
|
||||
}
|
||||
};
|
||||
|
||||
SearchBushConfig N(SearchBush_Bush4) = {
|
||||
.bush = &N(Bush4_BushModels),
|
||||
.drops = &N(Bush4_Drops),
|
||||
.vectors = &N(Bush4_Effects),
|
||||
};
|
||||
|
||||
FoliageModelList N(Bush5_BushModels) = {
|
||||
.count = 1,
|
||||
.models = {
|
||||
MODEL_o205,
|
||||
}
|
||||
};
|
||||
|
||||
FoliageDropList N(Bush5_Drops) = {
|
||||
.count = 1,
|
||||
.drops = {
|
||||
{
|
||||
.itemID = ITEM_COIN,
|
||||
.pos = { -148, 16, -150 },
|
||||
.spawnMode = ITEM_SPAWN_MODE_TOSS_SPAWN_ONCE,
|
||||
.pickupFlag = GF_KMR04_Bush5_Coin,
|
||||
.spawnFlag = MF_Unk_0F,
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
FoliageVectorList N(Bush5_Effects) = {
|
||||
.count = 1,
|
||||
.vectors = {
|
||||
{ -148.0f, 16.0f, -150.0f },
|
||||
}
|
||||
};
|
||||
|
||||
SearchBushConfig N(SearchBush_Bush5) = {
|
||||
.bush = &N(Bush5_BushModels),
|
||||
.drops = &N(Bush5_Drops),
|
||||
.vectors = &N(Bush5_Effects),
|
||||
};
|
||||
|
||||
FoliageModelList N(Bush8_BushModels) = {
|
||||
.count = 1,
|
||||
.models = {
|
||||
MODEL_o213,
|
||||
}
|
||||
};
|
||||
|
||||
FoliageVectorList N(Bush8_Effects) = {
|
||||
.count = 1,
|
||||
.vectors = {
|
||||
{ -224.0f, 20.0f, 96.0f },
|
||||
}
|
||||
};
|
||||
|
||||
SearchBushConfig N(SearchBush_Bush7) = {
|
||||
.bush = &N(Bush8_BushModels),
|
||||
.vectors = &N(Bush8_Effects),
|
||||
.callback = &N(Bush7_CallbackScript),
|
||||
};
|
||||
|
||||
SearchBushConfig N(SearchBush_Bush8) = {
|
||||
.bush = &N(Bush8_BushModels),
|
||||
.vectors = &N(Bush8_Effects),
|
||||
.callback = &N(Bush8_CallbackScript),
|
||||
};
|
||||
|
||||
FoliageModelList N(Bush6_BushModels) = {
|
||||
.count = 1,
|
||||
.models = {
|
||||
MODEL_o213,
|
||||
}
|
||||
};
|
||||
|
||||
FoliageVectorList N(Bush6_Effects) = {
|
||||
.count = 1,
|
||||
.vectors = {
|
||||
{ -224.0f, 20.0f, 96.0f },
|
||||
}
|
||||
};
|
||||
|
||||
SearchBushConfig N(SearchBush_Bush6) = {
|
||||
.bush = &N(Bush6_BushModels),
|
||||
.vectors = &N(Bush6_Effects),
|
||||
};
|
||||
|
||||
FoliageModelList N(Bush9_BushModels) = {
|
||||
.count = 1,
|
||||
.models = {
|
||||
MODEL_o239,
|
||||
}
|
||||
};
|
||||
|
||||
FoliageVectorList N(Bush9_Effects) = {
|
||||
.count = 1,
|
||||
.vectors = {
|
||||
{ -174.0f, 19.0f, 296.0f },
|
||||
}
|
||||
};
|
||||
|
||||
SearchBushConfig N(SearchBush_Bush9) = {
|
||||
.bush = &N(Bush9_BushModels),
|
||||
.vectors = &N(Bush9_Effects),
|
||||
};
|
||||
|
||||
FoliageModelList N(Tree1_LeafModels) = {
|
||||
.count = 1,
|
||||
.models = {
|
||||
MODEL_o237,
|
||||
}
|
||||
};
|
||||
|
||||
FoliageModelList N(Tree1_TrunkModels) = {
|
||||
.count = 1,
|
||||
.models = {
|
||||
MODEL_o236,
|
||||
}
|
||||
};
|
||||
|
||||
FoliageDropList N(Tree1_Drops) = {
|
||||
.count = 1,
|
||||
.drops = {
|
||||
{
|
||||
.itemID = ITEM_COIN,
|
||||
.pos = { -302, 128, 2 },
|
||||
.spawnMode = ITEM_SPAWN_MODE_FALL_SPAWN_ONCE,
|
||||
.pickupFlag = GF_KMR04_Tree1_Coin,
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
FoliageVectorList N(Tree1_Effects) = {
|
||||
.count = 2,
|
||||
.vectors = {
|
||||
{ -391.0f, 150.0f, 20.0f },
|
||||
{ -267.0f, 150.0f, 22.0f },
|
||||
}
|
||||
};
|
||||
|
||||
ShakeTreeConfig N(ShakeTree_Tree1) = {
|
||||
.leaves = &N(Tree1_LeafModels),
|
||||
.trunk = &N(Tree1_TrunkModels),
|
||||
.drops = &N(Tree1_Drops),
|
||||
.vectors = &N(Tree1_Effects),
|
||||
};
|
||||
|
||||
BombTrigger N(BombPos_Tree1) = {
|
||||
.pos = { -352.0f, 0.0f, 10.0f },
|
||||
.radius = 0.0f
|
||||
};
|
||||
|
||||
FoliageModelList N(Tree2_LeafModels) = {
|
||||
.count = 1,
|
||||
.models = {
|
||||
MODEL_o194,
|
||||
}
|
||||
};
|
||||
|
||||
FoliageModelList N(Tree2_TrunkModels) = {
|
||||
.count = 1,
|
||||
.models = {
|
||||
MODEL_o193,
|
||||
}
|
||||
};
|
||||
|
||||
FoliageDropList N(Tree2_Drops) = {
|
||||
.count = 1,
|
||||
.drops = {
|
||||
{
|
||||
.itemID = ITEM_COIN,
|
||||
.pos = { -96, 132, -255 },
|
||||
.spawnMode = ITEM_SPAWN_MODE_TOSS_SPAWN_ONCE,
|
||||
.pickupFlag = GF_KMR04_Tree2_Coin,
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
FoliageVectorList N(Tree2_Effects) = {
|
||||
.count = 2,
|
||||
.vectors = {
|
||||
{ -156.0f, 150.0f, -255.0f },
|
||||
{ -32.0f, 150.0f, -272.0f },
|
||||
}
|
||||
};
|
||||
|
||||
ShakeTreeConfig N(ShakeTree_Tree2) = {
|
||||
.leaves = &N(Tree2_LeafModels),
|
||||
.trunk = &N(Tree2_TrunkModels),
|
||||
.drops = &N(Tree2_Drops),
|
||||
.vectors = &N(Tree2_Effects),
|
||||
};
|
||||
|
||||
BombTrigger N(BombPos_Tree2) = {
|
||||
.pos = { -92.0f, 0.0f, -295.0f },
|
||||
.radius = 0.0f
|
||||
};
|
||||
|
||||
EvtScript N(Tree3_CallbackScript) = {
|
||||
EVT_IF_EQ(GF_KMR04_Tree3_Dolly, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END_IF
|
||||
EVT_IF_EQ(AF_KMR_09, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END_IF
|
||||
EVT_WAIT(15)
|
||||
EVT_CALL(MakeItemEntity, ITEM_DOLLY, 250, 132, -100, ITEM_SPAWN_MODE_FALL_NEVER_VANISH, GF_KMR04_Tree3_Dolly)
|
||||
EVT_SET(AF_KMR_09, TRUE)
|
||||
EVT_THREAD
|
||||
EVT_LABEL(10)
|
||||
EVT_IF_EQ(GF_KMR04_Tree3_Dolly, FALSE)
|
||||
EVT_WAIT(1)
|
||||
EVT_GOTO(10)
|
||||
EVT_END_IF
|
||||
EVT_CALL(GetCurrentPartnerID, LVar0)
|
||||
EVT_IF_EQ(LVar0, PARTNER_GOOMPA)
|
||||
EVT_CALL(DisablePlayerInput, TRUE)
|
||||
EVT_WAIT(5)
|
||||
EVT_CALL(DisablePartnerAI, 0)
|
||||
EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_Goompa_Talk, ANIM_Goompa_Idle, 0, MSG_CH0_00AB)
|
||||
EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_Goompa_Idle)
|
||||
EVT_CALL(EnablePartnerAI)
|
||||
EVT_CALL(DisablePlayerInput, FALSE)
|
||||
EVT_END_IF
|
||||
EVT_END_THREAD
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
FoliageModelList N(Tree3_LeafModels) = {
|
||||
.count = 1,
|
||||
.models = {
|
||||
MODEL_o192,
|
||||
}
|
||||
};
|
||||
|
||||
FoliageModelList N(Tree3_TrunkModels) = {
|
||||
.count = 1,
|
||||
.models = {
|
||||
MODEL_o191,
|
||||
}
|
||||
};
|
||||
|
||||
FoliageVectorList N(Tree3_Effects) = {
|
||||
.count = 2,
|
||||
.vectors = {
|
||||
{ 190.0f, 150.0f, -124.0f },
|
||||
{ 295.0f, 150.0f, -124.0f },
|
||||
}
|
||||
};
|
||||
|
||||
ShakeTreeConfig N(ShakeTree_Tree3) = {
|
||||
.leaves = &N(Tree3_LeafModels),
|
||||
.trunk = &N(Tree3_TrunkModels),
|
||||
.vectors = &N(Tree3_Effects),
|
||||
.callback = &N(Tree3_CallbackScript),
|
||||
};
|
||||
|
||||
BombTrigger N(BombPos_Tree3) = {
|
||||
.pos = { 248.0f, 0.0f, -122.0f },
|
||||
.radius = 0.0f
|
||||
};
|
||||
|
||||
EvtScript N(EVS_SetupFoliage) = {
|
||||
EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush1)))
|
||||
EVT_BIND_TRIGGER(EVT_PTR(N(searchBush)), TRIGGER_WALL_PRESS_A, COLLIDER_o402, 1, 0)
|
||||
EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush2)))
|
||||
EVT_BIND_TRIGGER(EVT_PTR(N(searchBush)), TRIGGER_WALL_PRESS_A, COLLIDER_o415, 1, 0)
|
||||
EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush3)))
|
||||
EVT_BIND_TRIGGER(EVT_PTR(N(searchBush)), TRIGGER_WALL_PRESS_A, COLLIDER_o409, 1, 0)
|
||||
EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush4)))
|
||||
EVT_BIND_TRIGGER(EVT_PTR(N(searchBush)), TRIGGER_WALL_PRESS_A, COLLIDER_o412, 1, 0)
|
||||
EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush5)))
|
||||
EVT_BIND_TRIGGER(EVT_PTR(N(searchBush)), TRIGGER_WALL_PRESS_A, COLLIDER_o399, 1, 0)
|
||||
EVT_IF_GE(GB_StoryProgress, STORY_CH0_FOUND_HAMMER)
|
||||
EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush6)))
|
||||
EVT_BIND_TRIGGER(EVT_PTR(N(searchBush)), TRIGGER_WALL_PRESS_A, COLLIDER_o410, 1, 0)
|
||||
EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush6)))
|
||||
EVT_BIND_TRIGGER(EVT_PTR(N(searchBush)), TRIGGER_WALL_PRESS_A, COLLIDER_o410_1, 1, 0)
|
||||
EVT_ELSE
|
||||
EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush7)))
|
||||
EVT_BIND_TRIGGER(EVT_PTR(N(searchBush)), TRIGGER_WALL_PRESS_A, COLLIDER_o410, 1, 0)
|
||||
EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush8)))
|
||||
EVT_BIND_TRIGGER(EVT_PTR(N(searchBush)), TRIGGER_WALL_PRESS_A, COLLIDER_o410_1, 1, 0)
|
||||
EVT_END_IF
|
||||
EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush9)))
|
||||
EVT_BIND_TRIGGER(EVT_PTR(N(searchBush)), TRIGGER_WALL_PRESS_A, COLLIDER_o413, 1, 0)
|
||||
EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree1)))
|
||||
EVT_BIND_TRIGGER(EVT_PTR(N(shakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o407, 1, 0)
|
||||
EVT_BIND_TRIGGER(EVT_PTR(N(shakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree1)), 1, 0)
|
||||
EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree2)))
|
||||
EVT_BIND_TRIGGER(EVT_PTR(N(shakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o271, 1, 0)
|
||||
EVT_BIND_TRIGGER(EVT_PTR(N(shakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree2)), 1, 0)
|
||||
EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree3)))
|
||||
EVT_BIND_TRIGGER(EVT_PTR(N(shakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o341, 1, 0)
|
||||
EVT_BIND_TRIGGER(EVT_PTR(N(shakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree3)), 1, 0)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
@ -1,6 +0,0 @@
|
||||
#include "kmr_05.h"
|
||||
|
||||
static char* N(exit_str_0) = "kmr_03";
|
||||
static char* N(exit_str_1) = "kmr_02";
|
||||
|
||||
#include "world/common/enemy/ai/FlyingAI.inc.c"
|
@ -1,13 +0,0 @@
|
||||
#include "kmr_05.h"
|
||||
|
||||
#include "common/foliage.inc.c"
|
||||
|
||||
ApiStatus func_8024173C_8CF7AC(Evt* script, s32 isInitialCall) {
|
||||
if (get_enemy_safe(6) == NULL) {
|
||||
script->varTable[0] = FALSE;
|
||||
} else {
|
||||
script->varTable[0] = 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