mirror of
https://github.com/pmret/papermario.git
synced 2024-11-08 12:02:30 +01:00
area_mac (#884)
* mac_00 match * mac_00 cleanup pass * enough mac_00 cleanup * mac_01 match * cleanup pass 1 * first pass done * more * unkfoldfunc dedupe * quick * mockup * new splat segment * git subrepo pull --force tools/splat subrepo: subdir: "tools/splat" merged: "b2d7b86185" upstream: origin: "https://github.com/ethteck/splat.git" branch: "master" commit: "b2d7b86185" git-subrepo: version: "0.4.5" origin: "https://github.com/ingydotnet/git-subrepo" commit: "aa416e4" * fix custom segment * git subrepo pull --force tools/splat subrepo: subdir: "tools/splat" merged: "0f66e7552a" upstream: origin: "https://github.com/ethteck/splat.git" branch: "master" commit: "0f66e7552a" git-subrepo: version: "0.4.5" origin: "https://github.com/ingydotnet/git-subrepo" commit: "aa416e4" * common vtx * victory * checkpoint * remove map-specific subaligns * enough * quick fixes Co-authored-by: HailSanta <Hail2Santa@gmail.com> Co-authored-by: Ethan Roseman <ethteck@gmail.com>
This commit is contained in:
parent
ff3835672d
commit
e4283f3ea1
@ -1664,7 +1664,7 @@ enum ItemIDs {
|
||||
ITEM_LETTER06 = 0x0000003B,
|
||||
ITEM_LETTER07 = 0x0000003C,
|
||||
ITEM_LETTER08 = 0x0000003D,
|
||||
ITEM_LETTER09 = 0x0000003E,
|
||||
ITEM_LETTER_TO_MINHT = 0x0000003E,
|
||||
ITEM_UNUSED_LETTER02 = 0x0000003F,
|
||||
ITEM_LETTER10 = 0x00000040,
|
||||
ITEM_LETTER11 = 0x00000041,
|
||||
@ -3067,7 +3067,7 @@ enum ItemEntityFlags {
|
||||
ITEM_ENTITY_FLAGS_CAM2 = 0x00000004,
|
||||
ITEM_ENTITY_FLAGS_CAM3 = 0x00000008,
|
||||
ITEM_ENTITY_FLAGS_10 = 0x00000010,
|
||||
ITEM_ENTITY_FLAGS_40 = 0x00000040,
|
||||
ITEM_ENTITY_FLAGS_HIDDEN = 0x00000040, // do not render; player cant pickup
|
||||
ITEM_ENTITY_FLAGS_80 = 0x00000080,
|
||||
ITEM_ENTITY_FLAGS_100 = 0x00000100,
|
||||
ITEM_ENTITY_FLAGS_NEVER_VANISH = 0x00000200,
|
||||
@ -3430,7 +3430,7 @@ enum PopupType {
|
||||
POPUP_MENU_READ_DIARY_PAGE = 0xA,
|
||||
POPUP_MENU_READ_POSTCARD = 0xB,
|
||||
POPUP_MENU_USEKEY = 0xC,
|
||||
POPUP_MENU_D = 0xD,
|
||||
POPUP_MENU_POST_OFFICE = 0xD,
|
||||
};
|
||||
|
||||
/// not really
|
||||
@ -4314,6 +4314,44 @@ enum TexPanner {
|
||||
TEX_PANNER_AUX = 1,
|
||||
};
|
||||
|
||||
enum CustomGfxUnit {
|
||||
CUSTOM_GFX_0 = 0x00,
|
||||
CUSTOM_GFX_1 = 0x01,
|
||||
CUSTOM_GFX_2 = 0x02,
|
||||
CUSTOM_GFX_3 = 0x03,
|
||||
CUSTOM_GFX_4 = 0x04,
|
||||
CUSTOM_GFX_5 = 0x05,
|
||||
CUSTOM_GFX_6 = 0x06,
|
||||
CUSTOM_GFX_7 = 0x07,
|
||||
CUSTOM_GFX_8 = 0x08,
|
||||
CUSTOM_GFX_9 = 0x09,
|
||||
CUSTOM_GFX_A = 0x0A,
|
||||
CUSTOM_GFX_B = 0x0B,
|
||||
CUSTOM_GFX_C = 0x0C,
|
||||
CUSTOM_GFX_D = 0x0D,
|
||||
CUSTOM_GFX_E = 0x0E,
|
||||
CUSTOM_GFX_F = 0x0F,
|
||||
};
|
||||
|
||||
enum CopiedVtxUnit {
|
||||
VTX_COPY_0 = 0x0,
|
||||
VTX_COPY_1 = 0x1,
|
||||
VTX_COPY_2 = 0x2,
|
||||
VTX_COPY_3 = 0x3,
|
||||
VTX_COPY_4 = 0x4,
|
||||
VTX_COPY_5 = 0x5,
|
||||
VTX_COPY_6 = 0x6,
|
||||
VTX_COPY_7 = 0x7,
|
||||
VTX_COPY_8 = 0x8,
|
||||
VTX_COPY_9 = 0x9,
|
||||
VTX_COPY_A = 0xA,
|
||||
VTX_COPY_B = 0xB,
|
||||
VTX_COPY_C = 0xC,
|
||||
VTX_COPY_D = 0xD,
|
||||
VTX_COPY_E = 0xE,
|
||||
VTX_COPY_F = 0xF,
|
||||
};
|
||||
|
||||
enum EnemyFlags {
|
||||
ENEMY_FLAGS_1 = 0x00000001,
|
||||
ENEMY_FLAGS_2 = 0x00000002,
|
||||
|
@ -1046,7 +1046,7 @@ void load_tattle_flags(s32);
|
||||
s32 use_consumable(s32 invSlot);
|
||||
void remove_consumable(void);
|
||||
void delete_shadow(s32);
|
||||
void repartner_set_tether_distance(void);
|
||||
void partner_reset_tether_distance(void);
|
||||
void save_tattle_flags(s32);
|
||||
void update_merlee_messages(void);
|
||||
void draw_merlee_messages(void);
|
||||
|
@ -94,7 +94,7 @@ typedef struct ModelLocalVertexCopy {
|
||||
/* 0x18 */ s32 selector;
|
||||
} ModelLocalVertexCopy; // size = 0x1C
|
||||
|
||||
typedef ModelLocalVertexCopy* ModelLocalVertexCopyList[0];
|
||||
typedef ModelLocalVertexCopy* ModelLocalVertexCopyList[16];
|
||||
|
||||
typedef struct ModelTreeInfo {
|
||||
/* 0x00 */ u8 modelIndex;
|
||||
|
@ -184,6 +184,7 @@ ApiStatus SetPlayerJumpscale(Evt* script, s32 isInitialCall);
|
||||
ApiStatus SetPlayerAnimation(Evt* script, s32 isInitialCall);
|
||||
ApiStatus SetPlayerActionState(Evt* script, s32 isInitialCall);
|
||||
ApiStatus PlayerMoveTo(Evt* script, s32 isInitialCall);
|
||||
ApiStatus func_802D1270(Evt* script, s32 isInitialCall);
|
||||
ApiStatus PlayerJump(Evt* script, s32 isInitialCall);
|
||||
ApiStatus PlayerJump1(Evt* script, s32 isInitialCall);
|
||||
ApiStatus PlayerJump2(Evt* script, s32 isInitialCall);
|
||||
@ -234,6 +235,7 @@ ApiStatus FadeOutMusic(Evt* script, s32 isInitialCall);
|
||||
ApiStatus SetMusicTrack(Evt* script, s32 isInitialCall);
|
||||
ApiStatus FadeInMusic(Evt* script, s32 isInitialCall);
|
||||
ApiStatus EnableMusicProximityMix(Evt* script, s32 isInitialCall);
|
||||
ApiStatus AdjustMusicProximityMix(Evt* script, s32 isInitialCall);
|
||||
ApiStatus SetMusicTrackVolumes(Evt* script, s32 isInitialCall);
|
||||
ApiStatus ClearAmbientSounds(Evt* script, s32 isInitialCall);
|
||||
ApiStatus PlayAmbientSounds(Evt* script, s32 isInitialCall);
|
||||
@ -242,6 +244,7 @@ ApiStatus PlaySoundWithVolume(Evt* script, s32 isInitialCall);
|
||||
ApiStatus PlaySoundAt(Evt* script, s32 isInitialCall);
|
||||
ApiStatus StopSound(Evt* script, s32 isInitialCall);
|
||||
ApiStatus UseDoorSounds(Evt* script, s32 isInitialCall);
|
||||
ApiStatus UseAdvancedDoorSounds(Evt* script, s32 isInitialCall);
|
||||
ApiStatus PlaySoundAtF(Evt* script, s32 isInitialCall);
|
||||
ApiStatus RemoveKeyItemAt(Evt* script, s32 isInitialCall);
|
||||
ApiStatus RemoveItemAt(Evt* script, s32 isInitialCall);
|
||||
|
@ -32,6 +32,8 @@ extern EvtScript ExitDoubleDoor;
|
||||
extern EvtScript EnterDoubleDoor;
|
||||
extern EvtScript ExitSplitDoubleDoor;
|
||||
extern EvtScript EnterSplitDoubleDoor;
|
||||
extern EvtScript BaseExitDoor;
|
||||
extern EvtScript BaseEnterDoor;
|
||||
extern EvtScript EnterPostPipe;
|
||||
|
||||
#endif
|
||||
|
@ -1248,7 +1248,7 @@ void check_for_interactables(void) {
|
||||
|
||||
if (!(playerStatus->animFlags & PA_FLAGS_INTERACT_PROMPT_AVAILABLE)) {
|
||||
func_800EF3D4(0);
|
||||
repartner_set_tether_distance();
|
||||
partner_reset_tether_distance();
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -108,7 +108,7 @@ void hide_popup_menu(void) {
|
||||
break;
|
||||
case POPUP_MENU_READ_DIARY_PAGE:
|
||||
case POPUP_MENU_READ_POSTCARD:
|
||||
case POPUP_MENU_D:
|
||||
case POPUP_MENU_POST_OFFICE:
|
||||
set_window_update(WINDOW_ID_14, (s32) basic_hidden_window_update);
|
||||
break;
|
||||
}
|
||||
@ -131,7 +131,7 @@ void hide_popup_menu(void) {
|
||||
break;
|
||||
case POPUP_MENU_READ_DIARY_PAGE:
|
||||
case POPUP_MENU_READ_POSTCARD:
|
||||
case POPUP_MENU_D:
|
||||
case POPUP_MENU_POST_OFFICE:
|
||||
set_window_update(WINDOW_ID_14, 2);
|
||||
break;
|
||||
}
|
||||
@ -217,7 +217,7 @@ void func_800F16CC(void) {
|
||||
break;
|
||||
case POPUP_MENU_READ_DIARY_PAGE:
|
||||
case POPUP_MENU_READ_POSTCARD:
|
||||
case POPUP_MENU_D:
|
||||
case POPUP_MENU_POST_OFFICE:
|
||||
set_window_update(WINDOW_ID_14, (s32) basic_window_update);
|
||||
sfx_play_sound(SOUND_1);
|
||||
break;
|
||||
@ -244,7 +244,7 @@ void func_800F16CC(void) {
|
||||
break;
|
||||
case POPUP_MENU_READ_DIARY_PAGE:
|
||||
case POPUP_MENU_READ_POSTCARD:
|
||||
case POPUP_MENU_D:
|
||||
case POPUP_MENU_POST_OFFICE:
|
||||
set_window_update(WINDOW_ID_14, 1);
|
||||
break;
|
||||
}
|
||||
@ -442,7 +442,7 @@ s32 popup_menu_update(void) {
|
||||
set_window_update(WINDOW_ID_15, WINDOW_UPDATE_SHOW);
|
||||
set_window_update(WINDOW_ID_17, WINDOW_UPDATE_HIDE);
|
||||
break;
|
||||
case POPUP_MENU_D:
|
||||
case POPUP_MENU_POST_OFFICE:
|
||||
set_window_properties(WINDOW_ID_14, posX, posY, 0x83, (D_8010D656 * 13) + 0x1A, 0x14, popup_menu_draw_menu_contents, NULL, -1);
|
||||
set_window_properties(WINDOW_ID_17, 0xA, -6, 0x72, 0x10, 0x15, popup_menu_draw_title_contents, NULL, 0xE);
|
||||
set_window_update(WINDOW_ID_15, WINDOW_UPDATE_HIDE);
|
||||
@ -498,7 +498,7 @@ s32 popup_menu_update(void) {
|
||||
break;
|
||||
case POPUP_MENU_SWITCH_PARTNER:
|
||||
case POPUP_MENU_THROW_AWAY_ITEM:
|
||||
case POPUP_MENU_D:
|
||||
case POPUP_MENU_POST_OFFICE:
|
||||
set_window_properties(WINDOW_ID_21, posX, posY, 0x90, 0x28, 0x14, func_800F4944, NULL, -1);
|
||||
break;
|
||||
case POPUP_MENU_TRADE_FOR_BADGE:
|
||||
@ -538,7 +538,7 @@ s32 popup_menu_update(void) {
|
||||
break;
|
||||
case POPUP_MENU_READ_DIARY_PAGE:
|
||||
case POPUP_MENU_READ_POSTCARD:
|
||||
case POPUP_MENU_D:
|
||||
case POPUP_MENU_POST_OFFICE:
|
||||
set_window_update(WINDOW_ID_14, WINDOW_UPDATE_SHOW);
|
||||
break;
|
||||
}
|
||||
@ -565,7 +565,7 @@ s32 popup_menu_update(void) {
|
||||
break;
|
||||
case POPUP_MENU_READ_DIARY_PAGE:
|
||||
case POPUP_MENU_READ_POSTCARD:
|
||||
case POPUP_MENU_D:
|
||||
case POPUP_MENU_POST_OFFICE:
|
||||
set_window_update(WINDOW_ID_14, (s32)basic_window_update);
|
||||
sfx_play_sound(SOUND_1);
|
||||
break;
|
||||
@ -650,7 +650,7 @@ s32 popup_menu_update(void) {
|
||||
D_8010D640 = -2;
|
||||
}
|
||||
break;
|
||||
case POPUP_MENU_D:
|
||||
case POPUP_MENU_POST_OFFICE:
|
||||
sfx_play_sound(SOUND_MENU_NEXT);
|
||||
if (!D_8010D68E) {
|
||||
D_8010D640 = -1;
|
||||
@ -705,7 +705,7 @@ s32 popup_menu_update(void) {
|
||||
case POPUP_MENU_TAKE_FROM_CHEST:
|
||||
case POPUP_MENU_READ_DIARY_PAGE:
|
||||
case POPUP_MENU_READ_POSTCARD:
|
||||
case POPUP_MENU_D:
|
||||
case POPUP_MENU_POST_OFFICE:
|
||||
buttons = BUTTON_B;
|
||||
break;
|
||||
default:
|
||||
@ -800,7 +800,7 @@ s32 popup_menu_update(void) {
|
||||
break;
|
||||
case POPUP_MENU_READ_DIARY_PAGE:
|
||||
case POPUP_MENU_READ_POSTCARD:
|
||||
case POPUP_MENU_D:
|
||||
case POPUP_MENU_POST_OFFICE:
|
||||
set_window_update(WINDOW_ID_14, WINDOW_UPDATE_HIDE);
|
||||
break;
|
||||
}
|
||||
@ -913,7 +913,7 @@ s32 popup_menu_update(void) {
|
||||
break;
|
||||
case POPUP_MENU_READ_DIARY_PAGE:
|
||||
case POPUP_MENU_READ_POSTCARD:
|
||||
case POPUP_MENU_D:
|
||||
case POPUP_MENU_POST_OFFICE:
|
||||
set_window_update(WINDOW_ID_14, WINDOW_UPDATE_HIDE);
|
||||
break;
|
||||
}
|
||||
@ -989,7 +989,7 @@ s32 popup_menu_update(void) {
|
||||
break;
|
||||
case POPUP_MENU_READ_DIARY_PAGE:
|
||||
case POPUP_MENU_READ_POSTCARD:
|
||||
case POPUP_MENU_D:
|
||||
case POPUP_MENU_POST_OFFICE:
|
||||
set_window_update(WINDOW_ID_14, WINDOW_UPDATE_SHOW);
|
||||
break;
|
||||
}
|
||||
@ -1048,7 +1048,7 @@ void popup_menu_draw_title_contents(
|
||||
break;
|
||||
case POPUP_MENU_SWITCH_PARTNER:
|
||||
case POPUP_MENU_UPGRADE_PARTNER:
|
||||
case POPUP_MENU_D:
|
||||
case POPUP_MENU_POST_OFFICE:
|
||||
draw_msg(0x1D003D, baseX + 8, baseY + 2, D_8010D650, MSG_PAL_34, DRAW_MSG_STYLE_MENU);
|
||||
break;
|
||||
}
|
||||
@ -1105,7 +1105,7 @@ void func_800F4944(s32* userData, s32 baseX, s32 baseY, s32 width, s32 height, s
|
||||
baseX += 72 - (msgWidth / 2);
|
||||
draw_msg(0x1D0067, baseX, baseY, 255, MSG_PAL_0F, 0);
|
||||
break;
|
||||
case POPUP_MENU_D:
|
||||
case POPUP_MENU_POST_OFFICE:
|
||||
msgWidth = get_msg_width(0x1D006F, 0);
|
||||
baseX += 72 - (msgWidth / 2);
|
||||
draw_msg(0x1D006F, baseX, baseY - 4, 255, MSG_PAL_0F, 0);
|
||||
|
63
src/C50A0.c
63
src/C50A0.c
@ -700,20 +700,20 @@ ItemEntity* get_item_entity(s32 itemEntityIndex) {
|
||||
return gCurrentItemEntities[itemEntityIndex];
|
||||
}
|
||||
|
||||
void item_entity_disable_shadow(ItemEntity* itemEntity) {
|
||||
void hide_item_entity(ItemEntity* itemEntity) {
|
||||
Shadow* shadow;
|
||||
|
||||
itemEntity->flags |= ITEM_ENTITY_FLAGS_40;
|
||||
itemEntity->flags |= ITEM_ENTITY_FLAGS_HIDDEN;
|
||||
if (itemEntity->shadowIndex >= 0) {
|
||||
shadow = get_shadow_by_index(itemEntity->shadowIndex);
|
||||
shadow->flags |= ENTITY_FLAGS_HIDDEN;
|
||||
}
|
||||
}
|
||||
|
||||
void item_entity_enable_shadow(ItemEntity* itemEntity) {
|
||||
void reveal_item_entity(ItemEntity* itemEntity) {
|
||||
Shadow* shadow;
|
||||
|
||||
itemEntity->flags &= ~ITEM_ENTITY_FLAGS_40;
|
||||
itemEntity->flags &= ~ITEM_ENTITY_FLAGS_HIDDEN;
|
||||
if (itemEntity->shadowIndex >= 0) {
|
||||
shadow = get_shadow_by_index(itemEntity->shadowIndex);
|
||||
shadow->flags &= ~ENTITY_FLAGS_HIDDEN;
|
||||
@ -1006,7 +1006,7 @@ s32 make_item_entity(s32 itemID, f32 x, f32 y, f32 z, s32 itemSpawnMode, s32 pic
|
||||
}
|
||||
|
||||
if (itemEntity->pickupDelay != 0) {
|
||||
item_entity_disable_shadow(itemEntity);
|
||||
hide_item_entity(itemEntity);
|
||||
}
|
||||
|
||||
item_entity_load(itemEntity);
|
||||
@ -1407,9 +1407,12 @@ void draw_item_entities(void) {
|
||||
for (i = 0; i < MAX_ITEM_ENTITIES; i++) {
|
||||
ItemEntity* itemEntity = gCurrentItemEntities[i];
|
||||
|
||||
if (itemEntity != NULL && itemEntity->flags != 0 && !(itemEntity->flags & ITEM_ENTITY_FLAGS_40) &&
|
||||
(itemEntity->flags & (1 << gCurrentCamID)) && !(itemEntity->flags & ITEM_ENTITY_FLAGS_100000) &&
|
||||
!(itemEntity->renderGroup != -1 && ItemEntityRenderGroup != itemEntity->renderGroup))
|
||||
if (itemEntity != NULL
|
||||
&& itemEntity->flags != 0
|
||||
&& !(itemEntity->flags & ITEM_ENTITY_FLAGS_HIDDEN)
|
||||
&& (itemEntity->flags & (1 << gCurrentCamID))
|
||||
&& !(itemEntity->flags & ITEM_ENTITY_FLAGS_100000)
|
||||
&& (itemEntity->renderGroup == -1 || ItemEntityRenderGroup == itemEntity->renderGroup))
|
||||
{
|
||||
if (!(itemEntity->flags & ITEM_ENTITY_FLAGS_TRANSPARENT)) {
|
||||
rtPtr->renderMode = RENDER_MODE_ALPHATEST;
|
||||
@ -1476,7 +1479,7 @@ void render_item_entities(void) {
|
||||
ItemEntity* item = gCurrentItemEntities[i];
|
||||
if (item != NULL) {
|
||||
if ((item->flags != 0)) {
|
||||
if (!(item->flags & ITEM_ENTITY_FLAGS_40)) {
|
||||
if (!(item->flags & ITEM_ENTITY_FLAGS_HIDDEN)) {
|
||||
if ((item->flags & ITEM_ENTITY_FLAGS_100000)) {
|
||||
if (!(item->flags & ITEM_ENTITY_FLAGS_40000)) {
|
||||
offsetY = -4;
|
||||
@ -1716,7 +1719,7 @@ s32 test_item_player_collision(ItemEntity* item) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (item->flags & ITEM_ENTITY_FLAGS_40) {
|
||||
if (item->flags & ITEM_ENTITY_FLAGS_HIDDEN) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@ -1840,7 +1843,7 @@ s32 test_item_entity_position(f32 x, f32 y, f32 z, f32 dist) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (item->flags & ITEM_ENTITY_FLAGS_40) {
|
||||
if (item->flags & ITEM_ENTITY_FLAGS_HIDDEN) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -1929,7 +1932,7 @@ void update_item_entity_collectable(ItemEntity* item) {
|
||||
|
||||
switch (item->state) {
|
||||
case 0:
|
||||
item_entity_enable_shadow(item);
|
||||
reveal_item_entity(item);
|
||||
physData = heap_malloc(sizeof(*physData));
|
||||
item->physicsData = physData;
|
||||
ASSERT(physData != NULL);
|
||||
@ -2359,9 +2362,9 @@ void func_8013559C(ItemEntity* itemEntity) {
|
||||
if (itemEntity->spawnType != ITEM_SPAWN_MODE_TOSS_FADE1) {
|
||||
if (physicsData->unk_1C < 60) {
|
||||
if ((itemEntity->flags & ITEM_ENTITY_FLAGS_200000) || ((gGameStatusPtr->frameCounter + flag) & 1)) {
|
||||
itemEntity->flags &= ~ITEM_ENTITY_FLAGS_40;
|
||||
itemEntity->flags &= ~ITEM_ENTITY_FLAGS_HIDDEN;
|
||||
} else {
|
||||
itemEntity->flags |= ITEM_ENTITY_FLAGS_40;
|
||||
itemEntity->flags |= ITEM_ENTITY_FLAGS_HIDDEN;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@ -2410,7 +2413,7 @@ void update_item_entity_temp(ItemEntity* itemEntity) {
|
||||
gOverrideFlags |= GLOBAL_OVERRIDES_40;
|
||||
set_time_freeze_mode(TIME_FREEZE_FULL);
|
||||
}
|
||||
item_entity_disable_shadow(itemEntity);
|
||||
hide_item_entity(itemEntity);
|
||||
itemEntity->state = 1;
|
||||
}
|
||||
|
||||
@ -2530,9 +2533,9 @@ block_47: // TODO required to match
|
||||
}
|
||||
if (itemEntity->state == 0xA) {
|
||||
func_801363A0(itemEntity);
|
||||
set_window_update(0xC, (s32) basic_window_update);
|
||||
set_window_update(0x11, (s32) basic_window_update);
|
||||
set_window_update(0x13, (s32) basic_window_update);
|
||||
set_window_update(WINDOW_ID_12, (s32) basic_window_update);
|
||||
set_window_update(WINDOW_ID_17, (s32) basic_window_update);
|
||||
set_window_update(WINDOW_ID_19, (s32) basic_window_update);
|
||||
}
|
||||
increment_status_menu_disabled();
|
||||
D_801568E4 = 10;
|
||||
@ -2584,15 +2587,15 @@ block_47: // TODO required to match
|
||||
(itemEntity->flags & ITEM_ENTITY_FLAGS_4000000) ||
|
||||
(itemEntity->pickupMsgFlags & 2))
|
||||
{
|
||||
itemEntity->flags &= ~ITEM_ENTITY_FLAGS_40;
|
||||
itemEntity->flags &= ~ITEM_ENTITY_FLAGS_HIDDEN;
|
||||
}
|
||||
}
|
||||
|
||||
if (D_801568E4 == 6) {
|
||||
func_801363A0(itemEntity);
|
||||
set_window_update(0xC, (s32) basic_window_update);
|
||||
set_window_update(WINDOW_ID_12, (s32) basic_window_update);
|
||||
if (itemEntity->itemID != ITEM_STAR_PIECE && itemEntity->itemID != ITEM_COIN) {
|
||||
set_window_update(0x13, (s32) basic_window_update);
|
||||
set_window_update(WINDOW_ID_19, (s32) basic_window_update);
|
||||
}
|
||||
}
|
||||
|
||||
@ -2604,7 +2607,7 @@ block_47: // TODO required to match
|
||||
if (gGameStatusPtr->pressedButtons[0] &
|
||||
(BUTTON_STICK_RIGHT | BUTTON_STICK_LEFT | BUTTON_STICK_DOWN | BUTTON_STICK_UP | BUTTON_A | BUTTON_B))
|
||||
{
|
||||
item_entity_disable_shadow(itemEntity);
|
||||
hide_item_entity(itemEntity);
|
||||
if (func_800DFCF4() &&
|
||||
playerStatus->actionState != ACTION_STATE_USE_SPINNING_FLOWER &&
|
||||
!(playerStatus->animFlags & PA_FLAGS_NO_OOB_RESPAWN))
|
||||
@ -2615,8 +2618,8 @@ block_47: // TODO required to match
|
||||
if (gItemTable[itemEntity->itemID].typeFlags & ITEM_TYPE_FLAG_GEAR) {
|
||||
D_801568F0->data.gotItemOutline->unk_14 = 0xA;
|
||||
}
|
||||
set_window_update(0xC, (s32) basic_hidden_window_update);
|
||||
set_window_update(0x13, (s32) basic_hidden_window_update);
|
||||
set_window_update(WINDOW_ID_12, (s32) basic_hidden_window_update);
|
||||
set_window_update(WINDOW_ID_19, (s32) basic_hidden_window_update);
|
||||
itemEntity->state = 3;
|
||||
}
|
||||
break;
|
||||
@ -2646,10 +2649,10 @@ block_47: // TODO required to match
|
||||
case 5:
|
||||
msgID = 0;
|
||||
if (gItemTable[itemEntity->itemID].typeFlags & ITEM_TYPE_FLAG_CONSUMABLE) {
|
||||
msgID = 0x1D0002;
|
||||
msgID = MSG_Menus_Tutorial_GotItem;
|
||||
}
|
||||
if (itemEntity->itemID == ITEM_STAR_PIECE) {
|
||||
msgID = 0x1D0003;
|
||||
msgID = MSG_Menus_Tutorial_GotStarPiece;
|
||||
}
|
||||
D_801568F4 = msg_get_printer_for_msg(msgID, &D_801568F8);
|
||||
msg_printer_set_origin_pos(D_801568F4, 0, 0);
|
||||
@ -2699,8 +2702,8 @@ block_47: // TODO required to match
|
||||
menu->numEntries = numEntries;
|
||||
menu->initialPos = 0;
|
||||
create_popup_menu(menu);
|
||||
set_window_update(0xC, (s32) basic_hidden_window_update);
|
||||
set_window_update(0x11, (s32) basic_hidden_window_update);
|
||||
set_window_update(WINDOW_ID_12, (s32) basic_hidden_window_update);
|
||||
set_window_update(WINDOW_ID_17, (s32) basic_hidden_window_update);
|
||||
D_801568E4 = 0;
|
||||
itemEntity->state = 0xB;
|
||||
}
|
||||
@ -2746,14 +2749,14 @@ block_47: // TODO required to match
|
||||
}
|
||||
suggest_player_anim_setUnkFlag(ANIM_Mario_6000C);
|
||||
func_801363A0(itemEntity);
|
||||
set_window_update(0xC, (s32) basic_window_update);
|
||||
set_window_update(WINDOW_ID_12, (s32) basic_window_update);
|
||||
D_801568E4 = 50;
|
||||
itemEntity->state = 0xD;
|
||||
}
|
||||
break;
|
||||
case 13:
|
||||
if (gGameStatusPtr->pressedButtons[0] & BUTTON_A) {
|
||||
set_window_update(0xC, (s32) basic_hidden_window_update);
|
||||
set_window_update(WINDOW_ID_12, (s32) basic_hidden_window_update);
|
||||
itemEntity->state = 0xE;
|
||||
}
|
||||
break;
|
||||
|
@ -197,5 +197,5 @@ void func_802B79C8_E20AD8(void) {
|
||||
gPlayerStatusPtr->encounteredNPC = NULL;
|
||||
gPlayerStatusPtr->animFlags &= ~PA_FLAGS_INTERACT_PROMPT_AVAILABLE;
|
||||
func_800EF3D4(0);
|
||||
repartner_set_tether_distance();
|
||||
partner_reset_tether_distance();
|
||||
}
|
||||
|
@ -4510,16 +4510,16 @@ void mdl_local_gfx_update_vtx_pointers(Gfx* nodeDlist, Vtx* baseVtx, Gfx* arg2,
|
||||
INCLUDE_ASM(s32, "a5dd0_len_114e0", mdl_local_gfx_update_vtx_pointers);
|
||||
#endif
|
||||
|
||||
void mdl_local_gfx_copy_vertices(Vtx* from, s32 num, Vtx* to) {
|
||||
void mdl_local_gfx_copy_vertices(Vtx* src, s32 num, Vtx* dest) {
|
||||
u32 i;
|
||||
|
||||
for (i = 0; i < num * sizeof(*from); i++) {
|
||||
((u8*)to)[i] = ((u8*)from)[i];
|
||||
for (i = 0; i < num * sizeof(*src); i++) {
|
||||
((u8*)dest)[i] = ((u8*)src)[i];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void mdl_make_local_vertex_copy(s32 arg0, u16 treeIdx, s32 arg2) {
|
||||
void mdl_make_local_vertex_copy(s32 copyIndex, u16 modelID, s32 isMakingCopy) {
|
||||
s32 numVertices;
|
||||
Vtx* baseVtx;
|
||||
s32 gfxCount;
|
||||
@ -4528,13 +4528,13 @@ void mdl_make_local_vertex_copy(s32 arg0, u16 treeIdx, s32 arg2) {
|
||||
ModelLocalVertexCopy* copy;
|
||||
s32 i;
|
||||
|
||||
model = get_model_from_list_index(get_model_list_index_from_tree_index(treeIdx));
|
||||
model = get_model_from_list_index(get_model_list_index_from_tree_index(modelID));
|
||||
nodeDlist = model->modelNode->displayData->displayList;
|
||||
mdl_get_vertex_count(nodeDlist, &numVertices, &baseVtx, &gfxCount, NULL);
|
||||
|
||||
copy = (*gCurrentModelLocalVtxBuffers)[arg0] = heap_malloc(sizeof(*copy));
|
||||
copy = (*gCurrentModelLocalVtxBuffers)[copyIndex] = heap_malloc(sizeof(*copy));
|
||||
|
||||
if (arg2) {
|
||||
if (isMakingCopy) {
|
||||
for (i = 0; i < ARRAY_COUNT(copy->gfxCopy); i++) {
|
||||
copy->gfxCopy[i] = heap_malloc(gfxCount * sizeof(*copy->gfxCopy[i]));
|
||||
copy->vtxCopy[i] = heap_malloc(numVertices * sizeof(*copy->vtxCopy[i]));
|
||||
|
@ -106,54 +106,54 @@ void func_80218CEC_47FD9C(s32 arg0) {
|
||||
EvtScript N(beforeBattle_80224BD0) = {
|
||||
EVT_CALL(SetSpriteShading, -1)
|
||||
|
||||
EVT_CALL(MakeLocalVertexCopy, 0, MODEL_o345, 1)
|
||||
EVT_CALL(SetCustomGfxBuilders, 1, EVT_PTR(func_802184C0_47F570), 0)
|
||||
EVT_CALL(SetModelCustomGfx, MODEL_o345, 1, -1)
|
||||
EVT_CALL(MakeLocalVertexCopy, VTX_COPY_0, MODEL_o345, TRUE)
|
||||
EVT_CALL(SetCustomGfxBuilders, CUSTOM_GFX_1, EVT_PTR(func_802184C0_47F570), 0)
|
||||
EVT_CALL(SetModelCustomGfx, MODEL_o345, CUSTOM_GFX_1, -1)
|
||||
EVT_CALL(SetModelFlags, MODEL_o345, 128, 1)
|
||||
|
||||
EVT_CALL(MakeLocalVertexCopy, 1, MODEL_o338, 1)
|
||||
EVT_CALL(SetCustomGfxBuilders, 2, EVT_PTR(func_802184C0_47F570), 0)
|
||||
EVT_CALL(SetModelCustomGfx, MODEL_o338, 2, -1)
|
||||
EVT_CALL(MakeLocalVertexCopy, VTX_COPY_1, MODEL_o338, TRUE)
|
||||
EVT_CALL(SetCustomGfxBuilders, CUSTOM_GFX_2, EVT_PTR(func_802184C0_47F570), 0)
|
||||
EVT_CALL(SetModelCustomGfx, MODEL_o338, CUSTOM_GFX_2, -1)
|
||||
EVT_CALL(SetModelFlags, MODEL_o338, 128, 1)
|
||||
|
||||
EVT_CALL(MakeLocalVertexCopy, 2, MODEL_o344, 1)
|
||||
EVT_CALL(SetCustomGfxBuilders, 3, EVT_PTR(func_802184C0_47F570), 0)
|
||||
EVT_CALL(SetModelCustomGfx, MODEL_o344, 3, -1)
|
||||
EVT_CALL(MakeLocalVertexCopy, VTX_COPY_2, MODEL_o344, TRUE)
|
||||
EVT_CALL(SetCustomGfxBuilders, CUSTOM_GFX_3, EVT_PTR(func_802184C0_47F570), 0)
|
||||
EVT_CALL(SetModelCustomGfx, MODEL_o344, CUSTOM_GFX_3, -1)
|
||||
EVT_CALL(SetModelFlags, MODEL_o344, 128, 1)
|
||||
|
||||
EVT_CALL(MakeLocalVertexCopy, 3, MODEL_o354, 1)
|
||||
EVT_CALL(SetCustomGfxBuilders, 4, EVT_PTR(func_802184C0_47F570), 0)
|
||||
EVT_CALL(SetModelCustomGfx, MODEL_o354, 4, -1)
|
||||
EVT_CALL(MakeLocalVertexCopy, VTX_COPY_3, MODEL_o354, TRUE)
|
||||
EVT_CALL(SetCustomGfxBuilders, CUSTOM_GFX_4, EVT_PTR(func_802184C0_47F570), 0)
|
||||
EVT_CALL(SetModelCustomGfx, MODEL_o354, CUSTOM_GFX_4, -1)
|
||||
EVT_CALL(SetModelFlags, MODEL_o354, 128, 1)
|
||||
|
||||
EVT_CALL(MakeLocalVertexCopy, 4, MODEL_o341, 1)
|
||||
EVT_CALL(SetCustomGfxBuilders, 5, EVT_PTR(func_802184C0_47F570), 0)
|
||||
EVT_CALL(SetModelCustomGfx, MODEL_o341, 5, -1)
|
||||
EVT_CALL(MakeLocalVertexCopy, VTX_COPY_4, MODEL_o341, TRUE)
|
||||
EVT_CALL(SetCustomGfxBuilders, CUSTOM_GFX_5, EVT_PTR(func_802184C0_47F570), 0)
|
||||
EVT_CALL(SetModelCustomGfx, MODEL_o341, CUSTOM_GFX_5, -1)
|
||||
EVT_CALL(SetModelFlags, MODEL_o341, 128, 1)
|
||||
|
||||
EVT_CALL(MakeLocalVertexCopy, 5, MODEL_o352, 1)
|
||||
EVT_CALL(SetCustomGfxBuilders, 6, EVT_PTR(func_802186B8_47F768), 0)
|
||||
EVT_CALL(SetModelCustomGfx, MODEL_o352, 6, -1)
|
||||
EVT_CALL(MakeLocalVertexCopy, VTX_COPY_5, MODEL_o352, TRUE)
|
||||
EVT_CALL(SetCustomGfxBuilders, CUSTOM_GFX_6, EVT_PTR(func_802186B8_47F768), 0)
|
||||
EVT_CALL(SetModelCustomGfx, MODEL_o352, CUSTOM_GFX_6, -1)
|
||||
EVT_CALL(SetModelFlags, MODEL_o352, 128, 1)
|
||||
|
||||
EVT_CALL(MakeLocalVertexCopy, 6, MODEL_o346, 1)
|
||||
EVT_CALL(SetCustomGfxBuilders, 7, EVT_PTR(func_802186B8_47F768), 0)
|
||||
EVT_CALL(SetModelCustomGfx, MODEL_o346, 7, -1)
|
||||
EVT_CALL(MakeLocalVertexCopy, VTX_COPY_6, MODEL_o346, TRUE)
|
||||
EVT_CALL(SetCustomGfxBuilders, CUSTOM_GFX_7, EVT_PTR(func_802186B8_47F768), 0)
|
||||
EVT_CALL(SetModelCustomGfx, MODEL_o346, CUSTOM_GFX_7, -1)
|
||||
EVT_CALL(SetModelFlags, MODEL_o346, 128, 1)
|
||||
|
||||
EVT_CALL(MakeLocalVertexCopy, 7, MODEL_o349, 1)
|
||||
EVT_CALL(SetCustomGfxBuilders, 8, EVT_PTR(func_802189D0_47FA80), 0)
|
||||
EVT_CALL(SetModelCustomGfx, MODEL_o349, 8, -1)
|
||||
EVT_CALL(MakeLocalVertexCopy, VTX_COPY_7, MODEL_o349, TRUE)
|
||||
EVT_CALL(SetCustomGfxBuilders, CUSTOM_GFX_8, EVT_PTR(func_802189D0_47FA80), 0)
|
||||
EVT_CALL(SetModelCustomGfx, MODEL_o349, CUSTOM_GFX_8, -1)
|
||||
EVT_CALL(SetModelFlags, MODEL_o349, 128, 1)
|
||||
|
||||
EVT_CALL(MakeLocalVertexCopy, 8, MODEL_o353, 1)
|
||||
EVT_CALL(SetCustomGfxBuilders, 9, EVT_PTR(func_802189D0_47FA80), 0)
|
||||
EVT_CALL(SetModelCustomGfx, MODEL_o353, 9, -1)
|
||||
EVT_CALL(MakeLocalVertexCopy, VTX_COPY_8, MODEL_o353, TRUE)
|
||||
EVT_CALL(SetCustomGfxBuilders, CUSTOM_GFX_9, EVT_PTR(func_802189D0_47FA80), 0)
|
||||
EVT_CALL(SetModelCustomGfx, MODEL_o353, CUSTOM_GFX_9, -1)
|
||||
EVT_CALL(SetModelFlags, MODEL_o353, 128, 1)
|
||||
|
||||
EVT_CALL(MakeLocalVertexCopy, 9, MODEL_o347, 1)
|
||||
EVT_CALL(SetCustomGfxBuilders, 10, EVT_PTR(func_80218CEC_47FD9C), 0)
|
||||
EVT_CALL(SetModelCustomGfx, MODEL_o347, 10, -1)
|
||||
EVT_CALL(MakeLocalVertexCopy, VTX_COPY_9, MODEL_o347, TRUE)
|
||||
EVT_CALL(SetCustomGfxBuilders, CUSTOM_GFX_A, EVT_PTR(func_80218CEC_47FD9C), 0)
|
||||
EVT_CALL(SetModelCustomGfx, MODEL_o347, CUSTOM_GFX_A, -1)
|
||||
EVT_CALL(SetModelFlags, MODEL_o347, 128, 1)
|
||||
|
||||
EVT_THREAD
|
||||
|
@ -154,15 +154,15 @@ ApiStatus SetCustomGfxEnabled(Evt* script, s32 isInitialCall) {
|
||||
ApiStatus SetModelCustomGfx(Evt* script, s32 isInitialCall) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 treeIndex = evt_get_variable(script, *args++);
|
||||
s32 var2 = evt_get_variable(script, *args++);
|
||||
s32 customGfxUnit = evt_get_variable(script, *args++);
|
||||
s32 var3 = evt_get_variable(script, *args++);
|
||||
Model* model;
|
||||
|
||||
treeIndex = get_model_list_index_from_tree_index(treeIndex);
|
||||
model = get_model_from_list_index(treeIndex);
|
||||
|
||||
set_mdl_custom_gfx_set(model, var2, var3);
|
||||
if (var2 != -1) {
|
||||
set_mdl_custom_gfx_set(model, customGfxUnit, var3);
|
||||
if (customGfxUnit != -1) {
|
||||
model->flags |= MODEL_FLAGS_USES_CUSTOM_GFX;
|
||||
}
|
||||
return ApiStatus_DONE2;
|
||||
@ -491,11 +491,11 @@ ApiStatus EnableGroup(Evt* script, s32 isInitialCall) {
|
||||
|
||||
ApiStatus MakeLocalVertexCopy(Evt* script, s32 isInitialCall) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 var1 = evt_get_variable(script, *args++);
|
||||
u16 var2 = evt_get_variable(script, *args++);
|
||||
s32 var3 = evt_get_variable(script, *args++);
|
||||
s32 copyIndex = evt_get_variable(script, *args++);
|
||||
u16 modelID = evt_get_variable(script, *args++);
|
||||
s32 isMakingCopy = evt_get_variable(script, *args++);
|
||||
|
||||
mdl_make_local_vertex_copy(var1, var2, var3);
|
||||
mdl_make_local_vertex_copy(copyIndex, modelID, isMakingCopy);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
|
@ -55,7 +55,6 @@ extern ShopOwner N(Shop_Owner);
|
||||
|
||||
extern EvtScript ItemShopInteract;
|
||||
|
||||
|
||||
extern EvtScript N(80244450);
|
||||
|
||||
extern EvtScript N(8024CDA0);
|
||||
|
@ -52,7 +52,7 @@ extern EvtScript N(EVS_PlayRestMusic);
|
||||
extern EvtScript N(EVS_PlayMoustafaMusic);
|
||||
|
||||
extern EvtScript N(EVS_SetupBuildings);
|
||||
extern EvtScript N(EVS_SetToadHouseDialogue);
|
||||
extern EvtScript N(EVS_ToadHouse_SetDialogue);
|
||||
extern EvtScript N(8024D434);
|
||||
extern EvtScript N(EVS_ToadHouse_GetInBed);
|
||||
extern EvtScript N(EVS_ToadHouse_ReturnFromRest);
|
||||
|
@ -55,12 +55,7 @@ NpcSettings N(NpcSettings_Archeologist) = {
|
||||
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/complete/ToadHouseBlanketAnim.inc.c"
|
||||
|
||||
#include "world/common/atomic/ToadHouse.inc.c"
|
||||
#include "world/common/atomic/ToadHouse.data.inc.c"
|
||||
@ -294,7 +289,7 @@ EvtScript N(EVS_NpcInit_Mouser_03) = {
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_SetToadHouseDialogue) = {
|
||||
EvtScript N(EVS_ToadHouse_SetDialogue) = {
|
||||
EVT_SET(LVar0, MSG_CH2_00D1)
|
||||
EVT_SET(LVar8, MSG_CH2_00D2)
|
||||
EVT_SET(LVar1, MSG_CH2_00D3)
|
||||
@ -324,7 +319,7 @@ EvtScript N(EVS_ToadHouse_GetInBed) = {
|
||||
EVT_CALL(InterpPlayerYaw, 230, 1)
|
||||
EVT_CALL(HidePlayerShadow, TRUE)
|
||||
EVT_CALL(SetPlayerAnimation, ANIM_Mario_10002)
|
||||
EVT_CALL(func_802D286C, 0x00000800)
|
||||
EVT_CALL(func_802D286C, 0x800)
|
||||
EVT_CALL(func_802D2520, ANIM_Mario_10002, 5, 7, 1, 1, 0)
|
||||
EVT_THREAD
|
||||
EVT_WAIT(60)
|
||||
|
@ -1,118 +0,0 @@
|
||||
#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,
|
||||
};
|
@ -1,128 +0,0 @@
|
||||
#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,
|
||||
};
|
@ -102,7 +102,7 @@ EvtScript N(EVS_NpcInteract_Moustafa) = {
|
||||
EVT_CALL(EndSpeech, NPC_DisguisedMoustafa, ANIM_DisguisedMoustafa_Talk, ANIM_DisguisedMoustafa_Idle, 0)
|
||||
EVT_END_IF
|
||||
EVT_LABEL(1)
|
||||
EVT_CHOOSE_ANY_CONSUMABLE()
|
||||
EVT_CHOOSE_ANY_CONSUMABLE(2)
|
||||
EVT_SWITCH(LVar0)
|
||||
EVT_CASE_EQ(0)
|
||||
EVT_CALL(SpeakToPlayer, NPC_DisguisedMoustafa, ANIM_DisguisedMoustafa_Talk, ANIM_DisguisedMoustafa_Idle, 0, MSG_CH2_00B8)
|
||||
|
@ -266,8 +266,8 @@ EvtScript N(EVS_UpdateLightshow) = {
|
||||
EVT_CALL(EnableModel, MODEL_kino7, TRUE)
|
||||
EVT_CALL(EnableModel, MODEL_kino8, TRUE)
|
||||
EVT_CALL(EnableTexPanning, MODEL_kino8, TRUE)
|
||||
EVT_CALL(SetModelCustomGfx, MODEL_kino7, 1, -1)
|
||||
EVT_CALL(SetCustomGfxBuilders, 1, EVT_PTR(N(gfx_build_set_spotlight_alpha)), 0)
|
||||
EVT_CALL(SetModelCustomGfx, MODEL_kino7, CUSTOM_GFX_1, -1)
|
||||
EVT_CALL(SetCustomGfxBuilders, CUSTOM_GFX_1, EVT_PTR(N(gfx_build_set_spotlight_alpha)), 0)
|
||||
EVT_CHILD_THREAD
|
||||
EVT_CALL(MakeLerp, 0, 255, 90, EASING_LINEAR)
|
||||
EVT_LOOP(0)
|
||||
|
@ -225,14 +225,14 @@ void N(gfx_build_big_bubble)(void) {
|
||||
matrix[2][1] = (cos_rad(N(BubblePhase) / 17.0f) * 0.04);
|
||||
|
||||
guMtxF2L(matrix, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||
mdl_get_copied_vertices(0, &src, &dest, ©Count);
|
||||
mdl_get_copied_vertices(VTX_COPY_0, &src, &dest, ©Count);
|
||||
|
||||
new_var = 0;
|
||||
while (new_var); // TODO required to match
|
||||
|
||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++],
|
||||
G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(gMasterGfxPos++, mdl_get_copied_gfx(0));
|
||||
gSPDisplayList(gMasterGfxPos++, mdl_get_copied_gfx(VTX_COPY_0));
|
||||
|
||||
N(BubblePhase) += 1.0f;
|
||||
}
|
||||
@ -247,7 +247,7 @@ void N(gfx_build_bubble_flower)(void) {
|
||||
f32 openedScale; // controls how open the flower is
|
||||
f32 lengthScale; // controls longitudinal pulsing
|
||||
|
||||
mdl_get_copied_vertices(1, &verts, &copied, &numCopied);
|
||||
mdl_get_copied_vertices(VTX_COPY_1, &verts, &copied, &numCopied);
|
||||
|
||||
for (i = 0; i < numCopied; i++) {
|
||||
Vtx* src = &verts[i];
|
||||
@ -262,7 +262,7 @@ void N(gfx_build_bubble_flower)(void) {
|
||||
}
|
||||
}
|
||||
|
||||
gSPDisplayList(gMasterGfxPos++, mdl_get_copied_gfx(1));
|
||||
gSPDisplayList(gMasterGfxPos++, mdl_get_copied_gfx(VTX_COPY_1));
|
||||
|
||||
if (evt_get_variable(NULL, AF_FLO_BlowingBigBubble)) {
|
||||
if (N(FlowerPhase) > 90) {
|
||||
@ -386,17 +386,17 @@ EvtScript N(EVS_SetupBubbles) = {
|
||||
EVT_EXEC(N(EVS_ManageBlownBubble))
|
||||
EVT_SET(LVar0, CLONED_MODEL(5))
|
||||
EVT_EXEC(N(EVS_ManageBlownBubble))
|
||||
EVT_CALL(MakeLocalVertexCopy, 0, MODEL_o167, TRUE)
|
||||
EVT_CALL(SetCustomGfxBuilders, 1, EVT_PTR(N(gfx_build_big_bubble)), 0)
|
||||
EVT_CALL(SetModelCustomGfx, MODEL_o167, 1, -1)
|
||||
EVT_CALL(MakeLocalVertexCopy, VTX_COPY_0, MODEL_o167, TRUE)
|
||||
EVT_CALL(SetCustomGfxBuilders, CUSTOM_GFX_1, EVT_PTR(N(gfx_build_big_bubble)), 0)
|
||||
EVT_CALL(SetModelCustomGfx, MODEL_o167, CUSTOM_GFX_1, -1)
|
||||
EVT_CALL(SetModelCustomGfx, CLONED_MODEL(1), 1, -1)
|
||||
EVT_CALL(SetModelCustomGfx, CLONED_MODEL(2), 1, -1)
|
||||
EVT_CALL(SetModelCustomGfx, CLONED_MODEL(3), 1, -1)
|
||||
EVT_CALL(SetModelCustomGfx, CLONED_MODEL(4), 1, -1)
|
||||
EVT_CALL(SetModelCustomGfx, CLONED_MODEL(5), 1, -1)
|
||||
EVT_CALL(MakeLocalVertexCopy, 1, MODEL_o57, TRUE)
|
||||
EVT_CALL(SetCustomGfxBuilders, 2, EVT_PTR(N(gfx_build_bubble_flower)), 0)
|
||||
EVT_CALL(SetModelCustomGfx, MODEL_o57, 2, -1)
|
||||
EVT_CALL(MakeLocalVertexCopy, VTX_COPY_1, MODEL_o57, TRUE)
|
||||
EVT_CALL(SetCustomGfxBuilders, CUSTOM_GFX_2, EVT_PTR(N(gfx_build_bubble_flower)), 0)
|
||||
EVT_CALL(SetModelCustomGfx, MODEL_o57, CUSTOM_GFX_2, -1)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
@ -4,7 +4,7 @@
|
||||
EvtScript N(EVS_MakeEntities) = {
|
||||
EVT_CALL(MakeEntity, EVT_PTR(Entity_HiddenYellowBlock), 660, 60, -115, 0, ITEM_THUNDER_RAGE, MAKE_ENTITY_END)
|
||||
EVT_CALL(AssignBlockFlag, GF_FLO17_HiddenItem_ThunderRage)
|
||||
EVT_CALL(MakeItemEntity, ITEM_LETTER09, -245, 0, 105, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_FLO17_Item_Letter09)
|
||||
EVT_CALL(MakeItemEntity, ITEM_LETTER_TO_MINHT, -245, 0, 105, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_FLO17_Item_Letter09)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
@ -29,7 +29,7 @@ void func_80240434_A16654(void) {
|
||||
s32 i;
|
||||
s32 temp3;
|
||||
|
||||
mdl_get_copied_vertices(0, &firstVertex, &copiedVertices, &numVertices);
|
||||
mdl_get_copied_vertices(VTX_COPY_0, &firstVertex, &copiedVertices, &numVertices);
|
||||
|
||||
for (i = 0; i < numVertices; i++) {
|
||||
u8* colors = copiedVertices[i].v.cn;
|
||||
@ -41,7 +41,7 @@ void func_80240434_A16654(void) {
|
||||
colors[2] = colors[0] * temp3 / 0x10000;
|
||||
}
|
||||
|
||||
gSPDisplayList(gMasterGfxPos++, mdl_get_copied_gfx(0));
|
||||
gSPDisplayList(gMasterGfxPos++, mdl_get_copied_gfx(VTX_COPY_0));
|
||||
D_802433AE_A195CE += 0x253;
|
||||
}
|
||||
|
||||
@ -52,7 +52,7 @@ void func_80240610_A16830(void) {
|
||||
s32 i;
|
||||
s32 temp3;
|
||||
|
||||
mdl_get_copied_vertices(1, &firstVertex, &copiedVertices, &numVertices);
|
||||
mdl_get_copied_vertices(VTX_COPY_1, &firstVertex, &copiedVertices, &numVertices);
|
||||
|
||||
for (i = 0; i < numVertices; i++) {
|
||||
u8* colors = copiedVertices[i].v.cn;
|
||||
@ -64,7 +64,7 @@ void func_80240610_A16830(void) {
|
||||
colors[2] = colors[0] * temp3 / 0x10000 + 99.6078431372549;
|
||||
}
|
||||
|
||||
gSPDisplayList(gMasterGfxPos++, mdl_get_copied_gfx(1));
|
||||
gSPDisplayList(gMasterGfxPos++, mdl_get_copied_gfx(VTX_COPY_1));
|
||||
D_802433B0_A195D0 += 0x253;
|
||||
}
|
||||
|
||||
@ -75,7 +75,7 @@ void func_80240904_A16B24(void) {
|
||||
s32 i;
|
||||
s32 temp3;
|
||||
|
||||
mdl_get_copied_vertices(2, &firstVertex, &copiedVertices, &numVertices);
|
||||
mdl_get_copied_vertices(VTX_COPY_2, &firstVertex, &copiedVertices, &numVertices);
|
||||
|
||||
for (i = 0; i < numVertices; i++) {
|
||||
u8* colors = copiedVertices[i].v.cn;
|
||||
@ -87,7 +87,7 @@ void func_80240904_A16B24(void) {
|
||||
colors[2] = colors[0] * temp3 / 0x10000 + 59.21568627450981;
|
||||
}
|
||||
|
||||
gSPDisplayList(gMasterGfxPos++, mdl_get_copied_gfx(2));
|
||||
gSPDisplayList(gMasterGfxPos++, mdl_get_copied_gfx(VTX_COPY_2));
|
||||
D_802433B2_A195D2 += 0x253;
|
||||
}
|
||||
|
||||
@ -98,7 +98,7 @@ void func_80240BFC_A16E1C(void) {
|
||||
s32 i;
|
||||
s32 temp3;
|
||||
|
||||
mdl_get_copied_vertices(3, &firstVertex, &copiedVertices, &numVertices);
|
||||
mdl_get_copied_vertices(VTX_COPY_3, &firstVertex, &copiedVertices, &numVertices);
|
||||
|
||||
for (i = 0; i < numVertices; i++) {
|
||||
u8* colors = copiedVertices[i].v.cn;
|
||||
@ -110,7 +110,7 @@ void func_80240BFC_A16E1C(void) {
|
||||
colors[2] = colors[0] * temp3 / 0x10000 + 96.07843137254902;
|
||||
}
|
||||
|
||||
gSPDisplayList(gMasterGfxPos++, mdl_get_copied_gfx(3));
|
||||
gSPDisplayList(gMasterGfxPos++, mdl_get_copied_gfx(VTX_COPY_3));
|
||||
D_802433B4_A195D4 += 0x253;
|
||||
}
|
||||
|
||||
|
@ -20,7 +20,7 @@ void func_8024033C_A1B43C(void) {
|
||||
guRotate(&gDisplayContext->matrixStack[gMatrixListPos], angle, 0.0f, 1.0f, 0.0f);
|
||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
||||
|
||||
mdl_get_copied_vertices(1, &firstVertex, &copiedVertices, &numVertices);
|
||||
mdl_get_copied_vertices(VTX_COPY_1, &firstVertex, &copiedVertices, &numVertices);
|
||||
|
||||
for (i = 0; i < numVertices; i++) {
|
||||
u8* colors = copiedVertices[i].v.cn;
|
||||
@ -33,7 +33,7 @@ void func_8024033C_A1B43C(void) {
|
||||
}
|
||||
|
||||
gSPClearGeometryMode(gMasterGfxPos++, G_CULL_BOTH);
|
||||
gSPDisplayList(gMasterGfxPos++, mdl_get_copied_gfx(1));
|
||||
gSPDisplayList(gMasterGfxPos++, mdl_get_copied_gfx(VTX_COPY_1));
|
||||
D_80243BCE_A1ECCE += 0x666;
|
||||
}
|
||||
|
||||
@ -44,7 +44,7 @@ void func_8024060C_A1B70C(void) {
|
||||
s32 i;
|
||||
s32 temp3;
|
||||
|
||||
mdl_get_copied_vertices(2, &firstVertex, &copiedVertices, &numVertices);
|
||||
mdl_get_copied_vertices(VTX_COPY_2, &firstVertex, &copiedVertices, &numVertices);
|
||||
|
||||
for (i = 0; i < numVertices; i++) {
|
||||
u8* colors = copiedVertices[i].v.cn;
|
||||
@ -56,7 +56,7 @@ void func_8024060C_A1B70C(void) {
|
||||
colors[2] = colors[0] * temp3 / 0x10000;
|
||||
}
|
||||
|
||||
gSPDisplayList(gMasterGfxPos++, mdl_get_copied_gfx(2));
|
||||
gSPDisplayList(gMasterGfxPos++, mdl_get_copied_gfx(VTX_COPY_2));
|
||||
D_80243BD0_A1ECD0 += 0x253;
|
||||
}
|
||||
|
||||
@ -66,7 +66,7 @@ void func_802407E8_A1B8E8(void) {
|
||||
s32 numVertices;
|
||||
s32 i;
|
||||
|
||||
mdl_get_copied_vertices(0, &firstVertex, &copiedVertices, &numVertices);
|
||||
mdl_get_copied_vertices(VTX_COPY_0, &firstVertex, &copiedVertices, &numVertices);
|
||||
|
||||
for (i = 0; i < numVertices; i++) {
|
||||
Vtx* vtxDst = &copiedVertices[i];
|
||||
@ -75,7 +75,7 @@ void func_802407E8_A1B8E8(void) {
|
||||
vtxDst->v.ob[1] = vtxSrc->v.ob[1] + v0 / 0x8000;
|
||||
}
|
||||
|
||||
gSPDisplayList(gMasterGfxPos++, mdl_get_copied_gfx(0));
|
||||
gSPDisplayList(gMasterGfxPos++, mdl_get_copied_gfx(VTX_COPY_0));
|
||||
D_80243BD2_A1ECD2 += 0xA3;
|
||||
}
|
||||
|
||||
|
@ -95,8 +95,8 @@ API_CALLABLE(N(InitSplashes)) {
|
||||
|
||||
EvtScript N(EVS_MakeSplashes) = {
|
||||
EVT_CALL(N(InitSplashes))
|
||||
EVT_CALL(SetCustomGfxBuilders, 0, 0, EVT_PTR(N(gfx_build_splashes)))
|
||||
EVT_CALL(SetModelCustomGfx, MODEL_dummy_sprash2, 0, -1)
|
||||
EVT_CALL(SetCustomGfxBuilders, CUSTOM_GFX_0, 0, EVT_PTR(N(gfx_build_splashes)))
|
||||
EVT_CALL(SetModelCustomGfx, MODEL_dummy_sprash2, CUSTOM_GFX_0, -1)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
@ -217,12 +217,12 @@ EvtScript N(D_8024652C_B26A6C) = {
|
||||
|
||||
EvtScript N(EVS_802467AC) = {
|
||||
EVT_SET_GROUP(EVT_GROUP_00)
|
||||
EVT_CALL(MakeLocalVertexCopy, 1, MODEL_karada, TRUE)
|
||||
EVT_CALL(SetCustomGfxBuilders, 1, EVT_PTR(N(unkAngleFunc002)), 0)
|
||||
EVT_CALL(SetModelCustomGfx, MODEL_karada, 1, -1)
|
||||
EVT_CALL(MakeLocalVertexCopy, 2, MODEL_onaka, TRUE)
|
||||
EVT_CALL(SetCustomGfxBuilders, 2, EVT_PTR(N(unkAngleFunc003)), 0)
|
||||
EVT_CALL(SetModelCustomGfx, MODEL_onaka, 2, -1)
|
||||
EVT_CALL(MakeLocalVertexCopy, VTX_COPY_1, MODEL_karada, TRUE)
|
||||
EVT_CALL(SetCustomGfxBuilders, CUSTOM_GFX_1, EVT_PTR(N(unkAngleFunc002)), 0)
|
||||
EVT_CALL(SetModelCustomGfx, MODEL_karada, CUSTOM_GFX_1, -1)
|
||||
EVT_CALL(MakeLocalVertexCopy, VTX_COPY_2, MODEL_onaka, TRUE)
|
||||
EVT_CALL(SetCustomGfxBuilders, CUSTOM_GFX_2, EVT_PTR(N(unkAngleFunc003)), 0)
|
||||
EVT_CALL(SetModelCustomGfx, MODEL_onaka, CUSTOM_GFX_2, -1)
|
||||
EVT_THREAD
|
||||
EVT_LABEL(0)
|
||||
EVT_CALL(N(UnkAngleFunc001), 0, LVar0, LVar1, LVar2)
|
||||
|
@ -61,9 +61,9 @@ void N(make_tongue_gfx)(s32 index) {
|
||||
Vtx* vtxCopy;
|
||||
s32 numCopied;
|
||||
|
||||
mdl_get_copied_vertices(1, &vtxSrc, &vtxCopy, &numCopied);
|
||||
mdl_get_copied_vertices(VTX_COPY_1, &vtxSrc, &vtxCopy, &numCopied);
|
||||
N(add_tongue_deformation)(vtxSrc, vtxCopy, numCopied, N(TongueWiggleTime));
|
||||
gSPDisplayList(gMasterGfxPos++, mdl_get_copied_gfx(1));
|
||||
gSPDisplayList(gMasterGfxPos++, mdl_get_copied_gfx(VTX_COPY_1));
|
||||
|
||||
N(TongueWiggleTime) += TONGUE_WIGGLE_RATE;
|
||||
}
|
||||
@ -106,9 +106,9 @@ EvtScript N(EVS_StartTongueWiggle) = {
|
||||
EVT_CALL(ParentColliderToModel, COLLIDER_sita, TONGUE_COPY_MODEL_ID)
|
||||
EVT_CALL(EnableModel, TONGUE_COPY_MODEL_ID, FALSE)
|
||||
EVT_EXEC(N(EVS_WiggleTongue))
|
||||
EVT_CALL(MakeLocalVertexCopy, 1, MODEL_sita, TRUE)
|
||||
EVT_CALL(SetCustomGfxBuilders, 1, EVT_PTR(N(make_tongue_gfx)), 0)
|
||||
EVT_CALL(SetModelCustomGfx, MODEL_sita, 1, -1)
|
||||
EVT_CALL(MakeLocalVertexCopy, VTX_COPY_1, MODEL_sita, TRUE)
|
||||
EVT_CALL(SetCustomGfxBuilders, CUSTOM_GFX_1, EVT_PTR(N(make_tongue_gfx)), 0)
|
||||
EVT_CALL(SetModelCustomGfx, MODEL_sita, CUSTOM_GFX_1, -1)
|
||||
EVT_CALL(HidePlayerShadow, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
|
@ -1,98 +1,8 @@
|
||||
#include "kkj_25.h"
|
||||
#include "effects.h"
|
||||
|
||||
#include "world/common/todo/UnkFoldFunc.inc.c"
|
||||
|
||||
ApiStatus func_802406EC_B070EC(Evt* script, s32 isInitialCall) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 spriteIndex = evt_get_variable(script, *args++);
|
||||
s32 rasterIndex = evt_get_variable(script, *args++);
|
||||
UnkEntityStruct* unkStruct = heap_malloc(sizeof(*unkStruct));
|
||||
|
||||
unkStruct->spriteIndex = spriteIndex;
|
||||
unkStruct->rasterIndex = rasterIndex;
|
||||
unkStruct->unk_34 = gPlayerStatus.colliderHeight;
|
||||
unkStruct->unk_38 = gPlayerStatus.colliderDiameter;
|
||||
unkStruct->pos.x = gPlayerStatus.position.x;
|
||||
unkStruct->pos.y = gPlayerStatus.position.y;
|
||||
unkStruct->pos.z = gPlayerStatus.position.z;
|
||||
unkStruct->rot.x = 0.0f;
|
||||
unkStruct->rot.y = 0.0f;
|
||||
unkStruct->rot.z = 0.0f;
|
||||
unkStruct->scale.x = SPRITE_WORLD_SCALE_F;
|
||||
unkStruct->scale.y = SPRITE_WORLD_SCALE_F;
|
||||
unkStruct->scale.z = SPRITE_WORLD_SCALE_F;
|
||||
unkStruct->foldID = func_8013A704(1);
|
||||
unkStruct->entityID = create_worker_world(NULL, kkj_25_UnkFoldFunc);
|
||||
|
||||
evt_set_variable(script, MapVar(10), (s32) unkStruct);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus func_80240800_B07200(Evt* script, s32 isInitialCall) {
|
||||
UnkEntityStruct* unkStruct = (UnkEntityStruct*) evt_get_variable(NULL, MapVar(10));
|
||||
|
||||
func_8013A854(unkStruct->foldID);
|
||||
free_worker(unkStruct->entityID);
|
||||
heap_free(unkStruct);
|
||||
evt_set_variable(script, MapVar(10), 0);
|
||||
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus func_8024086C_B0726C(Evt* script, s32 isInitialCall) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 x = evt_get_float_variable(script, *args++);
|
||||
s32 y = evt_get_float_variable(script, *args++);
|
||||
s32 z = evt_get_float_variable(script, *args++);
|
||||
UnkEntityStruct* unkStruct = (UnkEntityStruct*) evt_get_variable(NULL, MapVar(10));
|
||||
|
||||
unkStruct->pos.x = x;
|
||||
unkStruct->pos.y = y;
|
||||
unkStruct->pos.z = z;
|
||||
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus func_8024092C_B0732C(Evt* script, s32 isInitialCall) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 x = evt_get_float_variable(script, *args++);
|
||||
s32 y = evt_get_float_variable(script, *args++);
|
||||
s32 z = evt_get_float_variable(script, *args++);
|
||||
UnkEntityStruct* unkStruct = (UnkEntityStruct*) evt_get_variable(NULL, MapVar(10));
|
||||
|
||||
unkStruct->rot.x = x;
|
||||
unkStruct->rot.y = y;
|
||||
unkStruct->rot.z = z;
|
||||
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus func_802409EC_B073EC(Evt* script, s32 isInitialCall) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 x = evt_get_float_variable(script, *args++);
|
||||
s32 y = evt_get_float_variable(script, *args++);
|
||||
s32 z = evt_get_float_variable(script, *args++);
|
||||
UnkEntityStruct* unkStruct = (UnkEntityStruct*) evt_get_variable(NULL, MapVar(10));
|
||||
|
||||
unkStruct->scale.x = x;
|
||||
unkStruct->scale.y = y;
|
||||
unkStruct->scale.z = z;
|
||||
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus func_80240AAC_B074AC(Evt* script, s32 isInitialCall) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 spriteIndex = evt_get_variable(script, *args++);
|
||||
s32 rasterIndex = evt_get_variable(script, *args++);
|
||||
UnkEntityStruct* unkStruct = (UnkEntityStruct*) evt_get_variable(NULL, MapVar(10));
|
||||
|
||||
unkStruct->spriteIndex = spriteIndex;
|
||||
unkStruct->rasterIndex = rasterIndex;
|
||||
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
#define KNOCK_DOWN_MAP_VAR MapVar(10)
|
||||
#include "world/common/complete/KnockDownPlayer.inc.c"
|
||||
|
||||
ApiStatus func_80240B18_B07518(Evt* script, s32 isInitialCall) {
|
||||
EffectInstance* effect;
|
||||
|
@ -11,7 +11,7 @@ API_CALLABLE(N(func_802401B0_8C8140)) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
#include "world/common/todo/UnkPositionFunc.inc.c"
|
||||
#include "world/common/util/CheckPositionRelativeToPlane.inc.c"
|
||||
|
||||
NpcSettings N(NpcSettings_Goompa) = {
|
||||
.height = 22,
|
||||
@ -56,7 +56,7 @@ EvtScript N(EVS_NpcAI_Goompa) = {
|
||||
EVT_SWITCH(GB_StoryProgress)
|
||||
EVT_CASE_EQ(STORY_CH0_FELL_OFF_CLIFF)
|
||||
EVT_LABEL(89)
|
||||
EVT_CALL(N(UnkPositionFunc), -118, 86, -70, -15)
|
||||
EVT_CALL(N(CheckPositionRelativeToPlane), -118, 86, -70, -15)
|
||||
EVT_WAIT(1)
|
||||
EVT_IF_EQ(LVar0, 0)
|
||||
EVT_GOTO(89)
|
||||
|
@ -196,12 +196,12 @@ EvtScript N(EVS_Scene_TheEnd) = {
|
||||
EVT_END_THREAD
|
||||
EVT_WAIT(30)
|
||||
EVT_CALL(EnableGroup, MODEL_the_end, TRUE)
|
||||
EVT_CALL(SetModelCustomGfx, MODEL_t, 1, -1)
|
||||
EVT_CALL(SetModelCustomGfx, MODEL_h, 1, -1)
|
||||
EVT_CALL(SetModelCustomGfx, MODEL_e, 1, -1)
|
||||
EVT_CALL(SetModelCustomGfx, MODEL_d, 1, -1)
|
||||
EVT_CALL(SetModelCustomGfx, MODEL_n, 1, -1)
|
||||
EVT_CALL(SetCustomGfxBuilders, 1, EVT_PTR(N(gfx_build_the_end)), 0)
|
||||
EVT_CALL(SetModelCustomGfx, MODEL_t, CUSTOM_GFX_1, -1)
|
||||
EVT_CALL(SetModelCustomGfx, MODEL_h, CUSTOM_GFX_1, -1)
|
||||
EVT_CALL(SetModelCustomGfx, MODEL_e, CUSTOM_GFX_1, -1)
|
||||
EVT_CALL(SetModelCustomGfx, MODEL_d, CUSTOM_GFX_1, -1)
|
||||
EVT_CALL(SetModelCustomGfx, MODEL_n, CUSTOM_GFX_1, -1)
|
||||
EVT_CALL(SetCustomGfxBuilders, CUSTOM_GFX_1, EVT_PTR(N(gfx_build_the_end)), 0)
|
||||
EVT_CALL(MakeLerp, 0, 255, 90, EASING_LINEAR)
|
||||
EVT_LOOP(0)
|
||||
EVT_CALL(UpdateLerp)
|
||||
|
@ -15,6 +15,8 @@ EvtScript N(EVS_BindExitTriggers) = {
|
||||
EVT_END
|
||||
};
|
||||
|
||||
MAP_RODATA_PAD(1, unk) // can be fixed with subalign 16 for this map
|
||||
|
||||
EvtScript N(EVS_StartTexPanners) = {
|
||||
EVT_SET_GROUP(EVT_GROUP_00)
|
||||
EVT_CALL(SetTexPanner, MODEL_yo1, TEX_PANNER_0)
|
||||
|
@ -23,6 +23,15 @@ enum {
|
||||
enum {
|
||||
AF_MAC_01 = AreaFlag(1),
|
||||
AF_ExitingToybox = AreaFlag(2),
|
||||
AF_MAC_0D = AreaFlag(13),
|
||||
AF_MAC_0E = AreaFlag(14),
|
||||
AF_MAC_0F = AreaFlag(15),
|
||||
AF_MAC_10 = AreaFlag(16),
|
||||
AF_MAC_11 = AreaFlag(17),
|
||||
AF_MAC_12 = AreaFlag(18),
|
||||
AF_MAC_13 = AreaFlag(19),
|
||||
AF_MAC_14 = AreaFlag(20),
|
||||
AF_MAC_15 = AreaFlag(21),
|
||||
AF_MAC_16 = AreaFlag(22),
|
||||
AF_MAC_17 = AreaFlag(23),
|
||||
AF_MAC_18 = AreaFlag(24),
|
||||
@ -47,7 +56,85 @@ enum {
|
||||
AF_MAC_3D = AreaFlag(61),
|
||||
AF_MAC_3E = AreaFlag(62),
|
||||
AF_MAC_3F = AreaFlag(63),
|
||||
|
||||
AF_MAC_40 = AreaFlag(64),
|
||||
AF_MAC_41 = AreaFlag(65),
|
||||
AF_MAC_43 = AreaFlag(67),
|
||||
AF_MAC_44 = AreaFlag(68),
|
||||
|
||||
AF_MAC_45 = AreaFlag(0x45),
|
||||
AF_MAC_46 = AreaFlag(0x46),
|
||||
AF_MAC_47 = AreaFlag(0x47),
|
||||
AF_MAC_48 = AreaFlag(0x48),
|
||||
AF_MAC_49 = AreaFlag(0x49),
|
||||
AF_MAC_4A = AreaFlag(0x4A),
|
||||
AF_MAC_4B = AreaFlag(0x4B),
|
||||
AF_MAC_4C = AreaFlag(0x4C),
|
||||
AF_MAC_4D = AreaFlag(0x4D),
|
||||
AF_MAC_4E = AreaFlag(0x4E),
|
||||
AF_MAC_4F = AreaFlag(0x4F),
|
||||
AF_MAC_50 = AreaFlag(0x50),
|
||||
AF_MAC_51 = AreaFlag(0x51),
|
||||
AF_MAC_52 = AreaFlag(0x52),
|
||||
AF_MAC_53 = AreaFlag(0x53),
|
||||
AF_MAC_54 = AreaFlag(0x54),
|
||||
AF_MAC_55 = AreaFlag(0x55),
|
||||
AF_MAC_56 = AreaFlag(0x56),
|
||||
AF_MAC_57 = AreaFlag(0x57),
|
||||
AF_MAC_58 = AreaFlag(0x58),
|
||||
AF_MAC_59 = AreaFlag(0x59),
|
||||
AF_MAC_5A = AreaFlag(0x5A),
|
||||
AF_MAC_5B = AreaFlag(0x5B),
|
||||
AF_MAC_5C = AreaFlag(0x5C),
|
||||
AF_MAC_5D = AreaFlag(0x5D),
|
||||
AF_MAC_5E = AreaFlag(0x5E),
|
||||
AF_MAC_5F = AreaFlag(0x5F),
|
||||
AF_MAC_60 = AreaFlag(0x60),
|
||||
AF_MAC_61 = AreaFlag(0x61),
|
||||
AF_MAC_62 = AreaFlag(0x62),
|
||||
AF_MAC_63 = AreaFlag(0x63),
|
||||
AF_MAC_64 = AreaFlag(0x64),
|
||||
AF_MAC_65 = AreaFlag(0x65),
|
||||
AF_MAC_66 = AreaFlag(0x66),
|
||||
AF_MAC_67 = AreaFlag(0x67),
|
||||
AF_MAC_68 = AreaFlag(0x68),
|
||||
|
||||
AF_MAC_77 = AreaFlag(0x77),
|
||||
AF_MAC_78 = AreaFlag(0x78),
|
||||
AF_MAC_79 = AreaFlag(0x79),
|
||||
AF_MAC_7A = AreaFlag(0x7A),
|
||||
AF_MAC_7B = AreaFlag(0x7B),
|
||||
AF_MAC_7C = AreaFlag(0x7C),
|
||||
AF_MAC_7D = AreaFlag(0x7D),
|
||||
AF_MAC_7E = AreaFlag(0x7E),
|
||||
AF_MAC_7F = AreaFlag(0x7F),
|
||||
AF_MAC_80 = AreaFlag(0x80),
|
||||
AF_MAC_81 = AreaFlag(0x81),
|
||||
AF_MAC_82 = AreaFlag(0x82),
|
||||
AF_MAC_83 = AreaFlag(0x83),
|
||||
AF_MAC_84 = AreaFlag(0x84),
|
||||
AF_MAC_85 = AreaFlag(0x85),
|
||||
AF_MAC_86 = AreaFlag(0x86),
|
||||
AF_MAC_87 = AreaFlag(0x87),
|
||||
AF_MAC_88 = AreaFlag(0x88),
|
||||
AF_MAC_89 = AreaFlag(0x89),
|
||||
AF_MAC_8A = AreaFlag(0x8A),
|
||||
AF_MAC_8B = AreaFlag(0x8B),
|
||||
AF_MAC_8C = AreaFlag(0x8C),
|
||||
AF_MAC_8D = AreaFlag(0x8D),
|
||||
AF_MAC_8E = AreaFlag(0x8E),
|
||||
AF_MAC_8F = AreaFlag(0x8F),
|
||||
AF_MAC_90 = AreaFlag(0x90),
|
||||
AF_MAC_91 = AreaFlag(0x91),
|
||||
AF_MAC_92 = AreaFlag(0x92),
|
||||
AF_MAC_93 = AreaFlag(0x93),
|
||||
AF_MAC_94 = AreaFlag(0x94),
|
||||
AF_MAC_95 = AreaFlag(0x95),
|
||||
AF_MAC_96 = AreaFlag(0x96),
|
||||
AF_MAC_97 = AreaFlag(0x97),
|
||||
AF_MAC_98 = AreaFlag(0x98),
|
||||
AF_MAC_99 = AreaFlag(0x99),
|
||||
AF_MAC_9A = AreaFlag(0x9A),
|
||||
};
|
||||
|
||||
extern MapSettings machi_settings;
|
||||
|
@ -1,25 +0,0 @@
|
||||
#include "mac_00.h"
|
||||
|
||||
static char* N(exit_str_0) = "kmr_10";
|
||||
static char* N(exit_str_1) = "mac_01";
|
||||
static char* N(exit_str_2) = "tik_19";
|
||||
static char* N(exit_str_3) = "kmr_20";
|
||||
static char* N(exit_str_4) = "mac_00";
|
||||
static char* N(exit_str_5) = "\0\0\0\0";
|
||||
|
||||
#include "world/common/entity/Pipe.inc.c"
|
||||
|
||||
#include "world/common/atomic/TexturePan.inc.c"
|
||||
|
||||
ApiStatus func_802405EC_7EB2FC(Evt* script, s32 isInitialCall) {
|
||||
f32 x;
|
||||
f32 y;
|
||||
f32 z;
|
||||
|
||||
get_collider_center(evt_get_variable(script, *script->ptrReadPos), &x, &y, &z);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus func_80240624_7EB334(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
@ -1,200 +0,0 @@
|
||||
#include "mac_00.h"
|
||||
#include "effects.h"
|
||||
#include "model.h"
|
||||
|
||||
#define CHUCK_QUIZMO_NPC_ID 6
|
||||
|
||||
extern s32 N(Quizmo_Worker);
|
||||
extern s32 N(Quizmo_AnswerResult);
|
||||
extern EffectInstance* N(Quizmo_StageEffect);
|
||||
extern EffectInstance* N(Quizmo_AudienceEffect);
|
||||
extern EffectInstance* N(Quizmo_VannaTEffect);
|
||||
|
||||
#include "world/common/atomic/Quizmo.inc.c"
|
||||
|
||||
#include "world/common/todo/GetNpcCollisionHeight.inc.c"
|
||||
|
||||
#include "world/common/todo/AddPlayerHandsOffset.inc.c"
|
||||
|
||||
INCLUDE_ASM(s32, "world/area_mac/mac_00/7EB340", func_802418F0_7EC600);
|
||||
|
||||
extern s32 N(ItemChoice_HasSelectedItem);
|
||||
extern s32 N(ItemChoice_SelectedItemID);
|
||||
|
||||
ApiStatus N(ItemChoice_SaveSelected)(Evt* script, s32 isInitialCall) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
|
||||
N(ItemChoice_SelectedItemID) = evt_get_variable(script, *args++);
|
||||
N(ItemChoice_HasSelectedItem) = TRUE;
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
extern s32 mac_00_D_80255BA0[];
|
||||
|
||||
ApiStatus func_8024197C_7EC68C(Evt* script, s32 isInitialCall) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32* ptr = (s32*) evt_get_variable(script, *args++);
|
||||
s32 i;
|
||||
|
||||
if (ptr != NULL) {
|
||||
for (i = 0; ptr[i] != 0; i++) {
|
||||
mac_00_D_80255BA0[i] = ptr[i];
|
||||
}
|
||||
mac_00_D_80255BA0[i] = 0;
|
||||
} else {
|
||||
for (i = 0; i < 112; i++) {
|
||||
mac_00_D_80255BA0[i] = i + 16;
|
||||
mac_00_D_80255BA0[112] = 0;
|
||||
}
|
||||
}
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
extern s32 mac_00_D_80255D68[];
|
||||
|
||||
ApiStatus func_80241A18_7EC728(Evt* script, s32 isInitialCall) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32* ptr = (s32*) evt_get_variable(script, *args++);
|
||||
s32 i;
|
||||
|
||||
if (ptr != NULL) {
|
||||
for (i = 0; ptr[i] != 0; i++) {
|
||||
mac_00_D_80255D68[i] = ptr[i];
|
||||
}
|
||||
mac_00_D_80255D68[i] = 0;
|
||||
} else {
|
||||
for (i = 0; i < 91; i++) {
|
||||
mac_00_D_80255D68[i] = i + 128;
|
||||
mac_00_D_80255D68[91] = 0;
|
||||
}
|
||||
}
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
extern s32 N(LetterDelivery_SavedNpcAnim);
|
||||
#include "world/common/todo/LetterDelivery.inc.c"
|
||||
|
||||
typedef struct UnkMac00 {
|
||||
/* 0x00 */ s32 unk_00;
|
||||
/* 0x04 */ s32 unk_04;
|
||||
/* 0x08 */ s32 unk_08;
|
||||
/* 0x0C */ s32 unk_0C;
|
||||
/* 0x10 */ s32 unk_10;
|
||||
} UnkMac00; // size = 0x14
|
||||
|
||||
extern UnkMac00 D_80248F18_7F3C28[36];
|
||||
|
||||
ApiStatus func_80241DA0_7ECAB0(Evt* script, s32 isInitialCall) {
|
||||
UnkMac00* it = D_80248F18_7F3C28;
|
||||
u32 i;
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(D_80248F18_7F3C28); i++, it++) {
|
||||
evt_set_variable(script, it->unk_10, 0);
|
||||
}
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus func_80241E04_7ECB14(Evt* script, s32 isInitialCall) {
|
||||
UnkMac00* it = D_80248F18_7F3C28;
|
||||
u32 i;
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(D_80248F18_7F3C28); i++, it++) {
|
||||
s32 t1 = evt_get_variable(script, GameByte(0));
|
||||
|
||||
evt_set_variable(script, it->unk_08, t1 >= it->unk_04);
|
||||
}
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus func_80241E80_7ECB90(Evt* script, s32 isInitialCall) {
|
||||
UnkMac00* it = D_80248F18_7F3C28;
|
||||
s32 cond = FALSE;
|
||||
s32 count = 0;
|
||||
u32 i;
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(D_80248F18_7F3C28); i++, it++) {
|
||||
if (evt_get_variable(script, it->unk_08) != 0) {
|
||||
if (evt_get_variable(script, it->unk_0C) == 0) {
|
||||
cond = TRUE;
|
||||
break;
|
||||
} else {
|
||||
if (evt_get_variable(script, it->unk_10) == 0) {
|
||||
count++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!cond) {
|
||||
it = D_80248F18_7F3C28;
|
||||
i = 0;
|
||||
if (count != 0) {
|
||||
s32 temp_s6 = rand_int(count - 1);
|
||||
|
||||
count = 0;
|
||||
|
||||
for (i = cond; i < ARRAY_COUNT(D_80248F18_7F3C28); i++, it++) {
|
||||
if (evt_get_variable(script, it->unk_08) != 0 &&
|
||||
evt_get_variable(script, it->unk_10) == 0 &&
|
||||
count++ >= temp_s6)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
script->varTable[0] = i;
|
||||
script->varTable[1] = it->unk_00;
|
||||
script->varTable[2] = cond;
|
||||
evt_set_variable(script, it->unk_0C, 1);
|
||||
evt_set_variable(script, it->unk_10, 1);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus func_80241FF0_7ECD00(Evt* script, s32 isInitialCall) {
|
||||
UnkMac00* it = D_80248F18_7F3C28;
|
||||
s32 count = 0;
|
||||
u32 i;
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(D_80248F18_7F3C28); i++, it++) {
|
||||
if (evt_get_variable(script, it->unk_08) != 0 && evt_get_variable(script, it->unk_10) == 0) {
|
||||
count++;
|
||||
}
|
||||
}
|
||||
script->varTable[0] = count;
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
#include "world/common/todo/UnkPositionFunc.inc.c"
|
||||
|
||||
ApiStatus N(SetDojoBattle)(Evt* script, s32 isInitialCall) {
|
||||
Enemy* enemy = script->owner1.enemy;
|
||||
|
||||
gCurrentEncounter.encounterList[enemy->encounterIndex]->battle = N(dojoBattleIDs)[evt_get_variable(script, GB_MAC00_DojoRank)];
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus func_802421D0_7ECEE0(Evt* script, s32 isInitialCall) {
|
||||
func_8011B950(0x8A, -1, 1, 1);
|
||||
set_background_color_blend(0, 0, 0, 255);
|
||||
gCameras[CAM_DEFAULT].bgColor[0] = 0;
|
||||
gCameras[CAM_DEFAULT].bgColor[1] = 0;
|
||||
gCameras[CAM_DEFAULT].bgColor[2] = 0;
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus func_80242224_7ECF34(Evt* script, s32 isInitialCall) {
|
||||
gPlayerData.curHP = 1;
|
||||
sync_status_menu();
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus func_80242250_7ECF60(Evt* script, s32 isInitialCall) {
|
||||
script->varTable[0] = (s32) ((gPlayerData.frameCounter - gPlayerData.tradeEventStartTime) / 3600) < script->varTable[0];
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus func_8024228C_7ECF9C(Evt* script, s32 isInitialCall) {
|
||||
script->varTable[0] = get_item_count();
|
||||
return ApiStatus_DONE2;
|
||||
}
|
@ -1,62 +0,0 @@
|
||||
#include "mac_00.h"
|
||||
|
||||
#include "world/common/enemy/ai/PatrolNoAttackAI.inc.c"
|
||||
|
||||
static char* N(exit_str_0) = "mac_01";
|
||||
|
||||
#define NAMESPACE dup_mac_00
|
||||
#include "world/common/todo/StashVars.inc.c"
|
||||
#define NAMESPACE mac_00
|
||||
|
||||
#define NAMESPACE dup_mac_00
|
||||
#include "world/common/todo/GetItemName.inc.c"
|
||||
#define NAMESPACE mac_00
|
||||
|
||||
#define NAMESPACE dup_mac_00
|
||||
#include "world/common/todo/GetNpcCollisionHeight.inc.c"
|
||||
#define NAMESPACE mac_00
|
||||
|
||||
#define NAMESPACE dup_mac_00
|
||||
#include "world/common/todo/AddPlayerHandsOffset.inc.c"
|
||||
#define NAMESPACE mac_00
|
||||
|
||||
INCLUDE_ASM(s32, "world/area_mac/mac_00/7ED280", func_80243744_7EE454);
|
||||
|
||||
#define NAMESPACE dup_mac_00
|
||||
extern s32 N(ItemChoice_HasSelectedItem);
|
||||
extern s32 N(ItemChoice_SelectedItemID);
|
||||
|
||||
ApiStatus N(ItemChoice_SaveSelected)(Evt* script, s32 isInitialCall) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
|
||||
N(ItemChoice_SelectedItemID) = evt_get_variable(script, *args++);
|
||||
N(ItemChoice_HasSelectedItem) = TRUE;
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
#define NAMESPACE mac_00
|
||||
|
||||
extern s32 D_80255EE0[];
|
||||
|
||||
ApiStatus func_802437D0_7EE4E0(Evt* script, s32 isInitialCall) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32* ptr = (s32*) evt_get_variable(script, *args++);
|
||||
s32 i;
|
||||
|
||||
if (ptr != NULL) {
|
||||
for (i = 0; ptr[i] != 0; i++) {
|
||||
D_80255EE0[i] = ptr[i];
|
||||
}
|
||||
D_80255EE0[i] = 0;
|
||||
} else {
|
||||
for (i = 0; i < 112; i++) {
|
||||
D_80255EE0[i] = i + 16;
|
||||
D_80255EE0[112] = 0;
|
||||
}
|
||||
}
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
#define NAMESPACE dup_mac_00
|
||||
extern s32 N(LetterDelivery_SavedNpcAnim);
|
||||
#include "world/common/todo/LetterDelivery.inc.c"
|
||||
#define NAMESPACE mac_00
|
@ -2,10 +2,89 @@
|
||||
/// @brief Toad Town - Gate District
|
||||
|
||||
#include "common.h"
|
||||
#include "../mac.h"
|
||||
#include "message_ids.h"
|
||||
#include "map.h"
|
||||
|
||||
#include "../mac.h"
|
||||
#include "mapfs/mac_00_shape.h"
|
||||
#include "mapfs/mac_00_hit.h"
|
||||
|
||||
#include "sprite/npc/ChuckQuizmo.h"
|
||||
#include "sprite/npc/WorldParakarry.h"
|
||||
#include "sprite/npc/ShyGuy.h"
|
||||
#include "sprite/npc/RussT.h"
|
||||
#include "sprite/npc/HarryT.h"
|
||||
#include "sprite/npc/Toad.h"
|
||||
#include "sprite/npc/Chan.h"
|
||||
#include "sprite/npc/TheMaster.h"
|
||||
#include "sprite/npc/Lee.h"
|
||||
#include "sprite/npc/Toadette.h"
|
||||
#include "sprite/npc/ToadKid.h"
|
||||
#include "sprite/npc/Luigi.h"
|
||||
#include "sprite/npc/Goompapa.h"
|
||||
#include "sprite/npc/Goomama.h"
|
||||
#include "sprite/npc/Gooma.h"
|
||||
#include "sprite/npc/VannaT.h"
|
||||
|
||||
enum {
|
||||
NPC_Luigi_Intro = 0,
|
||||
NPC_RussT = 0,
|
||||
NPC_Toad_01 = 1,
|
||||
NPC_Toad_02 = 2,
|
||||
NPC_Toad_03 = 3,
|
||||
NPC_TheMaster = 3,
|
||||
NPC_Chan = 4,
|
||||
NPC_Lee = 5,
|
||||
NPC_ChuckQuizmo = 6,
|
||||
NPC_Toad_04 = 7,
|
||||
NPC_Toad_05 = 8,
|
||||
NPC_Toad_06 = 9,
|
||||
NPC_FickleLover = 10,
|
||||
NPC_ShamelessLover = 11,
|
||||
NPC_KrisT = 12,
|
||||
NPC_MissT = 13,
|
||||
NPC_FelissaT = 14,
|
||||
NPC_DojoSpectator = 15,
|
||||
NPC_DojoFan = 16,
|
||||
NPC_Waterfront_Dad = 17,
|
||||
NPC_Waterfront_Mom = 18,
|
||||
NPC_Waterfront_Kid1 = 19,
|
||||
NPC_Waterfront_Kid2 = 20,
|
||||
NPC_ShyGuyThief = 21,
|
||||
NPC_ShyGuy_02 = 22,
|
||||
NPC_GardenShyGuy1 = 23,
|
||||
NPC_Toad_11 = 24,
|
||||
NPC_Luigi_Epilogue = 25,
|
||||
NPC_Goompapa_Epilogue = 26,
|
||||
NPC_Goomama_Epilogue = 27,
|
||||
NPC_Gooma_Epilogue = 28,
|
||||
NPC_HarryT = 29,
|
||||
NPC_VannaT_Epilogue = 30,
|
||||
};
|
||||
|
||||
enum {
|
||||
MF_MusicMixTrigger1 = MapFlag(10),
|
||||
MF_MusicMixTrigger2 = MapFlag(11),
|
||||
};
|
||||
|
||||
#define NAMESPACE mac_00
|
||||
|
||||
extern s32 N(dojoBattleIDs)[];
|
||||
extern EvtScript N(EVS_Main);
|
||||
extern EvtScript N(EVS_SetupMusic);
|
||||
extern EvtScript N(EVS_SetupMusicTriggers);
|
||||
extern EvtScript N(EVS_SetupShop);
|
||||
extern EvtScript N(EVS_SetupRooms);
|
||||
extern EvtScript N(EVS_SetupWaterCustomGfx);
|
||||
extern EvtScript N(EVS_SetupDemo);
|
||||
extern EvtScript N(EVS_Scene_Intro);
|
||||
extern EvtScript N(EVS_Scene_BeginEpilogue);
|
||||
extern EvtScript N(EVS_Scene_ToadTownGreeting);
|
||||
extern EvtScript N(EVS_BlockExitToGoomaRoad);
|
||||
extern EvtScript N(EVS_WaterfrontHouse_DoorLocked);
|
||||
extern EvtScript N(EVS_MakeEntities);
|
||||
|
||||
extern NpcGroupList N(IntroNPCs);
|
||||
extern NpcGroupList N(EpilogueNPCs);
|
||||
extern NpcGroupList N(DefaultNPCs);
|
||||
|
||||
extern EvtScript ItemShopInteract;
|
||||
|
20
src/world/area_mac/mac_00/mac_00_0_header.c
Normal file
20
src/world/area_mac/mac_00/mac_00_0_header.c
Normal file
@ -0,0 +1,20 @@
|
||||
#include "mac_00.h"
|
||||
|
||||
EntryList N(Entrances) = {
|
||||
[mac_00_ENTRY_0] { -387.0, 0.0, -460.0, 125.0 },
|
||||
[mac_00_ENTRY_1] { 600.0, 0.0, 0.0, 270.0 },
|
||||
[mac_00_ENTRY_2] { -435.0, 147.0, -441.0, 125.0 },
|
||||
[mac_00_ENTRY_3] { 0.0, 50.0, 300.0, 180.0 },
|
||||
[mac_00_ENTRY_4] { -100.0, 30.0, -370.0, 180.0 },
|
||||
[mac_00_ENTRY_5] { -100.0, 30.0, -370.0, 135.0 },
|
||||
[mac_00_ENTRY_6] { -100.0, 30.0, -370.0, 135.0 },
|
||||
[mac_00_ENTRY_7] { -100.0, 30.0, -370.0, 135.0 },
|
||||
};
|
||||
|
||||
MapSettings N(settings) = {
|
||||
.main = &N(EVS_Main),
|
||||
.entryList = &N(Entrances),
|
||||
.entryCount = ENTRY_COUNT(N(Entrances)),
|
||||
.background = &gBackgroundImage,
|
||||
.tattle = { MSG_MapTattle_mac_00 },
|
||||
};
|
717
src/world/area_mac/mac_00/mac_00_10_shared_npc.c
Normal file
717
src/world/area_mac/mac_00/mac_00_10_shared_npc.c
Normal file
@ -0,0 +1,717 @@
|
||||
#include "mac_00.h"
|
||||
|
||||
#define NAME_SUFFIX _Shared
|
||||
#include "world/common/npc/Toad_Wander.inc.c"
|
||||
#include "world/common/npc/Toad_Patrol.inc.c"
|
||||
#include "world/common/npc/Toad_Stationary.inc.c"
|
||||
#include "world/common/complete/LetterDelivery.inc.c"
|
||||
#define NAME_SUFFIX
|
||||
|
||||
s32 N(LetterList_MissT)[] = {
|
||||
ITEM_LETTER18,
|
||||
ITEM_NONE
|
||||
};
|
||||
|
||||
EvtScript N(EVS_LetterPrompt_MissT) = {
|
||||
EVT_CALL(N(LetterDelivery_Init_Shared),
|
||||
NPC_MissT, ANIM_Toadette_Orange_Talk, ANIM_Toadette_Orange_Idle,
|
||||
ITEM_LETTER18, ITEM_LETTER19,
|
||||
MSG_MAC_Gate_00FF, MSG_MAC_Gate_0100, MSG_MAC_Gate_0101, MSG_MAC_Gate_0102,
|
||||
EVT_PTR(N(LetterList_MissT)))
|
||||
EVT_EXEC_WAIT(N(EVS_DoLetterDelivery_Shared))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_Scene_ToadTownGreeting) = {
|
||||
EVT_CALL(DisablePlayerInput, TRUE)
|
||||
EVT_CALL(UseSettingsFrom, CAM_DEFAULT, -225, 0, -300)
|
||||
EVT_CALL(SetPanTarget, CAM_DEFAULT, -225, 0, -300)
|
||||
EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(800.0))
|
||||
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0))
|
||||
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
|
||||
EVT_THREAD
|
||||
EVT_WAIT(35)
|
||||
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(2.1))
|
||||
EVT_CALL(UseSettingsFrom, CAM_DEFAULT, -225, 0, -300)
|
||||
EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(300.0))
|
||||
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
|
||||
EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0))
|
||||
EVT_WAIT(10)
|
||||
EVT_CALL(InterpNpcYaw, NPC_Toad_04, 230, 0)
|
||||
EVT_CALL(SetNpcJumpscale, NPC_Toad_04, EVT_FLOAT(1.5))
|
||||
EVT_CALL(GetNpcPos, NPC_Toad_04, LVar0, LVar1, LVar2)
|
||||
EVT_CALL(NpcJump0, NPC_Toad_04, LVar0, LVar1, LVar2, 5)
|
||||
EVT_WAIT(10)
|
||||
EVT_CALL(SetNpcAnimation, NPC_Toad_04, ANIM_Toad_Red_Run)
|
||||
EVT_CALL(NpcMoveTo, NPC_Toad_04, -185, -295, 15)
|
||||
EVT_CALL(SetNpcAnimation, NPC_Toad_04, ANIM_Toad_Red_Idle)
|
||||
EVT_END_THREAD
|
||||
EVT_WAIT(2)
|
||||
EVT_CALL(PlayerMoveTo, -225, -300, 80)
|
||||
EVT_CALL(SetPlayerPos, -225, 0, -300)
|
||||
EVT_WAIT(50)
|
||||
EVT_THREAD
|
||||
EVT_WAIT(20)
|
||||
EVT_CALL(SetPlayerAnimation, ANIM_Mario_80007)
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(SpeakToPlayer, NPC_Toad_04, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_MAC_Gate_007E)
|
||||
EVT_CALL(DisablePlayerInput, FALSE)
|
||||
EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(400.0))
|
||||
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_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInteract_Toad_04) = {
|
||||
EVT_SWITCH(GB_StoryProgress)
|
||||
EVT_CASE_LT(STORY_CH0_MET_STAR_SPIRITS)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_007F)
|
||||
EVT_CASE_LT(STORY_CH1_MERLIN_REVEALED_KOOPA_BROS)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_0080)
|
||||
EVT_CASE_LT(STORY_CH1_STAR_SPRIT_DEPARTED)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_0081)
|
||||
EVT_CASE_LT(STORY_CH2_STAR_SPRIT_DEPARTED)
|
||||
EVT_IF_EQ(GF_MAC03_BombedRock, FALSE)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_0082)
|
||||
EVT_ELSE
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_0083)
|
||||
EVT_END_IF
|
||||
EVT_CASE_LT(STORY_CH3_STAR_SPIRIT_RESCUED)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_0084)
|
||||
EVT_CASE_LT(STORY_CH4_STAR_SPRIT_DEPARTED)
|
||||
EVT_IF_EQ(GF_MAC00_DictionaryStolen, FALSE)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_0085)
|
||||
EVT_ELSE
|
||||
EVT_IF_EQ(GF_MAC00_DictionaryReturned, FALSE)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_0086)
|
||||
EVT_ELSE
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_0087)
|
||||
EVT_END_IF
|
||||
EVT_END_IF
|
||||
EVT_CASE_LT(STORY_CH5_DEFEATED_FUZZIPEDE)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_0088)
|
||||
EVT_CASE_LT(STORY_CH5_STAR_SPRIT_DEPARTED)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_0089)
|
||||
EVT_CASE_LT(STORY_CH6_ARRIVED_AT_FLOWER_FIELDS)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_008A)
|
||||
EVT_CASE_LT(STORY_CH6_STAR_SPIRIT_RESCUED)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_008B)
|
||||
EVT_CASE_LT(STORY_CH7_INVITED_TO_STARBORN_VALLEY)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_008C)
|
||||
EVT_CASE_LT(STORY_CH7_STAR_SPRIT_DEPARTED)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_008D)
|
||||
EVT_CASE_LT(STORY_EPILOGUE)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_008E)
|
||||
EVT_CASE_GE(STORY_EPILOGUE)
|
||||
EVT_SET(LVar0, MSG_Outro_002C)
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, LVar0)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_Scene_CantLeaveTown) = {
|
||||
EVT_CALL(DisablePlayerInput, TRUE)
|
||||
EVT_CALL(NpcFacePlayer, NPC_Toad_04, 0)
|
||||
EVT_WAIT(5)
|
||||
EVT_CALL(SpeakToPlayer, NPC_Toad_04, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_Outro_002D)
|
||||
EVT_WAIT(10)
|
||||
EVT_CALL(SetPlayerSpeed, EVT_FLOAT(4.0))
|
||||
EVT_CALL(PlayerMoveTo, -220, -250, 0)
|
||||
EVT_CALL(DisablePlayerInput, FALSE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_BlockExitToGoomaRoad) = {
|
||||
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_Scene_CantLeaveTown)), TRIGGER_FLOOR_TOUCH, COLLIDER_o484, 1, 0)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInteract_Toad_05) = {
|
||||
EVT_SWITCH(GB_StoryProgress)
|
||||
EVT_CASE_LT(STORY_CH0_MET_STAR_SPIRITS)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_008F)
|
||||
EVT_CASE_LT(STORY_CH1_MERLIN_REVEALED_KOOPA_BROS)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_0090)
|
||||
EVT_CASE_LT(STORY_CH1_STAR_SPRIT_DEPARTED)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_0091)
|
||||
EVT_CASE_LT(STORY_CH2_STAR_SPRIT_DEPARTED)
|
||||
EVT_IF_EQ(GF_MAC03_BombedRock, FALSE)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_0092)
|
||||
EVT_ELSE
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_0093)
|
||||
EVT_END_IF
|
||||
EVT_CASE_LT(STORY_CH3_STAR_SPIRIT_RESCUED)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_0094)
|
||||
EVT_CASE_LT(STORY_CH4_STAR_SPRIT_DEPARTED)
|
||||
EVT_IF_EQ(GF_MAC00_DictionaryStolen, FALSE)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_0095)
|
||||
EVT_ELSE
|
||||
EVT_IF_EQ(GF_MAC00_DictionaryReturned, FALSE)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_0096)
|
||||
EVT_ELSE
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_0097)
|
||||
EVT_END_IF
|
||||
EVT_END_IF
|
||||
EVT_CASE_LT(STORY_CH5_DEFEATED_FUZZIPEDE)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_0098)
|
||||
EVT_CASE_LT(STORY_CH5_STAR_SPRIT_DEPARTED)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_0099)
|
||||
EVT_CASE_LT(STORY_CH6_ARRIVED_AT_FLOWER_FIELDS)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_009A)
|
||||
EVT_CASE_LT(STORY_CH6_STAR_SPIRIT_RESCUED)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_009B)
|
||||
EVT_CASE_LT(STORY_CH7_INVITED_TO_STARBORN_VALLEY)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_009C)
|
||||
EVT_CASE_LT(STORY_CH7_STAR_SPRIT_DEPARTED)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_009D)
|
||||
EVT_CASE_LT(STORY_EPILOGUE)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_009E)
|
||||
EVT_CASE_GE(STORY_EPILOGUE)
|
||||
EVT_SET(LVar0, MSG_Outro_002E)
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, LVar0)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInteract_Toad_06) = {
|
||||
EVT_SWITCH(GB_StoryProgress)
|
||||
EVT_CASE_LT(STORY_CH0_MET_STAR_SPIRITS)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_009F)
|
||||
EVT_CASE_LT(STORY_CH1_MERLIN_REVEALED_KOOPA_BROS)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_00A0)
|
||||
EVT_CASE_LT(STORY_CH1_STAR_SPRIT_DEPARTED)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_00A1)
|
||||
EVT_CASE_LT(STORY_CH2_STAR_SPRIT_DEPARTED)
|
||||
EVT_IF_EQ(GF_MAC03_BombedRock, FALSE)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_00A2)
|
||||
EVT_ELSE
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_00A3)
|
||||
EVT_END_IF
|
||||
EVT_CASE_LT(STORY_CH3_STAR_SPIRIT_RESCUED)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_00A4)
|
||||
EVT_CASE_LT(STORY_CH4_STAR_SPRIT_DEPARTED)
|
||||
EVT_IF_EQ(GF_MAC00_DictionaryStolen, FALSE)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_00A5)
|
||||
EVT_ELSE
|
||||
EVT_IF_EQ(GF_MAC00_DictionaryReturned, FALSE)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_00A6)
|
||||
EVT_ELSE
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_00A7)
|
||||
EVT_END_IF
|
||||
EVT_END_IF
|
||||
EVT_CASE_LT(STORY_CH5_DEFEATED_FUZZIPEDE)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_00A8)
|
||||
EVT_CASE_LT(STORY_CH5_STAR_SPRIT_DEPARTED)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_00A9)
|
||||
EVT_CASE_LT(STORY_CH6_ARRIVED_AT_FLOWER_FIELDS)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_00AA)
|
||||
EVT_CASE_LT(STORY_CH6_STAR_SPIRIT_RESCUED)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_00AB)
|
||||
EVT_CASE_LT(STORY_CH7_INVITED_TO_STARBORN_VALLEY)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_00AC)
|
||||
EVT_CASE_LT(STORY_CH7_STAR_SPRIT_DEPARTED)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_00AD)
|
||||
EVT_CASE_LT(STORY_EPILOGUE)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_00AE)
|
||||
EVT_CASE_GE(STORY_EPILOGUE)
|
||||
EVT_SET(LVar0, MSG_Outro_002F)
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toad_Yellow_Talk, ANIM_Toad_Yellow_Idle, 0, LVar0)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInteract_Lovers) = {
|
||||
EVT_SWITCH(GB_StoryProgress)
|
||||
EVT_CASE_LT(STORY_CH0_MET_STAR_SPIRITS)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_00AF)
|
||||
EVT_SET(LVar1, MSG_MAC_Gate_00B0)
|
||||
EVT_CASE_LT(STORY_CH1_MERLIN_REVEALED_KOOPA_BROS)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_00B1)
|
||||
EVT_SET(LVar1, MSG_MAC_Gate_00B2)
|
||||
EVT_CASE_LT(STORY_CH1_STAR_SPRIT_DEPARTED)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_00B3)
|
||||
EVT_SET(LVar1, MSG_MAC_Gate_00B4)
|
||||
EVT_CASE_LT(STORY_CH2_STAR_SPRIT_DEPARTED)
|
||||
EVT_IF_EQ(GF_MAC03_BombedRock, FALSE)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_00B5)
|
||||
EVT_SET(LVar1, MSG_MAC_Gate_00B6)
|
||||
EVT_ELSE
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_00B7)
|
||||
EVT_SET(LVar1, MSG_MAC_Gate_00B8)
|
||||
EVT_END_IF
|
||||
EVT_CASE_LT(STORY_CH3_STAR_SPIRIT_RESCUED)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_00B9)
|
||||
EVT_SET(LVar1, MSG_MAC_Gate_00BA)
|
||||
EVT_CASE_LT(STORY_CH4_STAR_SPRIT_DEPARTED)
|
||||
EVT_IF_EQ(GF_MAC03_ShyGuyBlockingTracks, FALSE)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_00BB)
|
||||
EVT_SET(LVar1, MSG_MAC_Gate_00BC)
|
||||
EVT_ELSE
|
||||
EVT_IF_EQ(GF_MAC03_ShyGuyChasedOff, FALSE)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_00BD)
|
||||
EVT_SET(LVar1, MSG_MAC_Gate_00BE)
|
||||
EVT_ELSE
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_00BF)
|
||||
EVT_SET(LVar1, MSG_MAC_Gate_00C0)
|
||||
EVT_END_IF
|
||||
EVT_END_IF
|
||||
EVT_CASE_LT(STORY_CH5_DEFEATED_FUZZIPEDE)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_00C1)
|
||||
EVT_SET(LVar1, MSG_MAC_Gate_00C2)
|
||||
EVT_CASE_LT(STORY_CH5_STAR_SPRIT_DEPARTED)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_00C3)
|
||||
EVT_SET(LVar1, MSG_MAC_Gate_00C4)
|
||||
EVT_CASE_LT(STORY_CH6_ARRIVED_AT_FLOWER_FIELDS)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_00C5)
|
||||
EVT_SET(LVar1, MSG_MAC_Gate_00C6)
|
||||
EVT_CASE_LT(STORY_CH6_STAR_SPIRIT_RESCUED)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_00C7)
|
||||
EVT_SET(LVar1, MSG_MAC_Gate_00C8)
|
||||
EVT_CASE_LT(STORY_CH7_INVITED_TO_STARBORN_VALLEY)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_00C9)
|
||||
EVT_SET(LVar1, MSG_MAC_Gate_00CA)
|
||||
EVT_CASE_LT(STORY_CH7_STAR_SPRIT_DEPARTED)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_00CB)
|
||||
EVT_SET(LVar1, MSG_MAC_Gate_00CC)
|
||||
EVT_CASE_LT(STORY_EPILOGUE)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_00CD)
|
||||
EVT_SET(LVar1, MSG_MAC_Gate_00CE)
|
||||
EVT_CASE_GE(STORY_EPILOGUE)
|
||||
EVT_SET(LVar0, MSG_Outro_0030)
|
||||
EVT_SET(LVar1, MSG_Outro_0031)
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(SpeakToPlayer, NPC_FickleLover, ANIM_Toad_Blue_Talk, ANIM_Toad_Blue_Idle, 5, LVar0)
|
||||
EVT_CALL(SpeakToPlayer, NPC_ShamelessLover, ANIM_Toadette_Pink_Talk, ANIM_Toadette_Pink_Idle, 5, LVar1)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInteract_ThreeSisters) = {
|
||||
EVT_SWITCH(GB_StoryProgress)
|
||||
EVT_CASE_LT(STORY_CH0_MET_STAR_SPIRITS)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_00CF)
|
||||
EVT_SET(LVar1, MSG_MAC_Gate_00D0)
|
||||
EVT_SET(LVar2, MSG_MAC_Gate_00D1)
|
||||
EVT_CASE_LT(STORY_CH1_MERLIN_REVEALED_KOOPA_BROS)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_00D2)
|
||||
EVT_SET(LVar1, MSG_MAC_Gate_00D3)
|
||||
EVT_SET(LVar2, MSG_MAC_Gate_00D4)
|
||||
EVT_CASE_LT(STORY_CH1_STAR_SPRIT_DEPARTED)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_00D5)
|
||||
EVT_SET(LVar1, MSG_MAC_Gate_00D6)
|
||||
EVT_SET(LVar2, MSG_MAC_Gate_00D7)
|
||||
EVT_CASE_LT(STORY_CH2_STAR_SPRIT_DEPARTED)
|
||||
EVT_IF_EQ(GF_MAC03_BombedRock, FALSE)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_00D8)
|
||||
EVT_SET(LVar1, MSG_MAC_Gate_00D9)
|
||||
EVT_SET(LVar2, MSG_MAC_Gate_00DA)
|
||||
EVT_ELSE
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_00DB)
|
||||
EVT_SET(LVar1, MSG_MAC_Gate_00DC)
|
||||
EVT_SET(LVar2, MSG_MAC_Gate_00DD)
|
||||
EVT_END_IF
|
||||
EVT_CASE_LT(STORY_CH3_STAR_SPIRIT_RESCUED)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_00DE)
|
||||
EVT_SET(LVar1, MSG_MAC_Gate_00DF)
|
||||
EVT_SET(LVar2, MSG_MAC_Gate_00E0)
|
||||
EVT_CASE_LT(STORY_CH4_RETURNED_STOREROOM_KEY)
|
||||
EVT_IF_EQ(GF_MAC04_StoreroomKeyStolen, FALSE)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_00E1)
|
||||
EVT_SET(LVar1, MSG_MAC_Gate_00E2)
|
||||
EVT_SET(LVar2, MSG_MAC_Gate_00E3)
|
||||
EVT_ELSE
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_00E4)
|
||||
EVT_SET(LVar1, MSG_MAC_Gate_00E5)
|
||||
EVT_SET(LVar2, MSG_MAC_Gate_00E6)
|
||||
EVT_END_IF
|
||||
EVT_CASE_LT(STORY_CH4_STAR_SPRIT_DEPARTED)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_00E7)
|
||||
EVT_SET(LVar1, MSG_MAC_Gate_00E8)
|
||||
EVT_SET(LVar2, MSG_MAC_Gate_00E9)
|
||||
EVT_CASE_LT(STORY_CH5_DEFEATED_FUZZIPEDE)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_00EA)
|
||||
EVT_SET(LVar1, MSG_MAC_Gate_00EB)
|
||||
EVT_SET(LVar2, MSG_MAC_Gate_00EC)
|
||||
EVT_CASE_LT(STORY_CH5_STAR_SPRIT_DEPARTED)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_00ED)
|
||||
EVT_SET(LVar1, MSG_MAC_Gate_00EE)
|
||||
EVT_SET(LVar2, MSG_MAC_Gate_00EF)
|
||||
EVT_CASE_LT(STORY_CH6_ARRIVED_AT_FLOWER_FIELDS)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_00F0)
|
||||
EVT_SET(LVar1, MSG_MAC_Gate_00F1)
|
||||
EVT_SET(LVar2, MSG_MAC_Gate_00F2)
|
||||
EVT_CASE_LT(STORY_CH6_STAR_SPIRIT_RESCUED)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_00F3)
|
||||
EVT_SET(LVar1, MSG_MAC_Gate_00F4)
|
||||
EVT_SET(LVar2, MSG_MAC_Gate_00F5)
|
||||
EVT_CASE_LT(STORY_CH7_INVITED_TO_STARBORN_VALLEY)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_00F6)
|
||||
EVT_SET(LVar1, MSG_MAC_Gate_00F7)
|
||||
EVT_SET(LVar2, MSG_MAC_Gate_00F8)
|
||||
EVT_CASE_LT(STORY_CH7_STAR_SPRIT_DEPARTED)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_00F9)
|
||||
EVT_SET(LVar1, MSG_MAC_Gate_00FA)
|
||||
EVT_SET(LVar2, MSG_MAC_Gate_00FB)
|
||||
EVT_CASE_LT(STORY_EPILOGUE)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_00FC)
|
||||
EVT_SET(LVar1, MSG_MAC_Gate_00FD)
|
||||
EVT_SET(LVar2, MSG_MAC_Gate_00FE)
|
||||
EVT_CASE_GE(STORY_EPILOGUE)
|
||||
EVT_SET(LVar0, MSG_Outro_0032)
|
||||
EVT_SET(LVar1, MSG_Outro_0033)
|
||||
EVT_SET(LVar2, MSG_Outro_0034)
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(SpeakToPlayer, NPC_KrisT, ANIM_Toadette_Green_Talk, ANIM_Toadette_Green_Idle, 0, LVar0)
|
||||
EVT_CALL(SpeakToPlayer, NPC_MissT, ANIM_Toadette_Orange_Talk, ANIM_Toadette_Orange_Idle, 0, LVar1)
|
||||
EVT_CALL(SpeakToPlayer, NPC_FelissaT, ANIM_Toadette_Purple_Talk, ANIM_Toadette_Purple_Idle, 0, LVar2)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInteract_MissT) = {
|
||||
EVT_EXEC_WAIT(N(EVS_NpcInteract_ThreeSisters))
|
||||
EVT_EXEC_WAIT(N(EVS_LetterPrompt_MissT))
|
||||
EVT_IF_NE(LVarC, 0)
|
||||
EVT_RETURN
|
||||
EVT_END_IF
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInteract_Toad_08) = {
|
||||
EVT_SWITCH(GB_StoryProgress)
|
||||
EVT_CASE_LT(STORY_CH0_MET_STAR_SPIRITS)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_0103)
|
||||
EVT_CASE_LT(STORY_CH1_MERLIN_REVEALED_KOOPA_BROS)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_0104)
|
||||
EVT_CASE_LT(STORY_CH1_STAR_SPRIT_DEPARTED)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_0105)
|
||||
EVT_CASE_LT(STORY_CH2_STAR_SPRIT_DEPARTED)
|
||||
EVT_IF_EQ(GF_MAC03_BombedRock, FALSE)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_0106)
|
||||
EVT_ELSE
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_0107)
|
||||
EVT_END_IF
|
||||
EVT_CASE_LT(STORY_CH3_STAR_SPIRIT_RESCUED)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_0108)
|
||||
EVT_CASE_LT(STORY_CH4_STAR_SPRIT_DEPARTED)
|
||||
EVT_IF_EQ(GF_MAC00_DictionaryStolen, FALSE)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_0109)
|
||||
EVT_ELSE
|
||||
EVT_IF_EQ(GF_MAC00_DictionaryReturned, FALSE)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_010A)
|
||||
EVT_ELSE
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_010B)
|
||||
EVT_END_IF
|
||||
EVT_END_IF
|
||||
EVT_CASE_LT(STORY_CH5_DEFEATED_FUZZIPEDE)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_010C)
|
||||
EVT_CASE_LT(STORY_CH5_STAR_SPRIT_DEPARTED)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_010D)
|
||||
EVT_CASE_LT(STORY_CH6_ARRIVED_AT_FLOWER_FIELDS)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_010E)
|
||||
EVT_CASE_LT(STORY_CH6_STAR_SPIRIT_RESCUED)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_010F)
|
||||
EVT_CASE_LT(STORY_CH7_INVITED_TO_STARBORN_VALLEY)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_0110)
|
||||
EVT_CASE_LT(STORY_CH7_STAR_SPRIT_DEPARTED)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_0111)
|
||||
EVT_CASE_LT(STORY_EPILOGUE)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_0112)
|
||||
EVT_CASE_GE(STORY_EPILOGUE)
|
||||
EVT_SET(LVar0, MSG_Outro_0035)
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toad_Blue_Talk, ANIM_Toad_Blue_Idle, 0, LVar0)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcAux_ShamelessLover) = {
|
||||
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Toadette_Pink_Still)
|
||||
EVT_WAIT(3)
|
||||
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Toadette_Pink_Idle)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcAux_KrisT) = {
|
||||
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Toadette_Green_Still)
|
||||
EVT_WAIT(2)
|
||||
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Toadette_Green_Idle)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcAux_MissT) = {
|
||||
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Toadette_Orange_Still)
|
||||
EVT_WAIT(6)
|
||||
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Toadette_Orange_Idle)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcAux_FelissaT) = {
|
||||
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Toadette_Purple_Still)
|
||||
EVT_WAIT(8)
|
||||
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Toadette_Purple_Idle)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInteract_Toad_09) = {
|
||||
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_Toad_Yellow_Talk, ANIM_Toad_Yellow_Idle, 0, MSG_MAC_Gate_0114)
|
||||
EVT_RETURN
|
||||
EVT_END_IF
|
||||
EVT_IF_NE(LVar2, -1)
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toad_Yellow_Talk, ANIM_Toad_Yellow_Idle, 0, MSG_MAC_Gate_0115)
|
||||
EVT_RETURN
|
||||
EVT_END_IF
|
||||
EVT_IF_NE(LVar3, -1)
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toad_Yellow_Talk, ANIM_Toad_Yellow_Idle, 0, MSG_MAC_Gate_0116)
|
||||
EVT_RETURN
|
||||
EVT_END_IF
|
||||
EVT_IF_NE(LVar4, -1)
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toad_Yellow_Talk, ANIM_Toad_Yellow_Idle, 0, MSG_MAC_Gate_0117)
|
||||
EVT_RETURN
|
||||
EVT_END_IF
|
||||
EVT_IF_NE(LVar5, -1)
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toad_Yellow_Talk, ANIM_Toad_Yellow_Idle, 0, MSG_MAC_Gate_0118)
|
||||
EVT_RETURN
|
||||
EVT_END_IF
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toad_Yellow_Talk, ANIM_Toad_Yellow_Idle, 0, MSG_MAC_Gate_0113)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInit_Toad_04) = {
|
||||
EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Toad_04)))
|
||||
EVT_IF_LT(GB_StoryProgress, STORY_EPILOGUE)
|
||||
EVT_RETURN
|
||||
EVT_END_IF
|
||||
EVT_CALL(GetEntryID, LVar0)
|
||||
EVT_IF_NE(LVar0, mac_00_ENTRY_7)
|
||||
EVT_EXEC(N(EVS_BlockExitToGoomaRoad))
|
||||
EVT_END_IF
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInit_Toad_05) = {
|
||||
EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Toad_05)))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInit_Toad_06) = {
|
||||
EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Toad_06)))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInit_FickleLover) = {
|
||||
EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Lovers)))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInit_ShamelessLover) = {
|
||||
EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Lovers)))
|
||||
EVT_CALL(BindNpcAux, NPC_SELF, EVT_PTR(N(EVS_NpcAux_ShamelessLover)))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInit_KrisT) = {
|
||||
EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_ThreeSisters)))
|
||||
EVT_CALL(BindNpcAux, NPC_SELF, EVT_PTR(N(EVS_NpcAux_KrisT)))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInit_MissT) = {
|
||||
EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_MissT)))
|
||||
EVT_CALL(BindNpcAux, NPC_SELF, EVT_PTR(N(EVS_NpcAux_MissT)))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInit_FelissaT) = {
|
||||
EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_ThreeSisters)))
|
||||
EVT_CALL(BindNpcAux, NPC_SELF, EVT_PTR(N(EVS_NpcAux_FelissaT)))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInit_DojoSpectator) = {
|
||||
EVT_IF_GE(GB_StoryProgress, STORY_EPILOGUE)
|
||||
EVT_CALL(SetNpcPos, NPC_DojoSpectator, 350, 20, -100)
|
||||
EVT_END_IF
|
||||
EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Toad_08)))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInit_DojoFan) = {
|
||||
EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Toad_09)))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
StaticNpc N(NpcData_SharedTownsfolk)[] = {
|
||||
{
|
||||
.id = NPC_Toad_04,
|
||||
.settings = &N(NpcSettings_Toad_Stationary_Shared),
|
||||
.pos = { -150.0f, 0.0f, -275.0f },
|
||||
.yaw = 90,
|
||||
.flags = ENEMY_FLAGS_1 | ENEMY_FLAGS_8 | ENEMY_FLAGS_100 | ENEMY_FLAGS_400 | ENEMY_FLAGS_800 | ENEMY_FLAGS_2000 | ENEMY_FLAGS_10000 | ENEMY_FLAGS_100000,
|
||||
.init = &N(EVS_NpcInit_Toad_04),
|
||||
.drops = TOAD_DROPS,
|
||||
.animations = TOAD_RED_ANIMS,
|
||||
.tattle = MSG_NpcTattle_MAC_GateGuardian,
|
||||
},
|
||||
{
|
||||
.id = NPC_Toad_05,
|
||||
.settings = &N(NpcSettings_Toad_Wander_Shared),
|
||||
.pos = { 219.0f, 0.0f, -45.0f },
|
||||
.yaw = 90,
|
||||
.flags = ENEMY_FLAGS_1 | ENEMY_FLAGS_8 | ENEMY_FLAGS_100 | ENEMY_FLAGS_400 | ENEMY_FLAGS_800 | ENEMY_FLAGS_2000 | ENEMY_FLAGS_10000,
|
||||
.init = &N(EVS_NpcInit_Toad_05),
|
||||
.drops = TOAD_DROPS,
|
||||
.territory = {
|
||||
.patrol = {
|
||||
.isFlying = TRUE,
|
||||
.moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED,
|
||||
.numPoints = 5,
|
||||
.points = {
|
||||
{ 219, 0, -45 },
|
||||
{ 144, 0, -10 },
|
||||
{ 163, 0, -50 },
|
||||
{ 240, 0, 50 },
|
||||
{ 275, 0, 10 },
|
||||
},
|
||||
.detectShape = SHAPE_CYLINDER,
|
||||
.detectPos = { 0, 0, 0 },
|
||||
.detectSize = { 200 },
|
||||
}
|
||||
},
|
||||
.animations = TOAD_RED_ANIMS,
|
||||
.tattle = MSG_NpcTattle_MAC_ShopLoiterer,
|
||||
},
|
||||
{
|
||||
.id = NPC_Toad_06,
|
||||
.settings = &N(NpcSettings_Toad_Patrol_Shared),
|
||||
.pos = { -290.0f, 0.0f, -120.0f },
|
||||
.yaw = 90,
|
||||
.flags = ENEMY_FLAGS_1 | ENEMY_FLAGS_8 | ENEMY_FLAGS_100 | ENEMY_FLAGS_400 | ENEMY_FLAGS_800 | ENEMY_FLAGS_2000 | ENEMY_FLAGS_10000,
|
||||
.init = &N(EVS_NpcInit_Toad_06),
|
||||
.drops = TOAD_DROPS,
|
||||
.territory = {
|
||||
.patrol = {
|
||||
.isFlying = TRUE,
|
||||
.moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED,
|
||||
.numPoints = 2,
|
||||
.points = {
|
||||
{ -290, 0, -120 },
|
||||
{ 37, 0, -150 },
|
||||
},
|
||||
.detectShape = SHAPE_CYLINDER,
|
||||
.detectPos = { 0, 0, 0 },
|
||||
.detectSize = { 200 },
|
||||
}
|
||||
},
|
||||
.animations = TOAD_YELLOW_ANIMS,
|
||||
.tattle = MSG_NpcTattle_MAC_NewsEnthusiast,
|
||||
},
|
||||
{
|
||||
.id = NPC_FickleLover,
|
||||
.settings = &N(NpcSettings_Toad_Stationary_Shared),
|
||||
.pos = { -40.0f, 0.0f, 61.0f },
|
||||
.yaw = 90,
|
||||
.flags = ENEMY_FLAGS_1 | ENEMY_FLAGS_8 | ENEMY_FLAGS_100 | ENEMY_FLAGS_400 | ENEMY_FLAGS_800 | ENEMY_FLAGS_2000 | ENEMY_FLAGS_10000 | ENEMY_FLAGS_400000,
|
||||
.init = &N(EVS_NpcInit_FickleLover),
|
||||
.drops = TOAD_DROPS,
|
||||
.animations = TOAD_BLUE_ANIMS,
|
||||
.tattle = MSG_NpcTattle_MAC_FickleLovers,
|
||||
},
|
||||
{
|
||||
.id = NPC_ShamelessLover,
|
||||
.settings = &N(NpcSettings_Toad_Stationary_Shared),
|
||||
.pos = { -15.0f, 0.0f, 60.0f },
|
||||
.yaw = 270,
|
||||
.flags = ENEMY_FLAGS_1 | ENEMY_FLAGS_8 | ENEMY_FLAGS_100 | ENEMY_FLAGS_400 | ENEMY_FLAGS_800 | ENEMY_FLAGS_2000 | ENEMY_FLAGS_10000 | ENEMY_FLAGS_400000,
|
||||
.init = &N(EVS_NpcInit_ShamelessLover),
|
||||
.drops = TOADETTE_DROPS,
|
||||
.animations = TOADETTE_PINK_ANIMS,
|
||||
.tattle = MSG_NpcTattle_MAC_ShamelessLover,
|
||||
},
|
||||
{
|
||||
.id = NPC_KrisT,
|
||||
.settings = &N(NpcSettings_Toad_Stationary_Shared),
|
||||
.pos = { 426.0f, 20.0f, 268.0f },
|
||||
.yaw = 90,
|
||||
.flags = ENEMY_FLAGS_1 | ENEMY_FLAGS_8 | ENEMY_FLAGS_100 | ENEMY_FLAGS_400 | ENEMY_FLAGS_800 | ENEMY_FLAGS_2000 | ENEMY_FLAGS_10000,
|
||||
.init = &N(EVS_NpcInit_KrisT),
|
||||
.drops = TOADETTE_DROPS,
|
||||
.animations = TOADETTE_GREEN_ANIMS,
|
||||
.tattle = MSG_NpcTattle_MAC_ThreeSisters_Eldest,
|
||||
},
|
||||
{
|
||||
.id = NPC_MissT,
|
||||
.settings = &N(NpcSettings_Toad_Stationary_Shared),
|
||||
.pos = { 381.0f, 20.0f, 326.0f },
|
||||
.yaw = 180,
|
||||
.flags = ENEMY_FLAGS_1 | ENEMY_FLAGS_8 | ENEMY_FLAGS_100 | ENEMY_FLAGS_400 | ENEMY_FLAGS_800 | ENEMY_FLAGS_2000 | ENEMY_FLAGS_10000,
|
||||
.init = &N(EVS_NpcInit_MissT),
|
||||
.drops = TOADETTE_DROPS,
|
||||
.animations = TOADETTE_ORANGE_ANIMS,
|
||||
.tattle = MSG_NpcTattle_MAC_ThreeSisters_Middle,
|
||||
},
|
||||
{
|
||||
.id = NPC_FelissaT,
|
||||
.settings = &N(NpcSettings_Toad_Stationary_Shared),
|
||||
.pos = { 476.0f, 20.0f, 326.0f },
|
||||
.yaw = 270,
|
||||
.flags = ENEMY_FLAGS_1 | ENEMY_FLAGS_8 | ENEMY_FLAGS_100 | ENEMY_FLAGS_400 | ENEMY_FLAGS_800 | ENEMY_FLAGS_2000 | ENEMY_FLAGS_10000,
|
||||
.init = &N(EVS_NpcInit_FelissaT),
|
||||
.drops = TOADETTE_DROPS,
|
||||
.animations = TOADETTE_PURPLE_ANIMS,
|
||||
.tattle = MSG_NpcTattle_MAC_ThreeSisters_Youngest,
|
||||
},
|
||||
{
|
||||
.id = NPC_DojoSpectator,
|
||||
.settings = &N(NpcSettings_Toad_Stationary_Shared),
|
||||
.pos = { 424.0f, 20.0f, -85.0f },
|
||||
.yaw = 270,
|
||||
.flags = ENEMY_FLAGS_1 | ENEMY_FLAGS_8 | ENEMY_FLAGS_100 | ENEMY_FLAGS_400 | ENEMY_FLAGS_800 | ENEMY_FLAGS_2000 | ENEMY_FLAGS_10000,
|
||||
.init = &N(EVS_NpcInit_DojoSpectator),
|
||||
.drops = TOAD_DROPS,
|
||||
.animations = TOAD_BLUE_ANIMS,
|
||||
.tattle = MSG_NpcTattle_MAC_DojoSpectator,
|
||||
},
|
||||
{
|
||||
.id = NPC_DojoFan,
|
||||
.settings = &N(NpcSettings_Toad_Stationary_Shared),
|
||||
.pos = { 373.0f, 0.0f, 22.0f },
|
||||
.yaw = 270,
|
||||
.flags = ENEMY_FLAGS_1 | ENEMY_FLAGS_8 | ENEMY_FLAGS_100 | ENEMY_FLAGS_400 | ENEMY_FLAGS_800 | ENEMY_FLAGS_2000 | ENEMY_FLAGS_10000,
|
||||
.init = &N(EVS_NpcInit_DojoFan),
|
||||
.drops = TOAD_DROPS,
|
||||
.animations = TOAD_YELLOW_ANIMS,
|
||||
.tattle = MSG_NpcTattle_MAC_DojoFanToad,
|
||||
},
|
||||
};
|
135
src/world/area_mac/mac_00/mac_00_11_intro_npc.c
Normal file
135
src/world/area_mac/mac_00/mac_00_11_intro_npc.c
Normal file
@ -0,0 +1,135 @@
|
||||
#include "mac_00.h"
|
||||
|
||||
#define NAME_SUFFIX _Intro
|
||||
#include "world/common/npc/Luigi.inc.c"
|
||||
#include "world/common/npc/Toad_Stationary.inc.c"
|
||||
#include "world/common/npc/Toad_Wander.inc.c"
|
||||
#define NAME_SUFFIX
|
||||
|
||||
EvtScript N(EVS_NpcInit_Chan_Intro) = {
|
||||
EVT_CALL(SetNpcPos, NPC_SELF, 570, 20, -150)
|
||||
EVT_CALL(SetNpcYaw, NPC_SELF, 270)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInit_Lee_Intro) = {
|
||||
EVT_CALL(SetNpcPos, NPC_SELF, 600, 20, -145)
|
||||
EVT_CALL(SetNpcYaw, NPC_SELF, 270)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
s32 N(ExtraAnims_Chan_Intro)[] = {
|
||||
ANIM_Chan_Still,
|
||||
ANIM_Chan_Idle,
|
||||
ANIM_Chan_Run,
|
||||
-1
|
||||
};
|
||||
|
||||
s32 N(ExtraAnims_Lee_Intro)[] = {
|
||||
ANIM_Lee_Still,
|
||||
ANIM_Lee_Idle,
|
||||
ANIM_Lee_Talk,
|
||||
-1
|
||||
};
|
||||
|
||||
StaticNpc N(NpcData_IntroNPCs)[] = {
|
||||
{
|
||||
.id = NPC_Luigi_Intro,
|
||||
.settings = &N(NpcSettings_Luigi_Intro),
|
||||
.pos = { NPC_DISPOSE_LOCATION },
|
||||
.yaw = 90,
|
||||
.flags = ENEMY_FLAGS_1 | ENEMY_FLAGS_4 | ENEMY_FLAGS_8 | ENEMY_FLAGS_100 | ENEMY_FLAGS_200 | ENEMY_FLAGS_400 | ENEMY_FLAGS_800,
|
||||
.drops = LUIGI_DROPS,
|
||||
.animations = LUIGI_ANIMS,
|
||||
},
|
||||
{
|
||||
.id = NPC_Toad_01,
|
||||
.settings = &N(NpcSettings_Toad_Stationary_Intro),
|
||||
.pos = { -150.0f, 0.0f, -275.0f },
|
||||
.yaw = 90,
|
||||
.flags = ENEMY_FLAGS_1 | ENEMY_FLAGS_8 | ENEMY_FLAGS_100 | ENEMY_FLAGS_400 | ENEMY_FLAGS_800 | ENEMY_FLAGS_2000 | ENEMY_FLAGS_10000 | ENEMY_FLAGS_100000,
|
||||
.drops = TOAD_DROPS,
|
||||
.animations = TOAD_RED_ANIMS,
|
||||
.tattle = MSG_NpcTattle_MAC_GateGuardian,
|
||||
},
|
||||
{
|
||||
.id = NPC_Toad_02,
|
||||
.settings = &N(NpcSettings_Toad_Wander_Intro),
|
||||
.pos = { 219.0f, 0.0f, -45.0f },
|
||||
.yaw = 90,
|
||||
.flags = ENEMY_FLAGS_1 | ENEMY_FLAGS_8 | ENEMY_FLAGS_100 | ENEMY_FLAGS_400 | ENEMY_FLAGS_800 | ENEMY_FLAGS_2000 | ENEMY_FLAGS_10000,
|
||||
.drops = TOAD_DROPS,
|
||||
.territory = {
|
||||
.patrol = {
|
||||
.isFlying = TRUE,
|
||||
.moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED,
|
||||
.numPoints = 5,
|
||||
.points = {
|
||||
{ 219, 0, -45 },
|
||||
{ 144, 0, -10 },
|
||||
{ 163, 0, -50 },
|
||||
{ 240, 0, 50 },
|
||||
{ 275, 0, 10 },
|
||||
},
|
||||
.detectShape = SHAPE_CYLINDER,
|
||||
.detectPos = { 0, 0, 0 },
|
||||
.detectSize = { 200 },
|
||||
}
|
||||
},
|
||||
.animations = TOAD_RED_ANIMS,
|
||||
.tattle = MSG_NpcTattle_MAC_ShopLoiterer,
|
||||
},
|
||||
{
|
||||
.id = NPC_Toad_03,
|
||||
.settings = &N(NpcSettings_Toad_Stationary_Intro),
|
||||
.pos = { 424.0f, 20.0f, -85.0f },
|
||||
.yaw = 270,
|
||||
.flags = ENEMY_FLAGS_1 | ENEMY_FLAGS_8 | ENEMY_FLAGS_100 | ENEMY_FLAGS_400 | ENEMY_FLAGS_800 | ENEMY_FLAGS_2000 | ENEMY_FLAGS_10000,
|
||||
.drops = TOAD_DROPS,
|
||||
.animations = TOAD_BLUE_ANIMS,
|
||||
.tattle = MSG_NpcTattle_MAC_DojoSpectator,
|
||||
},
|
||||
{
|
||||
.id = NPC_Chan,
|
||||
.settings = &N(NpcSettings_Toad_Stationary_Intro),
|
||||
.pos = { 310.0f, 115.0f, -390.0f },
|
||||
.yaw = 45,
|
||||
.flags = ENEMY_FLAGS_1 | ENEMY_FLAGS_8 | ENEMY_FLAGS_100 | ENEMY_FLAGS_400 | ENEMY_FLAGS_800 | ENEMY_FLAGS_2000 | ENEMY_FLAGS_10000 | ENEMY_FLAGS_100000,
|
||||
.init = &N(EVS_NpcInit_Chan_Intro),
|
||||
.drops = {
|
||||
.dropFlags = NPC_DROP_FLAGS_80,
|
||||
.heartDrops = NO_DROPS,
|
||||
.flowerDrops = NO_DROPS,
|
||||
},
|
||||
.animations = {
|
||||
.idle = ANIM_Chan_Idle,
|
||||
},
|
||||
.extraAnimations = N(ExtraAnims_Chan_Intro),
|
||||
.tattle = MSG_NpcTattle_Chan,
|
||||
},
|
||||
{
|
||||
.id = NPC_Lee,
|
||||
.settings = &N(NpcSettings_Toad_Stationary_Intro),
|
||||
.pos = { 330.0f, 115.0f, -410.0f },
|
||||
.yaw = 45,
|
||||
.flags = ENEMY_FLAGS_1 | ENEMY_FLAGS_8 | ENEMY_FLAGS_100 | ENEMY_FLAGS_400 | ENEMY_FLAGS_800 | ENEMY_FLAGS_2000 | ENEMY_FLAGS_10000 | ENEMY_FLAGS_100000,
|
||||
.init = &N(EVS_NpcInit_Lee_Intro),
|
||||
.drops = {
|
||||
.dropFlags = NPC_DROP_FLAGS_80,
|
||||
.heartDrops = NO_DROPS,
|
||||
.flowerDrops = NO_DROPS,
|
||||
},
|
||||
.animations = {
|
||||
.idle = ANIM_Lee_Idle,
|
||||
},
|
||||
.extraAnimations = N(ExtraAnims_Lee_Intro),
|
||||
.tattle = MSG_NpcTattle_Lee,
|
||||
},
|
||||
};
|
||||
|
||||
NpcGroupList N(IntroNPCs) = {
|
||||
NPC_GROUP(N(NpcData_IntroNPCs)),
|
||||
{}
|
||||
};
|
92
src/world/area_mac/mac_00/mac_00_12_intro.c
Normal file
92
src/world/area_mac/mac_00/mac_00_12_intro.c
Normal file
@ -0,0 +1,92 @@
|
||||
#include "mac_00.h"
|
||||
|
||||
EvtScript N(EVS_PlayerExitPipe_Intro) = {
|
||||
EVT_CALL(DisablePlayerPhysics, TRUE)
|
||||
EVT_CALL(HidePlayerShadow, TRUE)
|
||||
EVT_CALL(SetPlayerPos, -100, -10, -370)
|
||||
EVT_CALL(InterpPlayerYaw, 135, 0)
|
||||
EVT_WAIT(2)
|
||||
EVT_CALL(PlaySoundAtPlayer, SOUND_ENTER_PIPE, 0)
|
||||
EVT_CALL(func_802D286C, 0x100)
|
||||
EVT_CALL(func_802D2520, ANIM_Mario_10002, 5, 2, 1, 1, 0)
|
||||
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
|
||||
EVT_LOOP(40)
|
||||
EVT_ADD(LVar1, 1)
|
||||
EVT_CALL(SetPlayerPos, LVar0, LVar1, LVar2)
|
||||
EVT_WAIT(1)
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(func_802D2520, ANIM_Mario_10002, 0, 0, 0, 0, 0)
|
||||
EVT_CALL(HidePlayerShadow, FALSE)
|
||||
EVT_CALL(DisablePlayerPhysics, FALSE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_LuigiExitPipe_Intro) = {
|
||||
EVT_CALL(EnableNpcShadow, NPC_Luigi_Intro, FALSE)
|
||||
EVT_CALL(SetNpcPos, NPC_Luigi_Intro, -100, -35, -370)
|
||||
EVT_CALL(SetNpcYaw, NPC_Luigi_Intro, 135)
|
||||
EVT_WAIT(2)
|
||||
EVT_CALL(PlaySoundAtNpc, NPC_Luigi_Intro, SOUND_ENTER_PIPE, 0)
|
||||
EVT_CALL(func_802CFE2C, 0, 0x100)
|
||||
EVT_CALL(func_802CFD30, 0, 5, 2, 1, 1, 0)
|
||||
EVT_CALL(SetNpcPos, NPC_Luigi_Intro, -100, -10, -370)
|
||||
EVT_CALL(GetNpcPos, NPC_Luigi_Intro, LVar0, LVar1, LVar2)
|
||||
EVT_LOOP(45)
|
||||
EVT_ADD(LVar1, 1)
|
||||
EVT_CALL(SetNpcPos, NPC_Luigi_Intro, LVar0, LVar1, LVar2)
|
||||
EVT_WAIT(1)
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(func_802CFD30, 0, 0, 0, 0, 0, 0)
|
||||
EVT_CALL(SetNpcPos, NPC_Luigi_Intro, -100, 30, -370)
|
||||
EVT_WAIT(3)
|
||||
EVT_CALL(EnableNpcShadow, NPC_Luigi_Intro, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_Scene_Intro) = {
|
||||
EVT_CALL(DisablePlayerInput, TRUE)
|
||||
EVT_CALL(UseSettingsFrom, CAM_DEFAULT, -100, 30, -370)
|
||||
EVT_CALL(SetPanTarget, CAM_DEFAULT, -100, 30, -370)
|
||||
EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(300.0))
|
||||
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0))
|
||||
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
|
||||
EVT_THREAD
|
||||
EVT_EXEC_WAIT(N(EVS_PlayerExitPipe_Intro))
|
||||
EVT_WAIT(10)
|
||||
EVT_CALL(func_802D1270, -60, -320, EVT_FLOAT(4.0))
|
||||
EVT_WAIT(63)
|
||||
EVT_CALL(func_802D1270, 80, -60, EVT_FLOAT(4.0))
|
||||
EVT_CALL(func_802D1270, 180, 0, EVT_FLOAT(4.0))
|
||||
EVT_CALL(func_802D1270, 650, 0, EVT_FLOAT(4.0))
|
||||
EVT_END_THREAD
|
||||
EVT_THREAD
|
||||
EVT_WAIT(70)
|
||||
EVT_EXEC_WAIT(N(EVS_LuigiExitPipe_Intro))
|
||||
EVT_WAIT(10)
|
||||
EVT_CALL(SetNpcFlagBits, NPC_Luigi_Intro, NPC_FLAG_GRAVITY, TRUE)
|
||||
EVT_CALL(SetNpcAnimation, NPC_Luigi_Intro, ANIM_Luigi_Run)
|
||||
EVT_CALL(SetNpcSpeed, NPC_Luigi_Intro, EVT_FLOAT(4.0))
|
||||
EVT_CALL(NpcMoveTo, NPC_Luigi_Intro, 80, -60, 0)
|
||||
EVT_CALL(NpcMoveTo, NPC_Luigi_Intro, 180, 0, 0)
|
||||
EVT_CALL(NpcMoveTo, NPC_Luigi_Intro, 650, 0, 0)
|
||||
EVT_END_THREAD
|
||||
EVT_WAIT(70)
|
||||
EVT_CALL(SetPanTarget, CAM_DEFAULT, -60, 0, -320)
|
||||
EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(600.0))
|
||||
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(UseSettingsFrom, CAM_DEFAULT, 400, 0, 0)
|
||||
EVT_CALL(SetPanTarget, CAM_DEFAULT, 400, 0, 0)
|
||||
EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(450.0))
|
||||
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(0.5))
|
||||
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
|
||||
EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0))
|
||||
EVT_CALL(GotoMap, EVT_PTR("mac_01"), mac_01_ENTRY_4)
|
||||
EVT_WAIT(100)
|
||||
EVT_CALL(DisablePlayerInput, FALSE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
462
src/world/area_mac/mac_00/mac_00_13_epilogue_npc.c
Normal file
462
src/world/area_mac/mac_00/mac_00_13_epilogue_npc.c
Normal file
@ -0,0 +1,462 @@
|
||||
#include "mac_00.h"
|
||||
|
||||
#define NAME_SUFFIX _Epilogue
|
||||
#include "world/common/npc/Luigi.inc.c"
|
||||
#include "world/common/npc/GoombaFamily.inc.c"
|
||||
#include "world/common/npc/Toad_Stationary.inc.c"
|
||||
#define NAME_SUFFIX
|
||||
|
||||
EvtScript N(EVS_NpcInteract_Goompapa_Epilogue) = {
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Goompapa_Talk, ANIM_Goompapa_Idle, 0, MSG_Outro_0024)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInit_Goompapa_Epilogue) = {
|
||||
EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Goompapa_Epilogue)))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInteract_Goomama_Epilogue) = {
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Goomama_Talk, ANIM_Goomama_Idle, 0, MSG_Outro_0025)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInit_Goomama_Epilogue) = {
|
||||
EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Goomama_Epilogue)))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInteract_Gooma_Epilogue) = {
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Gooma_Talk, ANIM_Gooma_Idle, 0, MSG_Outro_0026)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInit_Gooma_Epilogue) = {
|
||||
EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Gooma_Epilogue)))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInteract_ChuckQuizmo_Epilogue) = {
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_ChuckQuizmo_Talk, ANIM_ChuckQuizmo_Idle, 0, MSG_Outro_0027)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInit_ChuckQuizmo_Epilogue) = {
|
||||
EVT_CALL(SetNpcPos, NPC_ChuckQuizmo, 460, 20, -130)
|
||||
EVT_CALL(SetNpcYaw, NPC_ChuckQuizmo, 90)
|
||||
EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_ChuckQuizmo_Epilogue)))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInteract_VannaT_Epilogue) = {
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_VannaT_Wave, ANIM_VannaT_Wave, 0, MSG_Outro_003B)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInit_VannaT_Epilogue) = {
|
||||
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_VannaT_Happy)
|
||||
EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_VannaT_Epilogue)))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInteract_Chan_Epilogue) = {
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Chan_Run, ANIM_Chan_Idle, 0, MSG_Outro_0029)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInit_Chan_Epilogue) = {
|
||||
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt, COLLIDER_FLAGS_UPPER_MASK)
|
||||
EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Chan_Epilogue)))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInteract_Lee_Epilogue) = {
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Lee_Talk, ANIM_Lee_Idle, 0, MSG_Outro_002A)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInit_Lee_Epilogue) = {
|
||||
EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Lee_Epilogue)))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInteract_TheMaster_Epilogue) = {
|
||||
EVT_CALL(SpeakToPlayer, NPC_TheMaster, ANIM_TheMaster_Talk, ANIM_TheMaster_Idle, 0, MSG_Outro_0028)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInit_TheMaster_Epilogue) = {
|
||||
EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_TheMaster_Epilogue)))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInteract_Toad_01_Epilogue) = {
|
||||
EVT_CALL(SpeakToPlayer, NPC_Toad_01, ANIM_HarryT_Talk, ANIM_HarryT_Idle, 0, MSG_Outro_002B)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInit_Toad_01_Epilogue) = {
|
||||
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_mono1, COLLIDER_FLAGS_UPPER_MASK)
|
||||
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_mono2, COLLIDER_FLAGS_UPPER_MASK)
|
||||
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_mono3, COLLIDER_FLAGS_UPPER_MASK)
|
||||
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_mono4, COLLIDER_FLAGS_UPPER_MASK)
|
||||
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_mono5, COLLIDER_FLAGS_UPPER_MASK)
|
||||
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_mono6, COLLIDER_FLAGS_UPPER_MASK)
|
||||
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_dummy, COLLIDER_FLAGS_UPPER_MASK)
|
||||
EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Toad_01_Epilogue)))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInteract_HarryT_Epilogue) = {
|
||||
EVT_CALL(SpeakToPlayer, NPC_HarryT, ANIM_HarryT_Talk, ANIM_HarryT_Idle, 0, MSG_Outro_003A)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInit_HarryT_Epilogue) = {
|
||||
EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_HarryT_Epilogue)))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
s32 N(ExtraAnims_Luigi_Epilogue)[] = {
|
||||
ANIM_Luigi_Still,
|
||||
ANIM_Luigi_Idle,
|
||||
ANIM_Luigi_Walk,
|
||||
ANIM_Luigi_Run,
|
||||
ANIM_Luigi_Talk,
|
||||
-1
|
||||
};
|
||||
|
||||
StaticNpc N(NpcData_Luigi_Epilogue) = {
|
||||
.id = NPC_Luigi_Epilogue,
|
||||
.settings = &N(NpcSettings_Luigi_Epilogue),
|
||||
.pos = { NPC_DISPOSE_LOCATION },
|
||||
.yaw = 90,
|
||||
.flags = ENEMY_FLAGS_1 | ENEMY_FLAGS_4 | ENEMY_FLAGS_8 | ENEMY_FLAGS_100 | ENEMY_FLAGS_200 | ENEMY_FLAGS_400 | ENEMY_FLAGS_800,
|
||||
.drops = LUIGI_DROPS,
|
||||
.animations = LUIGI_ANIMS,
|
||||
.extraAnimations = N(ExtraAnims_Luigi_Epilogue),
|
||||
};
|
||||
|
||||
s32 N(ExtraAnims_Goompapa_Epilogue)[] = {
|
||||
ANIM_Goompapa_Still,
|
||||
ANIM_Goompapa_Idle,
|
||||
ANIM_Goompapa_Talk,
|
||||
-1
|
||||
};
|
||||
|
||||
s32 N(ExtraAnims_Goomama_Epilogue)[] = {
|
||||
ANIM_Goomama_Still,
|
||||
ANIM_Goomama_Idle,
|
||||
ANIM_Goomama_Talk,
|
||||
-1
|
||||
};
|
||||
|
||||
s32 N(ExtraAnims_Gooma_Epilogue)[] = {
|
||||
ANIM_Gooma_Still,
|
||||
ANIM_Gooma_Idle,
|
||||
ANIM_Gooma_Talk,
|
||||
-1
|
||||
};
|
||||
|
||||
StaticNpc N(NpcData_Goompapa_Epilogue)[] = {
|
||||
{
|
||||
.id = NPC_Goompapa_Epilogue,
|
||||
.settings = &N(NpcSettings_GoombaFamily_Epilogue),
|
||||
.pos = { 70.0f, 0.0f, -30.0f },
|
||||
.yaw = 90,
|
||||
.flags = ENEMY_FLAGS_1 | ENEMY_FLAGS_8 | ENEMY_FLAGS_100 | ENEMY_FLAGS_400 | ENEMY_FLAGS_800 | ENEMY_FLAGS_2000 | ENEMY_FLAGS_10000,
|
||||
.init = &N(EVS_NpcInit_Goompapa_Epilogue),
|
||||
.drops = GOOMPAPA_DROPS,
|
||||
.animations = GOOMPAPA_ANIMS,
|
||||
.extraAnimations = N(ExtraAnims_Goompapa_Epilogue),
|
||||
.tattle = MSG_NpcTattle_Goompapa,
|
||||
},
|
||||
{
|
||||
.id = NPC_Goomama_Epilogue,
|
||||
.settings = &N(NpcSettings_GoombaFamily_Epilogue),
|
||||
.pos = { 40.0f, 0.0f, 20.0f },
|
||||
.yaw = 90,
|
||||
.flags = ENEMY_FLAGS_1 | ENEMY_FLAGS_8 | ENEMY_FLAGS_100 | ENEMY_FLAGS_400 | ENEMY_FLAGS_800 | ENEMY_FLAGS_2000 | ENEMY_FLAGS_10000,
|
||||
.init = &N(EVS_NpcInit_Goomama_Epilogue),
|
||||
.drops = GOOMAMA_DROPS,
|
||||
.animations = GOOMAMA_ANIMS,
|
||||
.extraAnimations = N(ExtraAnims_Goomama_Epilogue),
|
||||
.tattle = MSG_NpcTattle_Goomama,
|
||||
},
|
||||
{
|
||||
.id = NPC_Gooma_Epilogue,
|
||||
.settings = &N(NpcSettings_GoombaFamily_Epilogue),
|
||||
.pos = { 20.0f, 0.0f, -35.0f },
|
||||
.yaw = 90,
|
||||
.flags = ENEMY_FLAGS_1 | ENEMY_FLAGS_8 | ENEMY_FLAGS_100 | ENEMY_FLAGS_400 | ENEMY_FLAGS_800 | ENEMY_FLAGS_2000 | ENEMY_FLAGS_10000,
|
||||
.init = &N(EVS_NpcInit_Gooma_Epilogue),
|
||||
.drops = GOOMA_DROPS,
|
||||
.animations = GOOMA_ANIMS,
|
||||
.extraAnimations = N(ExtraAnims_Gooma_Epilogue),
|
||||
.tattle = MSG_NpcTattle_Gooma,
|
||||
},
|
||||
};
|
||||
|
||||
s32 N(ExtraAnims_Quizmo_Epilogue)[] = {
|
||||
ANIM_ChuckQuizmo_Still,
|
||||
ANIM_ChuckQuizmo_Idle,
|
||||
ANIM_ChuckQuizmo_Talk,
|
||||
-1
|
||||
};
|
||||
|
||||
s32 N(ExtraAnims_VannaT_Epilogue)[] = {
|
||||
ANIM_VannaT_Still,
|
||||
ANIM_VannaT_Happy,
|
||||
ANIM_VannaT_Wave,
|
||||
-1
|
||||
};
|
||||
|
||||
StaticNpc N(NpcData_ChuckQuizmo_Epilogue)[] = {
|
||||
{
|
||||
.id = NPC_ChuckQuizmo,
|
||||
.settings = &N(NpcSettings_Luigi_Epilogue),
|
||||
.pos = { 545.0f, 20.0f, 150.0f },
|
||||
.yaw = 30,
|
||||
.flags = ENEMY_FLAGS_1 | ENEMY_FLAGS_8 | ENEMY_FLAGS_100 | ENEMY_FLAGS_400 | ENEMY_FLAGS_800 | ENEMY_FLAGS_2000,
|
||||
.init = &N(EVS_NpcInit_ChuckQuizmo_Epilogue),
|
||||
.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,
|
||||
},
|
||||
.extraAnimations = N(ExtraAnims_Quizmo_Epilogue),
|
||||
.tattle = MSG_NpcTattle_ChuckQuizmo,
|
||||
},
|
||||
{
|
||||
.id = NPC_VannaT_Epilogue,
|
||||
.settings = &N(NpcSettings_Toad_Stationary_Epilogue),
|
||||
.pos = { 500.0f, 20.0f, -130.0f },
|
||||
.yaw = 270,
|
||||
.flags = ENEMY_FLAGS_1 | ENEMY_FLAGS_8 | ENEMY_FLAGS_100 | ENEMY_FLAGS_400 | ENEMY_FLAGS_800 | ENEMY_FLAGS_2000,
|
||||
.init = &N(EVS_NpcInit_VannaT_Epilogue),
|
||||
.drops = {
|
||||
.dropFlags = NPC_DROP_FLAGS_80,
|
||||
.heartDrops = NO_DROPS,
|
||||
.flowerDrops = NO_DROPS,
|
||||
},
|
||||
.animations = {
|
||||
.idle = ANIM_VannaT_Still,
|
||||
.walk = ANIM_VannaT_Walk,
|
||||
.run = ANIM_VannaT_Still,
|
||||
.chase = ANIM_VannaT_Still,
|
||||
.anim_4 = ANIM_VannaT_Still,
|
||||
.anim_5 = ANIM_VannaT_Still,
|
||||
.death = ANIM_VannaT_Still,
|
||||
.hit = ANIM_VannaT_Still,
|
||||
.anim_8 = ANIM_VannaT_Still,
|
||||
.anim_9 = ANIM_VannaT_Still,
|
||||
.anim_A = ANIM_VannaT_Still,
|
||||
.anim_B = ANIM_VannaT_Still,
|
||||
.anim_C = ANIM_VannaT_Still,
|
||||
.anim_D = ANIM_VannaT_Still,
|
||||
.anim_E = ANIM_VannaT_Still,
|
||||
.anim_F = ANIM_VannaT_Still,
|
||||
},
|
||||
.extraAnimations = N(ExtraAnims_VannaT_Epilogue),
|
||||
.tattle = MSG_NpcTattle_MAC00_ShopOwner,
|
||||
},
|
||||
};
|
||||
|
||||
s32 N(D_80254944_7FF654_Epilogue)[] = {
|
||||
ANIM_TheMaster_Still,
|
||||
ANIM_TheMaster_Idle,
|
||||
ANIM_TheMaster_Talk,
|
||||
-1
|
||||
};
|
||||
|
||||
s32 N(D_80254954_7FF664_Epilogue)[] = {
|
||||
ANIM_Chan_Still,
|
||||
ANIM_Chan_Idle,
|
||||
ANIM_Chan_Run,
|
||||
-1
|
||||
};
|
||||
|
||||
s32 N(D_80254964_7FF674_Epilogue)[] = {
|
||||
ANIM_Lee_Still,
|
||||
ANIM_Lee_Idle,
|
||||
ANIM_Lee_Talk,
|
||||
-1
|
||||
};
|
||||
|
||||
StaticNpc N(NpcData_DojoMembers_Epilogue)[] = {
|
||||
{
|
||||
.id = NPC_TheMaster,
|
||||
.settings = &N(NpcSettings_Luigi_Epilogue),
|
||||
.pos = { 375.0f, 115.0f, -440.0f },
|
||||
.yaw = 225,
|
||||
.flags = ENEMY_FLAGS_1 | ENEMY_FLAGS_4 | ENEMY_FLAGS_8 | ENEMY_FLAGS_100 | ENEMY_FLAGS_400 | ENEMY_FLAGS_800 | ENEMY_FLAGS_2000 | ENEMY_FLAGS_10000,
|
||||
.init = &N(EVS_NpcInit_TheMaster_Epilogue),
|
||||
.drops = {
|
||||
.dropFlags = NPC_DROP_FLAGS_80,
|
||||
.heartDrops = NO_DROPS,
|
||||
.flowerDrops = NO_DROPS,
|
||||
},
|
||||
.animations = {
|
||||
.idle = ANIM_TheMaster_Idle,
|
||||
.walk = ANIM_TheMaster_Still,
|
||||
.run = ANIM_TheMaster_Still,
|
||||
.chase = ANIM_TheMaster_Still,
|
||||
.anim_4 = ANIM_TheMaster_Still,
|
||||
.anim_5 = ANIM_TheMaster_Still,
|
||||
.death = ANIM_TheMaster_Still,
|
||||
.hit = ANIM_TheMaster_Still,
|
||||
.anim_8 = ANIM_TheMaster_Still,
|
||||
.anim_9 = ANIM_TheMaster_Still,
|
||||
.anim_A = ANIM_TheMaster_Still,
|
||||
.anim_B = ANIM_TheMaster_Still,
|
||||
.anim_C = ANIM_TheMaster_Still,
|
||||
.anim_D = ANIM_TheMaster_Still,
|
||||
.anim_E = ANIM_TheMaster_Still,
|
||||
.anim_F = ANIM_TheMaster_Still,
|
||||
},
|
||||
.extraAnimations = N(D_80254944_7FF654_Epilogue),
|
||||
.tattle = MSG_NpcTattle_TheMaster,
|
||||
},
|
||||
{
|
||||
.id = NPC_Chan,
|
||||
.settings = &N(NpcSettings_Luigi_Epilogue),
|
||||
.pos = { 310.0f, 115.0f, -390.0f },
|
||||
.yaw = 45,
|
||||
.flags = ENEMY_FLAGS_1 | ENEMY_FLAGS_4 | ENEMY_FLAGS_8 | ENEMY_FLAGS_100 | ENEMY_FLAGS_400 | ENEMY_FLAGS_800 | ENEMY_FLAGS_2000 | ENEMY_FLAGS_10000,
|
||||
.init = &N(EVS_NpcInit_Chan_Epilogue),
|
||||
.drops = {
|
||||
.dropFlags = NPC_DROP_FLAGS_80,
|
||||
.heartDrops = NO_DROPS,
|
||||
.flowerDrops = NO_DROPS,
|
||||
},
|
||||
.animations = {
|
||||
.idle = ANIM_Chan_Idle,
|
||||
},
|
||||
.extraAnimations = N(D_80254954_7FF664_Epilogue),
|
||||
.tattle = MSG_NpcTattle_Chan,
|
||||
},
|
||||
{
|
||||
.id = NPC_Lee,
|
||||
.settings = &N(NpcSettings_Luigi_Epilogue),
|
||||
.pos = { 330.0f, 115.0f, -410.0f },
|
||||
.yaw = 45,
|
||||
.flags = ENEMY_FLAGS_1 | ENEMY_FLAGS_4 | ENEMY_FLAGS_8 | ENEMY_FLAGS_100 | ENEMY_FLAGS_400 | ENEMY_FLAGS_800 | ENEMY_FLAGS_2000 | ENEMY_FLAGS_10000,
|
||||
.init = &N(EVS_NpcInit_Lee_Epilogue),
|
||||
.drops = {
|
||||
.dropFlags = NPC_DROP_FLAGS_80,
|
||||
.heartDrops = NO_DROPS,
|
||||
.flowerDrops = NO_DROPS,
|
||||
},
|
||||
.animations = {
|
||||
.idle = ANIM_Lee_Idle,
|
||||
},
|
||||
.extraAnimations = N(D_80254964_7FF674_Epilogue),
|
||||
.tattle = MSG_NpcTattle_Lee,
|
||||
},
|
||||
};
|
||||
|
||||
s32 N(ExtraAnims_HarryT_Epilogue)[] = {
|
||||
ANIM_HarryT_Still,
|
||||
ANIM_HarryT_Idle,
|
||||
ANIM_HarryT_Talk,
|
||||
-1
|
||||
};
|
||||
|
||||
StaticNpc N(NpcData_Toad_01_Epilogue)[] = {
|
||||
{
|
||||
.id = NPC_Toad_01,
|
||||
.settings = &N(NpcSettings_Toad_Stationary_Epilogue),
|
||||
.pos = { 430.0f, 20.0f, -373.0f },
|
||||
.yaw = 223,
|
||||
.flags = ENEMY_FLAGS_1 | ENEMY_FLAGS_8 | ENEMY_FLAGS_100 | ENEMY_FLAGS_400 | ENEMY_FLAGS_800 | ENEMY_FLAGS_2000 | ENEMY_FLAGS_10000 | ENEMY_FLAGS_100000,
|
||||
.init = &N(EVS_NpcInit_Toad_01_Epilogue),
|
||||
.drops = {
|
||||
.dropFlags = NPC_DROP_FLAGS_80,
|
||||
.heartDrops = NO_DROPS,
|
||||
.flowerDrops = NO_DROPS,
|
||||
},
|
||||
.animations = {
|
||||
.idle = ANIM_HarryT_Idle,
|
||||
.walk = ANIM_HarryT_Walk,
|
||||
.run = ANIM_HarryT_Run,
|
||||
.chase = ANIM_HarryT_Run,
|
||||
.anim_4 = ANIM_HarryT_Idle,
|
||||
},
|
||||
.extraAnimations = N(ExtraAnims_HarryT_Epilogue),
|
||||
.tattle = MSG_NpcTattle_MAC00_ShopOwner,
|
||||
},
|
||||
{
|
||||
.id = NPC_HarryT,
|
||||
.settings = &N(NpcSettings_Toad_Stationary_Epilogue),
|
||||
.pos = { 410.0f, 20.0f, -320.0f },
|
||||
.yaw = 43,
|
||||
.flags = ENEMY_FLAGS_1 | ENEMY_FLAGS_8 | ENEMY_FLAGS_100 | ENEMY_FLAGS_400 | ENEMY_FLAGS_800 | ENEMY_FLAGS_2000 | ENEMY_FLAGS_10000 | ENEMY_FLAGS_100000,
|
||||
.init = &N(EVS_NpcInit_HarryT_Epilogue),
|
||||
.drops = {
|
||||
.dropFlags = NPC_DROP_FLAGS_80,
|
||||
.heartDrops = NO_DROPS,
|
||||
.flowerDrops = NO_DROPS,
|
||||
},
|
||||
.animations = {
|
||||
.idle = ANIM_HarryT_Idle,
|
||||
.walk = ANIM_HarryT_Walk,
|
||||
.run = ANIM_HarryT_Run,
|
||||
.chase = ANIM_HarryT_Run,
|
||||
.anim_4 = ANIM_HarryT_Idle,
|
||||
},
|
||||
.extraAnimations = N(ExtraAnims_HarryT_Epilogue),
|
||||
.tattle = MSG_NpcTattle_MAC00_ShopOwner,
|
||||
},
|
||||
};
|
||||
|
||||
extern StaticNpc N(NpcData_SharedTownsfolk)[9]; //@bug this NPC list actually has 10 NPCs in it...
|
||||
extern StaticNpc N(NpcData_Waterfront_Family)[4];
|
||||
|
||||
NpcGroupList N(EpilogueNPCs) = {
|
||||
NPC_GROUP(N(NpcData_Luigi_Epilogue)),
|
||||
NPC_GROUP(N(NpcData_DojoMembers_Epilogue)),
|
||||
NPC_GROUP(N(NpcData_Goompapa_Epilogue)),
|
||||
NPC_GROUP(N(NpcData_ChuckQuizmo_Epilogue)),
|
||||
NPC_GROUP(N(NpcData_Toad_01_Epilogue)),
|
||||
NPC_GROUP(N(NpcData_SharedTownsfolk)),
|
||||
NPC_GROUP(N(NpcData_Waterfront_Family)),
|
||||
{}
|
||||
};
|
93
src/world/area_mac/mac_00/mac_00_14_epilogue.c
Normal file
93
src/world/area_mac/mac_00/mac_00_14_epilogue.c
Normal file
@ -0,0 +1,93 @@
|
||||
#include "mac_00.h"
|
||||
|
||||
EvtScript N(EVS_PlayerExitPipe_Epilogue) = {
|
||||
EVT_CALL(DisablePlayerPhysics, TRUE)
|
||||
EVT_CALL(HidePlayerShadow, TRUE)
|
||||
EVT_CALL(SetPlayerPos, -100, -10, -370)
|
||||
EVT_CALL(InterpPlayerYaw, 135, 0)
|
||||
EVT_WAIT(2)
|
||||
EVT_CALL(PlaySoundAtPlayer, SOUND_ENTER_PIPE, 0)
|
||||
EVT_CALL(func_802D286C, 0x100)
|
||||
EVT_CALL(func_802D2520, ANIM_Mario_10002, 5, 2, 1, 1, 0)
|
||||
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
|
||||
EVT_LOOP(40)
|
||||
EVT_ADD(LVar1, 1)
|
||||
EVT_CALL(SetPlayerPos, LVar0, LVar1, LVar2)
|
||||
EVT_WAIT(1)
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(func_802D2520, ANIM_Mario_10002, 0, 0, 0, 0, 0)
|
||||
EVT_CALL(HidePlayerShadow, FALSE)
|
||||
EVT_CALL(DisablePlayerPhysics, FALSE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_LuigiExitPipe_Epilogue) = {
|
||||
EVT_CALL(EnableNpcShadow, NPC_Luigi_Epilogue, FALSE)
|
||||
EVT_CALL(SetNpcPos, NPC_Luigi_Epilogue, -100, -35, -370)
|
||||
EVT_CALL(SetNpcYaw, NPC_Luigi_Epilogue, 135)
|
||||
EVT_WAIT(2)
|
||||
EVT_CALL(PlaySoundAtNpc, NPC_Luigi_Epilogue, SOUND_ENTER_PIPE, 0)
|
||||
EVT_CALL(func_802CFE2C, 25, 0x100)
|
||||
EVT_CALL(func_802CFD30, 25, 5, 2, 1, 1, 0)
|
||||
EVT_CALL(SetNpcPos, NPC_Luigi_Epilogue, -100, -10, -370)
|
||||
EVT_CALL(GetNpcPos, NPC_Luigi_Epilogue, LVar0, LVar1, LVar2)
|
||||
EVT_LOOP(45)
|
||||
EVT_ADD(LVar1, 1)
|
||||
EVT_CALL(SetNpcPos, NPC_Luigi_Epilogue, LVar0, LVar1, LVar2)
|
||||
EVT_WAIT(1)
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(func_802CFD30, 25, 0, 0, 0, 0, 0)
|
||||
EVT_CALL(SetNpcPos, NPC_Luigi_Epilogue, -100, 30, -370)
|
||||
EVT_WAIT(3)
|
||||
EVT_CALL(EnableNpcShadow, NPC_Luigi_Epilogue, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_Scene_BeginEpilogue) = {
|
||||
EVT_CALL(DisablePlayerInput, TRUE)
|
||||
EVT_CALL(UseSettingsFrom, CAM_DEFAULT, -100, 30, -370)
|
||||
EVT_CALL(SetPanTarget, CAM_DEFAULT, -100, 30, -370)
|
||||
EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(300.0))
|
||||
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0))
|
||||
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
|
||||
EVT_THREAD
|
||||
EVT_EXEC_WAIT(N(EVS_PlayerExitPipe_Epilogue))
|
||||
EVT_WAIT(10)
|
||||
EVT_CALL(func_802D1270, -60, -320, EVT_FLOAT(4.0))
|
||||
EVT_END_THREAD
|
||||
EVT_THREAD
|
||||
EVT_WAIT(70)
|
||||
EVT_EXEC_WAIT(N(EVS_LuigiExitPipe_Epilogue))
|
||||
EVT_WAIT(10)
|
||||
EVT_CALL(SetNpcFlagBits, NPC_Luigi_Epilogue, NPC_FLAG_GRAVITY, TRUE)
|
||||
EVT_CALL(SetNpcAnimation, NPC_Luigi_Epilogue, ANIM_Luigi_Run)
|
||||
EVT_CALL(SetNpcSpeed, NPC_Luigi_Epilogue, EVT_FLOAT(4.0))
|
||||
EVT_CALL(NpcMoveTo, NPC_Luigi_Epilogue, -100, -300, 0)
|
||||
EVT_CALL(SetNpcAnimation, NPC_Luigi_Epilogue, ANIM_Luigi_Idle)
|
||||
EVT_END_THREAD
|
||||
EVT_WAIT(70)
|
||||
EVT_CALL(UseSettingsFrom, CAM_DEFAULT, -60, 0, -320)
|
||||
EVT_CALL(SetPanTarget, CAM_DEFAULT, -60, 0, -320)
|
||||
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(2.0))
|
||||
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
|
||||
EVT_WAIT(80)
|
||||
EVT_CALL(SpeakToPlayer, NPC_Luigi_Epilogue, ANIM_Luigi_Talk, ANIM_Luigi_Idle, 0, MSG_Outro_0023)
|
||||
EVT_WAIT(10)
|
||||
EVT_CHILD_THREAD
|
||||
EVT_LOOP(0)
|
||||
EVT_CALL(PlayerFaceNpc, NPC_Luigi_Epilogue, FALSE)
|
||||
EVT_WAIT(1)
|
||||
EVT_END_LOOP
|
||||
EVT_END_CHILD_THREAD
|
||||
EVT_CALL(SetNpcAnimation, NPC_Luigi_Epilogue, ANIM_Luigi_Run)
|
||||
EVT_CALL(NpcMoveTo, NPC_Luigi_Epilogue, 60, -100, 0)
|
||||
EVT_CALL(SetNpcFlagBits, NPC_Luigi_Epilogue, NPC_FLAG_GRAVITY, FALSE)
|
||||
EVT_CALL(SetNpcPos, NPC_Luigi_Epilogue, NPC_DISPOSE_LOCATION)
|
||||
EVT_EXEC(N(EVS_BlockExitToGoomaRoad))
|
||||
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0)
|
||||
EVT_CALL(DisablePlayerInput, FALSE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
25
src/world/area_mac/mac_00/mac_00_1_music.c
Normal file
25
src/world/area_mac/mac_00/mac_00_1_music.c
Normal file
@ -0,0 +1,25 @@
|
||||
#include "mac_00.h"
|
||||
|
||||
EvtScript N(EVS_SetupMusic) = {
|
||||
EVT_SWITCH(GB_StoryProgress)
|
||||
EVT_CASE_EQ(STORY_INTRO)
|
||||
EVT_CALL(SetMusicTrack, 0, SONG_PEACHS_CASTLE_PARTY, 1, 8)
|
||||
EVT_CASE_EQ(STORY_EPILOGUE)
|
||||
EVT_CALL(SetMusicTrack, 0, SONG_PEACHS_CASTLE_PARTY, 0, 8)
|
||||
EVT_CASE_RANGE(STORY_CH3_STAR_SPRIT_DEPARTED, STORY_CH4_STAR_SPIRIT_RESCUED)
|
||||
EVT_CALL(SetMusicTrack, 0, SONG_SHY_GUY_INVASION, 0, 8)
|
||||
EVT_CASE_DEFAULT
|
||||
EVT_EXEC(N(EVS_SetupMusicTriggers))
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(GetEntryID, LVar0)
|
||||
EVT_SWITCH(LVar0)
|
||||
EVT_CASE_OR_EQ(mac_00_ENTRY_4)
|
||||
EVT_CASE_OR_EQ(mac_00_ENTRY_5)
|
||||
EVT_CASE_OR_EQ(mac_00_ENTRY_6)
|
||||
EVT_CASE_OR_EQ(mac_00_ENTRY_7)
|
||||
EVT_CALL(ClearAmbientSounds, 250)
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_END_SWITCH
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
128
src/world/area_mac/mac_00/mac_00_2_main.c
Normal file
128
src/world/area_mac/mac_00/mac_00_2_main.c
Normal file
@ -0,0 +1,128 @@
|
||||
#include "mac_00.h"
|
||||
|
||||
#include "world/common/entity/Pipe.inc.c"
|
||||
#include "world/common/entity/Pipe.data.inc.c"
|
||||
|
||||
#include "world/common/atomic/TexturePan.inc.c"
|
||||
#include "world/common/atomic/TexturePan.data.inc.c"
|
||||
|
||||
API_CALLABLE(N(DummyColliderFunction)) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
f32 x, y, z;
|
||||
|
||||
get_collider_center(evt_get_variable(script, *args++), &x, &y, &z);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
API_CALLABLE(N(DummyInitFunction)) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
EvtScript N(EVS_ExitWalk_kmr_10_1) = EVT_EXIT_WALK(60, mac_00_ENTRY_0, "kmr_10", kmr_10_ENTRY_1);
|
||||
EvtScript N(EVS_ExitWalk_mac_01_0) = EVT_EXIT_WALK(60, mac_00_ENTRY_1, "mac_01", mac_01_ENTRY_0);
|
||||
|
||||
EvtScript N(EVS_GotoMap_tik_19_9) = {
|
||||
EVT_CALL(GotoMap, EVT_PTR("tik_19"), tik_19_ENTRY_0)
|
||||
EVT_WAIT(100)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_GotoMap_kmr_20_4) = {
|
||||
EVT_CALL(GotoMap, EVT_PTR("kmr_20"), kmr_20_ENTRY_4)
|
||||
EVT_WAIT(100)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_ExitPipe_tik_19_9) = EVT_EXIT_PIPE_VERTICAL(mac_00_ENTRY_3, COLLIDER_deilit, N(EVS_GotoMap_tik_19_9));
|
||||
EvtScript N(EVS_ExitPipe_kmr_20_4) = EVT_EXIT_PIPE_VERTICAL(mac_00_ENTRY_4, COLLIDER_deilim, N(EVS_GotoMap_kmr_20_4));
|
||||
|
||||
EvtScript N(EVS_BindExitTriggers) = {
|
||||
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_mac_01_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0)
|
||||
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitPipe_kmr_20_4)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilim, 1, 0)
|
||||
EVT_IF_GE(GB_StoryProgress, STORY_EPILOGUE)
|
||||
EVT_RETURN
|
||||
EVT_END_IF
|
||||
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_kmr_10_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilinw, 1, 0)
|
||||
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitPipe_tik_19_9)), TRIGGER_FLOOR_TOUCH, COLLIDER_deilit, 1, 0)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_EnterMap) = {
|
||||
EVT_CALL(GetEntryID, LVar0)
|
||||
EVT_SWITCH(LVar0)
|
||||
EVT_CASE_OR_EQ(mac_00_ENTRY_3)
|
||||
EVT_CASE_OR_EQ(mac_00_ENTRY_4)
|
||||
EVT_ENTER_PIPE_VERTICAL(N(EVS_BindExitTriggers))
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_CASE_EQ(mac_00_ENTRY_5)
|
||||
EVT_EXEC(N(EVS_Scene_Intro))
|
||||
EVT_CASE_EQ(mac_00_ENTRY_7)
|
||||
EVT_EXEC_WAIT(N(EVS_Scene_BeginEpilogue))
|
||||
EVT_EXEC(N(EVS_BindExitTriggers))
|
||||
EVT_CASE_DEFAULT
|
||||
EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers)))
|
||||
EVT_EXEC(EnterWalk)
|
||||
EVT_END_SWITCH
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_Main) = {
|
||||
EVT_SET(GB_WorldLocation, LOCATION_TOAD_TOWN)
|
||||
EVT_CALL(SetSpriteShading, SHADING_NONE)
|
||||
EVT_SETUP_CAMERA_NO_LEAD()
|
||||
EVT_IF_GE(GB_StoryProgress, STORY_CH0_KAMMY_RETURNED_TO_BOWSER)
|
||||
EVT_SET(GF_MAP_ToadTown, TRUE)
|
||||
EVT_END_IF
|
||||
EVT_CALL(SetRenderMode, MODEL_minka1_yuka, RENDER_MODE_SURFXLU_ZB_ZUPD)
|
||||
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_dummy, COLLIDER_FLAGS_UPPER_MASK)
|
||||
EVT_SWITCH(GB_StoryProgress)
|
||||
EVT_CASE_EQ(STORY_INTRO)
|
||||
EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(IntroNPCs)))
|
||||
EVT_CASE_GE(STORY_EPILOGUE)
|
||||
EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(EpilogueNPCs)))
|
||||
EVT_CASE_DEFAULT
|
||||
EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs)))
|
||||
EVT_END_SWITCH
|
||||
EVT_EXEC_WAIT(N(EVS_MakeEntities))
|
||||
EVT_EXEC(N(EVS_SetupRooms))
|
||||
EVT_EXEC(N(EVS_SetupShop))
|
||||
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_water, SURFACE_TYPE_WATER)
|
||||
EVT_EXEC(N(EVS_SetupWaterCustomGfx))
|
||||
EVT_CALL(EnableTexPanning, MODEL_water, TRUE)
|
||||
EVT_THREAD
|
||||
TEX_PAN_PARAMS_ID(TEX_PANNER_1)
|
||||
TEX_PAN_PARAMS_STEP( 0, 0, 0, 120)
|
||||
TEX_PAN_PARAMS_FREQ( 0, 1, 0, 0)
|
||||
TEX_PAN_PARAMS_INIT( 0, 0, 0, 0)
|
||||
EVT_EXEC(N(EVS_UpdateTexturePan))
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_op_1, SURFACE_TYPE_DOCK_WALL)
|
||||
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_op2, SURFACE_TYPE_DOCK_WALL)
|
||||
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_op3, SURFACE_TYPE_DOCK_WALL)
|
||||
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_op_1, COLLIDER_FLAGS_80000)
|
||||
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_op2, COLLIDER_FLAGS_80000)
|
||||
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_op3, COLLIDER_FLAGS_80000)
|
||||
EVT_CALL(N(DummyColliderFunction), COLLIDER_op_1)
|
||||
EVT_CALL(N(DummyColliderFunction), COLLIDER_op2)
|
||||
EVT_CALL(N(DummyColliderFunction), COLLIDER_op3)
|
||||
EVT_CALL(GetDemoState, LVar0)
|
||||
EVT_IF_NE(LVar0, DEMO_STATE_NONE)
|
||||
EVT_ENTER_PIPE_VERTICAL(N(EVS_BindExitTriggers))
|
||||
EVT_EXEC_WAIT(N(EVS_SetupDemo))
|
||||
EVT_RETURN
|
||||
EVT_END_IF
|
||||
EVT_EXEC(N(EVS_SetupMusic))
|
||||
EVT_IF_EQ(GB_StoryProgress, STORY_CH0_KAMMY_RETURNED_TO_BOWSER)
|
||||
EVT_SET(GB_StoryProgress, STORY_CH0_ARRIVED_AT_TOAD_TOWN)
|
||||
EVT_EXEC(N(EVS_Scene_ToadTownGreeting))
|
||||
EVT_END_IF
|
||||
EVT_EXEC(N(EVS_EnterMap))
|
||||
EVT_WAIT(1)
|
||||
EVT_CALL(N(DummyInitFunction))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
19
src/world/area_mac/mac_00/mac_00_3_entity.c
Normal file
19
src/world/area_mac/mac_00/mac_00_3_entity.c
Normal file
@ -0,0 +1,19 @@
|
||||
#include "mac_00.h"
|
||||
#include "entity.h"
|
||||
|
||||
EvtScript N(EVS_Inspect_StreetSign) = {
|
||||
EVT_CALL(DisablePlayerInput, TRUE)
|
||||
EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_016F, 160, 40)
|
||||
EVT_CALL(DisablePlayerInput, FALSE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_MakeEntities) = {
|
||||
EVT_CALL(MakeEntity, EVT_PTR(Entity_HiddenPanel), 545, 20, 205, 0, MODEL_o262, MAKE_ENTITY_END)
|
||||
EVT_CALL(AssignPanelFlag, GF_MAC00_HiddenPanel)
|
||||
EVT_CALL(MakeItemEntity, ITEM_STAR_PIECE, -420, 20, 410, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_MAC00_Item_StarPiece)
|
||||
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_Inspect_StreetSign)), TRIGGER_WALL_PRESS_A, COLLIDER_sign, 1, 0)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
240
src/world/area_mac/mac_00/mac_00_4_rooms.c
Normal file
240
src/world/area_mac/mac_00/mac_00_4_rooms.c
Normal file
@ -0,0 +1,240 @@
|
||||
#include "mac_00.h"
|
||||
|
||||
EvtScript N(EVS_SetDoorRot_RussHouse) = {
|
||||
EVT_CALL(RotateModel, MODEL_o210, LVar0, 0, 1, 0)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_MoveWalls_RussHouse) = {
|
||||
EVT_SET(LVar1, LVar0)
|
||||
EVT_MULF(LVar1, EVT_FLOAT(-2.0))
|
||||
EVT_CALL(RotateModel, MODEL_o201, LVar1, 0, 1, 0)
|
||||
EVT_CALL(RotateModel, MODEL_o467, LVar1, 0, 1, 0)
|
||||
EVT_CALL(RotateModel, MODEL_o466, LVar1, 0, 1, 0)
|
||||
EVT_SET(LVar1, LVar0)
|
||||
EVT_MULF(LVar1, EVT_FLOAT(-1.11))
|
||||
EVT_CALL(RotateModel, MODEL_o194, LVar1, 0, 1, 0)
|
||||
EVT_CALL(RotateModel, MODEL_o463, LVar1, 0, 1, 0)
|
||||
EVT_CALL(RotateModel, MODEL_o469, LVar1, 0, 1, 0)
|
||||
EVT_CALL(RotateModel, MODEL_o335, LVar1, 0, 1, 0)
|
||||
EVT_SET(LVar1, LVar0)
|
||||
EVT_MULF(LVar1, EVT_FLOAT(-0.328125))
|
||||
EVT_CALL(RotateModel, MODEL_o198, LVar1, 0, 1, 0)
|
||||
EVT_CALL(RotateModel, MODEL_o460, LVar1, 0, 1, 0)
|
||||
EVT_CALL(RotateModel, MODEL_o461, LVar1, 0, 1, 0)
|
||||
EVT_SET(LVar1, LVar0)
|
||||
EVT_MULF(LVar1, EVT_FLOAT(2.21875))
|
||||
EVT_CALL(RotateModel, MODEL_o213, LVar1, 0, 1, 0)
|
||||
EVT_CALL(RotateModel, MODEL_o215, LVar1, 0, 1, 0)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_DropDoor_RussHouse) = {
|
||||
EVT_CALL(RotateModel, MODEL_o210, LVar0, 1, 0, 0)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_ToggleVis_RussHouse) = {
|
||||
EVT_SWITCH(LVar0)
|
||||
EVT_CASE_EQ(0)
|
||||
EVT_CALL(SetGroupEnabled, MODEL_intel_inn, 1)
|
||||
EVT_SET(MF_MusicMixTrigger1, TRUE)
|
||||
EVT_CASE_EQ(3)
|
||||
EVT_CALL(SetGroupEnabled, MODEL_intel_inn, 0)
|
||||
EVT_SET(MF_MusicMixTrigger1, FALSE)
|
||||
EVT_END_SWITCH
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_SetDoorRot_Shop) = {
|
||||
EVT_CALL(RotateModel, MODEL_o121, LVar0, 0, -1, 0)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_MoveWalls_Shop) = {
|
||||
EVT_SET(LVar1, LVar0)
|
||||
EVT_CALL(RotateModel, MODEL_o370, LVar1, 1, 0, 0)
|
||||
EVT_CALL(RotateModel, MODEL_o371, LVar1, 1, 0, 0)
|
||||
EVT_CALL(RotateModel, MODEL_o373, LVar1, 1, 0, 0)
|
||||
EVT_SET(LVar1, LVar0)
|
||||
EVT_CALL(RotateModel, MODEL_o396, LVar1, -1, 0, 0)
|
||||
EVT_CALL(RotateModel, MODEL_o397, LVar1, -1, 0, 0)
|
||||
EVT_CALL(RotateModel, MODEL_o155, LVar1, -1, 0, 0)
|
||||
EVT_CALL(RotateModel, MODEL_o146, LVar1, -1, 0, 0)
|
||||
EVT_CALL(RotateModel, MODEL_o398, LVar1, -1, 0, 0)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_ToggleVis_Shop) = {
|
||||
EVT_SWITCH(LVar0)
|
||||
EVT_CASE_EQ(0)
|
||||
EVT_CALL(SetGroupEnabled, MODEL_shop_in, 1)
|
||||
EVT_CALL(EnableModel, MODEL_o375, FALSE)
|
||||
EVT_CASE_EQ(2)
|
||||
EVT_CASE_EQ(3)
|
||||
EVT_CALL(SetGroupEnabled, MODEL_shop_in, 0)
|
||||
EVT_CALL(EnableModel, MODEL_o375, TRUE)
|
||||
EVT_END_SWITCH
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_SetDoorRot_Dojo) = {
|
||||
EVT_CALL(RotateModel, MODEL_o168, LVar0, 0, -1, 0)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_MoveWalls_Dojo) = {
|
||||
EVT_SET(LVar1, LVar0)
|
||||
EVT_MULF(LVar1, EVT_FLOAT(2.0))
|
||||
EVT_CALL(RotateModel, MODEL_o159, LVar1, 0, 1, 0)
|
||||
EVT_CALL(RotateModel, MODEL_o169, LVar1, 0, 1, 0)
|
||||
EVT_CALL(RotateModel, MODEL_o164, LVar1, 0, 1, 0)
|
||||
EVT_CALL(RotateModel, MODEL_o162, LVar1, 0, 1, 0)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_DropDoor_Dojo) = {
|
||||
EVT_CALL(RotateModel, MODEL_o168, LVar0, 1, 0, 0)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_ToggleVis_Dojo) = {
|
||||
EVT_SWITCH(LVar0)
|
||||
EVT_CASE_EQ(0)
|
||||
EVT_CALL(SetGroupEnabled, MODEL_minka_inn, 1)
|
||||
EVT_SET(MF_MusicMixTrigger2, TRUE)
|
||||
EVT_CASE_EQ(3)
|
||||
EVT_CALL(SetGroupEnabled, MODEL_minka_inn, 0)
|
||||
EVT_CALL(EnableMusicProximityMix, 0)
|
||||
EVT_SET(MF_MusicMixTrigger2, FALSE)
|
||||
EVT_END_SWITCH
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_SetDoorRot_Waterfront) = {
|
||||
EVT_CALL(RotateModel, MODEL_o228, LVar0, 0, -1, 0)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_MoveWalls_Waterfront) = {
|
||||
EVT_SET(LVar1, LVar0)
|
||||
EVT_CALL(RotateModel, MODEL_o437, LVar1, 1, 0, 0)
|
||||
EVT_CALL(RotateModel, MODEL_o453, LVar1, 1, 0, 0)
|
||||
EVT_CALL(RotateModel, MODEL_o454, LVar1, 1, 0, 0)
|
||||
EVT_SET(LVar1, LVar0)
|
||||
EVT_MULF(LVar1, EVT_FLOAT(-0.671875))
|
||||
EVT_CALL(RotateModel, MODEL_o242, LVar1, 1, 0, 0)
|
||||
EVT_CALL(RotateModel, MODEL_o239, LVar1, 1, 0, 0)
|
||||
EVT_CALL(RotateModel, MODEL_o243, LVar1, 1, 0, 0)
|
||||
EVT_CALL(RotateModel, MODEL_o245, LVar1, 1, 0, 0)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_ToggleVis_Waterfront) = {
|
||||
EVT_SWITCH(LVar0)
|
||||
EVT_CASE_EQ(0)
|
||||
EVT_SWITCH(GB_StoryProgress)
|
||||
EVT_CASE_RANGE(STORY_CH3_STAR_SPRIT_DEPARTED, STORY_CH4_BEGAN_PEACH_MISSION)
|
||||
EVT_EXEC(N(EVS_WaterfrontHouse_DoorLocked))
|
||||
EVT_SET(LVar0, -1)
|
||||
EVT_CASE_DEFAULT
|
||||
EVT_CALL(SetGroupEnabled, MODEL_minka2_inn, 1)
|
||||
EVT_END_SWITCH
|
||||
EVT_CASE_EQ(3)
|
||||
EVT_CALL(SetGroupEnabled, MODEL_minka2_inn, 0)
|
||||
EVT_END_SWITCH
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
s32 N(InteriorNPCs_RussHouse)[] = {
|
||||
NPC_RussT,
|
||||
-1
|
||||
};
|
||||
|
||||
s32 N(InteriorNPCs_Shop)[] = {
|
||||
NPC_Toad_01,
|
||||
NPC_ShyGuy_02,
|
||||
NPC_HarryT,
|
||||
-1
|
||||
};
|
||||
|
||||
s32 N(InteriorNPCs_Dojo)[] = {
|
||||
NPC_TheMaster,
|
||||
NPC_Chan,
|
||||
NPC_Lee,
|
||||
-1
|
||||
};
|
||||
|
||||
s32 N(InteriorNPCs_WaterfrontHouse)[] = {
|
||||
NPC_Waterfront_Dad,
|
||||
NPC_Waterfront_Mom,
|
||||
NPC_Waterfront_Kid1,
|
||||
NPC_Waterfront_Kid2,
|
||||
-1
|
||||
};
|
||||
|
||||
EvtScript N(EVS_SetupRooms) = {
|
||||
// RussT's house
|
||||
EVT_CALL(MakeDoorAdvanced,
|
||||
VIS_GROUP_PAIR(VIS_GROUP_0, VIS_GROUP_0),
|
||||
EVT_PTR(N(EVS_SetDoorRot_RussHouse)),
|
||||
EVT_PTR(N(EVS_MoveWalls_RussHouse)),
|
||||
EVT_PTR(N(EVS_DropDoor_RussHouse)),
|
||||
EVT_PTR(N(EVS_ToggleVis_RussHouse)),
|
||||
COLLIDER_deilit3,
|
||||
COLLIDER_deilit3u,
|
||||
MODEL_intel_house,
|
||||
EVT_PTR(N(InteriorNPCs_RussHouse)))
|
||||
// harry's shop
|
||||
EVT_CALL(MakeDoorAdvanced,
|
||||
VIS_GROUP_PAIR(VIS_GROUP_1, VIS_GROUP_2),
|
||||
EVT_PTR(N(EVS_SetDoorRot_Shop)),
|
||||
EVT_PTR(N(EVS_MoveWalls_Shop)),
|
||||
NULL,
|
||||
EVT_PTR(N(EVS_ToggleVis_Shop)),
|
||||
COLLIDER_deilit5, COLLIDER_deilit5u, MODEL_omise, EVT_PTR(N(InteriorNPCs_Shop)))
|
||||
// the dojo
|
||||
EVT_CALL(MakeDoorAdvanced,
|
||||
VIS_GROUP_PAIR(VIS_GROUP_0, VIS_GROUP_2),
|
||||
EVT_PTR(N(EVS_SetDoorRot_Dojo)),
|
||||
EVT_PTR(N(EVS_MoveWalls_Dojo)),
|
||||
EVT_PTR(N(EVS_DropDoor_Dojo)),
|
||||
EVT_PTR(N(EVS_ToggleVis_Dojo)),
|
||||
COLLIDER_deilit6,
|
||||
COLLIDER_deilit6u,
|
||||
MODEL_minka_1,
|
||||
EVT_PTR(N(InteriorNPCs_Dojo)))
|
||||
// the waterfront house
|
||||
EVT_CALL(MakeDoorAdvanced,
|
||||
VIS_GROUP_PAIR(VIS_GROUP_0, VIS_GROUP_2),
|
||||
EVT_PTR(N(EVS_SetDoorRot_Waterfront)),
|
||||
EVT_PTR(N(EVS_MoveWalls_Waterfront)),
|
||||
NULL,
|
||||
EVT_PTR(N(EVS_ToggleVis_Waterfront)),
|
||||
COLLIDER_deilit4,
|
||||
COLLIDER_deilit4u,
|
||||
MODEL_minka2,
|
||||
EVT_PTR(N(InteriorNPCs_WaterfrontHouse)))
|
||||
// initial visibility
|
||||
EVT_SET(LVar0, VIS_GROUP_3)
|
||||
EVT_EXEC(N(EVS_ToggleVis_RussHouse))
|
||||
EVT_EXEC(N(EVS_ToggleVis_Waterfront))
|
||||
EVT_EXEC(N(EVS_ToggleVis_Shop))
|
||||
EVT_EXEC(N(EVS_ToggleVis_Dojo))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
496
src/world/area_mac/mac_00/mac_00_5_npc.c
Normal file
496
src/world/area_mac/mac_00/mac_00_5_npc.c
Normal file
@ -0,0 +1,496 @@
|
||||
#include "mac_00.h"
|
||||
#include "effects.h"
|
||||
|
||||
#include "world/common/npc/Toad_Stationary.inc.c"
|
||||
#include "world/common/enemy/complete/ShyGuy_NoAI.inc.c"
|
||||
#include "world/common/npc/Dummy.inc.c"
|
||||
|
||||
#define CHUCK_QUIZMO_NPC_ID NPC_ChuckQuizmo
|
||||
#include "world/common/complete/Quizmo.inc.c"
|
||||
|
||||
MAP_STATIC_PAD(1,key_choice);
|
||||
#include "world/common/complete/KeyItemChoice.inc.c"
|
||||
MAP_STATIC_PAD(1,item_choice);
|
||||
#include "world/common/complete/NormalItemChoice.inc.c"
|
||||
|
||||
#include "world/common/complete/LetterDelivery.inc.c"
|
||||
|
||||
#include "npc/russ_and_thief.inc.c"
|
||||
|
||||
EvtScript N(EVS_NpcAI_ShyGuy_03) = {
|
||||
EVT_CALL(DisablePlayerInput, TRUE)
|
||||
EVT_CALL(SetNpcAnimation, NPC_ShyGuy_02, ANIM_ShyGuy_Red_Anim0C)
|
||||
EVT_WAIT(10)
|
||||
EVT_CALL(SetNpcAnimation, NPC_ShyGuy_02, ANIM_ShyGuy_Red_Anim03)
|
||||
EVT_CALL(SetNpcJumpscale, NPC_ShyGuy_02, EVT_FLOAT(1.0))
|
||||
EVT_CALL(PlaySoundAtNpc, NPC_ShyGuy_02, SOUND_32C, 0)
|
||||
EVT_CALL(NpcJump0, NPC_ShyGuy_02, 400, 20, -300, 20)
|
||||
EVT_CALL(NpcFacePlayer, NPC_ShyGuy_02, 0)
|
||||
EVT_WAIT(10)
|
||||
EVT_CALL(SpeakToPlayer, NPC_ShyGuy_02, ANIM_ShyGuy_Red_Anim11, ANIM_ShyGuy_Red_Anim01, 0, MSG_MAC_Gate_0002)
|
||||
EVT_CALL(ShowSweat, 22, 1, 45, 1, 0, 0, 0, 0, 20)
|
||||
EVT_WAIT(10)
|
||||
EVT_CALL(ShowSweat, 22, 1, 45, 1, 0, 0, 0, 0, 20)
|
||||
EVT_WAIT(10)
|
||||
EVT_THREAD
|
||||
EVT_CALL(SetPlayerSpeed, EVT_FLOAT(2.0))
|
||||
EVT_CALL(PlayerMoveTo, 410, -340, 0)
|
||||
EVT_END_THREAD
|
||||
EVT_SET(LVar0, 22)
|
||||
EVT_CALL(PlaySoundAtNpc, LVar0, SOUND_203F, 0)
|
||||
EVT_EXEC_GET_TID(N(EVS_ShyGuy_PlayRunningSounds), LVarA)
|
||||
EVT_CALL(SetNpcSpeed, NPC_ShyGuy_02, EVT_FLOAT(8.0))
|
||||
EVT_CALL(NpcMoveTo, NPC_ShyGuy_02, 170, -140, 0)
|
||||
EVT_KILL_THREAD(LVarA)
|
||||
EVT_CALL(SetNpcPos, NPC_ShyGuy_02, NPC_DISPOSE_LOCATION)
|
||||
EVT_CALL(SetNpcPos, NPC_Toad_02, NPC_DISPOSE_LOCATION)
|
||||
EVT_CALL(SetNpcPos, NPC_Toad_01, 170, 20, -140)
|
||||
EVT_CALL(SetNpcFlagBits, NPC_Toad_01, NPC_FLAG_100, TRUE)
|
||||
EVT_CALL(SetNpcSpeed, NPC_Toad_01, EVT_FLOAT(8.0))
|
||||
EVT_CALL(SetNpcAnimation, NPC_Toad_01, ANIM_HarryT_Run)
|
||||
EVT_CALL(NpcMoveTo, NPC_Toad_01, 430, -373, 0)
|
||||
EVT_CALL(SetNpcPos, NPC_Toad_01, 430, 20, -373)
|
||||
EVT_CALL(SetNpcAnimation, NPC_Toad_01, ANIM_HarryT_Idle)
|
||||
EVT_CALL(SetNpcFlagBits, NPC_Toad_01, NPC_FLAG_100, FALSE)
|
||||
EVT_CALL(NpcFacePlayer, NPC_Toad_01, 0)
|
||||
EVT_WAIT(10)
|
||||
EVT_CALL(SpeakToPlayer, NPC_Toad_01, ANIM_HarryT_Talk, ANIM_HarryT_Idle, 0, MSG_MAC_Gate_0003)
|
||||
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_mono1, COLLIDER_FLAGS_UPPER_MASK)
|
||||
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_mono2, COLLIDER_FLAGS_UPPER_MASK)
|
||||
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_mono3, COLLIDER_FLAGS_UPPER_MASK)
|
||||
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_mono4, COLLIDER_FLAGS_UPPER_MASK)
|
||||
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_mono5, COLLIDER_FLAGS_UPPER_MASK)
|
||||
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_mono6, COLLIDER_FLAGS_UPPER_MASK)
|
||||
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_dummy, COLLIDER_FLAGS_UPPER_MASK)
|
||||
EVT_CALL(DisablePlayerInput, FALSE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
#include "world/common/util/CheckPositionRelativeToPlane.inc.c"
|
||||
|
||||
EvtScript N(EVS_NpcHit_ShyGuy_03) = {
|
||||
EVT_CALL(GetOwnerEncounterTrigger, LVar0)
|
||||
EVT_SWITCH(LVar0)
|
||||
EVT_CASE_EQ(ENCOUNTER_TRIGGER_HAMMER)
|
||||
EVT_SET(LVar1, 1)
|
||||
EVT_CASE_EQ(ENCOUNTER_TRIGGER_JUMP)
|
||||
EVT_SET(LVar1, 1)
|
||||
EVT_CASE_EQ(ENCOUNTER_TRIGGER_PARTNER)
|
||||
EVT_SET(LVar1, 1)
|
||||
EVT_CASE_DEFAULT
|
||||
EVT_SET(LVar1, 0)
|
||||
EVT_END_SWITCH
|
||||
EVT_IF_EQ(LVar1, 0)
|
||||
EVT_RETURN
|
||||
EVT_END_IF
|
||||
EVT_CALL(N(CheckPositionRelativeToPlane), 266, -350, 366, -253)
|
||||
EVT_IF_EQ(LVar0, PLANE_SIDE_POSITIVE)
|
||||
EVT_RETURN
|
||||
EVT_END_IF
|
||||
EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_HIT_PLAYER_NORMAL, 0)
|
||||
EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_203E, 0)
|
||||
EVT_SET(GF_MAC00_ShyGuyChasedFromShop, TRUE)
|
||||
EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION)
|
||||
EVT_CALL(SetEnemyFlagBits, NPC_ShyGuy_02, ENEMY_FLAGS_8000000, 1)
|
||||
EVT_CALL(BindNpcAI, NPC_SELF, EVT_PTR(N(EVS_NpcAI_ShyGuy_03)))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInteract_ShyGuy_02) = {
|
||||
EVT_CALL(SpeakToPlayer, NPC_ShyGuy_02, ANIM_ShyGuy_Red_Anim11, ANIM_ShyGuy_Red_Anim01, 0, MSG_MAC_Gate_0001)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInit_ShyGuy_02) = {
|
||||
EVT_SWITCH(GB_StoryProgress)
|
||||
EVT_CASE_RANGE(STORY_CH3_STAR_SPRIT_DEPARTED, STORY_CH4_STAR_SPIRIT_RESCUED)
|
||||
EVT_IF_EQ(GF_MAC00_ShyGuyChasedFromShop, FALSE)
|
||||
EVT_SET(GF_MAC01_ShyGuyTookOverShop, TRUE)
|
||||
EVT_CALL(SetNpcPos, NPC_SELF, 430, 20, -373)
|
||||
EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_ShyGuy_02)))
|
||||
EVT_RETURN
|
||||
EVT_END_IF
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(RemoveNpc, NPC_SELF)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInit_GardenShyGuy1) = {
|
||||
EVT_SWITCH(GB_StoryProgress)
|
||||
EVT_CASE_RANGE(STORY_CH3_STAR_SPRIT_DEPARTED, STORY_CH4_STAR_SPIRIT_RESCUED)
|
||||
EVT_IF_EQ(GF_MAC00_ShyGuyChasedFromShop, FALSE)
|
||||
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_mono1, COLLIDER_FLAGS_UPPER_MASK)
|
||||
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_mono2, COLLIDER_FLAGS_UPPER_MASK)
|
||||
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_mono3, COLLIDER_FLAGS_UPPER_MASK)
|
||||
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_mono4, COLLIDER_FLAGS_UPPER_MASK)
|
||||
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_mono5, COLLIDER_FLAGS_UPPER_MASK)
|
||||
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_mono6, COLLIDER_FLAGS_UPPER_MASK)
|
||||
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_dummy, COLLIDER_FLAGS_UPPER_MASK)
|
||||
EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_100, FALSE)
|
||||
EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_2, TRUE)
|
||||
EVT_CALL(SetNpcPos, NPC_SELF, 430, 20, -373)
|
||||
EVT_CALL(BindNpcHit, NPC_SELF, EVT_PTR(N(EVS_NpcHit_ShyGuy_03)))
|
||||
EVT_RETURN
|
||||
EVT_END_IF
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(RemoveNpc, NPC_SELF)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInteract_Toad_01) = {
|
||||
EVT_EXEC_WAIT(ItemShopInteract)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInteract_Toad_02) = {
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_MAC_Gate_0000)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInit_Toad_01) = {
|
||||
EVT_SWITCH(GB_StoryProgress)
|
||||
EVT_CASE_RANGE(STORY_CH3_STAR_SPRIT_DEPARTED, STORY_CH4_STAR_SPIRIT_RESCUED)
|
||||
EVT_IF_EQ(GF_MAC00_ShyGuyChasedFromShop, FALSE)
|
||||
EVT_CALL(SetNpcPos, NPC_Toad_01, NPC_DISPOSE_LOCATION)
|
||||
EVT_END_IF
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Toad_01)))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInit_Toad_02) = {
|
||||
EVT_SWITCH(GB_StoryProgress)
|
||||
EVT_CASE_RANGE(STORY_CH3_STAR_SPRIT_DEPARTED, STORY_CH4_STAR_SPIRIT_RESCUED)
|
||||
EVT_IF_EQ(GF_MAC00_ShyGuyChasedFromShop, FALSE)
|
||||
EVT_CALL(SetNpcPos, NPC_SELF, 105, 0, -40)
|
||||
EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Toad_02)))
|
||||
EVT_RETURN
|
||||
EVT_END_IF
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(RemoveNpc, NPC_SELF)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
#include "npc/dojo_members.inc.c"
|
||||
#include "npc/waterfront_family.inc.c"
|
||||
#include "npc/trading_toad.inc.c"
|
||||
|
||||
StaticNpc N(NpcData_ShyGuy_01)[] = {
|
||||
{
|
||||
.id = NPC_ShyGuyThief,
|
||||
.settings = &N(NpcSettings_ShyGuy_NoAI),
|
||||
.pos = { NPC_DISPOSE_LOCATION },
|
||||
.yaw = 270,
|
||||
.flags = ENEMY_FLAGS_1 | ENEMY_FLAGS_8 | ENEMY_FLAGS_100 | ENEMY_FLAGS_200 | ENEMY_FLAGS_400 | ENEMY_FLAGS_800 | ENEMY_FLAGS_10000 | ENEMY_FLAGS_100000 | ENEMY_FLAGS_400000,
|
||||
.init = &N(EVS_NpcInit_ShyGuyThief),
|
||||
.drops = SHY_GUY_NO_DROPS,
|
||||
.animations = SHY_GUY_ANIMS,
|
||||
},
|
||||
{
|
||||
.id = NPC_ShyGuy_02,
|
||||
.settings = &N(NpcSettings_ShyGuy_NoAI),
|
||||
.pos = { NPC_DISPOSE_LOCATION },
|
||||
.yaw = 270,
|
||||
.flags = ENEMY_FLAGS_1 | ENEMY_FLAGS_8 | ENEMY_FLAGS_100 | ENEMY_FLAGS_200 | ENEMY_FLAGS_400 | ENEMY_FLAGS_800 | ENEMY_FLAGS_10000 | ENEMY_FLAGS_100000 | ENEMY_FLAGS_400000,
|
||||
.init = &N(EVS_NpcInit_ShyGuy_02),
|
||||
.drops = SHY_GUY_NO_DROPS,
|
||||
.animations = SHY_GUY_ANIMS,
|
||||
.tattle = MSG_NpcTattle_MAC_ShyGuyShopOwner,
|
||||
},
|
||||
{
|
||||
.id = NPC_GardenShyGuy1,
|
||||
.settings = &N(NpcSettings_ShyGuy_NoAI),
|
||||
.pos = { NPC_DISPOSE_LOCATION },
|
||||
.yaw = 270,
|
||||
.flags = ENEMY_FLAGS_8 | ENEMY_FLAGS_100 | ENEMY_FLAGS_400 | ENEMY_FLAGS_800 | ENEMY_FLAGS_100000 | ENEMY_FLAGS_200000 | ENEMY_FLAGS_IGNORE_TOUCH,
|
||||
.init = &N(EVS_NpcInit_GardenShyGuy1),
|
||||
.drops = SHY_GUY_NO_DROPS,
|
||||
.animations = SHY_GUY_ANIMS,
|
||||
.tattle = MSG_NpcTattle_MAC_ShyGuyShopOwner,
|
||||
},
|
||||
};
|
||||
|
||||
StaticNpc N(NpcData_RussT) = {
|
||||
.id = NPC_RussT,
|
||||
.settings = &N(NpcSettings_RussT),
|
||||
.pos = { -66.0f, 20.0f, -532.0f },
|
||||
.yaw = 119,
|
||||
.flags = ENEMY_FLAGS_1 | ENEMY_FLAGS_8 | ENEMY_FLAGS_100 | ENEMY_FLAGS_400 | ENEMY_FLAGS_800 | ENEMY_FLAGS_2000 | ENEMY_FLAGS_10000 | ENEMY_FLAGS_100000,
|
||||
.init = &N(EVS_NpcInit_RussT),
|
||||
.drops = {
|
||||
.dropFlags = NPC_DROP_FLAGS_80,
|
||||
.heartDrops = NO_DROPS,
|
||||
.flowerDrops = NO_DROPS,
|
||||
},
|
||||
.animations = {
|
||||
.idle = ANIM_RussT_Idle,
|
||||
.walk = ANIM_RussT_Idle,
|
||||
.run = ANIM_RussT_Idle,
|
||||
.chase = ANIM_RussT_Idle,
|
||||
.anim_4 = ANIM_RussT_Idle,
|
||||
.anim_5 = ANIM_RussT_Idle,
|
||||
.death = ANIM_RussT_Idle,
|
||||
.hit = ANIM_RussT_Idle,
|
||||
.anim_8 = ANIM_RussT_Idle,
|
||||
.anim_9 = ANIM_RussT_Idle,
|
||||
.anim_A = ANIM_RussT_Idle,
|
||||
.anim_B = ANIM_RussT_Idle,
|
||||
.anim_C = ANIM_RussT_Idle,
|
||||
.anim_D = ANIM_RussT_Idle,
|
||||
.anim_E = ANIM_RussT_Idle,
|
||||
.anim_F = ANIM_RussT_Idle,
|
||||
},
|
||||
.tattle = MSG_NpcTattle_RussT,
|
||||
};
|
||||
|
||||
StaticNpc N(NpcData_Toad_01)[] = {
|
||||
{
|
||||
.id = NPC_Toad_01,
|
||||
.settings = &N(NpcSettings_Toad_Stationary),
|
||||
.pos = { 430.0f, 20.0f, -373.0f },
|
||||
.yaw = 223,
|
||||
.flags = ENEMY_FLAGS_1 | ENEMY_FLAGS_8 | ENEMY_FLAGS_100 | ENEMY_FLAGS_400 | ENEMY_FLAGS_800 | ENEMY_FLAGS_2000 | ENEMY_FLAGS_10000 | ENEMY_FLAGS_100000,
|
||||
.init = &N(EVS_NpcInit_Toad_01),
|
||||
.drops = {
|
||||
.dropFlags = NPC_DROP_FLAGS_80,
|
||||
.heartDrops = NO_DROPS,
|
||||
.flowerDrops = NO_DROPS,
|
||||
},
|
||||
.animations = {
|
||||
.idle = ANIM_HarryT_Idle,
|
||||
.walk = ANIM_HarryT_Walk,
|
||||
.run = ANIM_HarryT_Run,
|
||||
.chase = ANIM_HarryT_Run,
|
||||
.anim_4 = ANIM_HarryT_Idle,
|
||||
},
|
||||
.tattle = MSG_NpcTattle_MAC00_ShopOwner,
|
||||
},
|
||||
{
|
||||
.id = NPC_Toad_02,
|
||||
.settings = &N(NpcSettings_Toad_Stationary),
|
||||
.pos = { NPC_DISPOSE_LOCATION },
|
||||
.yaw = 223,
|
||||
.flags = ENEMY_FLAGS_1 | ENEMY_FLAGS_8 | ENEMY_FLAGS_100 | ENEMY_FLAGS_400 | ENEMY_FLAGS_800 | ENEMY_FLAGS_2000 | ENEMY_FLAGS_10000 | ENEMY_FLAGS_100000,
|
||||
.init = &N(EVS_NpcInit_Toad_02),
|
||||
.drops = {
|
||||
.dropFlags = NPC_DROP_FLAGS_80,
|
||||
.heartDrops = NO_DROPS,
|
||||
.flowerDrops = NO_DROPS,
|
||||
},
|
||||
.animations = {
|
||||
.idle = ANIM_HarryT_Idle,
|
||||
.walk = ANIM_HarryT_Walk,
|
||||
.run = ANIM_HarryT_Run,
|
||||
.chase = ANIM_HarryT_Run,
|
||||
.anim_4 = ANIM_HarryT_Idle,
|
||||
},
|
||||
.tattle = MSG_NpcTattle_MAC00_ShopOwner,
|
||||
},
|
||||
};
|
||||
|
||||
s32 N(D_8024CFFC_7F7D0C)[] = {
|
||||
ANIM_TheMaster_Still,
|
||||
ANIM_TheMaster_Idle,
|
||||
ANIM_TheMaster_Walk,
|
||||
ANIM_TheMaster_Talk,
|
||||
-1
|
||||
};
|
||||
|
||||
s32 N(D_8024D010_7F7D20)[] = {
|
||||
ANIM_Chan_Still,
|
||||
ANIM_Chan_Idle,
|
||||
ANIM_Chan_Walk,
|
||||
ANIM_Chan_Run,
|
||||
-1
|
||||
};
|
||||
|
||||
s32 N(D_8024D024_7F7D34)[] = {
|
||||
ANIM_Lee_Still,
|
||||
ANIM_Lee_Idle,
|
||||
ANIM_Lee_Walk,
|
||||
ANIM_Lee_Talk,
|
||||
-1
|
||||
};
|
||||
|
||||
StaticNpc N(NpcData_Toad_03)[] = {
|
||||
{
|
||||
.id = NPC_TheMaster,
|
||||
.settings = &N(NpcSettings_Dummy),
|
||||
.pos = { 375.0f, 115.0f, -440.0f },
|
||||
.yaw = 225,
|
||||
.flags = ENEMY_FLAGS_1 | ENEMY_FLAGS_4 | ENEMY_FLAGS_8 | ENEMY_FLAGS_100 | ENEMY_FLAGS_400 | ENEMY_FLAGS_800 | ENEMY_FLAGS_2000 | ENEMY_FLAGS_10000 | ENEMY_FLAGS_40000 | ENEMY_FLAGS_800000,
|
||||
.init = &N(EVS_NpcInit_TheMaster),
|
||||
.drops = {
|
||||
.dropFlags = NPC_DROP_FLAGS_80,
|
||||
.heartDrops = NO_DROPS,
|
||||
.flowerDrops = NO_DROPS,
|
||||
},
|
||||
.animations = {
|
||||
.idle = ANIM_TheMaster_Idle,
|
||||
.walk = ANIM_TheMaster_Still,
|
||||
.run = ANIM_TheMaster_Still,
|
||||
.chase = ANIM_TheMaster_Still,
|
||||
.anim_4 = ANIM_TheMaster_Still,
|
||||
.anim_5 = ANIM_TheMaster_Still,
|
||||
.death = ANIM_TheMaster_Still,
|
||||
.hit = ANIM_TheMaster_Still,
|
||||
.anim_8 = ANIM_TheMaster_Still,
|
||||
.anim_9 = ANIM_TheMaster_Still,
|
||||
.anim_A = ANIM_TheMaster_Still,
|
||||
.anim_B = ANIM_TheMaster_Still,
|
||||
.anim_C = ANIM_TheMaster_Still,
|
||||
.anim_D = ANIM_TheMaster_Still,
|
||||
.anim_E = ANIM_TheMaster_Still,
|
||||
.anim_F = ANIM_TheMaster_Still,
|
||||
},
|
||||
.extraAnimations = N(D_8024CFFC_7F7D0C),
|
||||
.tattle = MSG_NpcTattle_TheMaster,
|
||||
},
|
||||
{
|
||||
.id = NPC_Chan,
|
||||
.settings = &N(NpcSettings_Dummy),
|
||||
.pos = { 310.0f, 115.0f, -390.0f },
|
||||
.yaw = 45,
|
||||
.flags = ENEMY_FLAGS_1 | ENEMY_FLAGS_4 | ENEMY_FLAGS_8 | ENEMY_FLAGS_100 | ENEMY_FLAGS_400 | ENEMY_FLAGS_800 | ENEMY_FLAGS_2000 | ENEMY_FLAGS_10000 | ENEMY_FLAGS_40000 | ENEMY_FLAGS_800000,
|
||||
.init = &N(EVS_NpcInit_Chan),
|
||||
.drops = {
|
||||
.dropFlags = NPC_DROP_FLAGS_80,
|
||||
.heartDrops = NO_DROPS,
|
||||
.flowerDrops = NO_DROPS,
|
||||
},
|
||||
.animations = {
|
||||
.idle = ANIM_Chan_Idle,
|
||||
},
|
||||
.extraAnimations = N(D_8024D010_7F7D20),
|
||||
.tattle = MSG_NpcTattle_Chan,
|
||||
},
|
||||
{
|
||||
.id = NPC_Lee,
|
||||
.settings = &N(NpcSettings_Dummy),
|
||||
.pos = { 330.0f, 115.0f, -410.0f },
|
||||
.yaw = 45,
|
||||
.flags = ENEMY_FLAGS_1 | ENEMY_FLAGS_4 | ENEMY_FLAGS_8 | ENEMY_FLAGS_100 | ENEMY_FLAGS_400 | ENEMY_FLAGS_800 | ENEMY_FLAGS_2000 | ENEMY_FLAGS_10000 | ENEMY_FLAGS_40000 | ENEMY_FLAGS_800000,
|
||||
.init = &N(EVS_NpcInit_Lee),
|
||||
.drops = {
|
||||
.dropFlags = NPC_DROP_FLAGS_80,
|
||||
.heartDrops = NO_DROPS,
|
||||
.flowerDrops = NO_DROPS,
|
||||
},
|
||||
.animations = {
|
||||
.idle = ANIM_Lee_Idle,
|
||||
},
|
||||
.extraAnimations = N(D_8024D024_7F7D34),
|
||||
.tattle = MSG_NpcTattle_Lee,
|
||||
},
|
||||
};
|
||||
|
||||
StaticNpc N(NpcData_Quizmo_Unused) = {
|
||||
.id = NPC_ChuckQuizmo,
|
||||
.settings = &N(Quizmo_NpcSettings),
|
||||
.pos = { 545.0f, 20.0f, 150.0f },
|
||||
.yaw = 30,
|
||||
.flags = ENEMY_FLAGS_1 | ENEMY_FLAGS_8 | ENEMY_FLAGS_100 | ENEMY_FLAGS_400 | ENEMY_FLAGS_800 | ENEMY_FLAGS_2000 | ENEMY_FLAGS_4000,
|
||||
.initVarCount = 1,
|
||||
.initVar = { .bytes = { 0, QUIZ_AREA_MAC, QUIZ_COUNT_MAC, QUIZ_MAP_MAC_00 }},
|
||||
.drops = QUIZMO_DROPS,
|
||||
.animations = QUIZMO_ANIMS,
|
||||
.tattle = MSG_NpcTattle_ChuckQuizmo,
|
||||
};
|
||||
|
||||
StaticNpc N(NpcData_Waterfront_Family)[] = {
|
||||
{
|
||||
.id = NPC_Waterfront_Dad,
|
||||
.settings = &N(NpcSettings_Toad_Stationary),
|
||||
.pos = { -496.0f, 20.0f, 218.0f },
|
||||
.yaw = 133,
|
||||
.flags = ENEMY_FLAGS_1 | ENEMY_FLAGS_8 | ENEMY_FLAGS_100 | ENEMY_FLAGS_400 | ENEMY_FLAGS_800 | ENEMY_FLAGS_2000 | ENEMY_FLAGS_10000 | ENEMY_FLAGS_100000,
|
||||
.init = &N(EVS_NpcInit_WaterfrontDad),
|
||||
.drops = TOAD_DROPS,
|
||||
.animations = TOAD_GREEN_ANIMS,
|
||||
.tattle = MSG_NpcTattle_MAC_LuckyCastleWorker,
|
||||
},
|
||||
{
|
||||
.id = NPC_Waterfront_Mom,
|
||||
.settings = &N(NpcSettings_Toad_Stationary),
|
||||
.pos = { -566.0f, 20.0f, 267.0f },
|
||||
.yaw = 133,
|
||||
.flags = ENEMY_FLAGS_1 | ENEMY_FLAGS_8 | ENEMY_FLAGS_100 | ENEMY_FLAGS_400 | ENEMY_FLAGS_800 | ENEMY_FLAGS_2000 | ENEMY_FLAGS_10000 | ENEMY_FLAGS_100000,
|
||||
.init = &N(EVS_NpcInit_WaterfrontMom),
|
||||
.drops = TOADETTE_DROPS,
|
||||
.animations = TOADETTE_ORANGE_ANIMS,
|
||||
.tattle = MSG_NpcTattle_MAC_Homemaker,
|
||||
},
|
||||
{
|
||||
.id = NPC_Waterfront_Kid1,
|
||||
.settings = &N(NpcSettings_Toad_Stationary),
|
||||
.pos = { -508.0f, 20.0f, 324.0f },
|
||||
.yaw = 313,
|
||||
.flags = ENEMY_FLAGS_1 | ENEMY_FLAGS_8 | ENEMY_FLAGS_100 | ENEMY_FLAGS_400 | ENEMY_FLAGS_800 | ENEMY_FLAGS_2000 | ENEMY_FLAGS_10000 | ENEMY_FLAGS_100000,
|
||||
.init = &N(EVS_NpcInit_WaterfrontKid1),
|
||||
.drops = TOAD_KID_DROPS,
|
||||
.animations = TOAD_KID_GREEN_ANIMS,
|
||||
.tattle = MSG_NpcTattle_MAC_FriendlyToadKid,
|
||||
},
|
||||
{
|
||||
.id = NPC_Waterfront_Kid2,
|
||||
.settings = &N(NpcSettings_Toad_Stationary),
|
||||
.pos = { -480.0f, 20.0f, 329.0f },
|
||||
.yaw = 313,
|
||||
.flags = ENEMY_FLAGS_1 | ENEMY_FLAGS_8 | ENEMY_FLAGS_100 | ENEMY_FLAGS_400 | ENEMY_FLAGS_800 | ENEMY_FLAGS_2000 | ENEMY_FLAGS_10000 | ENEMY_FLAGS_100000,
|
||||
.init = &N(EVS_NpcInit_WaterfrontKid2),
|
||||
.drops = TOAD_KID_DROPS,
|
||||
.animations = TOAD_KID_GREEN_ANIMS,
|
||||
.tattle = MSG_NpcTattle_MAC_PowerHungryToadKid,
|
||||
},
|
||||
};
|
||||
|
||||
StaticNpc N(NpcData_PrizeToad) = {
|
||||
.id = NPC_Toad_11,
|
||||
.settings = &N(NpcSettings_Toad_Stationary),
|
||||
.pos = { -112.0f, 0.0f, -62.0f },
|
||||
.yaw = 90,
|
||||
.flags = ENEMY_FLAGS_1 | ENEMY_FLAGS_8 | ENEMY_FLAGS_100 | ENEMY_FLAGS_400 | ENEMY_FLAGS_800 | ENEMY_FLAGS_2000 | ENEMY_FLAGS_10000 | ENEMY_FLAGS_100000,
|
||||
.init = &N(EVS_NpcInit_TradingToad),
|
||||
.drops = TOAD_DROPS,
|
||||
.animations = {
|
||||
.idle = ANIM_Toad_Pink_Idle,
|
||||
.walk = ANIM_Toad_Pink_Walk,
|
||||
.run = ANIM_Toad_Pink_Run,
|
||||
.chase = ANIM_Toad_Pink_Run,
|
||||
.anim_4 = ANIM_Toad_Pink_Idle,
|
||||
.anim_5 = ANIM_Toad_Pink_Idle,
|
||||
.death = ANIM_Toad_Pink_Idle,
|
||||
.hit = ANIM_Toad_Pink_Disappointed,
|
||||
.anim_8 = ANIM_Toad_Pink_Run,
|
||||
.anim_9 = ANIM_Toad_Pink_Run,
|
||||
.anim_A = ANIM_Toad_Pink_Run,
|
||||
.anim_B = ANIM_Toad_Pink_Run,
|
||||
.anim_C = ANIM_Toad_Pink_Run,
|
||||
.anim_D = ANIM_Toad_Pink_Run,
|
||||
.anim_E = ANIM_Toad_Pink_Run,
|
||||
.anim_F = ANIM_Toad_Pink_Run,
|
||||
},
|
||||
.tattle = MSG_NpcTattle_PrizeToad,
|
||||
};
|
||||
|
||||
extern StaticNpc N(NpcData_SharedTownsfolk)[10];
|
||||
|
||||
NpcGroupList N(DefaultNPCs) = {
|
||||
NPC_GROUP(N(NpcData_Toad_03)),
|
||||
NPC_GROUP(N(NpcData_ShyGuy_01)),
|
||||
NPC_GROUP(N(NpcData_RussT)),
|
||||
NPC_GROUP(N(NpcData_Toad_01)),
|
||||
NPC_GROUP(N(NpcData_SharedTownsfolk)),
|
||||
NPC_GROUP(N(NpcData_Waterfront_Family)),
|
||||
NPC_GROUP(N(NpcData_PrizeToad)),
|
||||
{}
|
||||
};
|
83
src/world/area_mac/mac_00/mac_00_6_shop.c
Normal file
83
src/world/area_mac/mac_00/mac_00_6_shop.c
Normal file
@ -0,0 +1,83 @@
|
||||
#include "mac_00.h"
|
||||
|
||||
s32 N(ShopMessages)[] = {
|
||||
MSG_Shop_0000,
|
||||
MSG_Shop_0001,
|
||||
MSG_Shop_0002,
|
||||
MSG_Shop_0003,
|
||||
MSG_Shop_0004,
|
||||
MSG_Shop_0005,
|
||||
MSG_Shop_0006,
|
||||
MSG_Shop_0007,
|
||||
MSG_Shop_0008,
|
||||
MSG_Shop_0009,
|
||||
MSG_Shop_000A,
|
||||
MSG_Shop_000B,
|
||||
MSG_Shop_000C,
|
||||
MSG_Shop_000D,
|
||||
MSG_Shop_000E,
|
||||
MSG_Shop_000F,
|
||||
MSG_Shop_0010,
|
||||
MSG_Shop_0011,
|
||||
MSG_Shop_0012,
|
||||
MSG_Shop_0013,
|
||||
MSG_Shop_0014,
|
||||
MSG_Shop_0015,
|
||||
MSG_Shop_0016,
|
||||
};
|
||||
|
||||
ShopItemData N(Inventory)[] = {
|
||||
{ .itemID = ITEM_FRIGHT_JAR, .price = 5, .descMsg = MSG_ItemShopDesc_FrightJar },
|
||||
{ .itemID = ITEM_SLEEPY_SHEEP, .price = 10, .descMsg = MSG_ItemShopDesc_SleepySheep },
|
||||
{ .itemID = ITEM_POW_BLOCK, .price = 5, .descMsg = MSG_ItemShopDesc_POWBlock },
|
||||
{ .itemID = ITEM_FIRE_FLOWER, .price = 10, .descMsg = MSG_ItemShopDesc_FireFlower },
|
||||
{ .itemID = ITEM_HONEY_SYRUP, .price = 10, .descMsg = MSG_ItemShopDesc_HoneySyrup },
|
||||
{ .itemID = ITEM_MUSHROOM, .price = 5, .descMsg = MSG_ItemShopDesc_Mushroom },
|
||||
{}
|
||||
};
|
||||
|
||||
ShopSellPriceData N(PriceList)[] = {
|
||||
{ .itemID = ITEM_DRIED_SHROOM, .sellPrice = 3 },
|
||||
{ .itemID = ITEM_DRIED_PASTA, .sellPrice = 5 },
|
||||
{ .itemID = ITEM_DUSTY_HAMMER, .sellPrice = 3 },
|
||||
{ .itemID = ITEM_WHACKAS_BUMP, .sellPrice = 64 },
|
||||
{ .itemID = ITEM_DRIED_FRUIT, .sellPrice = 20 },
|
||||
{ .itemID = ITEM_LIME, .sellPrice = 4 },
|
||||
{ .itemID = ITEM_LEMON, .sellPrice = 4 },
|
||||
{}
|
||||
};
|
||||
|
||||
EvtScript N(EVS_OnBuy) = {
|
||||
EVT_SWITCH(LVar0)
|
||||
EVT_CASE_EQ(3)
|
||||
EVT_CASE_EQ(4)
|
||||
EVT_CASE_EQ(1)
|
||||
EVT_CASE_EQ(2)
|
||||
EVT_END_SWITCH
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
ShopItemLocation N(ItemPositions)[] = {
|
||||
{ .posModelID = MODEL_syouhin1, .triggerColliderID = COLLIDER_mono1 },
|
||||
{ .posModelID = MODEL_syouhin2, .triggerColliderID = COLLIDER_mono2 },
|
||||
{ .posModelID = MODEL_shouhin3, .triggerColliderID = COLLIDER_mono3 },
|
||||
{ .posModelID = MODEL_shouhin4, .triggerColliderID = COLLIDER_mono4 },
|
||||
{ .posModelID = MODEL_shouhin5, .triggerColliderID = COLLIDER_mono5 },
|
||||
{ .posModelID = MODEL_shouhin6, .triggerColliderID = COLLIDER_mono6 },
|
||||
};
|
||||
|
||||
ShopOwner N(Owner) = {
|
||||
.npcID = NPC_Toad_01,
|
||||
.idleAnim = ANIM_HarryT_Idle,
|
||||
.talkAnim = ANIM_HarryT_Talk,
|
||||
.onBuyEvt = &N(EVS_OnBuy),
|
||||
.shopMsgIDs = N(ShopMessages),
|
||||
};
|
||||
|
||||
EvtScript N(EVS_SetupShop) = {
|
||||
EVT_CALL(MakeShop, EVT_PTR(N(ItemPositions)), EVT_PTR(N(Inventory)), EVT_PTR(N(PriceList)), ITEM_ENTITY_FLAGS_10000)
|
||||
EVT_CALL(MakeShopOwner, EVT_PTR(N(Owner)))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
34
src/world/area_mac/mac_00/mac_00_7_music_mix.c
Normal file
34
src/world/area_mac/mac_00/mac_00_7_music_mix.c
Normal file
@ -0,0 +1,34 @@
|
||||
#include "mac_00.h"
|
||||
|
||||
#include "world/common/atomic/MonitorMusicProximityTrigger.inc.c"
|
||||
|
||||
MusicProximityTrigger N(MusicMixTrigger1) = {
|
||||
.pos = { 15.0f, -400.0f },
|
||||
.innerDist = 90.0f,
|
||||
.outerDist = 120.0f,
|
||||
.unk = 7,
|
||||
.manualActivationFlag = MF_MusicMixTrigger1,
|
||||
};
|
||||
|
||||
MusicProximityTrigger N(MusicMixTrigger2) = {
|
||||
.pos = { 445.0f, -307.0f },
|
||||
.innerDist = 90.0f,
|
||||
.outerDist = 110.0f,
|
||||
.unk = 3,
|
||||
.manualActivationFlag = MF_MusicMixTrigger2,
|
||||
};
|
||||
|
||||
EvtScript N(EVS_SetupMusicTriggers) = {
|
||||
EVT_CALL(SetMusicTrack, 0, SONG_TOAD_TOWN, 0, 8)
|
||||
EVT_CALL(EnableMusicProximityMix, 0)
|
||||
EVT_THREAD
|
||||
EVT_CALL(N(MonitorMusicProximityTrigger), EVT_PTR(N(MusicMixTrigger1)))
|
||||
EVT_END_THREAD
|
||||
EVT_IF_GE(GB_StoryProgress, STORY_CH0_RETURNED_TO_TOAD_TOWN)
|
||||
EVT_THREAD
|
||||
EVT_CALL(N(MonitorMusicProximityTrigger), EVT_PTR(N(MusicMixTrigger2)))
|
||||
EVT_END_THREAD
|
||||
EVT_END_IF
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
117
src/world/area_mac/mac_00/mac_00_8_demo.c
Normal file
117
src/world/area_mac/mac_00/mac_00_8_demo.c
Normal file
@ -0,0 +1,117 @@
|
||||
#include "mac_00.h"
|
||||
|
||||
EvtScript N(EVS_ProvideDemoInputs) = {
|
||||
EVT_WAIT(50)
|
||||
EVT_CALL(DemoJoystickXY, 22, -26)
|
||||
EVT_WAIT(1)
|
||||
EVT_CALL(DemoJoystickXY, 65, -61)
|
||||
EVT_WAIT(1)
|
||||
EVT_CALL(DemoJoystickXY, 66, -67)
|
||||
EVT_WAIT(1)
|
||||
EVT_CALL(DemoJoystickXY, 66, -70)
|
||||
EVT_WAIT(30)
|
||||
EVT_CALL(DemoJoystickXY, 66, -71)
|
||||
EVT_WAIT(18)
|
||||
EVT_CALL(DemoJoystickXY, 67, -62)
|
||||
EVT_WAIT(1)
|
||||
EVT_CALL(DemoJoystickXY, 74, -34)
|
||||
EVT_WAIT(1)
|
||||
EVT_CALL(DemoJoystickXY, 81, -6)
|
||||
EVT_CALL(DemoSetButtons, BUTTON_A)
|
||||
EVT_WAIT(1)
|
||||
EVT_CALL(DemoJoystickXY, 82, -2)
|
||||
EVT_WAIT(3)
|
||||
EVT_CALL(DemoSetButtons, 0)
|
||||
EVT_WAIT(7)
|
||||
EVT_CALL(DemoJoystickXY, 81, -3)
|
||||
EVT_WAIT(1)
|
||||
EVT_CALL(DemoJoystickXY, 80, -10)
|
||||
EVT_WAIT(1)
|
||||
EVT_CALL(DemoJoystickXY, 78, -22)
|
||||
EVT_WAIT(1)
|
||||
EVT_CALL(DemoJoystickXY, 75, -35)
|
||||
EVT_WAIT(1)
|
||||
EVT_CALL(DemoJoystickXY, 72, -49)
|
||||
EVT_CALL(DemoSetButtons, BUTTON_A)
|
||||
EVT_WAIT(1)
|
||||
EVT_CALL(DemoJoystickXY, 70, -56)
|
||||
EVT_WAIT(1)
|
||||
EVT_CALL(DemoJoystickXY, 70, -57)
|
||||
EVT_WAIT(2)
|
||||
EVT_CALL(DemoSetButtons, 0)
|
||||
EVT_WAIT(9)
|
||||
EVT_CALL(DemoJoystickXY, 70, -56)
|
||||
EVT_WAIT(1)
|
||||
EVT_CALL(DemoJoystickXY, 74, -26)
|
||||
EVT_WAIT(1)
|
||||
EVT_CALL(DemoJoystickXY, 79, 8)
|
||||
EVT_WAIT(1)
|
||||
EVT_CALL(DemoJoystickXY, 70, 46)
|
||||
EVT_WAIT(1)
|
||||
EVT_CALL(DemoJoystickXY, 66, 68)
|
||||
EVT_WAIT(1)
|
||||
EVT_CALL(DemoJoystickXY, 66, 67)
|
||||
EVT_WAIT(2)
|
||||
EVT_CALL(DemoJoystickXY, 65, 67)
|
||||
EVT_WAIT(1)
|
||||
EVT_CALL(DemoJoystickXY, 63, 66)
|
||||
EVT_WAIT(1)
|
||||
EVT_CALL(DemoJoystickXY, 45, 46)
|
||||
EVT_WAIT(1)
|
||||
EVT_CALL(DemoJoystickXY, 22, 23)
|
||||
EVT_WAIT(1)
|
||||
EVT_CALL(DemoJoystickXY, 1, -1)
|
||||
EVT_WAIT(2)
|
||||
EVT_CALL(DemoSetButtons, BUTTON_A)
|
||||
EVT_WAIT(4)
|
||||
EVT_CALL(DemoSetButtons, 0)
|
||||
EVT_WAIT(61)
|
||||
EVT_CALL(DemoJoystickXY, 3, -1)
|
||||
EVT_WAIT(1)
|
||||
EVT_CALL(DemoJoystickXY, 14, -1)
|
||||
EVT_WAIT(1)
|
||||
EVT_CALL(DemoJoystickXY, 74, -8)
|
||||
EVT_WAIT(1)
|
||||
EVT_CALL(DemoJoystickXY, 77, -9)
|
||||
EVT_WAIT(1)
|
||||
EVT_CALL(DemoJoystickXY, 78, -9)
|
||||
EVT_WAIT(11)
|
||||
EVT_CALL(DemoJoystickXY, 78, -8)
|
||||
EVT_WAIT(1)
|
||||
EVT_CALL(DemoJoystickXY, 79, -7)
|
||||
EVT_IF_EQ(GF_DemoSceneDone, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END_IF
|
||||
EVT_SET(GF_DemoSceneDone, TRUE)
|
||||
EVT_CALL(GotoMapSpecial, EVT_PTR("mac_00"), mac_00_ENTRY_2, TRANSITION_2)
|
||||
EVT_WAIT(110)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_MonitorDemoState) = {
|
||||
EVT_WAIT(10)
|
||||
EVT_LOOP(0)
|
||||
EVT_CALL(GetDemoState, LVar0)
|
||||
EVT_IF_EQ(LVar0, DEMO_STATE_CHANGE_MAP)
|
||||
EVT_BREAK_LOOP
|
||||
EVT_END_IF
|
||||
EVT_WAIT(1)
|
||||
EVT_END_LOOP
|
||||
EVT_IF_EQ(GF_DemoSceneDone, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END_IF
|
||||
EVT_SET(GF_DemoSceneDone, TRUE)
|
||||
EVT_CALL(GotoMapSpecial, EVT_PTR("mac_00"), mac_00_ENTRY_2, TRANSITION_3)
|
||||
EVT_WAIT(100)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_SetupDemo) = {
|
||||
EVT_SET(GF_DemoSceneDone, FALSE)
|
||||
EVT_EXEC(N(EVS_MonitorDemoState))
|
||||
EVT_EXEC(N(EVS_ProvideDemoInputs))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
@ -1,21 +1,20 @@
|
||||
#include "mac_00.h"
|
||||
|
||||
#include "world/common/atomic/MonitorMusicProximityTrigger.inc.c"
|
||||
|
||||
#include "model.h"
|
||||
|
||||
void func_802423F0_7ED100(void) {
|
||||
MAP_RODATA_PAD(1,unk)
|
||||
|
||||
void N(gfx_build_water)(void) {
|
||||
Model* model;
|
||||
|
||||
gDPSetDepthSource(gMasterGfxPos++, G_ZS_PRIM);
|
||||
gDPSetPrimDepth(gMasterGfxPos++, 32752, 0);
|
||||
gDPSetPrimDepth(gMasterGfxPos++, 0x7FF0, 0);
|
||||
gDPSetRenderMode(gMasterGfxPos++, Z_CMP | CVG_DST_CLAMP | ZMODE_OPA | FORCE_BL | G_RM_PASS,
|
||||
Z_CMP | CVG_DST_CLAMP | ZMODE_OPA | FORCE_BL | GBL_c2(G_BL_CLR_IN, G_BL_0, G_BL_CLR_IN, G_BL_1));
|
||||
gDPSetCombineLERP(gMasterGfxPos++, 0, 0, 0, PRIMITIVE, 0, 0, 0, 0, 0, 0, 0, PRIMITIVE, 0, 0, 0, 0);
|
||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, 0, 0, 128, 0);
|
||||
gDPPipeSync(gMasterGfxPos++);
|
||||
|
||||
model = get_model_from_list_index(get_model_list_index_from_tree_index(0xD6));
|
||||
model = get_model_from_list_index(get_model_list_index_from_tree_index(MODEL_water));
|
||||
|
||||
gSPDisplayList(gMasterGfxPos++, model->modelNode->displayData->displayList);
|
||||
gDPPipeSync(gMasterGfxPos++);
|
||||
@ -23,5 +22,13 @@ void func_802423F0_7ED100(void) {
|
||||
gDPSetDepthSource(gMasterGfxPos++, G_ZS_PIXEL);
|
||||
gDPSetRenderMode(gMasterGfxPos++, G_RM_PASS, G_RM_AA_ZB_XLU_SURF2);
|
||||
|
||||
mdl_draw_hidden_panel_surface(&gMasterGfxPos, 0xD6);
|
||||
mdl_draw_hidden_panel_surface(&gMasterGfxPos, MODEL_water);
|
||||
}
|
||||
|
||||
EvtScript N(EVS_SetupWaterCustomGfx) = {
|
||||
EVT_WAIT(1)
|
||||
EVT_CALL(SetCustomGfxBuilders, CUSTOM_GFX_0, EVT_PTR(N(gfx_build_water)), 0)
|
||||
EVT_CALL(SetModelCustomGfx, MODEL_water, CUSTOM_GFX_0, -1)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
335
src/world/area_mac/mac_00/npc/dojo_members.inc.c
Normal file
335
src/world/area_mac/mac_00/npc/dojo_members.inc.c
Normal file
@ -0,0 +1,335 @@
|
||||
s32 N(DojoBattleIDs)[] = {
|
||||
BTL_MAC_FORMATION_00,
|
||||
BTL_MAC_FORMATION_01,
|
||||
BTL_MAC_FORMATION_02,
|
||||
BTL_MAC_FORMATION_03,
|
||||
BTL_MAC_FORMATION_04
|
||||
};
|
||||
|
||||
ApiStatus N(SetDojoBattle)(Evt* script, s32 isInitialCall) {
|
||||
Enemy* enemy = script->owner1.enemy;
|
||||
s32 battleIndex = evt_get_variable(script, GB_MAC00_DojoRank);
|
||||
|
||||
gCurrentEncounter.encounterList[enemy->encounterIndex]->battle = N(DojoBattleIDs)[battleIndex];
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
API_CALLABLE(N(ResetBackgroundPostBattle)) {
|
||||
func_8011B950(MODEL_minka_1, -1, 1, 1);
|
||||
set_background_color_blend(0, 0, 0, 255);
|
||||
gCameras[CAM_DEFAULT].bgColor[0] = 0;
|
||||
gCameras[CAM_DEFAULT].bgColor[1] = 0;
|
||||
gCameras[CAM_DEFAULT].bgColor[2] = 0;
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
EvtScript N(EVS_NpcInteract_Chan) = {
|
||||
EVT_IF_LT(GB_StoryProgress, STORY_CH0_TWINK_GAVE_LUCKY_STAR)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_0015)
|
||||
EVT_ELSE
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_001B)
|
||||
EVT_END_IF
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Chan_Run, ANIM_Chan_Idle, 0, LVar0)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcAI_Chan) = {
|
||||
EVT_CALL(ContinueSpeech, NPC_TheMaster, ANIM_TheMaster_Talk, ANIM_TheMaster_Idle, 0, MSG_MAC_Gate_001D)
|
||||
EVT_CALL(SpeakToNpc, NPC_SELF, ANIM_Chan_Run, ANIM_Chan_Idle, 0, NPC_TheMaster, MSG_MAC_Gate_001E)
|
||||
EVT_WAIT(10)
|
||||
EVT_THREAD
|
||||
EVT_CALL(SetNpcFlagBits, NPC_TheMaster, NPC_FLAG_100, TRUE)
|
||||
EVT_CALL(func_802D2C14, 1)
|
||||
EVT_CALL(PlayerMoveTo, 348, -364, 20)
|
||||
EVT_CALL(InterpPlayerYaw, 20, 0)
|
||||
EVT_WAIT(20)
|
||||
EVT_CALL(func_802D2C14, 0)
|
||||
EVT_CALL(SetNpcFlagBits, NPC_TheMaster, NPC_FLAG_100, FALSE)
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Chan_Walk)
|
||||
EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_100, TRUE)
|
||||
EVT_CALL(NpcMoveTo, NPC_SELF, 380, -400, 30)
|
||||
EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_100, FALSE)
|
||||
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Chan_Idle)
|
||||
EVT_CALL(InterpNpcYaw, NPC_SELF, 225, 0)
|
||||
EVT_WAIT(20)
|
||||
EVT_CALL(N(SetDojoBattle))
|
||||
EVT_CALL(StartBattle)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcDefeat_Chan) = {
|
||||
EVT_CALL(SetEncounterStatusFlags, ENCOUNTER_STATUS_FLAGS_4, TRUE)
|
||||
EVT_CALL(N(ResetBackgroundPostBattle))
|
||||
EVT_THREAD
|
||||
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Chan_Walk)
|
||||
EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_100, TRUE)
|
||||
EVT_CALL(NpcMoveTo, NPC_SELF, 310, -390, 30)
|
||||
EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_100, FALSE)
|
||||
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Chan_Idle)
|
||||
EVT_CALL(InterpNpcYaw, NPC_SELF, 45, 0)
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(GetBattleOutcome, LVar0)
|
||||
EVT_CALL(SetNpcVar, NPC_TheMaster, 1, LVar0)
|
||||
EVT_CALL(SetNpcVar, NPC_TheMaster, 0, 1)
|
||||
EVT_CALL(SetPlayerAnimation, ANIM_Mario_10002)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInit_Chan) = {
|
||||
EVT_IF_LT(GB_StoryProgress, STORY_CH0_TWINK_GAVE_LUCKY_STAR)
|
||||
EVT_CALL(SetNpcPos, NPC_SELF, 570, 20, -150)
|
||||
EVT_CALL(SetNpcYaw, NPC_SELF, 270)
|
||||
EVT_ELSE
|
||||
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt, COLLIDER_FLAGS_UPPER_MASK)
|
||||
EVT_END_IF
|
||||
EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Chan)))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInteract_Lee) = {
|
||||
EVT_IF_LT(GB_StoryProgress, STORY_CH0_TWINK_GAVE_LUCKY_STAR)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_0016)
|
||||
EVT_ELSE
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_001C)
|
||||
EVT_END_IF
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Lee_Talk, ANIM_Lee_Idle, 0, LVar0)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcAI_Lee) = {
|
||||
EVT_CALL(ContinueSpeech, NPC_TheMaster, ANIM_TheMaster_Talk, ANIM_TheMaster_Idle, 0, MSG_MAC_Gate_0024)
|
||||
EVT_CALL(SpeakToNpc, NPC_SELF, ANIM_Lee_Talk, ANIM_Lee_Idle, 0, NPC_TheMaster, MSG_MAC_Gate_0025)
|
||||
EVT_WAIT(10)
|
||||
EVT_THREAD
|
||||
EVT_CALL(SetNpcFlagBits, NPC_TheMaster, NPC_FLAG_100, TRUE)
|
||||
EVT_CALL(func_802D2C14, 1)
|
||||
EVT_CALL(PlayerMoveTo, 348, -364, 20)
|
||||
EVT_CALL(InterpPlayerYaw, 20, 0)
|
||||
EVT_WAIT(20)
|
||||
EVT_CALL(func_802D2C14, 0)
|
||||
EVT_CALL(SetNpcFlagBits, NPC_TheMaster, NPC_FLAG_100, FALSE)
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Lee_Walk)
|
||||
EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_100, TRUE)
|
||||
EVT_CALL(NpcMoveTo, NPC_SELF, 380, -400, 30)
|
||||
EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_100, FALSE)
|
||||
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Lee_Idle)
|
||||
EVT_CALL(InterpNpcYaw, NPC_SELF, 225, 0)
|
||||
EVT_WAIT(20)
|
||||
EVT_CALL(N(SetDojoBattle))
|
||||
EVT_CALL(StartBattle)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcDefeat_Lee) = {
|
||||
EVT_CALL(SetEncounterStatusFlags, ENCOUNTER_STATUS_FLAGS_4, TRUE)
|
||||
EVT_CALL(N(ResetBackgroundPostBattle))
|
||||
EVT_THREAD
|
||||
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Lee_Walk)
|
||||
EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_100, TRUE)
|
||||
EVT_CALL(NpcMoveTo, NPC_SELF, 330, -410, 30)
|
||||
EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_100, FALSE)
|
||||
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Lee_Idle)
|
||||
EVT_CALL(InterpNpcYaw, NPC_SELF, 45, 0)
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(GetBattleOutcome, LVar0)
|
||||
EVT_CALL(SetNpcVar, NPC_TheMaster, 1, LVar0)
|
||||
EVT_CALL(SetNpcVar, NPC_TheMaster, 0, 1)
|
||||
EVT_CALL(SetPlayerAnimation, ANIM_Mario_10002)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInit_Lee) = {
|
||||
EVT_IF_LT(GB_StoryProgress, STORY_CH0_TWINK_GAVE_LUCKY_STAR)
|
||||
EVT_CALL(SetNpcPos, NPC_SELF, 600, 20, -145)
|
||||
EVT_CALL(SetNpcYaw, NPC_SELF, 270)
|
||||
EVT_END_IF
|
||||
EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Lee)))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
API_CALLABLE(N(SetPlayer1HP)) {
|
||||
gPlayerData.curHP = 1;
|
||||
sync_status_menu();
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
// NPC_TheMaster SelfVar indices
|
||||
enum {
|
||||
VAR_FINISHED_BATTLE = 0,
|
||||
VAR_BATTLE_OUTCOME = 1,
|
||||
VAR_STARTED_BATTLE = 2,
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcIdle_TheMaster) = {
|
||||
EVT_LABEL(0)
|
||||
EVT_CALL(SetSelfVar, VAR_FINISHED_BATTLE, FALSE)
|
||||
EVT_CALL(SetSelfVar, VAR_STARTED_BATTLE, FALSE)
|
||||
// wait for battle to start
|
||||
EVT_LOOP(0)
|
||||
EVT_CALL(GetSelfVar, VAR_STARTED_BATTLE, LVar0)
|
||||
EVT_IF_TRUE(LVar0)
|
||||
EVT_BREAK_LOOP
|
||||
EVT_END_IF
|
||||
EVT_WAIT(1)
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(DisablePlayerInput, TRUE)
|
||||
// wait for battle to end
|
||||
EVT_LOOP(0)
|
||||
EVT_CALL(GetSelfVar, VAR_FINISHED_BATTLE, LVar0)
|
||||
EVT_IF_TRUE(LVar0)
|
||||
EVT_BREAK_LOOP
|
||||
EVT_END_IF
|
||||
EVT_WAIT(1)
|
||||
EVT_END_LOOP
|
||||
// handle battle outcomes
|
||||
EVT_CALL(GetSelfVar, VAR_BATTLE_OUTCOME, LVar0)
|
||||
EVT_SWITCH(LVar0)
|
||||
EVT_CASE_EQ(OUTCOME_PLAYER_LOST)
|
||||
EVT_CALL(N(SetPlayer1HP))
|
||||
EVT_CALL(SpeakToPlayer, NPC_TheMaster, ANIM_TheMaster_Talk, ANIM_TheMaster_Idle, 0, MSG_MAC_Gate_0042)
|
||||
EVT_CASE_EQ(OUTCOME_PLAYER_FLED)
|
||||
EVT_CALL(SpeakToPlayer, NPC_TheMaster, ANIM_TheMaster_Talk, ANIM_TheMaster_Idle, 0, MSG_MAC_Gate_0042)
|
||||
EVT_CASE_EQ(OUTCOME_PLAYER_WON)
|
||||
EVT_SWITCH(GB_MAC00_DojoRank)
|
||||
EVT_CASE_EQ(0)
|
||||
EVT_SET(LVar1, MSG_MAC_Gate_0023)
|
||||
EVT_SET(LVar0, ITEM_FIRST_DEGREE_CARD)
|
||||
EVT_SET(LVar2, ITEM_FIRST_DEGREE_CARD)
|
||||
EVT_CASE_EQ(1)
|
||||
EVT_SET(LVar1, MSG_MAC_Gate_002A)
|
||||
EVT_SET(LVar0, ITEM_SECOND_DEGREE_CARD)
|
||||
EVT_SET(LVar2, ITEM_FIRST_DEGREE_CARD)
|
||||
EVT_CASE_EQ(2)
|
||||
EVT_SET(LVar1, MSG_MAC_Gate_003E)
|
||||
EVT_SET(LVar0, ITEM_THIRD_DEGREE_CARD)
|
||||
EVT_SET(LVar2, ITEM_SECOND_DEGREE_CARD)
|
||||
EVT_CASE_EQ(3)
|
||||
EVT_SET(LVar1, MSG_MAC_Gate_003F)
|
||||
EVT_SET(LVar0, ITEM_FOURTH_DEGREE_CARD)
|
||||
EVT_SET(LVar2, ITEM_THIRD_DEGREE_CARD)
|
||||
EVT_CASE_EQ(4)
|
||||
EVT_SET(LVar1, MSG_MAC_Gate_0040)
|
||||
EVT_SET(LVar0, ITEM_DIPLOMA)
|
||||
EVT_SET(LVar2, ITEM_FOURTH_DEGREE_CARD)
|
||||
EVT_END_SWITCH
|
||||
EVT_ADD(GB_MAC00_DojoRank, 1)
|
||||
EVT_CALL(SpeakToPlayer, NPC_TheMaster, ANIM_TheMaster_Talk, ANIM_TheMaster_Idle, 0, LVar1)
|
||||
EVT_CALL(FindKeyItem, LVar2, LVar1)
|
||||
EVT_IF_NE(LVar1, -1)
|
||||
EVT_CALL(RemoveKeyItemAt, LVar1)
|
||||
EVT_END_IF
|
||||
EVT_SET(LVar1, 1)
|
||||
EVT_EXEC_WAIT(N(GiveKeyReward))
|
||||
EVT_CALL(AddKeyItem, LVar0)
|
||||
EVT_IF_LT(GB_MAC00_DojoRank, 5)
|
||||
EVT_CALL(SpeakToPlayer, NPC_TheMaster, ANIM_TheMaster_Talk, ANIM_TheMaster_Idle, 0, MSG_MAC_Gate_0041)
|
||||
EVT_END_IF
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(DisablePlayerInput, FALSE)
|
||||
// restart cycle, waiting for the next battle
|
||||
EVT_GOTO(0)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcDefeat_Dojo) = {
|
||||
EVT_CALL(SetEncounterStatusFlags, ENCOUNTER_STATUS_FLAGS_4, TRUE)
|
||||
EVT_CALL(N(ResetBackgroundPostBattle))
|
||||
EVT_CALL(GetBattleOutcome, LVar0)
|
||||
EVT_CALL(SetSelfVar, VAR_BATTLE_OUTCOME, LVar0)
|
||||
EVT_CALL(SetSelfVar, VAR_FINISHED_BATTLE, TRUE)
|
||||
EVT_CALL(SetPlayerAnimation, ANIM_Mario_10002)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_TheMaster_InteractImpl) = {
|
||||
EVT_CALL(DisablePlayerInput, TRUE)
|
||||
EVT_IF_EQ(GF_MAC00_Met_TheMaster, FALSE)
|
||||
EVT_SET(GF_MAC00_Met_TheMaster, TRUE)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_0017)
|
||||
EVT_ELSE
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_0018)
|
||||
EVT_END_IF
|
||||
EVT_CALL(SpeakToPlayer, NPC_TheMaster, ANIM_TheMaster_Talk, ANIM_TheMaster_Idle, 0, LVar0)
|
||||
EVT_CALL(ShowChoice, MSG_Choice_0016)
|
||||
EVT_IF_EQ(LVar0, 1)
|
||||
EVT_CALL(ContinueSpeech, NPC_TheMaster, ANIM_TheMaster_Talk, ANIM_TheMaster_Idle, 0, MSG_MAC_Gate_0019)
|
||||
EVT_CALL(DisablePlayerInput, FALSE)
|
||||
EVT_RETURN
|
||||
EVT_END_IF
|
||||
EVT_IF_GT(GB_MAC00_DojoRank, 4)
|
||||
EVT_CALL(ContinueSpeech, NPC_TheMaster, ANIM_TheMaster_Talk, ANIM_TheMaster_Idle, 0, MSG_MAC_Gate_0043)
|
||||
EVT_CALL(DisablePlayerInput, FALSE)
|
||||
EVT_RETURN
|
||||
EVT_END_IF
|
||||
EVT_CALL(SetSelfVar, VAR_STARTED_BATTLE, TRUE)
|
||||
EVT_WAIT(1)
|
||||
EVT_SWITCH(GB_MAC00_DojoRank)
|
||||
EVT_CASE_EQ(0)
|
||||
EVT_CALL(BindNpcDefeat, NPC_Chan, EVT_PTR(N(EVS_NpcDefeat_Chan)))
|
||||
EVT_CALL(BindNpcAI, NPC_Chan, EVT_PTR(N(EVS_NpcAI_Chan)))
|
||||
EVT_CALL(DisablePlayerInput, FALSE)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(1)
|
||||
EVT_CALL(BindNpcDefeat, NPC_Lee, EVT_PTR(N(EVS_NpcDefeat_Lee)))
|
||||
EVT_CALL(BindNpcAI, NPC_Lee, EVT_PTR(N(EVS_NpcAI_Lee)))
|
||||
EVT_CALL(DisablePlayerInput, FALSE)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(2)
|
||||
EVT_SET(LVar1, MSG_MAC_Gate_002B)
|
||||
EVT_CASE_EQ(3)
|
||||
EVT_SET(LVar1, MSG_MAC_Gate_002C)
|
||||
EVT_CASE_EQ(4)
|
||||
EVT_SET(LVar1, MSG_MAC_Gate_002D)
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(ContinueSpeech, NPC_TheMaster, ANIM_TheMaster_Talk, ANIM_TheMaster_Idle, 0, LVar1)
|
||||
EVT_WAIT(10)
|
||||
EVT_CALL(SetNpcFlagBits, NPC_TheMaster, NPC_FLAG_100, TRUE)
|
||||
EVT_THREAD
|
||||
EVT_CALL(func_802D2C14, 1)
|
||||
EVT_CALL(PlayerMoveTo, 348, -364, 20)
|
||||
EVT_CALL(InterpPlayerYaw, 20, 0)
|
||||
EVT_WAIT(20)
|
||||
EVT_CALL(func_802D2C14, 0)
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(NpcMoveTo, NPC_SELF, 375, -400, 30)
|
||||
EVT_CALL(InterpNpcYaw, NPC_TheMaster, 225, 0)
|
||||
EVT_WAIT(30)
|
||||
EVT_CALL(SetNpcFlagBits, NPC_TheMaster, NPC_FLAG_100, FALSE)
|
||||
EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_Dojo)))
|
||||
EVT_WAIT(1)
|
||||
EVT_CALL(N(SetDojoBattle))
|
||||
EVT_IF_LT(GB_MAC00_DojoRank, 2)
|
||||
EVT_CALL(StartBattle)
|
||||
EVT_ELSE
|
||||
EVT_CALL(StartBattleWith, SONG_MASTER_BATTLE)
|
||||
EVT_END_IF
|
||||
EVT_CALL(DisablePlayerInput, FALSE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInteract_TheMaster) = {
|
||||
EVT_EXEC(N(EVS_TheMaster_InteractImpl))
|
||||
EVT_WAIT(30) // purpose unknown -- perhaps somehow prevents double interaction?
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInit_TheMaster) = {
|
||||
EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_TheMaster)))
|
||||
EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_TheMaster)))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
385
src/world/area_mac/mac_00/npc/russ_and_thief.inc.c
Normal file
385
src/world/area_mac/mac_00/npc/russ_and_thief.inc.c
Normal file
@ -0,0 +1,385 @@
|
||||
s32 N(LetterList_RussT)[] = {
|
||||
ITEM_LETTER04,
|
||||
ITEM_NONE
|
||||
};
|
||||
|
||||
EvtScript N(EVS_RussT_LetterPrompt) = {
|
||||
EVT_CALL(N(LetterDelivery_Init),
|
||||
NPC_RussT, ANIM_RussT_Talk, ANIM_RussT_Idle,
|
||||
ITEM_LETTER04, ITEM_NONE,
|
||||
MSG_MAC_Gate_0011, MSG_MAC_Gate_0012, MSG_MAC_Gate_0013, MSG_MAC_Gate_0014,
|
||||
EVT_PTR(N(LetterList_RussT)))
|
||||
EVT_EXEC_WAIT(N(EVS_DoLetterDelivery))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_RussT_LetterReward) = {
|
||||
EVT_IF_EQ(LVarC, 2)
|
||||
EVT_SET(LVar0, ITEM_STAR_PIECE)
|
||||
EVT_SET(LVar1, ITEM_TYPE_STAR_PIECE)
|
||||
EVT_EXEC_WAIT(N(GiveKeyReward))
|
||||
EVT_CALL(AddStarPieces, 1)
|
||||
EVT_END_IF
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_ShyGuy_PlayRunningSounds) = {
|
||||
EVT_LOOP(0)
|
||||
EVT_CALL(PlaySoundAtNpc, LVar0, SOUND_B0000021, 0)
|
||||
EVT_WAIT(2)
|
||||
EVT_END_LOOP
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
typedef struct RussTLoreEntry {
|
||||
/* 0x00 */ s32 hintMessage;
|
||||
/* 0x04 */ s32 progressRequired;
|
||||
/* 0x08 */ s32 isAvailableFlag;
|
||||
/* 0x0C */ s32 savedFlag;
|
||||
/* 0x10 */ s32 hasBeenGivenFlag;
|
||||
} RussTLoreEntry; // size = 0x14
|
||||
|
||||
RussTLoreEntry N(RussTLore)[] = {
|
||||
{ MSG_RussTHint_0000, STORY_CH0_WAKE_UP, AF_MAC_45, GF_MAC00_RussT_HeardLore_00, AF_MAC_77 },
|
||||
{ MSG_RussTHint_0001, STORY_CH0_WAKE_UP, AF_MAC_46, GF_MAC00_RussT_HeardLore_01, AF_MAC_78 },
|
||||
{ MSG_RussTHint_0002, STORY_CH0_WAKE_UP, AF_MAC_47, GF_MAC00_RussT_HeardLore_02, AF_MAC_79 },
|
||||
{ MSG_RussTHint_0003, STORY_CH0_WAKE_UP, AF_MAC_48, GF_MAC00_RussT_HeardLore_03, AF_MAC_7A },
|
||||
{ MSG_RussTHint_0004, STORY_CH0_BEGAN_PEACH_MISSION, AF_MAC_49, GF_MAC00_RussT_HeardLore_04, AF_MAC_7B },
|
||||
{ MSG_RussTHint_0005, STORY_CH0_BEGAN_PEACH_MISSION, AF_MAC_4A, GF_MAC00_RussT_HeardLore_05, AF_MAC_7C },
|
||||
{ MSG_RussTHint_0006, STORY_CH0_BEGAN_PEACH_MISSION, AF_MAC_4B, GF_MAC00_RussT_HeardLore_06, AF_MAC_7D },
|
||||
{ MSG_RussTHint_0007, STORY_CH0_BEGAN_PEACH_MISSION, AF_MAC_4C, GF_MAC00_RussT_HeardLore_07, AF_MAC_7E },
|
||||
{ MSG_RussTHint_0008, STORY_CH1_BEGAN_PEACH_MISSION, AF_MAC_4D, GF_MAC00_RussT_HeardLore_08, AF_MAC_7F },
|
||||
{ MSG_RussTHint_0009, STORY_CH1_BEGAN_PEACH_MISSION, AF_MAC_4E, GF_MAC00_RussT_HeardLore_09, AF_MAC_80 },
|
||||
{ MSG_RussTHint_000A, STORY_CH1_BEGAN_PEACH_MISSION, AF_MAC_4F, GF_MAC00_RussT_HeardLore_0A, AF_MAC_81 },
|
||||
{ MSG_RussTHint_000B, STORY_CH1_BEGAN_PEACH_MISSION, AF_MAC_50, GF_MAC00_RussT_HeardLore_0B, AF_MAC_82 },
|
||||
{ MSG_RussTHint_000C, STORY_CH2_BEGAN_PEACH_MISSION, AF_MAC_51, GF_MAC00_RussT_HeardLore_0C, AF_MAC_83 },
|
||||
{ MSG_RussTHint_000D, STORY_CH2_BEGAN_PEACH_MISSION, AF_MAC_52, GF_MAC00_RussT_HeardLore_0D, AF_MAC_84 },
|
||||
{ MSG_RussTHint_000E, STORY_CH2_BEGAN_PEACH_MISSION, AF_MAC_53, GF_MAC00_RussT_HeardLore_0E, AF_MAC_85 },
|
||||
{ MSG_RussTHint_000F, STORY_CH2_BEGAN_PEACH_MISSION, AF_MAC_54, GF_MAC00_RussT_HeardLore_0F, AF_MAC_86 },
|
||||
{ MSG_RussTHint_0010, STORY_CH3_BEGAN_PEACH_MISSION, AF_MAC_55, GF_MAC00_RussT_HeardLore_10, AF_MAC_87 },
|
||||
{ MSG_RussTHint_0011, STORY_CH3_BEGAN_PEACH_MISSION, AF_MAC_56, GF_MAC00_RussT_HeardLore_11, AF_MAC_88 },
|
||||
{ MSG_RussTHint_0012, STORY_CH3_BEGAN_PEACH_MISSION, AF_MAC_57, GF_MAC00_RussT_HeardLore_12, AF_MAC_89 },
|
||||
{ MSG_RussTHint_0013, STORY_CH3_BEGAN_PEACH_MISSION, AF_MAC_58, GF_MAC00_RussT_HeardLore_13, AF_MAC_8A },
|
||||
{ MSG_RussTHint_0014, STORY_CH4_BEGAN_PEACH_MISSION, AF_MAC_59, GF_MAC00_RussT_HeardLore_14, AF_MAC_8B },
|
||||
{ MSG_RussTHint_0015, STORY_CH4_BEGAN_PEACH_MISSION, AF_MAC_5A, GF_MAC00_RussT_HeardLore_15, AF_MAC_8C },
|
||||
{ MSG_RussTHint_0016, STORY_CH4_BEGAN_PEACH_MISSION, AF_MAC_5B, GF_MAC00_RussT_HeardLore_16, AF_MAC_8D },
|
||||
{ MSG_RussTHint_0017, STORY_CH4_BEGAN_PEACH_MISSION, AF_MAC_5C, GF_MAC00_RussT_HeardLore_17, AF_MAC_8E },
|
||||
{ MSG_RussTHint_0018, STORY_CH5_BEGAN_PEACH_MISSION, AF_MAC_5D, GF_MAC00_RussT_HeardLore_18, AF_MAC_8F },
|
||||
{ MSG_RussTHint_0019, STORY_CH5_BEGAN_PEACH_MISSION, AF_MAC_5E, GF_MAC00_RussT_HeardLore_19, AF_MAC_90 },
|
||||
{ MSG_RussTHint_001A, STORY_CH5_BEGAN_PEACH_MISSION, AF_MAC_5F, GF_MAC00_RussT_HeardLore_1A, AF_MAC_91 },
|
||||
{ MSG_RussTHint_001B, STORY_CH5_BEGAN_PEACH_MISSION, AF_MAC_60, GF_MAC00_RussT_HeardLore_1B, AF_MAC_92 },
|
||||
{ MSG_RussTHint_001C, STORY_CH6_BEGAN_PEACH_MISSION, AF_MAC_61, GF_MAC00_RussT_HeardLore_1C, AF_MAC_93 },
|
||||
{ MSG_RussTHint_001D, STORY_CH6_BEGAN_PEACH_MISSION, AF_MAC_62, GF_MAC00_RussT_HeardLore_1D, AF_MAC_94 },
|
||||
{ MSG_RussTHint_001E, STORY_CH6_BEGAN_PEACH_MISSION, AF_MAC_63, GF_MAC00_RussT_HeardLore_1E, AF_MAC_95 },
|
||||
{ MSG_RussTHint_001F, STORY_CH6_BEGAN_PEACH_MISSION, AF_MAC_64, GF_MAC00_RussT_HeardLore_1F, AF_MAC_96 },
|
||||
{ MSG_RussTHint_0020, STORY_CH7_BEGAN_PEACH_MISSION, AF_MAC_65, GF_MAC00_RussT_HeardLore_20, AF_MAC_97 },
|
||||
{ MSG_RussTHint_0021, STORY_CH7_BEGAN_PEACH_MISSION, AF_MAC_66, GF_MAC00_RussT_HeardLore_21, AF_MAC_98 },
|
||||
{ MSG_RussTHint_0022, STORY_CH7_BEGAN_PEACH_MISSION, AF_MAC_67, GF_MAC00_RussT_HeardLore_22, AF_MAC_99 },
|
||||
{ MSG_RussTHint_0023, STORY_CH7_BEGAN_PEACH_MISSION, AF_MAC_68, GF_MAC00_RussT_HeardLore_23, AF_MAC_9A },
|
||||
};
|
||||
|
||||
API_CALLABLE(N(ResetRussHintsGiven)) {
|
||||
RussTLoreEntry* entry = N(RussTLore);
|
||||
u32 i;
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(N(RussTLore)); i++, entry++) {
|
||||
evt_set_variable(script, entry->hasBeenGivenFlag, FALSE);
|
||||
}
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
API_CALLABLE(N(InitRussHintUnlocks)) {
|
||||
RussTLoreEntry* entry = N(RussTLore);
|
||||
u32 i;
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(N(RussTLore)); i++, entry++) {
|
||||
s32 progress = evt_get_variable(script, GB_StoryProgress);
|
||||
|
||||
evt_set_variable(script, entry->isAvailableFlag, progress >= entry->progressRequired);
|
||||
}
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
API_CALLABLE(N(GetRussHintMessage)) {
|
||||
RussTLoreEntry* entry = N(RussTLore);
|
||||
s32 hasHintMessage = FALSE;
|
||||
s32 count = 0;
|
||||
u32 i;
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(N(RussTLore)); i++, entry++) {
|
||||
if (evt_get_variable(script, entry->isAvailableFlag)) {
|
||||
if (!evt_get_variable(script, entry->savedFlag)) {
|
||||
hasHintMessage = TRUE;
|
||||
break;
|
||||
} else {
|
||||
if (!evt_get_variable(script, entry->hasBeenGivenFlag)) {
|
||||
count++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!hasHintMessage) {
|
||||
entry = N(RussTLore);
|
||||
i = 0;
|
||||
if (count != 0) {
|
||||
s32 chosenHint = rand_int(count - 1);
|
||||
|
||||
count = 0;
|
||||
|
||||
for (i = hasHintMessage; i < ARRAY_COUNT(N(RussTLore)); i++, entry++) {
|
||||
if (evt_get_variable(script, entry->isAvailableFlag) &&
|
||||
!evt_get_variable(script, entry->hasBeenGivenFlag) &&
|
||||
count++ >= chosenHint)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
script->varTable[0] = i;
|
||||
script->varTable[1] = entry->hintMessage;
|
||||
script->varTable[2] = hasHintMessage;
|
||||
evt_set_variable(script, entry->savedFlag, TRUE);
|
||||
evt_set_variable(script, entry->hasBeenGivenFlag, TRUE);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
API_CALLABLE(N(GetRussHintCount)) {
|
||||
RussTLoreEntry* entry = N(RussTLore);
|
||||
s32 count = 0;
|
||||
u32 i;
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(N(RussTLore)); i++, entry++) {
|
||||
if (evt_get_variable(script, entry->isAvailableFlag) && !evt_get_variable(script, entry->hasBeenGivenFlag)) {
|
||||
count++;
|
||||
}
|
||||
}
|
||||
script->varTable[0] = count;
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
EvtScript N(EVS_ManageCarriedDictionary) = {
|
||||
EVT_CALL(GetNpcPos, NPC_ShyGuyThief, LVar2, LVar3, LVar4)
|
||||
EVT_ADD(LVar3, 20)
|
||||
EVT_CALL(MakeItemEntity, ITEM_DICTIONARY, LVar2, LVar3, LVar4, ITEM_SPAWN_MODE_DECORATION, 0)
|
||||
EVT_SET(LVar9, LVar0)
|
||||
EVT_WAIT(1)
|
||||
EVT_LOOP(300)
|
||||
EVT_CALL(GetNpcPos, NPC_ShyGuyThief, LVar2, LVar3, LVar4)
|
||||
EVT_ADD(LVar3, 20)
|
||||
EVT_CALL(SetItemPos, LVar9, LVar2, LVar3, LVar4)
|
||||
EVT_WAIT(1)
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(RemoveItemEntity, LVar9)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_ShyGuy_StealDictionary) = {
|
||||
EVT_LOOP(0)
|
||||
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
|
||||
EVT_IF_GT(LVar0, -60)
|
||||
EVT_IF_LT(LVar0, 120)
|
||||
EVT_BREAK_LOOP
|
||||
EVT_END_IF
|
||||
EVT_END_IF
|
||||
EVT_WAIT(1)
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(SetNpcPos, NPC_ShyGuyThief, -30, 20, -470)
|
||||
EVT_CALL(SetNpcAnimation, NPC_ShyGuyThief, ANIM_ShyGuy_Red_Anim04)
|
||||
EVT_WAIT(1)
|
||||
EVT_CALL(DisablePlayerInput, TRUE)
|
||||
EVT_CALL(ShowMessageAtScreenPos, MSG_MAC_Gate_0009, 160, 40)
|
||||
EVT_EXEC(N(EVS_ManageCarriedDictionary))
|
||||
EVT_THREAD
|
||||
EVT_CALL(SetGroupEnabled, MODEL_intel_inn, 1)
|
||||
EVT_CALL(PlaySoundAtCollider, COLLIDER_deilit3, SOUND_BASIC_DOOR_OPEN, 0)
|
||||
EVT_SET(LVar0, 0)
|
||||
EVT_LOOP(10)
|
||||
EVT_ADD(LVar0, 8)
|
||||
EVT_CALL(RotateModel, MODEL_o210, LVar0, 0, 1, 0)
|
||||
EVT_WAIT(1)
|
||||
EVT_END_LOOP
|
||||
EVT_LOOP(10)
|
||||
EVT_ADD(LVar0, -8)
|
||||
EVT_CALL(RotateModel, MODEL_o210, LVar0, 0, 1, 0)
|
||||
EVT_WAIT(1)
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(PlaySoundAtCollider, COLLIDER_deilit3, SOUND_BASIC_DOOR_CLOSE, 0)
|
||||
EVT_CALL(SetGroupEnabled, MODEL_intel_inn, 0)
|
||||
EVT_END_THREAD
|
||||
EVT_WAIT(5)
|
||||
EVT_CALL(SetNpcSpeed, NPC_ShyGuyThief, 10)
|
||||
EVT_SET(LVar0, 21)
|
||||
EVT_EXEC_GET_TID(N(EVS_ShyGuy_PlayRunningSounds), LVarA)
|
||||
EVT_CALL(NpcMoveTo, NPC_ShyGuyThief, -10, -410, 0)
|
||||
EVT_KILL_THREAD(LVarA)
|
||||
EVT_CALL(PlaySoundAtNpc, NPC_ShyGuyThief, SOUND_32C, 0)
|
||||
EVT_CALL(NpcJump0, NPC_ShyGuyThief, -10, 0, -340, 0)
|
||||
EVT_SET(LVar0, 21)
|
||||
EVT_CALL(PlaySoundAtNpc, LVar0, SOUND_203F, 0)
|
||||
EVT_EXEC_GET_TID(N(EVS_ShyGuy_PlayRunningSounds), LVarA)
|
||||
EVT_CALL(NpcMoveTo, NPC_ShyGuyThief, 45, -186, 0)
|
||||
EVT_CALL(NpcMoveTo, NPC_ShyGuyThief, 139, -67, 0)
|
||||
EVT_THREAD
|
||||
EVT_CALL(NpcMoveTo, NPC_ShyGuyThief, 300, -20, 0)
|
||||
EVT_CALL(NpcMoveTo, NPC_ShyGuyThief, 600, 0, 0)
|
||||
EVT_KILL_THREAD(LVarA)
|
||||
EVT_CALL(SetNpcPos, NPC_ShyGuyThief, NPC_DISPOSE_LOCATION)
|
||||
EVT_END_THREAD
|
||||
EVT_SET(GF_MAC00_DictionaryStolen, TRUE)
|
||||
EVT_CALL(DisablePlayerInput, FALSE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInit_ShyGuyThief) = {
|
||||
EVT_IF_LT(GB_StoryProgress, STORY_CH3_STAR_SPRIT_DEPARTED)
|
||||
EVT_RETURN
|
||||
EVT_END_IF
|
||||
EVT_IF_GT(GB_StoryProgress, STORY_CH4_GOT_TAYCE_TS_CAKE)
|
||||
EVT_RETURN
|
||||
EVT_END_IF
|
||||
EVT_IF_NE(GF_MAC00_DictionaryStolen, FALSE)
|
||||
EVT_RETURN
|
||||
EVT_END_IF
|
||||
EVT_EXEC(N(EVS_ShyGuy_StealDictionary))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_RussT_GetHint) = {
|
||||
EVT_CALL(N(InitRussHintUnlocks))
|
||||
EVT_IF_EQ(GF_MAC00_Met_RussT, FALSE)
|
||||
EVT_SET(GF_MAC00_Met_RussT, TRUE)
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_RussT_Talk, ANIM_RussT_Idle, 0, MSG_MAC_Gate_0004)
|
||||
EVT_RETURN
|
||||
EVT_END_IF
|
||||
EVT_CALL(N(GetRussHintCount))
|
||||
EVT_IF_EQ(LVar0, 0)
|
||||
EVT_CALL(SpeakToPlayer, NPC_RussT, ANIM_RussT_Talk, ANIM_RussT_Idle, 0, MSG_MAC_Gate_0008)
|
||||
EVT_RETURN
|
||||
EVT_END_IF
|
||||
EVT_CALL(N(GetRussHintMessage))
|
||||
EVT_IF_NE(LVar2, 0)
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_RussT_Talk, ANIM_RussT_Idle, 0, MSG_MAC_Gate_0005)
|
||||
EVT_ELSE
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_RussT_Talk, ANIM_RussT_Idle, 0, MSG_MAC_Gate_0006)
|
||||
EVT_END_IF
|
||||
EVT_CALL(ContinueSpeech, NPC_SELF, ANIM_RussT_Talk, ANIM_RussT_Idle, 0, LVar1)
|
||||
EVT_CALL(ContinueSpeech, NPC_SELF, ANIM_RussT_Talk, ANIM_RussT_Idle, 0, MSG_MAC_Gate_0007)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
s32 N(ItemList_RussDocuments1)[] = {
|
||||
ITEM_DICTIONARY,
|
||||
ITEM_MYSTERY_NOTE,
|
||||
ITEM_SUSPICIOUS_NOTE,
|
||||
ITEM_NONE
|
||||
};
|
||||
|
||||
s32 N(ItemList_RussDocuments2)[] = {
|
||||
ITEM_MYSTERY_NOTE,
|
||||
ITEM_SUSPICIOUS_NOTE,
|
||||
ITEM_NONE
|
||||
};
|
||||
|
||||
EvtScript N(EVS_ItemPrompt_Dictionary) = {
|
||||
EVT_IF_EQ(AF_MAC_0D, FALSE)
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_RussT_Talk, ANIM_RussT_Idle, 0, MSG_MAC_Gate_000A)
|
||||
EVT_SET(AF_MAC_0D, TRUE)
|
||||
EVT_ELSE
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_RussT_Talk, ANIM_RussT_Idle, 0, MSG_MAC_Gate_000B)
|
||||
EVT_END_IF
|
||||
EVT_CHOOSE_KEY_ITEM_FROM(N(ItemList_RussDocuments1))
|
||||
EVT_SWITCH(LVar0)
|
||||
EVT_CASE_EQ(ITEM_DICTIONARY)
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_RussT_Talk, ANIM_RussT_Idle, 0, MSG_MAC_Gate_000D)
|
||||
EVT_SET(GF_MAC00_DictionaryReturned, TRUE)
|
||||
EVT_WAIT(10)
|
||||
EVT_GIVE_STAR_PIECE()
|
||||
EVT_WAIT(10)
|
||||
EVT_IF_EQ(GF_MAC00_TranslatedMysteryNote, TRUE)
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_RussT_Talk, ANIM_RussT_Idle, 0, MSG_MAC_Gate_0010)
|
||||
EVT_END_IF
|
||||
EVT_CASE_EQ(ITEM_MYSTERY_NOTE)
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_RussT_Talk, ANIM_RussT_Idle, 0, MSG_MAC_Gate_000F)
|
||||
EVT_SET(GF_MAC00_TranslatedMysteryNote, TRUE)
|
||||
EVT_CASE_EQ(-1)
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_RussT_Talk, ANIM_RussT_Idle, 0, MSG_MAC_Gate_000C)
|
||||
EVT_CASE_EQ(0)
|
||||
EVT_END_SWITCH
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_ItemPrompt_Documents) = {
|
||||
EVT_SET(LVarA, 0)
|
||||
EVT_CHOOSE_KEY_ITEM_FROM(N(ItemList_RussDocuments2))
|
||||
EVT_SWITCH(LVar0)
|
||||
EVT_CASE_EQ(0)
|
||||
EVT_IF_LT(GB_StoryProgress, STORY_CH4_SOLVED_COLOR_PUZZLE)
|
||||
EVT_IF_EQ(GF_MAC00_TranslatedMysteryNote, TRUE)
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_RussT_Talk, ANIM_RussT_Idle, 0, MSG_MAC_Gate_0010)
|
||||
EVT_SET(LVarA, 1)
|
||||
EVT_RETURN
|
||||
EVT_END_IF
|
||||
EVT_ELSE
|
||||
EVT_END_IF
|
||||
EVT_CASE_EQ(-1)
|
||||
EVT_CASE_DEFAULT
|
||||
EVT_IF_EQ(LVar0, ITEM_MYSTERY_NOTE)
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_RussT_Talk, ANIM_RussT_Idle, 0, MSG_MAC_Gate_000E)
|
||||
EVT_SET(GF_MAC00_TranslatedMysteryNote, TRUE)
|
||||
EVT_SET(LVarA, 1)
|
||||
EVT_END_IF
|
||||
EVT_END_SWITCH
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInteract_RussT) = {
|
||||
EVT_IF_GE(GB_StoryProgress, STORY_CH3_STAR_SPRIT_DEPARTED)
|
||||
EVT_IF_EQ(GF_MAC00_DictionaryReturned, FALSE)
|
||||
EVT_EXEC_WAIT(N(EVS_ItemPrompt_Dictionary))
|
||||
EVT_EXEC_WAIT(N(EVS_RussT_LetterPrompt))
|
||||
EVT_EXEC_WAIT(N(EVS_RussT_LetterReward))
|
||||
EVT_IF_NE(LVarC, 0)
|
||||
EVT_RETURN
|
||||
EVT_END_IF
|
||||
EVT_RETURN
|
||||
EVT_END_IF
|
||||
EVT_EXEC_WAIT(N(EVS_ItemPrompt_Documents))
|
||||
EVT_IF_NE(LVarA, 0)
|
||||
EVT_RETURN
|
||||
EVT_END_IF
|
||||
EVT_END_IF
|
||||
EVT_EXEC_WAIT(N(EVS_RussT_GetHint))
|
||||
EVT_EXEC_WAIT(N(EVS_RussT_LetterPrompt))
|
||||
EVT_EXEC_WAIT(N(EVS_RussT_LetterReward))
|
||||
EVT_IF_NE(LVarC, 0)
|
||||
EVT_RETURN
|
||||
EVT_END_IF
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInit_RussT) = {
|
||||
EVT_CALL(N(ResetRussHintsGiven))
|
||||
EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_RussT)))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
NpcSettings N(NpcSettings_RussT) = {
|
||||
.defaultAnim = ANIM_RussT_Idle,
|
||||
.height = 30,
|
||||
.radius = 24,
|
||||
.level = 99,
|
||||
.flags = ENEMY_FLAGS_1,
|
||||
};
|
62
src/world/area_mac/mac_00/npc/trading_toad.inc.c
Normal file
62
src/world/area_mac/mac_00/npc/trading_toad.inc.c
Normal file
@ -0,0 +1,62 @@
|
||||
API_CALLABLE(N(CheckTradeEventTime)) {
|
||||
script->varTable[0] = (s32) ((gPlayerData.frameCounter - gPlayerData.tradeEventStartTime) / 3600) < script->varTable[0];
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
API_CALLABLE(N(GetTradeEventItemCount)) {
|
||||
script->varTable[0] = get_item_count();
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
EvtScript N(EVS_NpcInteract_TradingToad) = {
|
||||
EVT_SET(LVar0, 5)
|
||||
EVT_CALL(N(CheckTradeEventTime))
|
||||
EVT_IF_EQ(LVar0, 0)
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toad_Pink_Talk, ANIM_Toad_Pink_Idle, 0, MSG_MAC_Gate_0119)
|
||||
EVT_WAIT(10)
|
||||
EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2)
|
||||
EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_SMOKE_BURST, 0)
|
||||
EVT_PLAY_EFFECT(EFFECT_BIG_SMOKE_PUFF, LVar0, LVar1, LVar2, 1, 1, 1, 1)
|
||||
EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION)
|
||||
EVT_SET(GF_TradingEvent1_Active, FALSE)
|
||||
EVT_RETURN
|
||||
EVT_END_IF
|
||||
EVT_CALL(N(GetTradeEventItemCount))
|
||||
EVT_IF_EQ(LVar0, 0)
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toad_Pink_Talk, ANIM_Toad_Pink_Idle, 0, MSG_MAC_Gate_011A)
|
||||
EVT_RETURN
|
||||
EVT_END_IF
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toad_Pink_Talk, ANIM_Toad_Pink_Idle, 0, MSG_MAC_Gate_011B)
|
||||
EVT_CHOOSE_ANY_CONSUMABLE(24)
|
||||
EVT_SWITCH(LVar0)
|
||||
EVT_CASE_EQ(-1)
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toad_Pink_Talk, ANIM_Toad_Pink_Idle, 0, MSG_MAC_Gate_011F)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(ITEM_KOOPA_LEAF)
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toad_Pink_Talk, ANIM_Toad_Pink_Idle, 0, MSG_MAC_Gate_011C)
|
||||
EVT_GIVE_CONSUMABLE_REWARD(ITEM_MAPLE_SYRUP)
|
||||
EVT_WAIT(10)
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toad_Pink_Talk, ANIM_Toad_Pink_Idle, 0, MSG_MAC_Gate_011D)
|
||||
EVT_WAIT(10)
|
||||
EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2)
|
||||
EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_SMOKE_BURST, 0)
|
||||
EVT_PLAY_EFFECT(EFFECT_BIG_SMOKE_PUFF, LVar0, LVar1, LVar2, 1, 1, 1, 1)
|
||||
EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION)
|
||||
EVT_SET(GF_TradingEvent1_Active, FALSE)
|
||||
EVT_ADD(GB_TradingEvent_Count, 1)
|
||||
EVT_CASE_DEFAULT
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toad_Pink_Talk, ANIM_Toad_Pink_Idle, 0, MSG_MAC_Gate_011E)
|
||||
EVT_END_SWITCH
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInit_TradingToad) = {
|
||||
EVT_IF_NE(GF_TradingEvent1_Active, FALSE)
|
||||
EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_TradingToad)))
|
||||
EVT_ELSE
|
||||
EVT_CALL(RemoveNpc, NPC_SELF)
|
||||
EVT_END_IF
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
226
src/world/area_mac/mac_00/npc/waterfront_family.inc.c
Normal file
226
src/world/area_mac/mac_00/npc/waterfront_family.inc.c
Normal file
@ -0,0 +1,226 @@
|
||||
EvtScript N(EVS_NpcInteract_WaterfrontDad) = {
|
||||
EVT_SWITCH(GB_StoryProgress)
|
||||
EVT_CASE_LT(STORY_CH0_MET_STAR_SPIRITS)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_0044)
|
||||
EVT_CASE_LT(STORY_CH1_MERLIN_REVEALED_KOOPA_BROS)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_0045)
|
||||
EVT_CASE_LT(STORY_CH1_STAR_SPRIT_DEPARTED)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_0046)
|
||||
EVT_CASE_LT(STORY_CH2_STAR_SPRIT_DEPARTED)
|
||||
EVT_IF_EQ(GF_MAC03_BombedRock, FALSE)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_0047)
|
||||
EVT_ELSE
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_0048)
|
||||
EVT_END_IF
|
||||
EVT_CASE_LT(STORY_CH3_STAR_SPIRIT_RESCUED)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_0049)
|
||||
EVT_CASE_LT(STORY_CH4_STAR_SPRIT_DEPARTED)
|
||||
EVT_IF_EQ(GF_MAC00_DictionaryStolen, FALSE)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_004A)
|
||||
EVT_ELSE
|
||||
EVT_IF_EQ(GF_MAC00_DictionaryReturned, FALSE)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_004B)
|
||||
EVT_ELSE
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_004C)
|
||||
EVT_END_IF
|
||||
EVT_END_IF
|
||||
EVT_CASE_LT(STORY_CH5_DEFEATED_FUZZIPEDE)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_004D)
|
||||
EVT_CASE_LT(STORY_CH5_STAR_SPRIT_DEPARTED)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_004E)
|
||||
EVT_CASE_LT(STORY_CH6_ARRIVED_AT_FLOWER_FIELDS)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_004F)
|
||||
EVT_CASE_LT(STORY_CH6_STAR_SPIRIT_RESCUED)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_0050)
|
||||
EVT_CASE_LT(STORY_CH7_INVITED_TO_STARBORN_VALLEY)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_0051)
|
||||
EVT_CASE_LT(STORY_CH7_STAR_SPRIT_DEPARTED)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_0052)
|
||||
EVT_CASE_LT(STORY_EPILOGUE)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_0053)
|
||||
EVT_CASE_GE(STORY_EPILOGUE)
|
||||
EVT_SET(LVar0, MSG_Outro_0036)
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toad_Green_Talk, ANIM_Toad_Green_Idle, 0, LVar0)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInteract_WaterfrontMom) = {
|
||||
EVT_SWITCH(GB_StoryProgress)
|
||||
EVT_CASE_LT(STORY_CH0_MET_STAR_SPIRITS)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_0054)
|
||||
EVT_CASE_LT(STORY_CH1_MERLIN_REVEALED_KOOPA_BROS)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_0055)
|
||||
EVT_CASE_LT(STORY_CH1_STAR_SPRIT_DEPARTED)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_0056)
|
||||
EVT_CASE_LT(STORY_CH2_STAR_SPRIT_DEPARTED)
|
||||
EVT_IF_EQ(GF_MAC03_BombedRock, FALSE)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_0057)
|
||||
EVT_ELSE
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_0058)
|
||||
EVT_END_IF
|
||||
EVT_CASE_LT(STORY_CH3_STAR_SPIRIT_RESCUED)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_0059)
|
||||
EVT_CASE_LT(STORY_CH5_DEFEATED_FUZZIPEDE)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_005A)
|
||||
EVT_CASE_LT(STORY_CH5_STAR_SPRIT_DEPARTED)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_005B)
|
||||
EVT_CASE_LT(STORY_CH6_ARRIVED_AT_FLOWER_FIELDS)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_005C)
|
||||
EVT_CASE_LT(STORY_CH6_STAR_SPIRIT_RESCUED)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_005D)
|
||||
EVT_CASE_LT(STORY_CH7_INVITED_TO_STARBORN_VALLEY)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_005E)
|
||||
EVT_CASE_LT(STORY_CH7_STAR_SPRIT_DEPARTED)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_005F)
|
||||
EVT_CASE_LT(STORY_EPILOGUE)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_0060)
|
||||
EVT_CASE_GE(STORY_EPILOGUE)
|
||||
EVT_SET(LVar0, MSG_Outro_0037)
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toadette_Orange_Talk, ANIM_Toadette_Orange_Idle, 0, LVar0)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInteract_WaterfrontKid1) = {
|
||||
EVT_SWITCH(GB_StoryProgress)
|
||||
EVT_CASE_LT(STORY_CH0_MET_STAR_SPIRITS)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_0061)
|
||||
EVT_CASE_LT(STORY_CH1_MERLIN_REVEALED_KOOPA_BROS)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_0062)
|
||||
EVT_CASE_LT(STORY_CH1_STAR_SPRIT_DEPARTED)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_0063)
|
||||
EVT_CASE_LT(STORY_CH2_STAR_SPRIT_DEPARTED)
|
||||
EVT_IF_EQ(GF_MAC03_BombedRock, FALSE)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_0064)
|
||||
EVT_ELSE
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_0065)
|
||||
EVT_END_IF
|
||||
EVT_CASE_LT(STORY_CH3_STAR_SPIRIT_RESCUED)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_0066)
|
||||
EVT_CASE_LT(STORY_CH4_STAR_SPRIT_DEPARTED)
|
||||
EVT_IF_EQ(GF_MAC00_DictionaryStolen, FALSE)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_0067)
|
||||
EVT_ELSE
|
||||
EVT_IF_EQ(GF_MAC00_DictionaryReturned, FALSE)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_0068)
|
||||
EVT_ELSE
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_0069)
|
||||
EVT_END_IF
|
||||
EVT_END_IF
|
||||
EVT_CASE_LT(STORY_CH5_DEFEATED_FUZZIPEDE)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_006A)
|
||||
EVT_CASE_LT(STORY_CH5_STAR_SPRIT_DEPARTED)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_006B)
|
||||
EVT_CASE_LT(STORY_CH6_ARRIVED_AT_FLOWER_FIELDS)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_006C)
|
||||
EVT_CASE_LT(STORY_CH6_STAR_SPIRIT_RESCUED)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_006D)
|
||||
EVT_CASE_LT(STORY_CH7_INVITED_TO_STARBORN_VALLEY)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_006E)
|
||||
EVT_CASE_LT(STORY_CH7_STAR_SPRIT_DEPARTED)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_006F)
|
||||
EVT_CASE_LT(STORY_EPILOGUE)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_0070)
|
||||
EVT_CASE_GE(STORY_EPILOGUE)
|
||||
EVT_SET(LVar0, MSG_Outro_0038)
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toad_Green_Talk, ANIM_Toad_Green_Idle, 0, LVar0)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInteract_WaterfrontKid2) = {
|
||||
EVT_SWITCH(GB_StoryProgress)
|
||||
EVT_CASE_LT(STORY_CH0_MET_STAR_SPIRITS)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_0071)
|
||||
EVT_CASE_LT(STORY_CH1_MERLIN_REVEALED_KOOPA_BROS)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_0072)
|
||||
EVT_CASE_LT(STORY_CH1_STAR_SPRIT_DEPARTED)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_0073)
|
||||
EVT_CASE_LT(STORY_CH2_STAR_SPRIT_DEPARTED)
|
||||
EVT_IF_EQ(GF_MAC03_BombedRock, FALSE)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_0074)
|
||||
EVT_ELSE
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_0075)
|
||||
EVT_END_IF
|
||||
EVT_CASE_LT(STORY_CH3_STAR_SPIRIT_RESCUED)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_0076)
|
||||
EVT_CASE_LT(STORY_CH5_DEFEATED_FUZZIPEDE)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_0077)
|
||||
EVT_CASE_LT(STORY_CH5_STAR_SPRIT_DEPARTED)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_0078)
|
||||
EVT_CASE_LT(STORY_CH6_ARRIVED_AT_FLOWER_FIELDS)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_0079)
|
||||
EVT_CASE_LT(STORY_CH6_STAR_SPIRIT_RESCUED)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_007A)
|
||||
EVT_CASE_LT(STORY_CH7_INVITED_TO_STARBORN_VALLEY)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_007B)
|
||||
EVT_CASE_LT(STORY_CH7_STAR_SPRIT_DEPARTED)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_007C)
|
||||
EVT_CASE_LT(STORY_EPILOGUE)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_007D)
|
||||
EVT_CASE_GE(STORY_EPILOGUE)
|
||||
EVT_SET(LVar0, MSG_Outro_0039)
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toad_Green_Talk, ANIM_Toad_Green_Idle, 0, LVar0)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInit_WaterfrontDad) = {
|
||||
EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_WaterfrontDad)))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInit_WaterfrontMom) = {
|
||||
EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_WaterfrontMom)))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInit_WaterfrontKid1) = {
|
||||
EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_WaterfrontKid1)))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInit_WaterfrontKid2) = {
|
||||
EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_WaterfrontKid2)))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_WaterfrontHouse_DoorLocked) = {
|
||||
EVT_IF_LT(GB_StoryProgress, STORY_CH3_STAR_SPRIT_DEPARTED)
|
||||
EVT_RETURN
|
||||
EVT_END_IF
|
||||
EVT_IF_GE(GB_StoryProgress, STORY_CH4_STAR_SPRIT_DEPARTED)
|
||||
EVT_RETURN
|
||||
EVT_END_IF
|
||||
EVT_SWITCH(GB_StoryProgress)
|
||||
EVT_CASE_LT(STORY_CH4_STAR_SPRIT_DEPARTED)
|
||||
EVT_IF_EQ(GF_MAC00_DictionaryStolen, FALSE)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_004A)
|
||||
EVT_SET(LVar1, MSG_MAC_Gate_0067)
|
||||
EVT_ELSE
|
||||
EVT_IF_EQ(GF_MAC00_DictionaryReturned, FALSE)
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_004B)
|
||||
EVT_SET(LVar1, MSG_MAC_Gate_0068)
|
||||
EVT_ELSE
|
||||
EVT_SET(LVar0, MSG_MAC_Gate_004C)
|
||||
EVT_SET(LVar1, MSG_MAC_Gate_0069)
|
||||
EVT_END_IF
|
||||
EVT_END_IF
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(DisablePlayerInput, TRUE)
|
||||
EVT_CALL(ShowMessageAtScreenPos, LVar0, 160, 40)
|
||||
EVT_WAIT(5)
|
||||
EVT_CALL(ShowMessageAtScreenPos, LVar1, 160, 40)
|
||||
EVT_CALL(DisablePlayerInput, FALSE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
@ -1,26 +0,0 @@
|
||||
#include "mac_01.h"
|
||||
|
||||
static char* N(exit_str_0) = "mac_00";
|
||||
static char* N(exit_str_1) = "nok_11";
|
||||
static char* N(exit_str_2) = "kmr_22";
|
||||
static char* N(exit_str_3) = "osr_00";
|
||||
static char* N(exit_str_4) = "osr_01";
|
||||
static char* N(exit_str_5) = "mac_02";
|
||||
|
||||
ApiStatus func_80240000_800880(Evt* script, s32 isInitialCall) {
|
||||
s32 itemIndex = evt_get_variable(script, *script->ptrReadPos);
|
||||
|
||||
set_item_entity_flags(gGameStatusPtr->shopItemEntities[itemIndex].index, 0x40);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus func_80240044_8008C4(Evt* script, s32 isInitialCall) {
|
||||
s32 itemIndex = evt_get_variable(script, *script->ptrReadPos);
|
||||
s32* var1 = (s32*) evt_get_variable(NULL, MapVar(2));
|
||||
|
||||
set_item_entity_flags(gGameStatusPtr->shopItemEntities[itemIndex].index, 0x40);
|
||||
evt_set_variable(NULL, var1[itemIndex], 1);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
INCLUDE_ASM(s32, "world/area_mac/mac_01/800880", func_802400C8_800948);
|
@ -1,33 +0,0 @@
|
||||
#include "mac_01.h"
|
||||
|
||||
typedef struct UnkMac01 {
|
||||
/* 0x00 */ s32 unk_00;
|
||||
/* 0x04 */ s32 unk_04;
|
||||
/* 0x08 */ s32 unk_08;
|
||||
} UnkMac01; // size = 0xC
|
||||
|
||||
extern UnkMac01 D_802485E8_808E68[26];
|
||||
|
||||
ApiStatus func_80240E80_801700(Evt* script, s32 isInitialCall) {
|
||||
s32 idx = evt_get_variable(script, GameByte(349));
|
||||
|
||||
script->varTable[0] = D_802485E8_808E68[idx].unk_00;
|
||||
script->varTable[1] = D_802485E8_808E68[idx].unk_04;
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus func_80240ED8_801758(Evt* script, s32 isInitialCall) {
|
||||
s32 temp_a0 = evt_get_variable(script, GameByte(0));
|
||||
UnkMac01* it;
|
||||
s32 i;
|
||||
|
||||
it = &D_802485E8_808E68[ARRAY_COUNT(D_802485E8_808E68) - 1];
|
||||
|
||||
for (i = ARRAY_COUNT(D_802485E8_808E68) - 1; i >= 0; i--, it--) {
|
||||
if (temp_a0 >= it->unk_08) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
evt_set_variable(script, GameByte(349), i);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
@ -1,699 +0,0 @@
|
||||
#include "mac_01.h"
|
||||
#include "model.h"
|
||||
#include "hud_element.h"
|
||||
|
||||
extern IconHudScriptPair gItemHudScripts[];
|
||||
|
||||
#define CHUCK_QUIZMO_NPC_ID 5
|
||||
|
||||
extern s32 mac_01_ItemChoice_HasSelectedItem;
|
||||
extern s32 mac_01_ItemChoice_SelectedItemID;
|
||||
extern s32 D_80258404_818C84;
|
||||
extern s32 D_80262F68;
|
||||
|
||||
#include "world/common/atomic/MonitorMusicProximityTrigger.inc.c"
|
||||
|
||||
#include "world/common/enemy/ai/PatrolNoAttackAI.inc.c"
|
||||
|
||||
static char* N(exit_str_0) = "flo_00";
|
||||
static char* N(exit_str_1) = "kmr_22";
|
||||
|
||||
extern s32 N(Quizmo_Worker);
|
||||
extern s32 N(Quizmo_AnswerResult);
|
||||
extern EffectInstance* N(Quizmo_StageEffect);
|
||||
extern EffectInstance* N(Quizmo_AudienceEffect);
|
||||
extern EffectInstance* N(Quizmo_VannaTEffect);
|
||||
|
||||
#include "world/common/atomic/Quizmo.inc.c"
|
||||
|
||||
#include "world/common/todo/UnkFoldFunc.inc.c"
|
||||
|
||||
ApiStatus func_80243380_803C00(Evt* script, s32 isInitialCall) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 spriteIndex = evt_get_variable(script, *args++);
|
||||
s32 rasterIndex = evt_get_variable(script, *args++);
|
||||
UnkEntityStruct* temp_v0 = heap_malloc(sizeof(*temp_v0));
|
||||
|
||||
temp_v0->spriteIndex = spriteIndex;
|
||||
temp_v0->rasterIndex = rasterIndex;
|
||||
temp_v0->unk_34 = gPlayerStatus.colliderHeight;
|
||||
temp_v0->unk_38 = gPlayerStatus.colliderDiameter;
|
||||
temp_v0->pos.x = gPlayerStatus.position.x;
|
||||
temp_v0->pos.y = gPlayerStatus.position.y;
|
||||
temp_v0->pos.z = gPlayerStatus.position.z;
|
||||
temp_v0->rot.x = 0.0f;
|
||||
temp_v0->rot.y = 0.0f;
|
||||
temp_v0->rot.z = 0.0f;
|
||||
temp_v0->scale.x = SPRITE_WORLD_SCALE_F;
|
||||
temp_v0->scale.y = SPRITE_WORLD_SCALE_F;
|
||||
temp_v0->scale.z = SPRITE_WORLD_SCALE_F;
|
||||
temp_v0->foldID = func_8013A704(1);
|
||||
temp_v0->entityID = create_worker_world(NULL, mac_01_UnkFoldFunc);
|
||||
evt_set_variable(script, MapVar(10), (s32) temp_v0);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus func_80243494_803D14(Evt* script, s32 isInitialCall) {
|
||||
UnkEntityStruct* temp_v0 = (UnkEntityStruct*) evt_get_variable(NULL, MapVar(10));
|
||||
|
||||
func_8013A854(temp_v0->foldID);
|
||||
free_worker(temp_v0->entityID);
|
||||
heap_free(temp_v0);
|
||||
evt_set_variable(script, MapVar(10), NULL);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus func_80243500_803D80(Evt* script, s32 isInitialCall) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 x = evt_get_float_variable(script, *args++);
|
||||
s32 y = evt_get_float_variable(script, *args++);
|
||||
s32 z = evt_get_float_variable(script, *args++);
|
||||
UnkEntityStruct* temp_v0 = (UnkEntityStruct*) evt_get_variable(NULL, MapVar(10));
|
||||
|
||||
temp_v0->pos.x = x;
|
||||
temp_v0->pos.y = y;
|
||||
temp_v0->pos.z = z;
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus func_802435C0_803E40(Evt* script, s32 isInitialCall) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 x = evt_get_float_variable(script, *args++);
|
||||
s32 y = evt_get_float_variable(script, *args++);
|
||||
s32 z = evt_get_float_variable(script, *args++);
|
||||
UnkEntityStruct* temp_v0 = (UnkEntityStruct*) evt_get_variable(NULL, MapVar(10));
|
||||
|
||||
temp_v0->rot.x = x;
|
||||
temp_v0->rot.y = y;
|
||||
temp_v0->rot.z = z;
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus func_80243680_803F00(Evt* script, s32 isInitialCall) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 x = evt_get_float_variable(script, *args++);
|
||||
s32 y = evt_get_float_variable(script, *args++);
|
||||
s32 z = evt_get_float_variable(script, *args++);
|
||||
UnkEntityStruct* temp_v0 = (UnkEntityStruct*) evt_get_variable(NULL, MapVar(10));
|
||||
|
||||
temp_v0->scale.x = x;
|
||||
temp_v0->scale.y = y;
|
||||
temp_v0->scale.z = z;
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus func_80243740_803FC0(Evt* script, s32 isInitialCall) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 spriteIndex = evt_get_variable(script, *args++);
|
||||
s32 rasterIndex = evt_get_variable(script, *args++);
|
||||
UnkEntityStruct* temp_v0 = (UnkEntityStruct*) evt_get_variable(NULL, MapVar(10));
|
||||
|
||||
temp_v0->spriteIndex = spriteIndex;
|
||||
temp_v0->rasterIndex = rasterIndex;
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
#include "world/common/atomic/ToadHouse.inc.c"
|
||||
|
||||
#include "world/common/todo/GetNpcCollisionHeight.inc.c"
|
||||
|
||||
#include "world/common/todo/AddPlayerHandsOffset.inc.c"
|
||||
|
||||
INCLUDE_ASM(s32, "world/area_mac/mac_01/8017D0", func_80243CD4_804554);
|
||||
|
||||
ApiStatus N(ItemChoice_SaveSelected)(Evt* script, s32 isInitialCall) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
|
||||
N(ItemChoice_SelectedItemID) = evt_get_variable(script, *args);
|
||||
N(ItemChoice_HasSelectedItem) = TRUE;
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
extern s32 mac_01_D_80262A70[];
|
||||
|
||||
ApiStatus func_80243D60_8045E0(Evt* script, s32 isInitialCall) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32* ptr = (s32*) evt_get_variable(script, *args++);
|
||||
s32 i;
|
||||
|
||||
if (ptr != NULL) {
|
||||
for (i = 0; ptr[i] != 0; i++) {
|
||||
mac_01_D_80262A70[i] = ptr[i];
|
||||
}
|
||||
mac_01_D_80262A70[i] = 0;
|
||||
} else {
|
||||
for (i = 0; i < 112; i++) {
|
||||
mac_01_D_80262A70[i] = i + 16;
|
||||
mac_01_D_80262A70[112] = 0;
|
||||
}
|
||||
}
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
extern s32 N(LetterDelivery_SavedNpcAnim);
|
||||
#include "world/common/todo/LetterDelivery.inc.c"
|
||||
|
||||
#include "world/common/todo/GetPlayerCoins.inc.c"
|
||||
|
||||
ApiStatus func_802440FC_80497C(Evt* script, s32 isInitialCall) {
|
||||
if (isInitialCall) {
|
||||
set_mdl_custom_gfx_set(get_model_from_list_index(get_model_list_index_from_tree_index(0x2B)), -1, 3);
|
||||
set_mdl_custom_gfx_set(get_model_from_list_index(get_model_list_index_from_tree_index(0x2A)), -1, 3);
|
||||
set_mdl_custom_gfx_set(get_model_from_list_index(get_model_list_index_from_tree_index(0x29)), -1, 3);
|
||||
set_model_env_color_parameters(255, 255, 255, 0, 0, 0);
|
||||
script->functionTemp[0] = 255;
|
||||
}
|
||||
script->functionTemp[0] -= 4;
|
||||
if (script->functionTemp[0] < 64) {
|
||||
script->functionTemp[0] = 64;
|
||||
}
|
||||
set_model_env_color_parameters(script->functionTemp[0], script->functionTemp[0], script->functionTemp[0], 0, 0, 0);
|
||||
if (script->functionTemp[0] == 64) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
return ApiStatus_BLOCK;
|
||||
}
|
||||
|
||||
ApiStatus func_802441EC_804A6C(Evt* script, s32 isInitialCall) {
|
||||
if (isInitialCall) {
|
||||
script->functionTemp[0] = 64;
|
||||
script->functionTemp[2] = 64;
|
||||
script->functionTemp[1] = 0;
|
||||
}
|
||||
if (script->functionTemp[1] == 0) {
|
||||
script->functionTemp[0] += 4;
|
||||
script->functionTemp[2] += 4;
|
||||
if (script->functionTemp[0] > 127) {
|
||||
script->functionTemp[0] = 127;
|
||||
}
|
||||
if (script->functionTemp[2] > 127) {
|
||||
script->functionTemp[2] = 127;
|
||||
}
|
||||
if (script->functionTemp[0] == 127 && (script->functionTemp[2] == script->functionTemp[0])) {
|
||||
script->functionTemp[1] = 1;
|
||||
}
|
||||
} else {
|
||||
script->functionTemp[0] -= 4;
|
||||
script->functionTemp[2] -= 4;
|
||||
if (script->functionTemp[0] < 64) {
|
||||
script->functionTemp[0] = 64;
|
||||
}
|
||||
if (script->functionTemp[2] < 0) {
|
||||
script->functionTemp[2] = 0;
|
||||
}
|
||||
}
|
||||
set_model_env_color_parameters(
|
||||
script->functionTemp[0], script->functionTemp[0], script->functionTemp[0],
|
||||
script->functionTemp[2], script->functionTemp[2], script->functionTemp[2]
|
||||
);
|
||||
if (script->functionTemp[0] == 64 && script->functionTemp[2] == 0) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
return ApiStatus_BLOCK;
|
||||
}
|
||||
|
||||
ApiStatus func_80244308_804B88(Evt* script, s32 isInitialCall) {
|
||||
if (isInitialCall) {
|
||||
script->functionTemp[0] = 64;
|
||||
}
|
||||
script->functionTemp[0] += 4;
|
||||
if (script->functionTemp[0] > 255) {
|
||||
script->functionTemp[0] = 255;
|
||||
}
|
||||
set_model_env_color_parameters(script->functionTemp[0], script->functionTemp[0], script->functionTemp[0], 0, 0, 0);
|
||||
if (script->functionTemp[0] == 255) {
|
||||
set_mdl_custom_gfx_set(get_model_from_list_index(get_model_list_index_from_tree_index(0x2B)), -1, 0);
|
||||
set_mdl_custom_gfx_set(get_model_from_list_index(get_model_list_index_from_tree_index(0x2A)), -1, 0);
|
||||
set_mdl_custom_gfx_set(get_model_from_list_index(get_model_list_index_from_tree_index(0x29)), -1, 0);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
return ApiStatus_BLOCK;
|
||||
}
|
||||
|
||||
// identical to hos_06 func
|
||||
// TODO may not be motionBlurFlame
|
||||
ApiStatus func_802443E0_804C60(Evt* script, s32 isInitialCall) {
|
||||
EffectInstance* effects[3];
|
||||
Matrix4f sp28, sp68;
|
||||
f32 tx;
|
||||
f32 ty;
|
||||
f32 temp_f24;
|
||||
f32 temp_f28;
|
||||
f32 temp_f30;
|
||||
s32 i;
|
||||
|
||||
if (isInitialCall) {
|
||||
script->functionTemp[0] = 180;
|
||||
script->functionTempPtr[1] = (EffectInstance*) evt_get_variable(script, ArrayVar(3));
|
||||
script->functionTempPtr[2] = (EffectInstance*) evt_get_variable(script, ArrayVar(4));
|
||||
script->functionTempPtr[3] = (EffectInstance*) evt_get_variable(script, ArrayVar(5));
|
||||
}
|
||||
|
||||
effects[0] = script->functionTempPtr[1];
|
||||
effects[1] = script->functionTempPtr[2];
|
||||
effects[2] = script->functionTempPtr[3];
|
||||
temp_f30 = (sin_deg(script->functionTemp[0]) * 10.0f) + 10.0f;
|
||||
temp_f28 = (sin_deg(script->functionTemp[0]) * 25.0f) + 10.0f;
|
||||
temp_f24 = script->functionTemp[0] * 10;
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(effects); i++) {
|
||||
guRotateF(sp28, -gCameras[gCurrentCameraID].currentYaw, 0.0f, 1.0f, 0.0f);
|
||||
guRotateF(sp68, i * 120, 0.0f, 0.0f, 1.0f);
|
||||
guMtxCatF(sp68, sp28, sp28);
|
||||
tx = temp_f30 * sin_deg(temp_f24);
|
||||
ty = temp_f28 * cos_deg(temp_f24);
|
||||
guTranslateF(sp68, tx, ty, 0.0f);
|
||||
guMtxCatF(sp68, sp28, sp28);
|
||||
effects[i]->data.motionBlurFlame->pos.x = sp28[3][0];
|
||||
effects[i]->data.motionBlurFlame->pos.y = sp28[3][1];
|
||||
effects[i]->data.motionBlurFlame->pos.z = sp28[3][2];
|
||||
}
|
||||
|
||||
script->functionTemp[0]--;
|
||||
if (script->functionTemp[0] < 16) {
|
||||
for (i = 0; i < ARRAY_COUNT(effects); i++) {
|
||||
effects[i]->data.motionBlurFlame->unk_4C = script->functionTemp[0];
|
||||
}
|
||||
}
|
||||
|
||||
if (script->functionTemp[0] < 0) {
|
||||
for (i = 0; i < ARRAY_COUNT(effects); i++) {
|
||||
remove_effect(effects[i]);
|
||||
}
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
return ApiStatus_BLOCK;
|
||||
}
|
||||
|
||||
// identical to hos_06 func
|
||||
ApiStatus func_802446AC_804F2C(Evt* script, s32 isInitialCall) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
EffectInstance* effect = (EffectInstance*) evt_get_variable(script, *args++);
|
||||
|
||||
// TODO effect may be wrong
|
||||
effect->data.energyOrbWave->unk_1C++;
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
#include "world/common/todo/UnkPositionFunc.inc.c"
|
||||
|
||||
ApiStatus func_802447E0_805060(Evt* script, s32 isInitialCall) {
|
||||
if (isInitialCall) {
|
||||
script->functionTemp[1] = 0;
|
||||
}
|
||||
|
||||
script->functionTemp[1] += 10;
|
||||
if (script->functionTemp[1] > 255) {
|
||||
script->functionTemp[1] = 255;
|
||||
}
|
||||
|
||||
set_screen_overlay_params_front(0, script->functionTemp[1]);
|
||||
|
||||
if (script->functionTemp[1] == 255) {
|
||||
return ApiStatus_DONE2;
|
||||
} else {
|
||||
return ApiStatus_BLOCK;
|
||||
}
|
||||
}
|
||||
|
||||
ApiStatus func_80244848_8050C8(Evt* script, s32 isInitialCall) {
|
||||
if (isInitialCall) {
|
||||
script->functionTemp[1] = 255;
|
||||
}
|
||||
|
||||
script->functionTemp[1] -= 10;
|
||||
if (script->functionTemp[1] <= 0) {
|
||||
script->functionTemp[1] = 0;
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
set_screen_overlay_params_front(0, script->functionTemp[1]);
|
||||
return ApiStatus_BLOCK;
|
||||
}
|
||||
|
||||
ApiStatus func_802448A0_805120(Evt* script, s32 isInitialCall) {
|
||||
s32 alpha;
|
||||
|
||||
if (isInitialCall) {
|
||||
if (script->varTable[0] == 0) {
|
||||
func_8011B950(script->varTable[15], -1, 1, 1);
|
||||
}
|
||||
script->functionTemp[0] = 0;
|
||||
}
|
||||
|
||||
script->functionTemp[0] += 32;
|
||||
if (script->functionTemp[0] > 255) {
|
||||
script->functionTemp[0] = 255;
|
||||
}
|
||||
|
||||
if (script->varTable[0] == 0) {
|
||||
alpha = script->functionTemp[0];
|
||||
} else {
|
||||
alpha = 255 - script->functionTemp[0];
|
||||
}
|
||||
|
||||
set_background_color_blend(0, 0, 0, alpha);
|
||||
gCameras[CAM_DEFAULT].bgColor[0] = 0;
|
||||
gCameras[CAM_DEFAULT].bgColor[1] = 0;
|
||||
gCameras[CAM_DEFAULT].bgColor[2] = 0;
|
||||
|
||||
if (script->functionTemp[0] >= 255) {
|
||||
if (script->varTable[0] == 3) {
|
||||
func_8011B950(script->varTable[15], -1, 0, 1);
|
||||
}
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
return ApiStatus_BLOCK;
|
||||
}
|
||||
|
||||
ApiStatus func_80244984_805204(Evt* script, s32 isInitialCall) {
|
||||
s32 flagBase = GameFlag(1664);
|
||||
s32 count = 0;
|
||||
s32 i;
|
||||
|
||||
for (i = 0; i < 16; i++) {
|
||||
if (evt_get_variable(NULL, flagBase + i) == 0) {
|
||||
count++;
|
||||
}
|
||||
}
|
||||
script->varTable[0] = count;
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus func_802449F8_805278(Evt* script, s32 isInitialCall) {
|
||||
s32 temp_s3 = -evt_get_variable(NULL, MapVar(1));
|
||||
s32 temp_s4 = evt_get_variable(NULL, MapVar(0));
|
||||
Npc* npc = script->varTablePtr[7];
|
||||
Enemy* enemy = get_enemy(2);
|
||||
f32 theta = (temp_s3 / 180.0f) * PI;
|
||||
f32 sinTheta = sin_rad(theta);
|
||||
f32 cosTheta = cos_rad(theta);
|
||||
f32 vt0 = script->varTable[0];
|
||||
f32 vt1 = script->varTable[1];
|
||||
|
||||
script->varTable[4] = script->varTable[2] + (s32) ((vt0 * cosTheta) - (vt1 * sinTheta));
|
||||
script->varTable[5] = script->varTable[3] + (s32) ((vt0 * sinTheta) + (vt1 * cosTheta));
|
||||
|
||||
if (temp_s3 == 0) {
|
||||
npc->currentAnim = 0xA70001;
|
||||
enemy->flags &= ~ENEMY_FLAGS_8000000;
|
||||
} else {
|
||||
npc->currentAnim = 0xA70002;
|
||||
enemy->flags |= ENEMY_FLAGS_8000000;
|
||||
}
|
||||
|
||||
if (temp_s3 == -60) {
|
||||
npc->flags |= NPC_FLAG_2;
|
||||
} else {
|
||||
npc->flags &= ~NPC_FLAG_2;
|
||||
}
|
||||
|
||||
if (temp_s4 != 0) {
|
||||
npc->currentAnim = 0xA70006;
|
||||
}
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
void func_80244B98_805418(void) {
|
||||
s32 temp_s0 = evt_get_variable(NULL, MapVar(0));
|
||||
Vtx* sp10;
|
||||
Vtx* sp14;
|
||||
s32 numCopied;
|
||||
s32 i;
|
||||
|
||||
mdl_get_copied_vertices(0, &sp10, &sp14, &numCopied);
|
||||
|
||||
for (i = 0; i < numCopied; i++) {
|
||||
if (sp10[i].v.ob[0] == -0x4E) {
|
||||
Vtx* v14 = &sp14[i];
|
||||
|
||||
if (sp10[i].v.ob[1] == 0) {
|
||||
v14->v.ob[1] = sp10[i].v.ob[1] - (temp_s0 / 4);
|
||||
} else {
|
||||
v14->v.ob[1] = sp10[i].v.ob[1] + (temp_s0 / 4);
|
||||
}
|
||||
} else if (sp10[i].v.ob[0] == -0x10) {
|
||||
Vtx* v14 = &sp14[i];
|
||||
|
||||
if (sp10[i].v.ob[1] == 0) {
|
||||
v14->v.ob[1] = sp10[i].v.ob[1] - (temp_s0 / 4);
|
||||
} else {
|
||||
v14->v.ob[1] = sp10[i].v.ob[1] + (temp_s0 / 4);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
gSPDisplayList(gMasterGfxPos++, mdl_get_copied_gfx(0));
|
||||
}
|
||||
|
||||
// flag clearing counterpart of UnkMachiFunc
|
||||
ApiStatus func_80244CC0_805540(Evt* script, s32 isInitialCall) {
|
||||
if (evt_get_variable(NULL, GF_MAC01_RowfBadgeAvailableA) == 0) {
|
||||
clear_item_entity_flags(gGameStatusPtr->shopItemEntities[0].index, ITEM_ENTITY_FLAGS_40);
|
||||
}
|
||||
if (evt_get_variable(NULL, GF_MAC01_RowfBadgeAvailableB) == 0) {
|
||||
clear_item_entity_flags(gGameStatusPtr->shopItemEntities[1].index, ITEM_ENTITY_FLAGS_40);
|
||||
}
|
||||
if (evt_get_variable(NULL, GF_MAC01_RowfBadgeAvailableC) == 0) {
|
||||
clear_item_entity_flags(gGameStatusPtr->shopItemEntities[2].index, ITEM_ENTITY_FLAGS_40);
|
||||
}
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
#include "world/common/todo/UnkMachiFunc.inc.c"
|
||||
|
||||
ApiStatus func_80244E10_805690(Evt* script, s32 isInitialCall) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 idx = evt_get_variable(script, *args++);
|
||||
|
||||
set_item_entity_position(
|
||||
gGameStatusPtr->shopItemEntities[idx].index,
|
||||
script->varTable[0], script->varTable[1], script->varTable[2] + 6
|
||||
);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
typedef struct UnkMac01 {
|
||||
/* 0x00 */ s32 unk_00;
|
||||
/* 0x04 */ s32 unk_04;
|
||||
/* 0x08 */ s32 unk_08;
|
||||
/* 0x0C */ s32 unk_0C;
|
||||
/* 0x10 */ s32 unk_10;
|
||||
} UnkMac01; // size = 0x14
|
||||
// same as UnkMac00 ?
|
||||
|
||||
extern UnkMac01 D_80256ADC_81735C[19];
|
||||
extern UnkMac01 D_80256AEC_81736C[];
|
||||
extern PopupMenu D_80262C38;
|
||||
|
||||
ApiStatus func_80244E90_805710(Evt* script, s32 isInitialCall) {
|
||||
PlayerData* playerData = &gPlayerData;
|
||||
s32 var_s2 = -1;
|
||||
u32 i;
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(D_80256ADC_81735C); i++) {
|
||||
if (playerData->partners[D_80256ADC_81735C[i].unk_00].enabled &&
|
||||
(evt_get_variable(NULL, GameFlag(153 + i)) != 0))
|
||||
{
|
||||
if (evt_get_variable(NULL, GameFlag(172 + i)) == 0) {
|
||||
var_s2 = 1;
|
||||
break;
|
||||
} else {
|
||||
var_s2 = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
script->varTable[0] = var_s2;
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
s32 func_80244F5C_8057DC(s32 arg0) {
|
||||
s32 ret = 0;
|
||||
u32 i;
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(D_80256ADC_81735C); i++) {
|
||||
if (D_80256ADC_81735C[i].unk_00 == arg0 && evt_get_variable(NULL, GameFlag(153 + i)) != 0) {
|
||||
if (ret == 0) {
|
||||
ret = 1;
|
||||
}
|
||||
if (evt_get_variable(NULL, GameFlag(172 + i)) == 0) {
|
||||
ret = 2;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
ApiStatus func_80245018_805898(Evt* script, s32 isInitialCall) {
|
||||
D_80262F68 = 0;
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus func_80245028_8058A8(Evt* script, s32 isInitialCall) {
|
||||
PopupMenu* menu = &D_80262C38;
|
||||
PartnerPopupProperties* temp_s2;
|
||||
PlayerData* playerData = &gPlayerData;
|
||||
s32 partnerID;
|
||||
s32 cond;
|
||||
s32 numEntries;
|
||||
s32 i;
|
||||
|
||||
if (isInitialCall) {
|
||||
numEntries = 0;
|
||||
|
||||
for (i = 1; i < 12; i++) {
|
||||
partnerID = D_8008EEC0[i];
|
||||
if (playerData->partners[partnerID].enabled && partnerID != PARTNER_GOOMPA) {
|
||||
temp_s2 = &gPartnerPopupProperties[partnerID];
|
||||
cond = func_80244F5C_8057DC(partnerID);
|
||||
if (cond) {
|
||||
menu->ptrIcon[numEntries] = wPartnerHudScripts[partnerID];
|
||||
menu->userIndex[numEntries] = partnerID;
|
||||
menu->enabled[numEntries] = TRUE;
|
||||
menu->nameMsg[numEntries] = temp_s2->nameMsg;
|
||||
menu->descMsg[numEntries] = temp_s2->worldDescMsg;
|
||||
menu->value[numEntries] = playerData->partners[partnerID].level;
|
||||
if (cond == TRUE) {
|
||||
menu->enabled[numEntries] = FALSE;
|
||||
menu->ptrIcon[numEntries] = wDisabledPartnerHudScripts[partnerID];
|
||||
}
|
||||
numEntries++;
|
||||
}
|
||||
}
|
||||
}
|
||||
menu->popupType = POPUP_MENU_D;
|
||||
menu->numEntries = numEntries;
|
||||
menu->initialPos = D_80262F68;
|
||||
create_popup_menu(menu);
|
||||
status_menu_respond_to_changes();
|
||||
close_status_menu();
|
||||
script->functionTemp[0] = 0;
|
||||
}
|
||||
|
||||
if (script->functionTemp[0] == 0) {
|
||||
script->functionTemp[1] = menu->result;
|
||||
if (script->functionTemp[1] != 0) {
|
||||
hide_popup_menu();
|
||||
} else {
|
||||
return ApiStatus_BLOCK;
|
||||
}
|
||||
}
|
||||
|
||||
script->functionTemp[0]++;
|
||||
if (script->functionTemp[0] < 20) {
|
||||
return ApiStatus_BLOCK;
|
||||
}
|
||||
|
||||
destroy_popup_menu();
|
||||
if (script->functionTemp[1] == 0xFF) {
|
||||
script->varTable[1] = -1;
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
partnerID = menu->userIndex[script->functionTemp[1] - 1];
|
||||
script->varTable[1] = partnerID; // TODO required to match (use of partnerID temp)
|
||||
D_80262F68 = script->functionTemp[1] - 1;
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus func_8024522C_805AAC(Evt* script, s32 isInitialCall) {
|
||||
s32 vt10 = script->varTable[10];
|
||||
PopupMenu* menu = &D_80262C38;
|
||||
IconHudScriptPair* scriptPair;
|
||||
s32 temp_a0;
|
||||
s32 temp_a1;
|
||||
s32 temp_s0;
|
||||
s32 numEntries;
|
||||
u32 i;
|
||||
|
||||
if (isInitialCall) {
|
||||
numEntries = 0;
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(D_80256ADC_81735C); i++) {
|
||||
temp_s0 = evt_get_variable(NULL, GameFlag(153 + i));
|
||||
temp_a0 = evt_get_variable(NULL, GameFlag(172 + i));
|
||||
if (temp_s0 != 0 && vt10 == D_80256ADC_81735C[i].unk_00) {
|
||||
scriptPair = &gItemHudScripts[gItemTable[84].hudElemID];
|
||||
menu->userIndex[numEntries] = i;
|
||||
menu->nameMsg[numEntries] = D_80256ADC_81735C[i].unk_08;
|
||||
menu->descMsg[numEntries] = D_80256ADC_81735C[i].unk_0C;
|
||||
menu->value[numEntries] = 0;
|
||||
if (temp_a0 != 0) {
|
||||
menu->ptrIcon[numEntries] = scriptPair->disabled;
|
||||
menu->enabled[numEntries] = FALSE;
|
||||
} else {
|
||||
menu->ptrIcon[numEntries] = scriptPair->enabled;
|
||||
menu->enabled[numEntries] = TRUE;
|
||||
}
|
||||
numEntries++;
|
||||
}
|
||||
}
|
||||
menu->popupType = 8;
|
||||
menu->numEntries = numEntries;
|
||||
menu->initialPos = 0;
|
||||
create_popup_menu(menu);
|
||||
status_menu_respond_to_changes();
|
||||
close_status_menu();
|
||||
script->functionTemp[0] = 0;
|
||||
}
|
||||
|
||||
if (script->functionTemp[0] == 0) {
|
||||
script->functionTemp[1] = menu->result;
|
||||
if (script->functionTemp[1] != 0) {
|
||||
hide_popup_menu();
|
||||
} else {
|
||||
return ApiStatus_BLOCK;
|
||||
}
|
||||
}
|
||||
|
||||
script->functionTemp[0]++;
|
||||
if (script->functionTemp[0] < 20) {
|
||||
return ApiStatus_BLOCK;
|
||||
}
|
||||
|
||||
destroy_popup_menu();
|
||||
if (script->functionTemp[1] == 0xFF) {
|
||||
script->varTable[1] = -1;
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
temp_a1 = menu->userIndex[script->functionTemp[1] - 1];
|
||||
script->varTable[1] = temp_a1;
|
||||
script->varTable[0] = D_80256AEC_81736C[temp_a1].unk_00;
|
||||
evt_set_variable(NULL, GameFlag(temp_a1 + 172), 1);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus func_80245440_805CC0(Evt* script, s32 isInitialCall) {
|
||||
PlayerData* playerData = &gPlayerData;
|
||||
|
||||
if (playerData->currentPartner == script->varTable[10]) {
|
||||
script->varTable[1] = 0;
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
switch_to_partner(script->varTable[10]);
|
||||
script->varTable[1] = 1;
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus func_80245488_805D08(Evt* script, s32 isInitialCall) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
|
||||
D_80258404_818C84 = evt_get_variable(script, *args++);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
void func_802454B4_805D34(void) {
|
||||
gDPSetCombineLERP(gMasterGfxPos++, 0, 0, 0, 1, SHADE, 0, PRIMITIVE, 0, 0, 0, 0, 1, SHADE, 0, PRIMITIVE, 0);
|
||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, 0, 0, 0, D_80258404_818C84 & 0xFF);
|
||||
}
|
||||
|
||||
ApiStatus func_80245504_805D84(Evt* script, s32 isInitialCall) {
|
||||
partner_set_tether_distance(20.0f);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus func_8024552C_805DAC(Evt* script, s32 isInitialCall) {
|
||||
repartner_set_tether_distance();
|
||||
return ApiStatus_DONE2;
|
||||
}
|
@ -1,11 +0,0 @@
|
||||
#include "mac_01.h"
|
||||
|
||||
#define NAMESPACE dup_mac_01
|
||||
|
||||
#include "world/common/enemy/ai/PatrolNoAttackAI.inc.c"
|
||||
|
||||
#include "world/common/todo/UnkMachiFunc.inc.c"
|
||||
|
||||
#define NAMESPACE mac_01
|
||||
|
||||
static char* N(exit_str_0) = "osr_00";
|
@ -1,4 +0,0 @@
|
||||
#include "mac_01.h"
|
||||
|
||||
#include "common/foliage.inc.c"
|
||||
|
@ -2,8 +2,137 @@
|
||||
/// @brief Toad Town - Plaza District
|
||||
|
||||
#include "common.h"
|
||||
#include "../mac.h"
|
||||
#include "message_ids.h"
|
||||
#include "map.h"
|
||||
|
||||
#include "../mac.h"
|
||||
#include "mapfs/mac_01_shape.h"
|
||||
#include "mapfs/mac_01_hit.h"
|
||||
|
||||
#include "sprite/npc/Merlon.h"
|
||||
#include "sprite/npc/ChuckQuizmo.h"
|
||||
#include "sprite/npc/Toad.h"
|
||||
#include "sprite/npc/WorldParakarry.h"
|
||||
#include "sprite/npc/Kolorado.h"
|
||||
#include "sprite/npc/DarkToad.h"
|
||||
#include "sprite/npc/KoopaBros.h"
|
||||
#include "sprite/npc/Ninji.h"
|
||||
#include "sprite/npc/Rowf.h"
|
||||
#include "sprite/npc/Postmaster.h"
|
||||
#include "sprite/npc/ShyGuy.h"
|
||||
#include "sprite/npc/MinhT.h"
|
||||
#include "sprite/npc/Bubulb.h"
|
||||
#include "sprite/npc/Twink.h"
|
||||
#include "sprite/npc/Luigi.h"
|
||||
#include "sprite/npc/KoloradoWife.h"
|
||||
#include "sprite/npc/KoopaKoot.h"
|
||||
#include "sprite/npc/WorldBobomb.h"
|
||||
#include "sprite/npc/Koopa.h"
|
||||
#include "sprite/npc/Dryite.h"
|
||||
#include "sprite/npc/Chanterelle.h"
|
||||
#include "sprite/npc/Musician.h"
|
||||
|
||||
enum {
|
||||
// intro NPCs
|
||||
NPC_Luigi = 0,
|
||||
NPC_IntroToad1 = 1,
|
||||
NPC_IntroToad2 = 2,
|
||||
NPC_IntroToad3 = 3,
|
||||
// standard NPCs
|
||||
NPC_Merlon = 0,
|
||||
NPC_Rowf = 1,
|
||||
NPC_Rhuff = 2,
|
||||
NPC_Postmaster = 3,
|
||||
NPC_Parakarry = 4,
|
||||
NPC_ChuckQuizmo = 5,
|
||||
NPC_PostOfficeShyGuy = 6,
|
||||
NPC_ToadHouseShyGuy = 7,
|
||||
NPC_GardenShyGuy1 = 8,
|
||||
NPC_GardenShyGuy2 = 9,
|
||||
NPC_Toad_04 = 10,
|
||||
NPC_Toad_05 = 11,
|
||||
NPC_Toad_06 = 12,
|
||||
NPC_Toad_07 = 13,
|
||||
NPC_Toad_08 = 14,
|
||||
NPC_Toad_09 = 15,
|
||||
NPC_ToadHouseToad = 16,
|
||||
NPC_Bubulb = 17,
|
||||
NPC_MinhT = 18,
|
||||
NPC_Kolorado = 19,
|
||||
NPC_DarkToad_01 = 20,
|
||||
NPC_DarkToad_02 = 21,
|
||||
NPC_DarkToad_03 = 22,
|
||||
NPC_DarkToad_04 = 23,
|
||||
NPC_KoopaBros_01 = 24,
|
||||
NPC_KoopaBros_02 = 25,
|
||||
NPC_KoopaBros_03 = 26,
|
||||
NPC_KoopaBros_04 = 27,
|
||||
NPC_Twink = 28,
|
||||
NPC_Ninji = 29,
|
||||
NPC_KoloradoWife = 30,
|
||||
NPC_KoopaKoot = 31,
|
||||
NPC_Koopa = 32,
|
||||
NPC_Bobomb = 33,
|
||||
NPC_Dryite_01 = 34,
|
||||
NPC_Dryite_02 = 35,
|
||||
NPC_Chanterelle = 36,
|
||||
NPC_Poet = 37,
|
||||
NPC_Composer = 38,
|
||||
};
|
||||
|
||||
enum {
|
||||
MV_RowfRugRippleAmount = MapVar(0),
|
||||
MV_RowfRugRotateAngle = MapVar(1),
|
||||
MV_RowfShopBuyFlags = MapVar(2),
|
||||
MV_KnockdownWorker = MapVar(10),
|
||||
MV_FortuneFXHandles = MapVar(12),
|
||||
MV_BadgeShopOpenState = MapVar(13),
|
||||
MV_BadgeShopCloseState = MapVar(14),
|
||||
};
|
||||
|
||||
enum {
|
||||
MF_MusicMixTrigger1 = MapFlag(10),
|
||||
MF_MusicMixTrigger2 = MapFlag(11),
|
||||
MF_MusicMixTrigger3 = MapFlag(12),
|
||||
MF_BadgeShopOpen = MapFlag(11),
|
||||
MF_SpawnFlag_Tree1 = MapFlag(13),
|
||||
MF_SetupMusicMixes = MapFlag(14),
|
||||
MF_InsideToadHouse = MapFlag(15),
|
||||
MF_KoopaBrosSceneLock = MapFlag(20),
|
||||
};
|
||||
|
||||
#define NAMESPACE mac_01
|
||||
|
||||
extern EvtScript N(EVS_Main);
|
||||
extern EvtScript N(EVS_SetupMusic);
|
||||
extern EvtScript N(EVS_SetupMusicMix);
|
||||
extern EvtScript N(EVS_PlayRestingSong);
|
||||
extern EvtScript N(EVS_PlaySpellcastSong);
|
||||
extern EvtScript N(EVS_PlayFlowerGateSong);
|
||||
extern EvtScript N(EVS_ResetMusicAfterFortune);
|
||||
extern EvtScript N(EVS_SetupRooms);
|
||||
extern EvtScript N(EVS_SetupBadgeShop);
|
||||
extern EvtScript N(EVS_SetupBulletinBoard);
|
||||
extern EvtScript N(EVS_SetupCrystalBallGfx);
|
||||
extern EvtScript N(EVS_SetupFlowerModels);
|
||||
extern EvtScript N(EVS_EnterFlowerGate);
|
||||
extern EvtScript N(EVS_ExitFlowerGate);
|
||||
extern EvtScript N(EVS_Merlon_GiveHint);
|
||||
extern EvtScript N(EVS_MerlonShooAway);
|
||||
extern EvtScript N(EVS_SetupQuickChangeTrigger);
|
||||
extern EvtScript N(EVS_Scene_IntroWalking);
|
||||
extern EvtScript N(EVS_Scene_MailbagTheft);
|
||||
extern EvtScript N(EVS_Scene_MerlonAndNinji);
|
||||
extern EvtScript N(EVS_SetupFoliage);
|
||||
extern EvtScript N(EVS_MakeEntities);
|
||||
|
||||
extern NpcGroupList N(IntroNPCs);
|
||||
extern NpcGroupList N(EpilogueNPCs);
|
||||
extern NpcGroupList N(Chapter0NPCs);
|
||||
extern NpcGroupList N(Chapter1NPCs);
|
||||
extern NpcGroupList N(TwinkMeetingNPCs);
|
||||
extern NpcGroupList N(Chapter4NPCs);
|
||||
extern NpcGroupList N(NinjiMeetingNPCs);
|
||||
extern NpcGroupList N(DefaultNPCs);
|
||||
|
||||
extern ShopItemData N(RowfBadgeInventory)[16];
|
||||
|
18
src/world/area_mac/mac_01/mac_01_0_header.c
Normal file
18
src/world/area_mac/mac_01/mac_01_0_header.c
Normal file
@ -0,0 +1,18 @@
|
||||
#include "mac_01.h"
|
||||
|
||||
EntryList N(Entrances) = {
|
||||
[mac_01_ENTRY_0] { -600.0, 0.0, 0.0, 90.0 },
|
||||
[mac_01_ENTRY_1] { 600.0, 0.0, 0.0, 270.0 },
|
||||
[mac_01_ENTRY_2] { 0.0, 0.0, -570.0, 180.0 },
|
||||
[mac_01_ENTRY_3] { 0.0, 0.0, 600.0, 0.0 },
|
||||
[mac_01_ENTRY_4] { -400.0, 0.0, 0.0, 90.0 },
|
||||
[mac_01_ENTRY_5] { 264.0, 27.0, 350.0, 180.0 },
|
||||
};
|
||||
|
||||
MapSettings N(settings) = {
|
||||
.main = &N(EVS_Main),
|
||||
.entryList = &N(Entrances),
|
||||
.entryCount = ENTRY_COUNT(N(Entrances)),
|
||||
.background = &gBackgroundImage,
|
||||
.tattle = { MSG_MapTattle_mac_01 },
|
||||
};
|
68
src/world/area_mac/mac_01/mac_01_10_intro_npc.c
Normal file
68
src/world/area_mac/mac_01/mac_01_10_intro_npc.c
Normal file
@ -0,0 +1,68 @@
|
||||
#include "mac_01.h"
|
||||
|
||||
#define NAME_SUFFIX _Intro
|
||||
#include "world/common/npc/Luigi.inc.c"
|
||||
#include "world/common/npc/Toad_Patrol.inc.c"
|
||||
#include "world/common/npc/Toad_Stationary.inc.c"
|
||||
#define NAME_SUFFIX
|
||||
|
||||
StaticNpc N(NpcData_IntroNPCs)[] = {
|
||||
{
|
||||
.id = NPC_Luigi,
|
||||
.settings = &N(NpcSettings_Luigi_Intro),
|
||||
.pos = { NPC_DISPOSE_LOCATION },
|
||||
.yaw = 90,
|
||||
.flags = ENEMY_FLAGS_1 | ENEMY_FLAGS_4 | ENEMY_FLAGS_8 | ENEMY_FLAGS_100 | ENEMY_FLAGS_200 | ENEMY_FLAGS_400 | ENEMY_FLAGS_800,
|
||||
.drops = LUIGI_DROPS,
|
||||
.animations = LUIGI_ANIMS,
|
||||
},
|
||||
{
|
||||
.id = NPC_IntroToad1,
|
||||
.settings = &N(NpcSettings_Toad_Stationary_Intro),
|
||||
.pos = { -94.0f, 0.0f, -117.0f },
|
||||
.yaw = 90,
|
||||
.flags = ENEMY_FLAGS_1 | ENEMY_FLAGS_8 | ENEMY_FLAGS_100 | ENEMY_FLAGS_400 | ENEMY_FLAGS_800 | ENEMY_FLAGS_2000,
|
||||
.drops = TOAD_DROPS,
|
||||
.animations = TOAD_RED_ANIMS,
|
||||
.tattle = MSG_NpcTattle_MAC_RunsHisMouth,
|
||||
},
|
||||
{
|
||||
.id = NPC_IntroToad2,
|
||||
.settings = &N(NpcSettings_Toad_Stationary_Intro),
|
||||
.pos = { 40.0f, 0.0f, -300.0f },
|
||||
.yaw = 270,
|
||||
.flags = ENEMY_FLAGS_1 | ENEMY_FLAGS_8 | ENEMY_FLAGS_100 | ENEMY_FLAGS_400 | ENEMY_FLAGS_800 | ENEMY_FLAGS_2000,
|
||||
.drops = TOAD_DROPS,
|
||||
.territory = {
|
||||
.patrol = {
|
||||
.isFlying = TRUE,
|
||||
.moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED,
|
||||
.numPoints = 2,
|
||||
.points = {
|
||||
{ 40, 0, -300 },
|
||||
{ -40, 0, -300 },
|
||||
},
|
||||
.detectShape = SHAPE_CYLINDER,
|
||||
.detectPos = { 0, 0, 0 },
|
||||
.detectSize = { 10 },
|
||||
}
|
||||
},
|
||||
.animations = TOAD_YELLOW_ANIMS,
|
||||
.tattle = MSG_NpcTattle_MAC_PrincessFan,
|
||||
},
|
||||
{
|
||||
.id = NPC_IntroToad3,
|
||||
.settings = &N(NpcSettings_Toad_Stationary_Intro),
|
||||
.pos = { -380.0f, 20.0f, -100.0f },
|
||||
.yaw = 270,
|
||||
.flags = ENEMY_FLAGS_1 | ENEMY_FLAGS_8 | ENEMY_FLAGS_100 | ENEMY_FLAGS_400 | ENEMY_FLAGS_800 | ENEMY_FLAGS_2000,
|
||||
.drops = TOAD_DROPS,
|
||||
.animations = TOAD_GREEN_ANIMS,
|
||||
.tattle = MSG_NpcTattle_MAC_SeeksTheSouth,
|
||||
},
|
||||
};
|
||||
|
||||
NpcGroupList N(IntroNPCs) = {
|
||||
NPC_GROUP(N(NpcData_IntroNPCs)),
|
||||
{}
|
||||
};
|
461
src/world/area_mac/mac_01/mac_01_11_epilogue_npc.c
Normal file
461
src/world/area_mac/mac_01/mac_01_11_epilogue_npc.c
Normal file
@ -0,0 +1,461 @@
|
||||
#include "mac_01.h"
|
||||
#define NAME_SUFFIX _Epilogue
|
||||
|
||||
#include "world/common/npc/Dummy.inc.c"
|
||||
#include "world/common/npc/Toad_Stationary.inc.c"
|
||||
#include "world/common/npc/Kolorado.inc.c"
|
||||
#include "world/common/npc/KoloradoWife.inc.c"
|
||||
#include "world/common/npc/KoopaKoot.inc.c"
|
||||
#include "world/common/npc/Koopa.inc.c"
|
||||
#include "world/common/npc/Bobomb.inc.c"
|
||||
#include "world/common/npc/Dryite_Stationary.inc.c"
|
||||
|
||||
EvtScript N(EVS_NpcInteract_Kolorado) = {
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_Outro_003C)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInit_Kolorado) = {
|
||||
EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Kolorado)))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInteract_KoloradoWife) = {
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_KoloradoWife_Talk, ANIM_KoloradoWife_Idle, 0, MSG_Outro_003D)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInit_KoloradoWife) = {
|
||||
EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_KoloradoWife)))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInteract_KoopaKoot) = {
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_KoopaKoot_Talk, ANIM_KoopaKoot_Idle, 0, MSG_Outro_003E)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInit_KoopaKoot) = {
|
||||
EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_KoopaKoot)))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInteract_Bobomb) = {
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldBobomb_Blue_Talk, ANIM_WorldBobomb_Blue_Idle, 0, MSG_Outro_004E)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInit_Bobomb) = {
|
||||
EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Bobomb)))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInteract_Koopa) = {
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Koopa_Talk, ANIM_Koopa_Idle, 0, MSG_Outro_004F)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInit_Koopa) = {
|
||||
EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Koopa)))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInteract_Rowf) = {
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Rowf_Talk, ANIM_Rowf_Idle, 0, MSG_Outro_0040)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInit_Rowf) = {
|
||||
EVT_CALL(SetNpcPos, NPC_SELF, -225, 0, 320)
|
||||
EVT_CALL(SetNpcYaw, NPC_SELF, 270)
|
||||
EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Rowf)))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInteract_Rhuff) = {
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Rowf_Talk, ANIM_Rowf_Idle, 0, MSG_Outro_0041)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInit_Rhuff) = {
|
||||
EVT_CALL(SetNpcScale, NPC_SELF, EVT_FLOAT(0.75), EVT_FLOAT(0.75), EVT_FLOAT(0.75))
|
||||
EVT_CALL(SetNpcPos, NPC_SELF, -250, 0, 295)
|
||||
EVT_CALL(SetNpcYaw, NPC_SELF, 270)
|
||||
EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Rhuff)))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInteract_Dryite_01) = {
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Dryite_Green_Talk, ANIM_Dryite_Green_Idle, 0, MSG_Outro_0050)
|
||||
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) = {
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Dryite_Green_Talk, ANIM_Dryite_Green_Idle, 0, MSG_Outro_0051)
|
||||
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_Chanterelle) = {
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Chanterelle_Talk, ANIM_Chanterelle_Idle, 16, MSG_Outro_0052)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInit_Chanterelle) = {
|
||||
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Chanterelle_Sing)
|
||||
EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Chanterelle)))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInteract_Poet) = {
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Musician_Poet_Talk, ANIM_Musician_Poet_Idle, 16, MSG_Outro_0053)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInit_Poet) = {
|
||||
EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Poet)))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInteract_Composer) = {
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Musician_Composer_Talk, ANIM_Musician_Composer_Idle, 16, MSG_Outro_0054)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInit_Composer) = {
|
||||
EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Composer)))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
s32 N(ExtraAnims_Kolorado)[] = {
|
||||
ANIM_Kolorado_Still,
|
||||
ANIM_Kolorado_Idle,
|
||||
ANIM_Kolorado_Talk,
|
||||
-1
|
||||
};
|
||||
|
||||
s32 N(ExtraAnims_KoloradoWife)[] = {
|
||||
ANIM_KoloradoWife_Still,
|
||||
ANIM_KoloradoWife_Idle,
|
||||
ANIM_KoloradoWife_Talk,
|
||||
-1
|
||||
};
|
||||
|
||||
s32 N(ExtraAnims_KoopaKoot)[] = {
|
||||
ANIM_KoopaKoot_Still,
|
||||
ANIM_KoopaKoot_Idle,
|
||||
ANIM_KoopaKoot_Talk,
|
||||
-1
|
||||
};
|
||||
|
||||
s32 N(ExtraAnims_Koopa)[] = {
|
||||
ANIM_Koopa_Still,
|
||||
ANIM_Koopa_Idle,
|
||||
ANIM_Koopa_Talk,
|
||||
-1
|
||||
};
|
||||
|
||||
s32 N(ExtraAnims_Bobomb)[] = {
|
||||
ANIM_WorldBobomb_Green_Still,
|
||||
ANIM_WorldBobomb_Green_Idle,
|
||||
ANIM_WorldBobomb_Green_Talk,
|
||||
-1
|
||||
};
|
||||
|
||||
StaticNpc N(NpcData_Koopas)[] = {
|
||||
{
|
||||
.id = NPC_Kolorado,
|
||||
.settings = &N(NpcSettings_Kolorado),
|
||||
.pos = { 60.0f, 0.0f, -120.0f },
|
||||
.yaw = 90,
|
||||
.flags = ENEMY_FLAGS_1 | ENEMY_FLAGS_8 | ENEMY_FLAGS_100 | ENEMY_FLAGS_400 | ENEMY_FLAGS_800 | ENEMY_FLAGS_2000,
|
||||
.init = &N(EVS_NpcInit_Kolorado),
|
||||
.drops = KOLORADO_DROPS,
|
||||
.animations = KOLORADO_ANIMS,
|
||||
.extraAnimations = N(ExtraAnims_Kolorado),
|
||||
},
|
||||
{
|
||||
.id = NPC_KoloradoWife,
|
||||
.settings = &N(NpcSettings_KoloradoWife),
|
||||
.pos = { 100.0f, 0.0f, -110.0f },
|
||||
.yaw = 270,
|
||||
.flags = ENEMY_FLAGS_1 | ENEMY_FLAGS_8 | ENEMY_FLAGS_100 | ENEMY_FLAGS_400 | ENEMY_FLAGS_800 | ENEMY_FLAGS_2000,
|
||||
.init = &N(EVS_NpcInit_KoloradoWife),
|
||||
.drops = KOLORADO_WIFE_DROPS,
|
||||
.animations = KOLORADO_WIFE_ANIMS,
|
||||
.extraAnimations = N(ExtraAnims_KoloradoWife),
|
||||
},
|
||||
{
|
||||
.id = NPC_KoopaKoot,
|
||||
.settings = &N(NpcSettings_KoopaKoot),
|
||||
.pos = { -330.0f, 0.0f, 330.0f },
|
||||
.yaw = 90,
|
||||
.flags = ENEMY_FLAGS_1 | ENEMY_FLAGS_8 | ENEMY_FLAGS_100 | ENEMY_FLAGS_400 | ENEMY_FLAGS_800 | ENEMY_FLAGS_2000,
|
||||
.init = &N(EVS_NpcInit_KoopaKoot),
|
||||
.drops = KOOPA_KOOT_DROPS,
|
||||
.animations = KOOPA_KOOT_ANIMS,
|
||||
.extraAnimations = N(ExtraAnims_KoopaKoot),
|
||||
},
|
||||
{
|
||||
.id = NPC_Koopa,
|
||||
.settings = &N(NpcSettings_Koopa),
|
||||
.pos = { 300.0f, 20.0f, -100.0f },
|
||||
.yaw = 270,
|
||||
.flags = ENEMY_FLAGS_1 | ENEMY_FLAGS_8 | ENEMY_FLAGS_100 | ENEMY_FLAGS_400 | ENEMY_FLAGS_800 | ENEMY_FLAGS_2000,
|
||||
.init = &N(EVS_NpcInit_Koopa),
|
||||
.drops = KOOPA_DROPS,
|
||||
.animations = KOOPA_ANIMS,
|
||||
.extraAnimations = N(ExtraAnims_Koopa),
|
||||
},
|
||||
{
|
||||
.id = NPC_Bobomb,
|
||||
.settings = &N(NpcSettings_Bobomb),
|
||||
.pos = { 252.0f, 20.0f, -100.0f },
|
||||
.yaw = 90,
|
||||
.flags = ENEMY_FLAGS_1 | ENEMY_FLAGS_8 | ENEMY_FLAGS_100 | ENEMY_FLAGS_400 | ENEMY_FLAGS_800 | ENEMY_FLAGS_2000,
|
||||
.init = &N(EVS_NpcInit_Bobomb),
|
||||
.drops = BOBOMB_DROPS,
|
||||
.animations = BOBOMB_ANIMS,
|
||||
.extraAnimations = N(ExtraAnims_Bobomb),
|
||||
},
|
||||
};
|
||||
|
||||
s32 N(ExtraAnims_Rowf)[] = {
|
||||
ANIM_Rowf_Still,
|
||||
ANIM_Rowf_Idle,
|
||||
ANIM_Rowf_Talk,
|
||||
-1
|
||||
};
|
||||
|
||||
StaticNpc N(NpcData_RowfAndRhuff)[] = {
|
||||
{
|
||||
.id = NPC_Rowf,
|
||||
.settings = &N(NpcSettings_Dummy),
|
||||
.pos = { -213.0f, -54.0f, 256.0f },
|
||||
.yaw = 90,
|
||||
.flags = ENEMY_FLAGS_1 | ENEMY_FLAGS_8 | ENEMY_FLAGS_100 | ENEMY_FLAGS_400 | ENEMY_FLAGS_800 | ENEMY_FLAGS_2000,
|
||||
.init = &N(EVS_NpcInit_Rowf),
|
||||
.drops = {
|
||||
.dropFlags = NPC_DROP_FLAGS_80,
|
||||
.heartDrops = NO_DROPS,
|
||||
.flowerDrops = NO_DROPS,
|
||||
},
|
||||
.animations = {
|
||||
.idle = ANIM_Rowf_Idle,
|
||||
},
|
||||
.extraAnimations = N(ExtraAnims_Rowf),
|
||||
.tattle = MSG_NpcTattle_Rowf,
|
||||
},
|
||||
{
|
||||
.id = NPC_Rhuff,
|
||||
.settings = &N(NpcSettings_Dummy),
|
||||
.pos = { -250.0f, 0.0f, 263.0f },
|
||||
.yaw = 90,
|
||||
.flags = ENEMY_FLAGS_1 | ENEMY_FLAGS_8 | ENEMY_FLAGS_100 | ENEMY_FLAGS_400 | ENEMY_FLAGS_800 | ENEMY_FLAGS_2000,
|
||||
.init = &N(EVS_NpcInit_Rhuff),
|
||||
.drops = {
|
||||
.dropFlags = NPC_DROP_FLAGS_80,
|
||||
.heartDrops = NO_DROPS,
|
||||
.flowerDrops = NO_DROPS,
|
||||
},
|
||||
.animations = {
|
||||
.idle = ANIM_Rowf_Idle,
|
||||
},
|
||||
.extraAnimations = N(ExtraAnims_Rowf),
|
||||
.tattle = MSG_NpcTattle_Rhuff,
|
||||
},
|
||||
};
|
||||
|
||||
s32 N(ExtraAnims_Dryite)[] = {
|
||||
ANIM_Dryite_Green_Still,
|
||||
ANIM_Dryite_Green_Idle,
|
||||
ANIM_Dryite_Green_Talk,
|
||||
-1
|
||||
};
|
||||
|
||||
StaticNpc N(NpcData_Dryites)[] = {
|
||||
{
|
||||
.id = NPC_Dryite_01,
|
||||
.settings = &N(NpcSettings_Dryite),
|
||||
.pos = { -10.0f, 0.0f, 360.0f },
|
||||
.yaw = 90,
|
||||
.flags = ENEMY_FLAGS_1 | ENEMY_FLAGS_100 | ENEMY_FLAGS_400 | ENEMY_FLAGS_800 | ENEMY_FLAGS_2000,
|
||||
.init = &N(EVS_NpcInit_Dryite_01),
|
||||
.drops = DRYITE_DROPS,
|
||||
.animations = DRYITE_GREEN_ANIMS,
|
||||
.extraAnimations = N(ExtraAnims_Dryite),
|
||||
},
|
||||
{
|
||||
.id = NPC_Dryite_02,
|
||||
.settings = &N(NpcSettings_Dryite),
|
||||
.pos = { 25.0f, 0.0f, 300.0f },
|
||||
.yaw = 270,
|
||||
.flags = ENEMY_FLAGS_1 | ENEMY_FLAGS_100 | ENEMY_FLAGS_400 | ENEMY_FLAGS_800 | ENEMY_FLAGS_2000,
|
||||
.init = &N(EVS_NpcInit_Dryite_02),
|
||||
.drops = DRYITE_DROPS,
|
||||
.animations = DRYITE_GREEN_ANIMS,
|
||||
.extraAnimations = N(ExtraAnims_Dryite),
|
||||
},
|
||||
};
|
||||
|
||||
s32 N(ExtraAnims_Chanterelle)[] = {
|
||||
ANIM_Chanterelle_Still,
|
||||
ANIM_Chanterelle_Idle,
|
||||
ANIM_Chanterelle_Sing,
|
||||
ANIM_Chanterelle_Talk,
|
||||
-1
|
||||
};
|
||||
|
||||
s32 N(ExtraAnims_Poet)[] = {
|
||||
ANIM_Musician_Poet_Still,
|
||||
ANIM_Musician_Poet_Idle,
|
||||
ANIM_Musician_Poet_Talk,
|
||||
-1
|
||||
};
|
||||
|
||||
StaticNpc N(NpcData_Artists)[] = {
|
||||
{
|
||||
.id = NPC_Chanterelle,
|
||||
.settings = &N(NpcSettings_Toad_Stationary),
|
||||
.pos = { 260.0f, 20.0f, 560.0f },
|
||||
.yaw = 270,
|
||||
.flags = ENEMY_FLAGS_1 | ENEMY_FLAGS_8 | ENEMY_FLAGS_100 | ENEMY_FLAGS_400 | ENEMY_FLAGS_800 | ENEMY_FLAGS_2000 | ENEMY_FLAGS_400000,
|
||||
.init = &N(EVS_NpcInit_Chanterelle),
|
||||
.drops = {
|
||||
.dropFlags = NPC_DROP_FLAGS_80,
|
||||
.heartDrops = NO_DROPS,
|
||||
.flowerDrops = NO_DROPS,
|
||||
},
|
||||
.animations = {
|
||||
.idle = ANIM_Chanterelle_Idle,
|
||||
.walk = ANIM_Chanterelle_Still,
|
||||
.run = ANIM_Chanterelle_Still,
|
||||
.chase = ANIM_Chanterelle_Still,
|
||||
.anim_4 = ANIM_Chanterelle_Still,
|
||||
.anim_5 = ANIM_Chanterelle_Still,
|
||||
.death = ANIM_Chanterelle_Still,
|
||||
.hit = ANIM_Chanterelle_Still,
|
||||
.anim_8 = ANIM_Chanterelle_Still,
|
||||
.anim_9 = ANIM_Chanterelle_Still,
|
||||
.anim_A = ANIM_Chanterelle_Still,
|
||||
.anim_B = ANIM_Chanterelle_Still,
|
||||
.anim_C = ANIM_Chanterelle_Still,
|
||||
.anim_D = ANIM_Chanterelle_Still,
|
||||
.anim_E = ANIM_Chanterelle_Still,
|
||||
.anim_F = ANIM_Chanterelle_Still,
|
||||
},
|
||||
.extraAnimations = N(ExtraAnims_Chanterelle),
|
||||
.tattle = MSG_NpcTattle_PopDiva_CantSing,
|
||||
},
|
||||
{
|
||||
.id = NPC_Poet,
|
||||
.settings = &N(NpcSettings_Toad_Stationary),
|
||||
.pos = { 230.0f, 20.0f, 500.0f },
|
||||
.yaw = 90,
|
||||
.flags = ENEMY_FLAGS_1 | ENEMY_FLAGS_8 | ENEMY_FLAGS_100 | ENEMY_FLAGS_400 | ENEMY_FLAGS_800 | ENEMY_FLAGS_2000 | ENEMY_FLAGS_400000,
|
||||
.init = &N(EVS_NpcInit_Poet),
|
||||
.drops = {
|
||||
.dropFlags = NPC_DROP_FLAGS_80,
|
||||
.heartDrops = NO_DROPS,
|
||||
.flowerDrops = NO_DROPS,
|
||||
},
|
||||
.animations = {
|
||||
.idle = ANIM_Musician_Poet_Idle,
|
||||
.walk = ANIM_Musician_Poet_Idle,
|
||||
.run = ANIM_Musician_Poet_Idle,
|
||||
.chase = ANIM_Musician_Poet_Idle,
|
||||
.anim_4 = ANIM_Musician_Poet_Idle,
|
||||
.anim_5 = ANIM_Musician_Poet_Idle,
|
||||
.death = ANIM_Musician_Poet_Idle,
|
||||
.hit = ANIM_Musician_Poet_Idle,
|
||||
.anim_8 = ANIM_Musician_Poet_Idle,
|
||||
.anim_9 = ANIM_Musician_Poet_Idle,
|
||||
.anim_A = ANIM_Musician_Poet_Idle,
|
||||
.anim_B = ANIM_Musician_Poet_Idle,
|
||||
.anim_C = ANIM_Musician_Poet_Idle,
|
||||
.anim_D = ANIM_Musician_Poet_Idle,
|
||||
.anim_E = ANIM_Musician_Poet_Idle,
|
||||
.anim_F = ANIM_Musician_Poet_Idle,
|
||||
},
|
||||
.extraAnimations = N(ExtraAnims_Poet),
|
||||
.tattle = MSG_NpcTattle_MasterPoet,
|
||||
},
|
||||
{
|
||||
.id = NPC_Composer,
|
||||
.settings = &N(NpcSettings_Toad_Stationary),
|
||||
.pos = { 300.0f, 20.0f, 500.0f },
|
||||
.yaw = 270,
|
||||
.flags = ENEMY_FLAGS_1 | ENEMY_FLAGS_8 | ENEMY_FLAGS_100 | ENEMY_FLAGS_400 | ENEMY_FLAGS_800 | ENEMY_FLAGS_2000 | ENEMY_FLAGS_400000,
|
||||
.init = &N(EVS_NpcInit_Composer),
|
||||
.drops = {
|
||||
.dropFlags = NPC_DROP_FLAGS_80,
|
||||
.heartDrops = NO_DROPS,
|
||||
.flowerDrops = NO_DROPS,
|
||||
},
|
||||
.animations = {
|
||||
.idle = ANIM_Musician_Composer_Idle,
|
||||
.walk = ANIM_Musician_Composer_Still,
|
||||
.run = ANIM_Musician_Composer_Still,
|
||||
.chase = ANIM_Musician_Composer_Still,
|
||||
.anim_4 = ANIM_Musician_Composer_Still,
|
||||
.anim_5 = ANIM_Musician_Composer_Still,
|
||||
.death = ANIM_Musician_Composer_Still,
|
||||
.hit = ANIM_Musician_Composer_Still,
|
||||
.anim_8 = ANIM_Musician_Composer_Still,
|
||||
.anim_9 = ANIM_Musician_Composer_Still,
|
||||
.anim_A = ANIM_Musician_Composer_Still,
|
||||
.anim_B = ANIM_Musician_Composer_Still,
|
||||
.anim_C = ANIM_Musician_Composer_Still,
|
||||
.anim_D = ANIM_Musician_Composer_Still,
|
||||
.anim_E = ANIM_Musician_Composer_Still,
|
||||
.anim_F = ANIM_Musician_Composer_Still,
|
||||
},
|
||||
.extraAnimations = N(ExtraAnims_Poet),
|
||||
.tattle = MSG_NpcTattle_Composer,
|
||||
},
|
||||
};
|
||||
|
||||
#define NAME_SUFFIX
|
||||
extern StaticNpc N(NpcData_Townsfolk)[10];
|
||||
|
||||
NpcGroupList N(EpilogueNPCs) = {
|
||||
NPC_GROUP(N(NpcData_Koopas_Epilogue)),
|
||||
NPC_GROUP(N(NpcData_RowfAndRhuff_Epilogue)),
|
||||
NPC_GROUP(N(NpcData_Dryites_Epilogue)),
|
||||
NPC_GROUP(N(NpcData_Artists_Epilogue)),
|
||||
NPC_GROUP(N(NpcData_Townsfolk)),
|
||||
{}
|
||||
};
|
63
src/world/area_mac/mac_01/mac_01_12_intro.c
Normal file
63
src/world/area_mac/mac_01/mac_01_12_intro.c
Normal file
@ -0,0 +1,63 @@
|
||||
#include "mac_01.h"
|
||||
|
||||
API_CALLABLE(N(HideRowfBadges_IntroScene)) {
|
||||
if (evt_get_variable(NULL, GF_MAC01_RowfBadgeAvailableA) == 0) {
|
||||
set_item_entity_flags(gGameStatusPtr->shopItemEntities[0].index, ITEM_ENTITY_FLAGS_HIDDEN);
|
||||
}
|
||||
if (evt_get_variable(NULL, GF_MAC01_RowfBadgeAvailableB) == 0) {
|
||||
set_item_entity_flags(gGameStatusPtr->shopItemEntities[1].index, ITEM_ENTITY_FLAGS_HIDDEN);
|
||||
}
|
||||
if (evt_get_variable(NULL, GF_MAC01_RowfBadgeAvailableC) == 0) {
|
||||
set_item_entity_flags(gGameStatusPtr->shopItemEntities[2].index, ITEM_ENTITY_FLAGS_HIDDEN);
|
||||
}
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
EvtScript N(EVS_Scene_IntroWalking) = {
|
||||
EVT_CALL(DisablePlayerInput, TRUE)
|
||||
EVT_CALL(EnableModel, MODEL_ju_1, FALSE)
|
||||
EVT_CALL(N(HideRowfBadges_IntroScene))
|
||||
EVT_CALL(UseSettingsFrom, CAM_DEFAULT, -560, 0, 0)
|
||||
EVT_CALL(SetPanTarget, CAM_DEFAULT, -560, 0, 0)
|
||||
EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(250.0))
|
||||
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(SetNpcPos, NPC_Luigi, -460, 0, 0)
|
||||
EVT_CALL(SetNpcYaw, NPC_Luigi, 90)
|
||||
EVT_THREAD
|
||||
EVT_CALL(func_802D1270, -100, 0, EVT_FLOAT(4.0))
|
||||
EVT_CALL(func_802D1270, -25, -25, EVT_FLOAT(4.0))
|
||||
EVT_CALL(func_802D1270, 0, -100, EVT_FLOAT(4.0))
|
||||
EVT_CALL(func_802D1270, 0, -400, EVT_FLOAT(4.0))
|
||||
EVT_END_THREAD
|
||||
EVT_THREAD
|
||||
EVT_CALL(SetNpcSpeed, NPC_Luigi, EVT_FLOAT(4.0))
|
||||
EVT_CALL(SetNpcAnimation, NPC_Luigi, ANIM_Luigi_Run)
|
||||
EVT_CALL(NpcMoveTo, NPC_Luigi, -100, 0, 0)
|
||||
EVT_CALL(SetNpcAnimation, NPC_Luigi, ANIM_Luigi_RunBack)
|
||||
EVT_CALL(NpcMoveTo, NPC_Luigi, -25, -25, 0)
|
||||
EVT_CALL(NpcMoveTo, NPC_Luigi, 0, -100, 0)
|
||||
EVT_CALL(NpcMoveTo, NPC_Luigi, 0, -340, 0)
|
||||
EVT_CALL(SetNpcAnimation, NPC_Luigi, ANIM_Luigi_IdleBack)
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0))
|
||||
EVT_CALL(MakeLerp, 300, 400, 100, EASING_LINEAR)
|
||||
EVT_LOOP(0)
|
||||
EVT_CALL(UpdateLerp)
|
||||
EVT_CALL(GetPlayerPos, LVar2, LVar3, LVar4)
|
||||
EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar2, LVar3, LVar4)
|
||||
EVT_CALL(SetCamDistance, CAM_DEFAULT, LVar0)
|
||||
EVT_WAIT(1)
|
||||
EVT_IF_EQ(LVar1, 0)
|
||||
EVT_BREAK_LOOP
|
||||
EVT_END_IF
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0)
|
||||
EVT_WAIT(75)
|
||||
EVT_CALL(GotoMap, EVT_PTR("osr_00"), osr_00_ENTRY_4)
|
||||
EVT_WAIT(100)
|
||||
EVT_CALL(DisablePlayerInput, FALSE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
72
src/world/area_mac/mac_01/mac_01_13_foliage.c
Normal file
72
src/world/area_mac/mac_01/mac_01_13_foliage.c
Normal file
@ -0,0 +1,72 @@
|
||||
#include "mac_01.h"
|
||||
|
||||
#include "common/foliage.inc.c"
|
||||
|
||||
FoliageDropList N(Tree1_Drops) = {
|
||||
.count = 1,
|
||||
.drops = {
|
||||
{
|
||||
.itemID = ITEM_STAR_PIECE,
|
||||
.pos = { -480, 120, -174 },
|
||||
.spawnMode = ITEM_SPAWN_MODE_FALL_NEVER_VANISH,
|
||||
.pickupFlag = GF_MAC01_Tree1_StarPiece,
|
||||
.spawnFlag = MF_SpawnFlag_Tree1,
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
FoliageModelList N(Tree1_LeafModels) = FOLIAGE_MODEL_LIST(MODEL_o362);
|
||||
FoliageModelList N(Tree1_TrunkModels) = FOLIAGE_MODEL_LIST(MODEL_o365);
|
||||
|
||||
FoliageVectorList N(Tree1_Effects) = {
|
||||
.count = 2,
|
||||
.vectors = {
|
||||
{ -532.0f, 135.0f, -174.0f },
|
||||
{ -492.0f, 135.0f, -184.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 = { -512.0f, 20.0f, -154.0f },
|
||||
.radius = 0.0f
|
||||
};
|
||||
|
||||
FoliageModelList N(Tree2_LeafModels) = FOLIAGE_MODEL_LIST(MODEL_o115);
|
||||
FoliageModelList N(Tree2_TrunkModels) = FOLIAGE_MODEL_LIST(MODEL_o116);
|
||||
|
||||
FoliageVectorList N(Tree2_Effects) = {
|
||||
.count = 2,
|
||||
.vectors = {
|
||||
{ -177.0f, 104.0f, -478.0f },
|
||||
{ -137.0f, 104.0f, -488.0f },
|
||||
}
|
||||
};
|
||||
|
||||
ShakeTreeConfig N(ShakeTree_Tree2) = {
|
||||
.leaves = &N(Tree2_LeafModels),
|
||||
.trunk = &N(Tree2_TrunkModels),
|
||||
.vectors = &N(Tree2_Effects),
|
||||
};
|
||||
|
||||
BombTrigger N(BombPos_Tree2) = {
|
||||
.pos = { -157.0f, 20.0f, -458.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_o393, 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_o237, 1, 0)
|
||||
EVT_BIND_TRIGGER(EVT_PTR(N(shakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree2)), 1, 0)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
48
src/world/area_mac/mac_01/mac_01_1_music.c
Normal file
48
src/world/area_mac/mac_01/mac_01_1_music.c
Normal file
@ -0,0 +1,48 @@
|
||||
#include "mac_01.h"
|
||||
|
||||
EvtScript N(EVS_SetupMusic) = {
|
||||
EVT_SWITCH(GB_StoryProgress)
|
||||
EVT_CASE_EQ(STORY_INTRO)
|
||||
EVT_CALL(SetMusicTrack, 0, SONG_PEACHS_CASTLE_PARTY, 1, 8)
|
||||
EVT_CASE_EQ(STORY_EPILOGUE)
|
||||
EVT_CALL(SetMusicTrack, 0, SONG_PEACHS_CASTLE_PARTY, 0, 8)
|
||||
EVT_CASE_RANGE(STORY_CH3_STAR_SPRIT_DEPARTED, STORY_CH4_STAR_SPIRIT_RESCUED)
|
||||
EVT_CALL(SetMusicTrack, 0, SONG_SHY_GUY_INVASION, 0, 8)
|
||||
EVT_CASE_DEFAULT
|
||||
EVT_EXEC(N(EVS_SetupMusicMix))
|
||||
EVT_END_SWITCH
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_PlaySpellcastSong) = {
|
||||
EVT_CALL(SetMusicTrack, 0, SONG_MERLEE_SPELL, 1, 8)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_ResetMusicAfterFortune) = {
|
||||
EVT_SWITCH(GB_StoryProgress)
|
||||
EVT_CASE_RANGE(STORY_CH3_STAR_SPRIT_DEPARTED, STORY_CH4_STAR_SPIRIT_RESCUED)
|
||||
EVT_CALL(SetMusicTrack, 0, SONG_SHY_GUY_INVASION, 0, 8)
|
||||
EVT_CASE_DEFAULT
|
||||
EVT_CALL(SetMusicTrack, 0, SONG_TOAD_TOWN, 0, 8)
|
||||
EVT_WAIT(20)
|
||||
EVT_CALL(EnableMusicProximityMix, 0)
|
||||
EVT_CALL(AdjustMusicProximityMix, 0, 2, 2)
|
||||
EVT_END_SWITCH
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_PlayFlowerGateSong) = {
|
||||
EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_GATE_APPEARS, 0, 8)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_PlayRestingSong) = {
|
||||
EVT_CALL(SetMusicTrack, 0, SONG_TAKING_REST, 0, 8)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
189
src/world/area_mac/mac_01/mac_01_2_main.c
Normal file
189
src/world/area_mac/mac_01/mac_01_2_main.c
Normal file
@ -0,0 +1,189 @@
|
||||
#include "mac_01.h"
|
||||
|
||||
EvtScript N(EVS_ExitWalk_mac_00_1) = EVT_EXIT_WALK(60, mac_01_ENTRY_0, "mac_00", mac_00_ENTRY_1);
|
||||
|
||||
EvtScript N(EVS_ExitWalk_nok_11_0) = {
|
||||
EVT_SET_GROUP(EVT_GROUP_1B)
|
||||
EVT_CALL(UseExitHeading, 60, mac_01_ENTRY_1)
|
||||
EVT_EXEC(ExitWalk)
|
||||
EVT_IF_EQ(GF_StartedChapter1, FALSE)
|
||||
EVT_SET(GF_StartedChapter1, TRUE)
|
||||
EVT_CALL(FadeOutMusic, 0, 1500)
|
||||
EVT_CALL(GotoMapSpecial, EVT_PTR("kmr_22"), kmr_22_ENTRY_1, TRANSITION_6)
|
||||
EVT_WAIT(100)
|
||||
EVT_RETURN
|
||||
EVT_END_IF
|
||||
EVT_CALL(GotoMap, EVT_PTR("nok_11"), nok_11_ENTRY_0)
|
||||
EVT_WAIT(100)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
s32 N(Models_CastleGateL)[] = {
|
||||
MODEL_o306,
|
||||
MODEL_o307,
|
||||
-1
|
||||
};
|
||||
|
||||
s32 N(Models_CastleGateR)[] = {
|
||||
MODEL_o308,
|
||||
MODEL_o309,
|
||||
-1
|
||||
};
|
||||
|
||||
EvtScript N(EVS_ExitDoors_osr_01_0) = {
|
||||
EVT_SET_GROUP(EVT_GROUP_1B)
|
||||
EVT_CALL(DisablePlayerInput, TRUE)
|
||||
EVT_CALL(UseDoorSounds, DOOR_SOUNDS_LARGE)
|
||||
EVT_SET(LVar0, 2)
|
||||
EVT_SET(LVar1, 5)
|
||||
EVT_SET(LVar2, EVT_PTR(N(Models_CastleGateL)))
|
||||
EVT_SET(LVar3, EVT_PTR(N(Models_CastleGateR)))
|
||||
EVT_EXEC(BaseExitDoor)
|
||||
EVT_WAIT(17)
|
||||
EVT_SWITCH(GB_StoryProgress)
|
||||
EVT_CASE_RANGE(STORY_CH0_WAKE_UP, STORY_CH8_REACHED_PEACHS_CASTLE)
|
||||
EVT_CALL(GotoMap, EVT_PTR("osr_01"), osr_01_ENTRY_0)
|
||||
EVT_CASE_DEFAULT
|
||||
EVT_CALL(GotoMap, EVT_PTR("osr_00"), osr_00_ENTRY_0)
|
||||
EVT_END_SWITCH
|
||||
EVT_WAIT(100)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_ExitWalk_mac_02_2) = EVT_EXIT_WALK(60, mac_01_ENTRY_3, "mac_02", mac_02_ENTRY_2);
|
||||
|
||||
EvtScript N(EVS_BindExitTriggers) = {
|
||||
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_mac_00_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0)
|
||||
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_osr_01_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilitn, 1, 0)
|
||||
EVT_IF_GE(GB_StoryProgress, STORY_EPILOGUE)
|
||||
EVT_RETURN
|
||||
EVT_END_IF
|
||||
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_nok_11_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0)
|
||||
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_mac_02_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0)
|
||||
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitFlowerGate)), TRIGGER_WALL_PRESS_A, COLLIDER_deilitf, 1, 0)
|
||||
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(mac_01_ENTRY_2)
|
||||
EVT_CALL(DisablePlayerInput, TRUE)
|
||||
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitn, COLLIDER_FLAGS_UPPER_MASK)
|
||||
EVT_CALL(RotateGroup, MODEL_east_gate, 80, 0, 1, 0)
|
||||
EVT_CALL(RotateGroup, MODEL_west_gate, 80, 0, -1, 0)
|
||||
EVT_CALL(UseDoorSounds, DOOR_SOUNDS_LARGE)
|
||||
EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers)))
|
||||
EVT_EXEC_WAIT(EnterWalk)
|
||||
EVT_CALL(MakeLerp, 80, 0, 10, EASING_LINEAR)
|
||||
EVT_LOOP(0)
|
||||
EVT_CALL(UpdateLerp)
|
||||
EVT_CALL(RotateGroup, MODEL_east_gate, LVar0, 0, 1, 0)
|
||||
EVT_CALL(RotateGroup, MODEL_west_gate, 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_deilitn, SOUND_LARGE_DOOR_CLOSE, 0)
|
||||
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_deilitn, COLLIDER_FLAGS_UPPER_MASK)
|
||||
EVT_CALL(DisablePlayerInput, FALSE)
|
||||
EVT_CASE_EQ(mac_01_ENTRY_4)
|
||||
EVT_EXEC(N(EVS_Scene_IntroWalking))
|
||||
EVT_CASE_EQ(mac_01_ENTRY_5)
|
||||
EVT_EXEC_WAIT(N(EVS_EnterFlowerGate))
|
||||
EVT_EXEC(N(EVS_BindExitTriggers))
|
||||
EVT_CASE_DEFAULT
|
||||
EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers)))
|
||||
EVT_EXEC(EnterWalk)
|
||||
EVT_END_SWITCH
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_Main) = {
|
||||
EVT_SET(GB_WorldLocation, LOCATION_TOAD_TOWN)
|
||||
EVT_CALL(SetSpriteShading, SHADING_NONE)
|
||||
EVT_CALL(SetCamPerspective, CAM_DEFAULT, 3, 25, 90, 4096) // note: unusually large near clip dist: 90 vs 16
|
||||
EVT_CALL(SetCamBGColor, CAM_DEFAULT, 0, 0, 0)
|
||||
EVT_CALL(SetCamEnabled, CAM_DEFAULT, TRUE)
|
||||
EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE)
|
||||
EVT_SET(AF_MAC_0E, FALSE)
|
||||
EVT_SET(AF_MAC_0F, FALSE)
|
||||
EVT_SET(AF_MAC_10, FALSE)
|
||||
EVT_SET(AF_MAC_11, FALSE)
|
||||
EVT_SET(AF_MAC_12, FALSE)
|
||||
EVT_SET(AF_MAC_13, FALSE)
|
||||
EVT_SET(AF_MAC_14, FALSE)
|
||||
EVT_SET(AF_MAC_15, FALSE)
|
||||
EVT_IF_LT(GB_StoryProgress, STORY_EPILOGUE)
|
||||
EVT_EXEC(N(EVS_SetupBadgeShop))
|
||||
EVT_ELSE
|
||||
EVT_CALL(EnableGroup, MODEL_jutan1, FALSE)
|
||||
EVT_END_IF
|
||||
EVT_SWITCH(GB_StoryProgress)
|
||||
EVT_CASE_EQ(STORY_INTRO)
|
||||
EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(IntroNPCs)))
|
||||
EVT_CASE_GE(STORY_EPILOGUE)
|
||||
EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(EpilogueNPCs)))
|
||||
EVT_CASE_LT(STORY_CH1_MERLIN_REVEALED_KOOPA_BROS)
|
||||
EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(Chapter0NPCs)))
|
||||
EVT_CASE_LT(STORY_CH1_STAR_SPRIT_DEPARTED)
|
||||
EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(Chapter1NPCs)))
|
||||
EVT_CASE_EQ(STORY_CH1_DEFEATED_JR_TROOPA)
|
||||
EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(TwinkMeetingNPCs)))
|
||||
EVT_CASE_RANGE(STORY_CH3_STAR_SPRIT_DEPARTED, STORY_CH4_STAR_SPIRIT_RESCUED)
|
||||
EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(Chapter4NPCs)))
|
||||
EVT_CASE_EQ(STORY_CH6_RETURNED_TO_TOAD_TOWN)
|
||||
EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(NinjiMeetingNPCs)))
|
||||
EVT_CASE_DEFAULT
|
||||
EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs)))
|
||||
EVT_END_SWITCH
|
||||
EVT_IF_GE(GB_StoryProgress, STORY_CH1_MERLIN_REVEALED_KOOPA_BROS)
|
||||
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt, COLLIDER_FLAGS_UPPER_MASK)
|
||||
EVT_END_IF
|
||||
EVT_EXEC(N(EVS_SetupFlowerModels))
|
||||
EVT_EXEC(N(EVS_MakeEntities))
|
||||
EVT_EXEC(N(EVS_SetupRooms))
|
||||
EVT_EXEC(N(EVS_SetupBulletinBoard))
|
||||
EVT_EXEC(N(EVS_SetupCrystalBallGfx))
|
||||
EVT_EXEC(N(EVS_SetupMusic))
|
||||
EVT_CALL(UseDoorSounds, DOOR_SOUNDS_LARGE)
|
||||
EVT_CALL(UseAdvancedDoorSounds, DOOR_SOUNDS_BASIC)
|
||||
EVT_EXEC(N(EVS_EnterMap))
|
||||
EVT_WAIT(1)
|
||||
EVT_CALL(EnableTexPanning, MODEL_hikari, TRUE)
|
||||
EVT_THREAD
|
||||
EVT_SET_GROUP(EVT_GROUP_00)
|
||||
EVT_SET(LVar0, 0)
|
||||
EVT_SET(LVar1, 0)
|
||||
EVT_LABEL(0)
|
||||
EVT_ADD(LVar0, -100)
|
||||
EVT_ADD(LVar1, -200)
|
||||
EVT_IF_LT(LVar0, 0)
|
||||
EVT_ADD(LVar0, 0x10000)
|
||||
EVT_END_IF
|
||||
EVT_IF_LT(LVar1, 0)
|
||||
EVT_ADD(LVar0, 0x10000)
|
||||
EVT_END_IF
|
||||
EVT_CALL(SetTexPanOffset, TEX_PANNER_3, TEX_PANNER_MAIN, LVar0, 0)
|
||||
EVT_CALL(SetTexPanOffset, TEX_PANNER_3, TEX_PANNER_AUX, LVar1, LVar1)
|
||||
EVT_WAIT(1)
|
||||
EVT_GOTO(0)
|
||||
EVT_END_THREAD
|
||||
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_Merlon_GiveHint)), TRIGGER_WALL_PRESS_A, COLLIDER_o335, 1, 0)
|
||||
EVT_EXEC(N(EVS_SetupQuickChangeTrigger))
|
||||
EVT_EXEC(N(EVS_SetupFoliage))
|
||||
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(2.0))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
19
src/world/area_mac/mac_01/mac_01_3_entity.c
Normal file
19
src/world/area_mac/mac_01/mac_01_3_entity.c
Normal file
@ -0,0 +1,19 @@
|
||||
#include "mac_01.h"
|
||||
#include "entity.h"
|
||||
|
||||
EvtScript N(EVS_Inspect_StreetSign) = {
|
||||
EVT_CALL(DisablePlayerInput, TRUE)
|
||||
EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_0170, 160, 40)
|
||||
EVT_CALL(DisablePlayerInput, FALSE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_MakeEntities) = {
|
||||
EVT_IF_LT(GB_StoryProgress, STORY_EPILOGUE)
|
||||
EVT_CALL(MakeEntity, EVT_PTR(Entity_SavePoint), 280, 80, -130, 0, MAKE_ENTITY_END)
|
||||
EVT_END_IF
|
||||
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_Inspect_StreetSign)), TRIGGER_WALL_PRESS_A, COLLIDER_o406, 1, 0)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
253
src/world/area_mac/mac_01/mac_01_4_rooms.c
Normal file
253
src/world/area_mac/mac_01/mac_01_4_rooms.c
Normal file
@ -0,0 +1,253 @@
|
||||
#include "mac_01.h"
|
||||
|
||||
EvtScript N(EVS_SetDoorRot_PostOffice) = {
|
||||
EVT_SETF(LVar1, LVar0)
|
||||
EVT_DIVF(LVar1, EVT_FLOAT(45.0))
|
||||
EVT_CALL(TranslateModel, MODEL_o189, LVar1, 0, 0)
|
||||
EVT_SETF(LVar1, LVar0)
|
||||
EVT_MULF(LVar1, EVT_FLOAT(0.95))
|
||||
EVT_CALL(RotateModel, MODEL_o189, LVar1, 0, -1, 0)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
s16 N(Models_PostOfficeWalls_Unused)[] = {
|
||||
MODEL_y1,
|
||||
MODEL_y2,
|
||||
MODEL_k14,
|
||||
MODEL_k15,
|
||||
MODEL_k16,
|
||||
MODEL_k17,
|
||||
MODEL_k18,
|
||||
MODEL_k21,
|
||||
MODEL_k22,
|
||||
MODEL_k23,
|
||||
MODEL_k24,
|
||||
MODEL_y3,
|
||||
MODEL_k11,
|
||||
MODEL_k12,
|
||||
MODEL_k13,
|
||||
};
|
||||
|
||||
EvtScript N(EVS_MoveWalls_PostOffice) = {
|
||||
EVT_SET(LVar1, LVar0)
|
||||
EVT_CALL(RotateModel, MODEL_k11, LVar1, 1, 0, 0)
|
||||
EVT_CALL(RotateModel, MODEL_k12, LVar1, 1, 0, 0)
|
||||
EVT_CALL(RotateModel, MODEL_k13, LVar1, 1, 0, 0)
|
||||
EVT_CALL(RotateModel, MODEL_k14, LVar1, 1, 0, 0)
|
||||
EVT_CALL(RotateModel, MODEL_k15, LVar1, 1, 0, 0)
|
||||
EVT_CALL(RotateModel, MODEL_k16, LVar1, 1, 0, 0)
|
||||
EVT_CALL(RotateModel, MODEL_k17, LVar1, 1, 0, 0)
|
||||
EVT_CALL(RotateModel, MODEL_k18, LVar1, 1, 0, 0)
|
||||
EVT_CALL(RotateModel, MODEL_k21, LVar1, 1, 0, 0)
|
||||
EVT_CALL(RotateModel, MODEL_k22, LVar1, 1, 0, 0)
|
||||
EVT_CALL(RotateModel, MODEL_k23, LVar1, 1, 0, 0)
|
||||
EVT_CALL(RotateModel, MODEL_k24, LVar1, 1, 0, 0)
|
||||
EVT_CALL(RotateModel, MODEL_y1, LVar1, -1, 0, 0)
|
||||
EVT_CALL(RotateModel, MODEL_y2, LVar1, -1, 0, 0)
|
||||
EVT_CALL(RotateModel, MODEL_y3, LVar1, -1, 0, 0)
|
||||
EVT_SWITCH(LVar0)
|
||||
EVT_CASE_EQ(90)
|
||||
EVT_CALL(EnableGroup, MODEL_po_mtx, FALSE)
|
||||
EVT_CASE_DEFAULT
|
||||
EVT_CALL(EnableGroup, MODEL_po_mtx, TRUE)
|
||||
EVT_END_SWITCH
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_DropDoor_PostOffice) = {
|
||||
EVT_CALL(RotateModel, MODEL_o189, LVar0, 1, 0, 0)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_ToggleVis_PostOffice) = {
|
||||
EVT_SWITCH(LVar0)
|
||||
EVT_CASE_EQ(0)
|
||||
EVT_CALL(SetGroupEnabled, MODEL_yubin_in, 1)
|
||||
EVT_EXEC_WAIT(N(EVS_Scene_MailbagTheft))
|
||||
EVT_CASE_EQ(3)
|
||||
EVT_CALL(SetGroupEnabled, MODEL_yubin_in, 0)
|
||||
EVT_END_SWITCH
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_SetDoorRot_ToadHouse) = {
|
||||
EVT_CALL(RotateModel, MODEL_door_k, LVar0, 0, -1, 0)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
s16 N(Models_ToadHouseWalls_Unused)[] = {
|
||||
MODEL_kk12,
|
||||
MODEL_kk13,
|
||||
MODEL_kk14,
|
||||
MODEL_kk21,
|
||||
MODEL_kk22,
|
||||
MODEL_kk23,
|
||||
MODEL_kk11,
|
||||
};
|
||||
|
||||
EvtScript N(EVS_MoveWalls_ToadHouse) = {
|
||||
EVT_SET(LVar1, LVar0)
|
||||
EVT_MULF(LVar1, EVT_FLOAT(1.0))
|
||||
EVT_CALL(RotateModel, MODEL_kk11, LVar1, 1, 0, 0)
|
||||
EVT_CALL(RotateModel, MODEL_kk12, LVar1, 1, 0, 0)
|
||||
EVT_CALL(RotateModel, MODEL_kk13, LVar1, 1, 0, 0)
|
||||
EVT_CALL(RotateModel, MODEL_kk14, LVar1, 1, 0, 0)
|
||||
EVT_CALL(RotateModel, MODEL_kk21, LVar1, 1, 0, 0)
|
||||
EVT_CALL(RotateModel, MODEL_kk22, LVar1, 1, 0, 0)
|
||||
EVT_CALL(RotateModel, MODEL_kk23, LVar1, 1, 0, 0)
|
||||
EVT_SWITCH(LVar0)
|
||||
EVT_CASE_EQ(90)
|
||||
EVT_CALL(EnableGroup, MODEL_kino_out, FALSE)
|
||||
EVT_CASE_DEFAULT
|
||||
EVT_CALL(EnableGroup, MODEL_kino_out, TRUE)
|
||||
EVT_END_SWITCH
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_ToggleVis_ToadHouse) = {
|
||||
EVT_SWITCH(LVar0)
|
||||
EVT_CASE_EQ(0)
|
||||
EVT_CALL(SetGroupEnabled, MODEL_kino_in, 1)
|
||||
EVT_SET(MF_InsideToadHouse, TRUE)
|
||||
EVT_CASE_EQ(3)
|
||||
EVT_CALL(SetGroupEnabled, MODEL_kino_in, 0)
|
||||
EVT_SET(MF_InsideToadHouse, FALSE)
|
||||
EVT_END_SWITCH
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_SetDoorRot_MerlonHouse) = {
|
||||
EVT_CALL(RotateModel, MODEL_door, LVar0, 0, -1, 0)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_MoveWalls_MerlonHouse) = {
|
||||
EVT_SET(LVar1, LVar0)
|
||||
EVT_MUL(LVar1, 2)
|
||||
EVT_CALL(RotateGroup, MODEL_off_kabe, LVar1, 0, 1, 0)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_ToggleVis_MerlonHouse) = {
|
||||
EVT_SWITCH(LVar0)
|
||||
EVT_CASE_EQ(0)
|
||||
EVT_SWITCH(GB_StoryProgress)
|
||||
EVT_CASE_LT(STORY_CH1_SPOKE_WITH_MERLIN)
|
||||
EVT_EXEC_WAIT(N(EVS_MerlonShooAway))
|
||||
EVT_SET(LVar0, -1)
|
||||
EVT_RETURN
|
||||
EVT_CASE_RANGE(STORY_CH6_RETURNED_TO_TOAD_TOWN, STORY_CH7_INVITED_TO_STARBORN_VALLEY)
|
||||
EVT_EXEC(N(EVS_Scene_MerlonAndNinji))
|
||||
EVT_CASE_RANGE(STORY_CH3_GOT_SUPER_BOOTS, STORY_CH8_REACHED_PEACHS_CASTLE)
|
||||
EVT_IF_EQ(GB_StoryProgress, STORY_CH6_RETURNED_TO_TOAD_TOWN)
|
||||
EVT_BREAK_SWITCH
|
||||
EVT_END_IF
|
||||
EVT_IF_EQ(GF_MAC01_Merlon_HeardAboutDream, FALSE)
|
||||
EVT_CALL(SpeakToPlayer, NPC_Luigi, ANIM_Merlon_Talk, ANIM_Merlon_Idle, 0, MSG_MAC_Plaza_003C)
|
||||
EVT_SET(LVar0, -1)
|
||||
EVT_RETURN
|
||||
EVT_END_IF
|
||||
EVT_CASE_GE(STORY_EPILOGUE)
|
||||
EVT_CALL(ShowMessageAtScreenPos, MSG_Outro_003F, 160, 40)
|
||||
EVT_SET(LVar0, -1)
|
||||
EVT_RETURN
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(SetGroupEnabled, MODEL_dr_in, 1)
|
||||
EVT_SET(MF_MusicMixTrigger1, TRUE)
|
||||
EVT_CASE_EQ(1)
|
||||
EVT_CASE_EQ(2)
|
||||
EVT_CASE_EQ(3)
|
||||
EVT_CALL(SetGroupEnabled, MODEL_dr_in, 0)
|
||||
EVT_SET(MF_MusicMixTrigger1, FALSE)
|
||||
EVT_END_SWITCH
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_SpinRoof) = {
|
||||
EVT_SET_GROUP(EVT_GROUP_00)
|
||||
EVT_SET(LVar0, 0)
|
||||
EVT_LABEL(0)
|
||||
EVT_ADDF(LVar0, EVT_FLOAT(3.0))
|
||||
EVT_IF_GT(LVar0, 360)
|
||||
EVT_SUBF(LVar0, EVT_FLOAT(360.0))
|
||||
EVT_END_IF
|
||||
EVT_CALL(RotateGroup, MODEL_yane, LVar0, 0, 1, 0)
|
||||
EVT_CALL(RotateGroup, MODEL_off_yane, LVar0, 0, 1, 0)
|
||||
EVT_WAIT(1)
|
||||
EVT_GOTO(0)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
s32 N(InsideNPCs_PostOffice)[] = {
|
||||
NPC_Postmaster,
|
||||
NPC_Parakarry,
|
||||
NPC_PostOfficeShyGuy,
|
||||
-1
|
||||
};
|
||||
|
||||
s32 N(InsideNPCs_ToadHouse)[] = {
|
||||
NPC_ToadHouseToad,
|
||||
NPC_ToadHouseShyGuy,
|
||||
-1
|
||||
};
|
||||
|
||||
s32 N(InsideNPCs_MerlonHouse)[] = {
|
||||
NPC_Merlon,
|
||||
NPC_Ninji,
|
||||
-1
|
||||
};
|
||||
|
||||
EvtScript N(EVS_SetupRooms) = {
|
||||
// post office
|
||||
EVT_CALL(MakeDoorAdvanced,
|
||||
VIS_GROUP_PAIR(VIS_GROUP_0, VIS_GROUP_2),
|
||||
EVT_PTR(N(EVS_SetDoorRot_PostOffice)),
|
||||
EVT_PTR(N(EVS_MoveWalls_PostOffice)),
|
||||
EVT_PTR(N(EVS_DropDoor_PostOffice)),
|
||||
EVT_PTR(N(EVS_ToggleVis_PostOffice)),
|
||||
COLLIDER_deilit1,
|
||||
COLLIDER_deilit1u,
|
||||
MODEL_post_office,
|
||||
EVT_PTR(N(InsideNPCs_PostOffice)))
|
||||
// toad house
|
||||
EVT_CALL(MakeDoorAdvanced,
|
||||
VIS_GROUP_PAIR(VIS_GROUP_0, VIS_GROUP_2),
|
||||
EVT_PTR(N(EVS_SetDoorRot_ToadHouse)),
|
||||
EVT_PTR(N(EVS_MoveWalls_ToadHouse)),
|
||||
NULL,
|
||||
EVT_PTR(N(EVS_ToggleVis_ToadHouse)),
|
||||
COLLIDER_deilit2,
|
||||
COLLIDER_deilit2u,
|
||||
MODEL_kinopi,
|
||||
EVT_PTR(N(InsideNPCs_ToadHouse)))
|
||||
// merlon's house
|
||||
EVT_CALL(MakeDoorAdvanced,
|
||||
VIS_GROUP_PAIR(VIS_GROUP_0, VIS_GROUP_2),
|
||||
EVT_PTR(N(EVS_SetDoorRot_MerlonHouse)),
|
||||
EVT_PTR(N(EVS_MoveWalls_MerlonHouse)),
|
||||
NULL,
|
||||
EVT_PTR(N(EVS_ToggleVis_MerlonHouse)),
|
||||
COLLIDER_deilitd,
|
||||
COLLIDER_deilitud,
|
||||
MODEL_de_aru,
|
||||
EVT_PTR(N(InsideNPCs_MerlonHouse)))
|
||||
// initial visibility
|
||||
EVT_EXEC(N(EVS_SpinRoof))
|
||||
EVT_SET(LVar0, VIS_GROUP_3)
|
||||
EVT_EXEC(N(EVS_ToggleVis_PostOffice))
|
||||
EVT_EXEC(N(EVS_ToggleVis_ToadHouse))
|
||||
EVT_EXEC(N(EVS_ToggleVis_MerlonHouse))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
251
src/world/area_mac/mac_01/mac_01_5_shop.c
Normal file
251
src/world/area_mac/mac_01/mac_01_5_shop.c
Normal file
@ -0,0 +1,251 @@
|
||||
#include "mac_01.h"
|
||||
|
||||
API_CALLABLE(N(HideRowfBadge)) {
|
||||
s32 itemIndex = evt_get_variable(script, *script->ptrReadPos);
|
||||
|
||||
set_item_entity_flags(gGameStatusPtr->shopItemEntities[itemIndex].index, ITEM_ENTITY_FLAGS_HIDDEN);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
API_CALLABLE(N(SetRowfBadgeBought)) {
|
||||
s32 itemIndex = evt_get_variable(script, *script->ptrReadPos);
|
||||
s32* buyFlags = (s32*) evt_get_variable(NULL, MV_RowfShopBuyFlags);
|
||||
|
||||
set_item_entity_flags(gGameStatusPtr->shopItemEntities[itemIndex].index, ITEM_ENTITY_FLAGS_HIDDEN);
|
||||
evt_set_variable(NULL, buyFlags[itemIndex], TRUE);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
API_CALLABLE(N(CreateShopInventory)) {
|
||||
s32 varBaseUnlocked = GF_MAC01_UnlockedRowfBadge_00;
|
||||
s32 varBaseHasBought = GF_MAC01_RowfBadge_00;
|
||||
s32 options[16];
|
||||
s32 itemID;
|
||||
s32 shopIdx;
|
||||
s32 randIdx;
|
||||
s32 available;
|
||||
s32 count;
|
||||
s32 i;
|
||||
|
||||
ShopItemData* inventory = heap_malloc(4 * sizeof(ShopItemData));
|
||||
s32* buyFlags = heap_malloc(3 * sizeof(s32));
|
||||
buyFlags[0] = 0;
|
||||
buyFlags[1] = 0;
|
||||
buyFlags[2] = 0;
|
||||
inventory[0].itemID = 0;
|
||||
inventory[1].itemID = 0;
|
||||
inventory[2].itemID = 0;
|
||||
inventory[3].itemID = 0;
|
||||
|
||||
if (!evt_get_variable(script, GF_MAC01_RowfBadgesChosen)) {
|
||||
available = 0;
|
||||
for (i = 0; i < (u32) ARRAY_COUNT(options); i++) {
|
||||
s32 isUnlocked = evt_get_variable(NULL, varBaseUnlocked + i);
|
||||
s32 hasBought = evt_get_variable(NULL, varBaseHasBought + i);
|
||||
if ((isUnlocked == 1) && (hasBought == 0)) {
|
||||
options[available++] = i;
|
||||
}
|
||||
}
|
||||
|
||||
count = 0;
|
||||
while (available != 0) {
|
||||
randIdx = rand_int(available - 1);
|
||||
shopIdx = options[randIdx];
|
||||
|
||||
itemID = mac_01_RowfBadgeInventory[shopIdx].itemID;
|
||||
inventory[count].itemID = itemID;
|
||||
inventory[count].price = gItemTable[itemID].sellValue;
|
||||
inventory[count].descMsg = mac_01_RowfBadgeInventory[shopIdx].descMsg;
|
||||
buyFlags[count] = varBaseHasBought + shopIdx;
|
||||
|
||||
evt_set_variable(script, GB_MAC01_Rowf_Badge0 + count, shopIdx);
|
||||
|
||||
count++;
|
||||
if (count >= 3)
|
||||
break;
|
||||
|
||||
for (i = randIdx; i < available - 1; i++) {
|
||||
options[i] = options[i + 1];
|
||||
}
|
||||
available--;
|
||||
}
|
||||
evt_set_variable(script, GB_MAC01_Rowf_NumBadges, count);
|
||||
evt_set_variable(script, GF_MAC01_RowfBadgesChosen, TRUE);
|
||||
script->varTable[3] = FALSE;
|
||||
} else {
|
||||
count = evt_get_variable(script, GB_MAC01_Rowf_NumBadges);
|
||||
for (i = 0; i < count; i++) {
|
||||
shopIdx = evt_get_variable(script, GB_MAC01_Rowf_Badge0 + i);
|
||||
itemID = mac_01_RowfBadgeInventory[shopIdx].itemID;
|
||||
inventory[i].itemID = itemID;
|
||||
inventory[i].price = gItemTable[itemID].sellValue;
|
||||
inventory[i].descMsg = mac_01_RowfBadgeInventory[shopIdx].descMsg;
|
||||
buyFlags[i] = varBaseHasBought + shopIdx;
|
||||
}
|
||||
script->varTable[3] = TRUE;
|
||||
}
|
||||
|
||||
script->varTable[0] = count;
|
||||
script->varTablePtr[1] = buyFlags;
|
||||
script->varTablePtr[2] = inventory;
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
s32 N(ShopMessages)[] = {
|
||||
MSG_Shop_0017,
|
||||
MSG_Shop_0018,
|
||||
MSG_Shop_0002,
|
||||
MSG_Shop_0019,
|
||||
MSG_Shop_0004,
|
||||
MSG_Shop_0005,
|
||||
MSG_Shop_0006,
|
||||
MSG_Shop_0007,
|
||||
MSG_Shop_0008,
|
||||
MSG_Shop_0009,
|
||||
MSG_Shop_000A,
|
||||
MSG_Shop_000B,
|
||||
MSG_Shop_000C,
|
||||
MSG_Shop_000D,
|
||||
MSG_Shop_000E,
|
||||
MSG_Shop_000F,
|
||||
MSG_Shop_0010,
|
||||
MSG_Shop_0011,
|
||||
MSG_Shop_0012,
|
||||
MSG_Shop_0013,
|
||||
MSG_Shop_0014,
|
||||
MSG_Shop_0015,
|
||||
MSG_Shop_001A,
|
||||
};
|
||||
|
||||
ShopSellPriceData N(RowfDummyPriceList)[] = {
|
||||
{ .itemID = ITEM_SHOOTING_STAR, .sellPrice = 0 },
|
||||
{}
|
||||
};
|
||||
|
||||
EvtScript N(EVS_OnBuy) = {
|
||||
EVT_SWITCH(LVar0)
|
||||
EVT_CASE_EQ(3)
|
||||
EVT_CASE_EQ(4)
|
||||
EVT_CASE_EQ(1)
|
||||
EVT_SWITCH(LVar2)
|
||||
EVT_CASE_EQ(0)
|
||||
EVT_SET(GF_MAC01_RowfBadgeAvailableA, TRUE)
|
||||
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_b3, COLLIDER_FLAGS_UPPER_MASK)
|
||||
EVT_CASE_EQ(1)
|
||||
EVT_SET(GF_MAC01_RowfBadgeAvailableB, TRUE)
|
||||
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_b2, COLLIDER_FLAGS_UPPER_MASK)
|
||||
EVT_CASE_EQ(2)
|
||||
EVT_SET(GF_MAC01_RowfBadgeAvailableC, TRUE)
|
||||
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_b1, COLLIDER_FLAGS_UPPER_MASK)
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(N(SetRowfBadgeBought), LVar2)
|
||||
EVT_CASE_EQ(2)
|
||||
EVT_END_SWITCH
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
ShopItemData N(RowfBadgeInventory)[] = {
|
||||
{ .itemID = ITEM_SPEEDY_SPIN, .price = 50, .descMsg = MSG_ItemShopDesc_SpeedySpin },
|
||||
{ .itemID = ITEM_FIRST_ATTACK, .price = 100, .descMsg = MSG_ItemShopDesc_FirstAttack },
|
||||
{ .itemID = ITEM_MULTIBOUNCE, .price = 75, .descMsg = MSG_ItemShopDesc_Multibounce },
|
||||
{ .itemID = ITEM_D_DOWN_POUND, .price = 75, .descMsg = MSG_ItemShopDesc_DDownPound },
|
||||
{ .itemID = ITEM_DODGE_MASTER, .price = 100, .descMsg = MSG_ItemShopDesc_DodgeMaster },
|
||||
{ .itemID = ITEM_SLEEP_STOMP, .price = 75, .descMsg = MSG_ItemShopDesc_SleepStomp },
|
||||
{ .itemID = ITEM_DOUBLE_DIP, .price = 100, .descMsg = MSG_ItemShopDesc_DoubleDip },
|
||||
{ .itemID = ITEM_BOOTS_CHARGE, .price = 50, .descMsg = MSG_ItemShopDesc_JumpCharge },
|
||||
{ .itemID = ITEM_SPIN_SMASH, .price = 75, .descMsg = MSG_ItemShopDesc_SpinSmash },
|
||||
{ .itemID = ITEM_GROUP_FOCUS, .price = 100, .descMsg = MSG_ItemShopDesc_GroupFocus },
|
||||
{ .itemID = ITEM_ALLOR_NOTHING, .price = 100, .descMsg = MSG_ItemShopDesc_AllorNothing },
|
||||
{ .itemID = ITEM_HP_PLUS_C, .price = 150, .descMsg = MSG_ItemShopDesc_HPPlus },
|
||||
{ .itemID = ITEM_FP_PLUS_C, .price = 150, .descMsg = MSG_ItemShopDesc_FPPlus },
|
||||
{ .itemID = ITEM_S_SMASH_CHG, .price = 100, .descMsg = MSG_ItemShopDesc_SSmashChg },
|
||||
{ .itemID = ITEM_DAMAGE_DODGE_A, .price = 150, .descMsg = MSG_ItemShopDesc_DamageDodge },
|
||||
{ .itemID = ITEM_MEGA_QUAKE, .price = 200, .descMsg = MSG_ItemShopDesc_MegaQuake },
|
||||
};
|
||||
|
||||
ShopItemLocation N(RowfItemPositions)[] = {
|
||||
{ .posModelID = MODEL_b3, .triggerColliderID = COLLIDER_b3 },
|
||||
{ .posModelID = MODEL_b2, .triggerColliderID = COLLIDER_b2 },
|
||||
{ .posModelID = MODEL_b1, .triggerColliderID = COLLIDER_b1 },
|
||||
};
|
||||
|
||||
ShopOwner N(ShopOwnerRowf) = {
|
||||
.npcID = NPC_Rowf,
|
||||
.idleAnim = ANIM_Rowf_Idle,
|
||||
.talkAnim = ANIM_Rowf_Talk,
|
||||
.onBuyEvt = &N(EVS_OnBuy),
|
||||
.shopMsgIDs = N(ShopMessages),
|
||||
};
|
||||
|
||||
EvtScript N(EVS_SetupBadgeShop) = {
|
||||
EVT_IF_LT(GB_StoryProgress, STORY_CH2_STAR_SPRIT_DEPARTED)
|
||||
EVT_GOTO(1)
|
||||
EVT_END_IF
|
||||
EVT_IF_LT(GB_StoryProgress, STORY_CH3_STAR_SPRIT_DEPARTED)
|
||||
EVT_GOTO(2)
|
||||
EVT_END_IF
|
||||
EVT_IF_LT(GB_StoryProgress, STORY_CH4_STAR_SPRIT_DEPARTED)
|
||||
EVT_GOTO(3)
|
||||
EVT_END_IF
|
||||
EVT_IF_LT(GB_StoryProgress, STORY_CH5_RETURNED_TO_TOAD_TOWN)
|
||||
EVT_GOTO(4)
|
||||
EVT_END_IF
|
||||
EVT_SET(GF_MAC01_UnlockedRowfBadge_0F, TRUE)
|
||||
EVT_SET(GF_MAC01_UnlockedRowfBadge_0E, TRUE)
|
||||
EVT_SET(GF_MAC01_UnlockedRowfBadge_0D, TRUE)
|
||||
EVT_LABEL(4)
|
||||
EVT_SET(GF_MAC01_UnlockedRowfBadge_0C, TRUE)
|
||||
EVT_SET(GF_MAC01_UnlockedRowfBadge_0B, TRUE)
|
||||
EVT_SET(GF_MAC01_UnlockedRowfBadge_0A, TRUE)
|
||||
EVT_LABEL(3)
|
||||
EVT_SET(GF_MAC01_UnlockedRowfBadge_09, TRUE)
|
||||
EVT_SET(GF_MAC01_UnlockedRowfBadge_08, TRUE)
|
||||
EVT_SET(GF_MAC01_UnlockedRowfBadge_07, TRUE)
|
||||
EVT_LABEL(2)
|
||||
EVT_SET(GF_MAC01_UnlockedRowfBadge_06, TRUE)
|
||||
EVT_SET(GF_MAC01_UnlockedRowfBadge_05, TRUE)
|
||||
EVT_SET(GF_MAC01_UnlockedRowfBadge_04, TRUE)
|
||||
EVT_LABEL(1)
|
||||
EVT_SET(GF_MAC01_UnlockedRowfBadge_03, TRUE)
|
||||
EVT_SET(GF_MAC01_UnlockedRowfBadge_02, TRUE)
|
||||
EVT_SET(GF_MAC01_UnlockedRowfBadge_01, TRUE)
|
||||
EVT_SET(GF_MAC01_UnlockedRowfBadge_00, TRUE)
|
||||
EVT_CALL(N(CreateShopInventory))
|
||||
EVT_SET(MV_RowfShopBuyFlags, LVar1)
|
||||
EVT_IF_EQ(LVar3, 0)
|
||||
EVT_SET(GF_MAC01_RowfBadgeAvailableA, FALSE)
|
||||
EVT_SET(GF_MAC01_RowfBadgeAvailableB, FALSE)
|
||||
EVT_SET(GF_MAC01_RowfBadgeAvailableC, FALSE)
|
||||
EVT_IF_LT(LVar0, 3)
|
||||
EVT_SET(GF_MAC01_RowfBadgeAvailableC, TRUE)
|
||||
EVT_END_IF
|
||||
EVT_IF_LT(LVar0, 2)
|
||||
EVT_SET(GF_MAC01_RowfBadgeAvailableB, TRUE)
|
||||
EVT_END_IF
|
||||
EVT_IF_LT(LVar0, 1)
|
||||
EVT_SET(GF_MAC01_RowfBadgeAvailableA, TRUE)
|
||||
EVT_END_IF
|
||||
EVT_END_IF
|
||||
EVT_CALL(MakeShop, EVT_PTR(N(RowfItemPositions)), LVar2, EVT_PTR(N(RowfDummyPriceList)), 0)
|
||||
EVT_CALL(MakeShopOwner, EVT_PTR(N(ShopOwnerRowf)))
|
||||
EVT_IF_EQ(LVar3, 1)
|
||||
EVT_IF_GE(LVar0, 3)
|
||||
EVT_IF_EQ(GF_MAC01_RowfBadgeAvailableC, TRUE)
|
||||
EVT_CALL(N(SetRowfBadgeBought), 2)
|
||||
EVT_END_IF
|
||||
EVT_END_IF
|
||||
EVT_IF_GE(LVar0, 2)
|
||||
EVT_IF_EQ(GF_MAC01_RowfBadgeAvailableB, TRUE)
|
||||
EVT_CALL(N(SetRowfBadgeBought), 1)
|
||||
EVT_END_IF
|
||||
EVT_END_IF
|
||||
EVT_IF_GE(LVar0, 1)
|
||||
EVT_IF_EQ(GF_MAC01_RowfBadgeAvailableA, TRUE)
|
||||
EVT_CALL(N(SetRowfBadgeBought), 0)
|
||||
EVT_END_IF
|
||||
EVT_END_IF
|
||||
EVT_END_IF
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
@ -1,16 +1,16 @@
|
||||
#include "mac_01.h"
|
||||
#include "mapfs/mac_01_shape.h"
|
||||
#include "model.h"
|
||||
#include "nu/nusys.h"
|
||||
|
||||
extern s32 D_80248420_808CA0;
|
||||
s32 N(CrystallBallRenderCounter) = 0;
|
||||
s32 N(UnusedCrystalBallField) = 0;
|
||||
|
||||
void func_802403C0_800C40(void) {
|
||||
void N(gfx_build_crystal_ball_pre)(void) {
|
||||
Camera* camera = &gCameras[gCurrentCameraID];
|
||||
Matrix4f sp50;
|
||||
LookAt sp90;
|
||||
|
||||
D_80248420_808CA0 += 1;
|
||||
N(CrystallBallRenderCounter)++;
|
||||
guLookAtHiliteF(sp50, &sp90, &gDisplayContext->hilite,
|
||||
camera->lookAt_eye.x, camera->lookAt_eye.y, camera->lookAt_eye.z,
|
||||
camera->lookAt_obj.x, camera->lookAt_obj.y, camera->lookAt_obj.z,
|
||||
@ -26,12 +26,12 @@ void func_802403C0_800C40(void) {
|
||||
gSPSetGeometryMode(gMasterGfxPos++, G_TEXTURE_GEN);
|
||||
}
|
||||
|
||||
void func_802405E8_800E68(void) {
|
||||
void N(gfx_build_crystal_ball_post)(void) {
|
||||
gSPClearGeometryMode(gMasterGfxPos++, G_TEXTURE_GEN);
|
||||
gSPEndDisplayList(gMasterGfxPos++);
|
||||
}
|
||||
|
||||
void func_80240628_800EA8(void) {
|
||||
void N(gfx_build_inside_crystal_ball)(void) {
|
||||
f32 x, y, z, s;
|
||||
f32 f20, f22;
|
||||
f32 f0, f2;
|
||||
@ -122,3 +122,16 @@ void func_80240628_800EA8(void) {
|
||||
gDPSetTexturePersp(gMasterGfxPos++, G_TP_PERSP);
|
||||
gSPTexture(gMasterGfxPos++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF);
|
||||
}
|
||||
|
||||
EvtScript N(EVS_SetupCrystalBallGfx) = {
|
||||
EVT_WAIT(1)
|
||||
EVT_CALL(SetCustomGfxBuilders, CUSTOM_GFX_2, EVT_PTR(N(gfx_build_crystal_ball_pre)), EVT_PTR(N(gfx_build_crystal_ball_post)))
|
||||
EVT_CALL(SetModelCustomGfx, MODEL_mirrorball, CUSTOM_GFX_2, -1)
|
||||
EVT_CALL(EnableModel, MODEL_mirrorball, FALSE)
|
||||
EVT_CALL(SetCustomGfxBuilders, CUSTOM_GFX_3, EVT_PTR(N(gfx_build_inside_crystal_ball)), 0)
|
||||
EVT_CALL(SetModelCustomGfx, MODEL_tama, CUSTOM_GFX_3, -1)
|
||||
EVT_CALL(SetModelFlags, MODEL_tama, MODEL_FLAGS_USE_CAMERA_UNK_MATRIX, TRUE)
|
||||
EVT_CALL(SetModelFlags, MODEL_ohosi, MODEL_FLAGS_USE_CAMERA_UNK_MATRIX, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
115
src/world/area_mac/mac_01/mac_01_7_bulletin.c
Normal file
115
src/world/area_mac/mac_01/mac_01_7_bulletin.c
Normal file
@ -0,0 +1,115 @@
|
||||
#include "mac_01.h"
|
||||
|
||||
EvtScript N(EVS_UpdateBulletinKootFavor) = {
|
||||
EVT_IF_NE(GB_KootFavor_Current, 9)
|
||||
EVT_RETURN
|
||||
EVT_END_IF
|
||||
EVT_SET(LVar1, GF_MAC01_KootFavor_ReadNewsBulletin)
|
||||
EVT_ADD(LVar1, GF_MAC01_KootFavor_ReadGossipBulletin)
|
||||
EVT_IF_EQ(LVar1, 2)
|
||||
EVT_RETURN
|
||||
EVT_END_IF
|
||||
EVT_IF_EQ(LVar0, 0)
|
||||
EVT_SET(GF_MAC01_KootFavor_ReadNewsBulletin, TRUE)
|
||||
EVT_ELSE
|
||||
EVT_SET(GF_MAC01_KootFavor_ReadGossipBulletin, TRUE)
|
||||
EVT_END_IF
|
||||
EVT_SET(LVar0, GF_MAC01_KootFavor_ReadNewsBulletin)
|
||||
EVT_ADD(LVar0, GF_MAC01_KootFavor_ReadGossipBulletin)
|
||||
EVT_IF_EQ(LVar0, 2)
|
||||
EVT_SET(GF_MAC02_KootFavor_CurrentComplete, TRUE)
|
||||
EVT_END_IF
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
typedef struct BulletinBoardEntry {
|
||||
/* 0x00 */ s32 newsMessage;
|
||||
/* 0x04 */ s32 gossipMessage;
|
||||
/* 0x08 */ s32 requiredProgress;
|
||||
} BulletinBoardEntry; // size = 0xC
|
||||
|
||||
BulletinBoardEntry N(BulletinBoardData)[] = {
|
||||
{ MSG_NewsBoard_0000, MSG_GossipBoard_0000, STORY_INTRO },
|
||||
{ MSG_NewsBoard_0001, MSG_GossipBoard_0001, STORY_CH0_MET_STAR_SPIRITS },
|
||||
{ MSG_NewsBoard_0002, MSG_GossipBoard_0002, STORY_CH1_ARRIVED_AT_KOOPA_VILLAGE },
|
||||
{ MSG_NewsBoard_0003, MSG_GossipBoard_0003, STORY_CH1_STAR_SPRIT_DEPARTED },
|
||||
{ MSG_NewsBoard_0004, MSG_GossipBoard_0004, STORY_CH2_SHADY_MOUSE_LEFT_SHOP },
|
||||
{ MSG_NewsBoard_0005, MSG_GossipBoard_0005, STORY_CH2_GOT_SUPER_HAMMER },
|
||||
{ MSG_NewsBoard_0006, MSG_GossipBoard_0006, STORY_UNUSED_FFFFFFCC },
|
||||
{ MSG_NewsBoard_0007, MSG_GossipBoard_0007, STORY_CH3_ARRIVED_AT_BOOS_MANSION },
|
||||
{ MSG_NewsBoard_0008, MSG_GossipBoard_0008, STORY_CH3_SAW_TUBBA_EAT_BOO },
|
||||
{ MSG_NewsBoard_0009, MSG_GossipBoard_0009, STORY_CH3_STAR_SPIRIT_RESCUED },
|
||||
{ MSG_NewsBoard_000A, MSG_GossipBoard_000A, STORY_CH4_FOUND_HIDDEN_DOOR },
|
||||
{ MSG_NewsBoard_000B, MSG_GossipBoard_000B, STORY_CH4_GOT_TOY_TRAIN },
|
||||
{ MSG_NewsBoard_000C, MSG_GossipBoard_000C, STORY_CH4_GOT_TAYCE_TS_CAKE },
|
||||
{ MSG_NewsBoard_000D, MSG_GossipBoard_000D, STORY_CH4_WATT_JOINED_PARTY },
|
||||
{ MSG_NewsBoard_000E, MSG_GossipBoard_000E, STORY_CH4_STAR_SPIRIT_RESCUED },
|
||||
{ MSG_NewsBoard_000F, MSG_GossipBoard_000F, STORY_CH5_REACHED_LAVA_LAVA_ISLAND },
|
||||
{ MSG_NewsBoard_0010, MSG_GossipBoard_0010, STORY_CH5_ZIP_LINE_READY },
|
||||
{ MSG_NewsBoard_0011, MSG_GossipBoard_0011, STORY_CH5_TRADED_VASE_FOR_SEED },
|
||||
{ MSG_NewsBoard_0012, MSG_GossipBoard_0012, STORY_CH6_ARRIVED_AT_FLOWER_FIELDS },
|
||||
{ MSG_NewsBoard_0013, MSG_GossipBoard_0013, STORY_CH6_SPOKE_WITH_THE_SUN },
|
||||
{ MSG_NewsBoard_0014, MSG_GossipBoard_0014, STORY_CH6_STAR_SPIRIT_RESCUED },
|
||||
{ MSG_NewsBoard_0015, MSG_GossipBoard_0015, STORY_CH7_INVITED_TO_STARBORN_VALLEY },
|
||||
{ MSG_NewsBoard_0016, MSG_GossipBoard_0016, STORY_CH7_ARRIVED_AT_SHIVER_CITY },
|
||||
{ MSG_NewsBoard_0017, MSG_GossipBoard_0017, STORY_CH7_STAR_SPIRIT_RESCUED },
|
||||
{ MSG_NewsBoard_0018, MSG_GossipBoard_0018, STORY_CH8_STAR_SHIP_ACTIVATED },
|
||||
{ MSG_NewsBoard_0019, MSG_GossipBoard_0019, STORY_EPILOGUE },
|
||||
};
|
||||
|
||||
API_CALLABLE(N(GetBulletinMessages)) {
|
||||
s32 idx = evt_get_variable(script, GB_MAC02_CurrentBulletin);
|
||||
|
||||
script->varTable[0] = N(BulletinBoardData)[idx].newsMessage;
|
||||
script->varTable[1] = N(BulletinBoardData)[idx].gossipMessage;
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
API_CALLABLE(N(SelectBulletinMessages)) {
|
||||
s32 storyProgress = evt_get_variable(script, GB_StoryProgress);
|
||||
BulletinBoardEntry* entry;
|
||||
s32 i;
|
||||
|
||||
entry = &N(BulletinBoardData)[ARRAY_COUNT(N(BulletinBoardData)) - 1];
|
||||
|
||||
for (i = ARRAY_COUNT(N(BulletinBoardData)) - 1; i >= 0; i--, entry--) {
|
||||
if (storyProgress >= entry->requiredProgress) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
evt_set_variable(script, GB_MAC02_CurrentBulletin, i);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
|
||||
EvtScript N(EVS_ReadBulletin_News) = {
|
||||
EVT_CALL(N(SelectBulletinMessages))
|
||||
EVT_CALL(DisablePlayerInput, TRUE)
|
||||
EVT_CALL(N(GetBulletinMessages))
|
||||
EVT_CALL(ShowMessageAtScreenPos, LVar0, 160, 40)
|
||||
EVT_SET(LVar0, 0)
|
||||
EVT_EXEC_WAIT(N(EVS_UpdateBulletinKootFavor))
|
||||
EVT_CALL(DisablePlayerInput, FALSE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_ReadBulletin_Gossip) = {
|
||||
EVT_CALL(N(SelectBulletinMessages))
|
||||
EVT_CALL(DisablePlayerInput, TRUE)
|
||||
EVT_CALL(N(GetBulletinMessages))
|
||||
EVT_CALL(ShowMessageAtScreenPos, LVar1, 160, 40)
|
||||
EVT_SET(LVar0, 1)
|
||||
EVT_EXEC_WAIT(N(EVS_UpdateBulletinKootFavor))
|
||||
EVT_CALL(DisablePlayerInput, FALSE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_SetupBulletinBoard) = {
|
||||
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ReadBulletin_News)), TRIGGER_WALL_PRESS_A, COLLIDER_syoumen, 1, 0)
|
||||
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ReadBulletin_Gossip)), TRIGGER_WALL_PRESS_A, COLLIDER_yoko_ushiro, 1, 0)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
47
src/world/area_mac/mac_01/mac_01_8_music_mix.c
Normal file
47
src/world/area_mac/mac_01/mac_01_8_music_mix.c
Normal file
@ -0,0 +1,47 @@
|
||||
#include "mac_01.h"
|
||||
|
||||
#include "world/common/atomic/MonitorMusicProximityTrigger.inc.c"
|
||||
|
||||
MusicProximityTrigger N(MusicMixTrigger1) = {
|
||||
.pos = { -190.0f, -210.0f },
|
||||
.innerDist = 100.0f,
|
||||
.outerDist = 120.0f,
|
||||
.unk = 2,
|
||||
.manualActivationFlag = MF_MusicMixTrigger1,
|
||||
};
|
||||
|
||||
MusicProximityTrigger N(MusicMixTrigger2) = {
|
||||
.pos = { -150.0f, 330.0f },
|
||||
.innerDist = 110.0f,
|
||||
.outerDist = 130.0f,
|
||||
.unk = 8,
|
||||
.manualActivationFlag = MF_MusicMixTrigger2,
|
||||
};
|
||||
|
||||
MusicProximityTrigger N(MusicMixTrigger3) = {
|
||||
.pos = { 266.0f, 370.0f },
|
||||
.innerDist = 200.0f,
|
||||
.outerDist = 220.0f,
|
||||
.unk = 5,
|
||||
.manualActivationFlag = MF_MusicMixTrigger3,
|
||||
};
|
||||
|
||||
|
||||
EvtScript N(EVS_SetupMusicMix) = {
|
||||
EVT_CALL(SetMusicTrack, 0, SONG_TOAD_TOWN, 0, 8)
|
||||
EVT_CALL(EnableMusicProximityMix, 0)
|
||||
EVT_IF_EQ(MF_SetupMusicMixes, FALSE)
|
||||
EVT_SET(MF_SetupMusicMixes, TRUE)
|
||||
EVT_THREAD
|
||||
EVT_CALL(N(MonitorMusicProximityTrigger), EVT_PTR(N(MusicMixTrigger1)))
|
||||
EVT_END_THREAD
|
||||
EVT_THREAD
|
||||
EVT_CALL(N(MonitorMusicProximityTrigger), EVT_PTR(N(MusicMixTrigger2)))
|
||||
EVT_END_THREAD
|
||||
EVT_THREAD
|
||||
EVT_CALL(N(MonitorMusicProximityTrigger), EVT_PTR(N(MusicMixTrigger3)))
|
||||
EVT_END_THREAD
|
||||
EVT_END_IF
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
2486
src/world/area_mac/mac_01/mac_01_9_npc.c
Normal file
2486
src/world/area_mac/mac_01/mac_01_9_npc.c
Normal file
File diff suppressed because it is too large
Load Diff
787
src/world/area_mac/mac_01/npc/flower_gate.inc.c
Normal file
787
src/world/area_mac/mac_01/npc/flower_gate.inc.c
Normal file
@ -0,0 +1,787 @@
|
||||
EvtScript N(EVS_MinhThankYou) = {
|
||||
EVT_CALL(DisablePlayerInput, TRUE)
|
||||
EVT_CALL(GetNpcPos, NPC_MinhT, LVar0, LVar1, LVar2)
|
||||
EVT_CALL(SetCamProperties, CAM_DEFAULT, 4, LVar0, LVar1, LVar2, 300, 16, -8)
|
||||
EVT_CALL(SpeakToPlayer, NPC_MinhT, ANIM_MinhT_Talk, ANIM_MinhT_Idle, 0, MSG_MAC_Plaza_006F)
|
||||
EVT_CALL(ResetCam, CAM_DEFAULT, 4)
|
||||
EVT_CALL(DisablePlayerInput, FALSE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcIdle_GardenShyGuy1) = {
|
||||
EVT_CALL(SetNpcPos, NPC_SELF, 170, 27, 380)
|
||||
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_ShyGuy_Red_Anim03)
|
||||
EVT_LOOP(0)
|
||||
EVT_CALL(InterpNpcYaw, NPC_SELF, 90, 1)
|
||||
EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_32C, 0)
|
||||
EVT_CALL(NpcJump0, NPC_SELF, 180, 27, 280, 15)
|
||||
EVT_CALL(NpcMoveTo, NPC_SELF, 220, 250, 15)
|
||||
EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_32C, 0)
|
||||
EVT_CALL(NpcJump0, NPC_SELF, 310, 27, 250, 15)
|
||||
EVT_CALL(NpcMoveTo, NPC_SELF, 350, 280, 15)
|
||||
EVT_CALL(InterpNpcYaw, NPC_SELF, 270, 1)
|
||||
EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_32C, 0)
|
||||
EVT_CALL(NpcJump0, NPC_SELF, 360, 27, 380, 15)
|
||||
EVT_CALL(NpcMoveTo, NPC_SELF, 300, 450, 15)
|
||||
EVT_CALL(NpcMoveTo, NPC_SELF, 230, 450, 15)
|
||||
EVT_CALL(NpcMoveTo, NPC_SELF, 170, 380, 15)
|
||||
EVT_END_LOOP
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcIdle_GardenShyGuy2) = {
|
||||
EVT_CALL(SetNpcPos, NPC_SELF, 350, 27, 280)
|
||||
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_ShyGuy_Red_Anim03)
|
||||
EVT_LOOP(0)
|
||||
EVT_CALL(InterpNpcYaw, NPC_SELF, 270, 1)
|
||||
EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_32C, 0)
|
||||
EVT_CALL(NpcJump0, NPC_SELF, 360, 27, 380, 15)
|
||||
EVT_CALL(NpcMoveTo, NPC_SELF, 300, 450, 15)
|
||||
EVT_CALL(NpcMoveTo, NPC_SELF, 230, 450, 15)
|
||||
EVT_CALL(NpcMoveTo, NPC_SELF, 170, 380, 15)
|
||||
EVT_CALL(InterpNpcYaw, NPC_SELF, 90, 1)
|
||||
EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_32C, 0)
|
||||
EVT_CALL(NpcJump0, NPC_SELF, 180, 27, 280, 15)
|
||||
EVT_CALL(NpcMoveTo, NPC_SELF, 220, 250, 15)
|
||||
EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_32C, 0)
|
||||
EVT_CALL(NpcJump0, NPC_SELF, 310, 27, 250, 15)
|
||||
EVT_CALL(NpcMoveTo, NPC_SELF, 350, 280, 15)
|
||||
EVT_END_LOOP
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_GardenShyGuy_RunAway) = {
|
||||
EVT_SET(LVarA, GF_MAC01_ChasedShyGuysFromGardenA)
|
||||
EVT_ADD(LVarA, GF_MAC01_ChasedShyGuysFromGardenB)
|
||||
EVT_CALL(DisablePlayerInput, TRUE)
|
||||
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_ShyGuy_Red_Anim0C)
|
||||
EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2)
|
||||
EVT_CALL(NpcJump0, NPC_SELF, LVar0, 27, LVar2, 10)
|
||||
EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(8.0))
|
||||
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_ShyGuy_Red_Anim03)
|
||||
EVT_CALL(ShowSweat, -1, 1, -45, 1, 0, 0, 0, 0, 20)
|
||||
EVT_CALL(InterpNpcYaw, NPC_SELF, 270, 1)
|
||||
EVT_SET(LVar0, -1)
|
||||
EVT_CALL(PlaySoundAtNpc, LVar0, SOUND_203F, 0)
|
||||
EVT_EXEC_GET_TID(N(D_8024E6F8_80EF78), LVar9)
|
||||
EVT_CALL(NpcMoveTo, NPC_SELF, 160, 400, 0)
|
||||
EVT_KILL_THREAD(LVar9)
|
||||
EVT_CALL(DisablePlayerInput, FALSE)
|
||||
EVT_IF_EQ(LVarA, 2)
|
||||
EVT_EXEC(N(EVS_MinhThankYou))
|
||||
EVT_END_IF
|
||||
EVT_CALL(ShowSweat, -1, 1, -45, 1, 0, 0, 0, 0, 20)
|
||||
EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_32C, 0)
|
||||
EVT_CALL(NpcJump0, NPC_SELF, 110, 20, 420, 0)
|
||||
EVT_CALL(ShowSweat, -1, 1, -45, 1, 0, 0, 0, 0, 20)
|
||||
EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_32C, 0)
|
||||
EVT_CALL(NpcJump0, NPC_SELF, 40, 0, 450, 0)
|
||||
EVT_CALL(ShowSweat, -1, 1, -45, 1, 0, 0, 0, 0, 20)
|
||||
EVT_CALL(NpcMoveTo, NPC_SELF, -30, 550, 0)
|
||||
EVT_CALL(NpcMoveTo, NPC_SELF, -30, 700, 0)
|
||||
EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_GardenShyGuy_PlayHitReactionSounds) = {
|
||||
EVT_SET(LVar0, 1)
|
||||
EVT_CALL(GetOwnerEncounterTrigger, LVar1)
|
||||
EVT_SWITCH(LVar1)
|
||||
EVT_CASE_EQ(ENCOUNTER_TRIGGER_HAMMER)
|
||||
EVT_CASE_EQ(ENCOUNTER_TRIGGER_JUMP)
|
||||
EVT_CASE_EQ(ENCOUNTER_TRIGGER_PARTNER)
|
||||
EVT_CASE_DEFAULT
|
||||
EVT_RETURN
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(GetPlayerPos, LVar1, LVar2, LVar3)
|
||||
EVT_IF_LE(LVar1, 50)
|
||||
EVT_RETURN
|
||||
EVT_END_IF
|
||||
EVT_IF_LE(LVar3, 80)
|
||||
EVT_RETURN
|
||||
EVT_END_IF
|
||||
EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_HIT_PLAYER_NORMAL, 0)
|
||||
EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_203E, 0)
|
||||
EVT_SET(LVar0, 0)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcHit_GardenShyGuy1) = {
|
||||
EVT_EXEC_WAIT(N(EVS_GardenShyGuy_PlayHitReactionSounds))
|
||||
EVT_IF_EQ(LVar0, 1)
|
||||
EVT_RETURN
|
||||
EVT_END_IF
|
||||
EVT_SET(GF_MAC01_ChasedShyGuysFromGardenA, TRUE)
|
||||
EVT_CALL(BindNpcAI, NPC_SELF, EVT_PTR(N(EVS_GardenShyGuy_RunAway)))
|
||||
EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAGS_IGNORE_TOUCH | ENEMY_FLAGS_IGNORE_JUMP | ENEMY_FLAGS_IGNORE_HAMMER | ENEMY_FLAGS_8000000 | ENEMY_FLAGS_10000000, 1)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcHit_GardenShyGuy2) = {
|
||||
EVT_EXEC_WAIT(N(EVS_GardenShyGuy_PlayHitReactionSounds))
|
||||
EVT_IF_EQ(LVar0, 1)
|
||||
EVT_RETURN
|
||||
EVT_END_IF
|
||||
EVT_SET(GF_MAC01_ChasedShyGuysFromGardenB, TRUE)
|
||||
EVT_CALL(BindNpcAI, NPC_SELF, EVT_PTR(N(EVS_GardenShyGuy_RunAway)))
|
||||
EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAGS_IGNORE_TOUCH | ENEMY_FLAGS_IGNORE_JUMP | ENEMY_FLAGS_IGNORE_HAMMER | ENEMY_FLAGS_8000000 | ENEMY_FLAGS_10000000, 1)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInit_GardenShyGuy1) = {
|
||||
EVT_IF_EQ(GF_MAC01_ChasedShyGuysFromGardenA, FALSE)
|
||||
EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_GardenShyGuy1)))
|
||||
EVT_CALL(BindNpcHit, NPC_SELF, EVT_PTR(N(EVS_NpcHit_GardenShyGuy1)))
|
||||
EVT_ELSE
|
||||
EVT_CALL(RemoveNpc, NPC_SELF)
|
||||
EVT_END_IF
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInit_GardenShyGuy2) = {
|
||||
EVT_IF_EQ(GF_MAC01_ChasedShyGuysFromGardenB, FALSE)
|
||||
EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_GardenShyGuy2)))
|
||||
EVT_CALL(BindNpcHit, NPC_SELF, EVT_PTR(N(EVS_NpcHit_GardenShyGuy2)))
|
||||
EVT_ELSE
|
||||
EVT_CALL(RemoveNpc, NPC_SELF)
|
||||
EVT_END_IF
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
// BUBULB
|
||||
|
||||
EvtScript N(EVS_NpcInteract_Bubulb) = {
|
||||
EVT_IF_EQ(GB_StoryProgress, STORY_EPILOGUE)
|
||||
EVT_SET(LVar0, MSG_Outro_0045)
|
||||
EVT_ELSE
|
||||
EVT_SET(LVar0, MSG_MAC_Plaza_0077)
|
||||
EVT_END_IF
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Pink_Talk, ANIM_Bubulb_Pink_Idle, 0, LVar0)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInit_Bubulb) = {
|
||||
EVT_SWITCH(GB_StoryProgress)
|
||||
EVT_CASE_RANGE(STORY_CH5_STAR_SPRIT_DEPARTED, STORY_CH6_FLOWER_GATE_OPEN)
|
||||
EVT_CALL(SetNpcPos, NPC_SELF, 200, 20, 500)
|
||||
EVT_CALL(SetNpcYaw, NPC_SELF, 270)
|
||||
EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Bubulb)))
|
||||
EVT_CASE_EQ(STORY_EPILOGUE)
|
||||
EVT_CALL(SetNpcPos, NPC_SELF, 230, 30, 400)
|
||||
EVT_CALL(SetNpcYaw, NPC_SELF, 270)
|
||||
EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Bubulb)))
|
||||
EVT_END_SWITCH
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
// MINH T
|
||||
|
||||
s32 N(FlowerGatePrimAlpha) = 0;
|
||||
|
||||
API_CALLABLE(N(SetFlowerGateGlowAlpha)) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
|
||||
N(FlowerGatePrimAlpha) = evt_get_variable(script, *args++);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
void N(gfx_build_flower_gate_glow)(void) {
|
||||
gDPSetCombineLERP(gMasterGfxPos++, 0, 0, 0, 1, SHADE, 0, PRIMITIVE, 0, 0, 0, 0, 1, SHADE, 0, PRIMITIVE, 0);
|
||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, 0, 0, 0, N(FlowerGatePrimAlpha));
|
||||
}
|
||||
|
||||
API_CALLABLE(N(SetPartnerTetherClose)) {
|
||||
partner_set_tether_distance(20.0f);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
API_CALLABLE(N(ResetPartnerTetherDist)) {
|
||||
partner_reset_tether_distance();
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
EvtScript N(EVS_FadeInFlowerGateGlowAlpha) = {
|
||||
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitf, COLLIDER_FLAGS_UPPER_MASK)
|
||||
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_door_ura, COLLIDER_FLAGS_UPPER_MASK)
|
||||
EVT_CALL(EnableModel, MODEL_pica, TRUE)
|
||||
EVT_CALL(SetModelCustomGfx, MODEL_pica, CUSTOM_GFX_4, -1)
|
||||
EVT_CALL(SetCustomGfxBuilders, CUSTOM_GFX_4, EVT_PTR(N(gfx_build_flower_gate_glow)), NULL)
|
||||
EVT_CALL(MakeLerp, 0, 255, 30, EASING_LINEAR)
|
||||
EVT_LOOP(0)
|
||||
EVT_CALL(UpdateLerp)
|
||||
EVT_CALL(N(SetFlowerGateGlowAlpha), LVar0)
|
||||
EVT_WAIT(1)
|
||||
EVT_IF_EQ(LVar1, 0)
|
||||
EVT_BREAK_LOOP
|
||||
EVT_END_IF
|
||||
EVT_END_LOOP
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_ModulateFlowerGateGlowAlpha) = {
|
||||
EVT_SET(LVar1, 255)
|
||||
EVT_LOOP(LVar0)
|
||||
EVT_LOOP(15)
|
||||
EVT_ADD(LVar1, -5)
|
||||
EVT_CALL(N(SetFlowerGateGlowAlpha), LVar1)
|
||||
EVT_WAIT(1)
|
||||
EVT_END_LOOP
|
||||
EVT_LOOP(15)
|
||||
EVT_ADD(LVar1, 5)
|
||||
EVT_CALL(N(SetFlowerGateGlowAlpha), LVar1)
|
||||
EVT_WAIT(1)
|
||||
EVT_END_LOOP
|
||||
EVT_END_LOOP
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_FadeOutFlowerGateGlowAlpha) = {
|
||||
EVT_CALL(MakeLerp, 255, 0, 30, EASING_LINEAR)
|
||||
EVT_LOOP(0)
|
||||
EVT_CALL(UpdateLerp)
|
||||
EVT_CALL(N(SetFlowerGateGlowAlpha), LVar0)
|
||||
EVT_WAIT(1)
|
||||
EVT_IF_EQ(LVar1, 0)
|
||||
EVT_BREAK_LOOP
|
||||
EVT_END_IF
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(EnableModel, MODEL_pica, FALSE)
|
||||
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_deilitf, COLLIDER_FLAGS_UPPER_MASK)
|
||||
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_door_ura, COLLIDER_FLAGS_UPPER_MASK)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_Scene_FlowerGateAppears) = {
|
||||
EVT_CALL(SetCamProperties, CAM_DEFAULT, 1, 266, 27, 373, 300, 15, -6)
|
||||
EVT_EXEC(N(EVS_PlayFlowerGateSong))
|
||||
EVT_PLAY_EFFECT(EFFECT_LIGHT_RAYS, 0, 266, 50, 338, 1, LVar9)
|
||||
EVT_CALL(PlaySoundAtCollider, COLLIDER_deilitf, SOUND_2A2, 0)
|
||||
EVT_EXEC_WAIT(N(EVS_FadeInFlowerGateGlowAlpha))
|
||||
EVT_THREAD
|
||||
EVT_WAIT(10)
|
||||
EVT_PLAY_EFFECT(EFFECT_FLOATING_FLOWER, 266, 50, 338, 100, 0)
|
||||
EVT_WAIT(10)
|
||||
EVT_PLAY_EFFECT(EFFECT_FLOATING_FLOWER, 240, 50, 338, 100, 0)
|
||||
EVT_WAIT(10)
|
||||
EVT_PLAY_EFFECT(EFFECT_FLOATING_FLOWER, 292, 50, 338, 100, 0)
|
||||
EVT_END_THREAD
|
||||
EVT_SET(LVar0, 3)
|
||||
EVT_EXEC_GET_TID(N(EVS_ModulateFlowerGateGlowAlpha), LVar2)
|
||||
EVT_WAIT(30)
|
||||
EVT_CALL(EnableModel, MODEL_r_door, TRUE)
|
||||
EVT_CALL(PlaySoundAtCollider, COLLIDER_deilitf, SOUND_2A3, 0)
|
||||
EVT_CALL(MakeLerp, 0, 3060, 80, EASING_LINEAR)
|
||||
EVT_LOOP(0)
|
||||
EVT_CALL(UpdateLerp)
|
||||
EVT_CALL(RotateModel, MODEL_r_door, LVar0, 0, 1, 0)
|
||||
EVT_WAIT(1)
|
||||
EVT_IF_EQ(LVar1, 0)
|
||||
EVT_BREAK_LOOP
|
||||
EVT_END_IF
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(EnableModel, MODEL_r_door, FALSE)
|
||||
EVT_CALL(EnableGroup, MODEL_to_flo, TRUE)
|
||||
EVT_CALL(func_802D7B10, LVar9)
|
||||
EVT_CALL(PlaySoundAt, SOUND_2A4, 0, 266, 50, 338)
|
||||
EVT_LOOP(3)
|
||||
EVT_PLAY_EFFECT(EFFECT_ENERGY_ORB_WAVE, 5, 266, 50, 338, 1, 20)
|
||||
EVT_WAIT(5)
|
||||
EVT_END_LOOP
|
||||
EVT_LOOP(0)
|
||||
EVT_WAIT(1)
|
||||
EVT_IS_THREAD_RUNNING(LVar2, LVar0)
|
||||
EVT_IF_EQ(LVar0, 0)
|
||||
EVT_BREAK_LOOP
|
||||
EVT_END_IF
|
||||
EVT_END_LOOP
|
||||
EVT_EXEC_WAIT(N(EVS_FadeOutFlowerGateGlowAlpha))
|
||||
EVT_CALL(ResetCam, CAM_DEFAULT, 1)
|
||||
EVT_EXEC(N(EVS_SetupMusic))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
s32 N(LetterList_MinhT_Unused)[] = {
|
||||
ITEM_LETTER_TO_MINHT,
|
||||
ITEM_NONE
|
||||
};
|
||||
|
||||
s32 N(ItemList_MagicalSeeds)[] = {
|
||||
ITEM_MAGICAL_SEED1,
|
||||
ITEM_MAGICAL_SEED2,
|
||||
ITEM_MAGICAL_SEED3,
|
||||
ITEM_MAGICAL_SEED4,
|
||||
ITEM_NONE
|
||||
};
|
||||
|
||||
EvtScript N(EVS_MinhT_PlantSeed) = {
|
||||
EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_100, TRUE)
|
||||
EVT_CALL(SpeakToPlayer, NPC_MinhT, ANIM_MinhT_Talk, ANIM_MinhT_Idle, 0, LVar4)
|
||||
EVT_WAIT(10)
|
||||
EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 266, 27, 373)
|
||||
EVT_CALL(SetPanTarget, CAM_DEFAULT, 266, 27, 373)
|
||||
EVT_CALL(SetCamSpeed, CAM_DEFAULT, 1)
|
||||
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
|
||||
EVT_CALL(InterpNpcYaw, NPC_SELF, 90, 1)
|
||||
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_MinhT_Run)
|
||||
EVT_CALL(NpcMoveTo, NPC_SELF, 175, 444, 0)
|
||||
EVT_CALL(NpcJump0, NPC_SELF, 200, 27, 435, 0)
|
||||
EVT_SWITCH(LVar5)
|
||||
EVT_CASE_EQ(0)
|
||||
EVT_CALL(NpcMoveTo, NPC_SELF, 200, 407, 0)
|
||||
EVT_CASE_EQ(1)
|
||||
EVT_CALL(NpcMoveTo, NPC_SELF, 220, 420, 0)
|
||||
EVT_CALL(NpcMoveTo, NPC_SELF, 200, 270, 0)
|
||||
EVT_CASE_EQ(2)
|
||||
EVT_CALL(NpcMoveTo, NPC_SELF, 310, 420, 0)
|
||||
EVT_CALL(NpcMoveTo, NPC_SELF, 330, 270, 0)
|
||||
EVT_CASE_EQ(3)
|
||||
EVT_CALL(NpcMoveTo, NPC_SELF, 310, 420, 0)
|
||||
EVT_CALL(NpcMoveTo, NPC_SELF, 330, 407, 0)
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_MinhT_Cheer)
|
||||
EVT_WAIT(20)
|
||||
EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_2A1, 0)
|
||||
EVT_SWITCH(LVar5)
|
||||
EVT_CASE_EQ(0)
|
||||
EVT_CALL(EnableModel, MODEL_o375, TRUE)
|
||||
EVT_CALL(EnableModel, MODEL_o370, TRUE)
|
||||
EVT_CASE_EQ(1)
|
||||
EVT_CALL(EnableModel, MODEL_o377, TRUE)
|
||||
EVT_CALL(EnableModel, MODEL_o372, TRUE)
|
||||
EVT_CASE_EQ(2)
|
||||
EVT_CALL(EnableModel, MODEL_o376, TRUE)
|
||||
EVT_CALL(EnableModel, MODEL_o371, TRUE)
|
||||
EVT_CASE_EQ(3)
|
||||
EVT_CALL(EnableModel, MODEL_o378, TRUE)
|
||||
EVT_CALL(EnableModel, MODEL_o373, TRUE)
|
||||
EVT_END_SWITCH
|
||||
EVT_IF_NE(LVar3, 3)
|
||||
EVT_THREAD
|
||||
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_END_IF
|
||||
EVT_CALL(InterpNpcYaw, NPC_SELF, 270, 1)
|
||||
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_MinhT_Run)
|
||||
EVT_SWITCH(LVar5)
|
||||
EVT_CASE_EQ(1)
|
||||
EVT_CALL(NpcMoveTo, NPC_SELF, 220, 420, 0)
|
||||
EVT_CASE_OR_EQ(2)
|
||||
EVT_CASE_OR_EQ(3)
|
||||
EVT_CALL(NpcMoveTo, NPC_SELF, 310, 420, 0)
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(NpcMoveTo, NPC_SELF, 186, 425, 0)
|
||||
EVT_CALL(NpcJump0, NPC_SELF, 175, 20, 444, 0)
|
||||
EVT_CALL(NpcMoveTo, NPC_SELF, 150, 480, 0)
|
||||
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_MinhT_Idle)
|
||||
EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_100, FALSE)
|
||||
EVT_IF_EQ(LVar3, 3)
|
||||
EVT_CALL(InterpNpcYaw, NPC_MinhT, 90, 0)
|
||||
EVT_EXEC_WAIT(N(EVS_Scene_FlowerGateAppears))
|
||||
EVT_CALL(SpeakToPlayer, NPC_MinhT, ANIM_MinhT_Talk, ANIM_MinhT_Idle, 0, MSG_MAC_Plaza_0070)
|
||||
EVT_SET(GB_StoryProgress, STORY_CH6_FLOWER_GATE_OPEN)
|
||||
EVT_END_IF
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(D_80258FFC_81987C) = {
|
||||
EVT_IF_NE(LVar5, 0)
|
||||
EVT_CALL(SpeakToPlayer, NPC_MinhT, ANIM_MinhT_Talk, ANIM_MinhT_Idle, 0, MSG_MAC_Plaza_0075)
|
||||
EVT_END_IF
|
||||
EVT_SET(LVar0, EVT_PTR(N(ItemList_MagicalSeeds)))
|
||||
EVT_SET(LVar1, 18)
|
||||
EVT_EXEC_WAIT(N(EVS_ChooseKeyItem))
|
||||
EVT_SWITCH(LVar0)
|
||||
EVT_CASE_EQ(0)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(-1)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(ITEM_MAGICAL_SEED1)
|
||||
EVT_SET(GF_MAC01_Planted_MagicalSeed1, TRUE)
|
||||
EVT_SET(LVar4, MSG_MAC_Plaza_0076)
|
||||
EVT_SET(LVar5, 0)
|
||||
EVT_EXEC_WAIT(N(EVS_MinhT_PlantSeed))
|
||||
EVT_CASE_EQ(ITEM_MAGICAL_SEED2)
|
||||
EVT_SET(GF_MAC01_Planted_MagicalSeed2, TRUE)
|
||||
EVT_SET(LVar4, MSG_MAC_Plaza_0076)
|
||||
EVT_SET(LVar5, 1)
|
||||
EVT_EXEC_WAIT(N(EVS_MinhT_PlantSeed))
|
||||
EVT_CASE_EQ(ITEM_MAGICAL_SEED3)
|
||||
EVT_SET(GF_MAC01_Planted_MagicalSeed3, TRUE)
|
||||
EVT_SET(LVar4, MSG_MAC_Plaza_0076)
|
||||
EVT_SET(LVar5, 2)
|
||||
EVT_EXEC_WAIT(N(EVS_MinhT_PlantSeed))
|
||||
EVT_CASE_EQ(ITEM_MAGICAL_SEED4)
|
||||
EVT_SET(GF_MAC01_Planted_MagicalSeed4, TRUE)
|
||||
EVT_SET(LVar4, MSG_MAC_Plaza_0076)
|
||||
EVT_SET(LVar5, 3)
|
||||
EVT_EXEC_WAIT(N(EVS_MinhT_PlantSeed))
|
||||
EVT_END_SWITCH
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInteract_MinhT) = {
|
||||
EVT_EXEC_WAIT(N(EVS_LetterPrompt_MinhT))
|
||||
EVT_EXEC_WAIT(N(EVS_LetterReward_MinhT))
|
||||
EVT_IF_NE(LVarC, 0)
|
||||
EVT_RETURN
|
||||
EVT_END_IF
|
||||
EVT_SET(LVar2, 0)
|
||||
EVT_SWITCH(GB_StoryProgress)
|
||||
EVT_CASE_LT(STORY_CH0_MET_STAR_SPIRITS)
|
||||
EVT_SET(LVar0, MSG_MAC_Plaza_0065)
|
||||
EVT_SET(LVar1, MSG_MAC_Plaza_0065)
|
||||
EVT_CASE_LT(STORY_CH3_STAR_SPIRIT_RESCUED)
|
||||
EVT_SET(LVar2, 1)
|
||||
EVT_CASE_LT(STORY_CH4_STAR_SPRIT_DEPARTED)
|
||||
EVT_SET(LVar0, GF_MAC01_ChasedShyGuysFromGardenA)
|
||||
EVT_ADD(LVar0, GF_MAC01_ChasedShyGuysFromGardenB)
|
||||
EVT_IF_EQ(LVar0, 2)
|
||||
EVT_SET(LVar2, 1)
|
||||
EVT_ELSE
|
||||
EVT_SET(LVar0, MSG_MAC_Plaza_006D)
|
||||
EVT_SET(LVar1, MSG_MAC_Plaza_006E)
|
||||
EVT_END_IF
|
||||
EVT_CASE_LT(STORY_CH6_FLOWER_GATE_OPEN)
|
||||
EVT_SET(LVar2, 1)
|
||||
EVT_CASE_LT(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE)
|
||||
EVT_SET(LVar0, MSG_MAC_Plaza_0071)
|
||||
EVT_SET(LVar1, MSG_MAC_Plaza_0071)
|
||||
EVT_CASE_LT(STORY_CH7_STAR_SPRIT_DEPARTED)
|
||||
EVT_SET(LVar0, MSG_MAC_Plaza_0072)
|
||||
EVT_SET(LVar1, MSG_MAC_Plaza_0072)
|
||||
EVT_CASE_LT(STORY_EPILOGUE)
|
||||
EVT_SET(LVar0, MSG_MAC_Plaza_0073)
|
||||
EVT_SET(LVar1, MSG_MAC_Plaza_0073)
|
||||
EVT_CASE_GE(STORY_EPILOGUE)
|
||||
EVT_SET(LVar0, MSG_Outro_0042)
|
||||
EVT_SET(LVar1, MSG_Outro_0042)
|
||||
EVT_END_SWITCH
|
||||
EVT_IF_EQ(LVar2, 1)
|
||||
EVT_SET(LVar3, GF_MAC01_Planted_MagicalSeed1)
|
||||
EVT_ADD(LVar3, GF_MAC01_Planted_MagicalSeed2)
|
||||
EVT_ADD(LVar3, GF_MAC01_Planted_MagicalSeed3)
|
||||
EVT_ADD(LVar3, GF_MAC01_Planted_MagicalSeed4)
|
||||
EVT_SWITCH(GB_StoryProgress)
|
||||
EVT_CASE_RANGE(STORY_CH5_STAR_SPRIT_DEPARTED, STORY_CH5_RETURNED_TO_TOAD_TOWN)
|
||||
EVT_SET(LVar4, GF_MAC02_Gift_MagicalSeed1)
|
||||
EVT_ADD(LVar4, GF_IWA02_Gift_MagicalSeed2)
|
||||
EVT_ADD(LVar4, GF_MIM04_Gift_MagicalSeed3)
|
||||
EVT_ADD(LVar4, GF_JAN03_Gift_MagicalSeed4)
|
||||
EVT_SET(LVar5, GF_MAC01_HeardAboutBubulbs)
|
||||
EVT_IF_EQ(LVar5, 0)
|
||||
EVT_CALL(SpeakToPlayer, NPC_MinhT, ANIM_MinhT_Talk, ANIM_MinhT_Idle, 0, MSG_MAC_Plaza_0074)
|
||||
EVT_SET(GF_MAC01_HeardAboutBubulbs, TRUE)
|
||||
EVT_END_IF
|
||||
EVT_IF_NE(LVar4, 0)
|
||||
EVT_EXEC_WAIT(N(D_80258FFC_81987C))
|
||||
EVT_RETURN
|
||||
EVT_END_IF
|
||||
EVT_CALL(SpeakToPlayer, NPC_MinhT, ANIM_MinhT_Talk, ANIM_MinhT_Idle, 0, MSG_MAC_Plaza_0075)
|
||||
EVT_RETURN
|
||||
EVT_END_SWITCH
|
||||
EVT_SWITCH(LVar3)
|
||||
EVT_CASE_EQ(0)
|
||||
EVT_SET(LVar0, MSG_MAC_Plaza_0066)
|
||||
EVT_SET(LVar1, MSG_MAC_Plaza_0066)
|
||||
EVT_CASE_EQ(1)
|
||||
EVT_SET(LVar0, MSG_MAC_Plaza_0068)
|
||||
EVT_SET(LVar1, MSG_MAC_Plaza_0068)
|
||||
EVT_CASE_EQ(2)
|
||||
EVT_SET(LVar0, MSG_MAC_Plaza_006A)
|
||||
EVT_SET(LVar1, MSG_MAC_Plaza_006A)
|
||||
EVT_CASE_EQ(3)
|
||||
EVT_SET(LVar0, MSG_MAC_Plaza_006C)
|
||||
EVT_SET(LVar1, MSG_MAC_Plaza_006C)
|
||||
EVT_END_SWITCH
|
||||
EVT_END_IF
|
||||
EVT_IF_EQ(AF_MAC_14, FALSE)
|
||||
EVT_SET(AF_MAC_14, TRUE)
|
||||
EVT_ELSE
|
||||
EVT_SET(LVar0, LVar1)
|
||||
EVT_SET(AF_MAC_14, FALSE)
|
||||
EVT_END_IF
|
||||
EVT_CALL(SpeakToPlayer, NPC_MinhT, ANIM_MinhT_Talk, ANIM_MinhT_Idle, 0, LVar0)
|
||||
EVT_IF_EQ(LVar2, 1)
|
||||
EVT_SET(LVar0, EVT_PTR(N(ItemList_MagicalSeeds)))
|
||||
EVT_SET(LVar1, 18)
|
||||
EVT_EXEC_WAIT(N(EVS_ChooseKeyItem))
|
||||
EVT_SWITCH(LVar0)
|
||||
EVT_CASE_EQ(0)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(-1)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(ITEM_MAGICAL_SEED1)
|
||||
EVT_SET(GF_MAC01_Planted_MagicalSeed1, TRUE)
|
||||
EVT_SET(LVar4, MSG_MAC_Plaza_0067)
|
||||
EVT_SET(LVar5, 0)
|
||||
EVT_EXEC_WAIT(N(EVS_MinhT_PlantSeed))
|
||||
EVT_CASE_EQ(ITEM_MAGICAL_SEED2)
|
||||
EVT_SET(GF_MAC01_Planted_MagicalSeed2, TRUE)
|
||||
EVT_SET(LVar4, MSG_MAC_Plaza_0069)
|
||||
EVT_SET(LVar5, 1)
|
||||
EVT_EXEC_WAIT(N(EVS_MinhT_PlantSeed))
|
||||
EVT_CASE_EQ(ITEM_MAGICAL_SEED3)
|
||||
EVT_SET(GF_MAC01_Planted_MagicalSeed3, TRUE)
|
||||
EVT_SET(LVar4, MSG_MAC_Plaza_006B)
|
||||
EVT_SET(LVar5, 2)
|
||||
EVT_EXEC_WAIT(N(EVS_MinhT_PlantSeed))
|
||||
EVT_CASE_EQ(ITEM_MAGICAL_SEED4)
|
||||
EVT_SET(LVar5, 3)
|
||||
EVT_EXEC_WAIT(N(EVS_MinhT_PlantSeed))
|
||||
EVT_END_SWITCH
|
||||
EVT_END_IF
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcAI_MinhT) = {
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcIdle_MinhT) = {
|
||||
EVT_THREAD
|
||||
EVT_LOOP(0)
|
||||
EVT_SET(LVar0, GF_MAC01_ChasedShyGuysFromGardenA)
|
||||
EVT_ADD(LVar0, GF_MAC01_ChasedShyGuysFromGardenB)
|
||||
EVT_IF_EQ(LVar0, 2)
|
||||
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_MinhT_Idle)
|
||||
EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAGS_400000, 0)
|
||||
EVT_CALL(BindNpcAI, NPC_SELF, EVT_PTR(N(EVS_NpcAI_MinhT)))
|
||||
EVT_BREAK_LOOP
|
||||
EVT_END_IF
|
||||
EVT_WAIT(1)
|
||||
EVT_END_LOOP
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2)
|
||||
EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(3.0))
|
||||
EVT_ADD(LVar0, 25)
|
||||
EVT_LOOP(0)
|
||||
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_MinhT_Run)
|
||||
EVT_CALL(NpcMoveTo, NPC_SELF, LVar0, LVar2, 0)
|
||||
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_MinhT_Idle)
|
||||
EVT_CALL(InterpNpcYaw, NPC_SELF, 270, 7)
|
||||
EVT_WAIT(10)
|
||||
EVT_CALL(InterpNpcYaw, NPC_SELF, 90, 7)
|
||||
EVT_WAIT(10)
|
||||
EVT_ADD(LVar0, -50)
|
||||
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_MinhT_Run)
|
||||
EVT_CALL(NpcMoveTo, NPC_SELF, LVar0, LVar2, 0)
|
||||
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_MinhT_Idle)
|
||||
EVT_CALL(InterpNpcYaw, NPC_SELF, 90, 7)
|
||||
EVT_WAIT(10)
|
||||
EVT_CALL(InterpNpcYaw, NPC_SELF, 270, 7)
|
||||
EVT_WAIT(10)
|
||||
EVT_ADD(LVar0, 50)
|
||||
EVT_END_LOOP
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInit_MinhT) = {
|
||||
EVT_SWITCH(GB_StoryProgress)
|
||||
EVT_CASE_RANGE(STORY_CH3_STAR_SPRIT_DEPARTED, STORY_CH4_STAR_SPIRIT_RESCUED)
|
||||
EVT_SET(GF_MAC01_ShyGuysTramplingGarden, TRUE)
|
||||
EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAGS_400000, 1)
|
||||
EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_MinhT)))
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_MinhT_Idle)
|
||||
EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_MinhT)))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
// FLOWER GATE
|
||||
|
||||
EvtScript N(EVS_ExitFlowerGate) = {
|
||||
EVT_SET_GROUP(EVT_GROUP_1B)
|
||||
EVT_CALL(DisablePlayerInput, TRUE)
|
||||
EVT_WAIT(2)
|
||||
EVT_CALL(GetPlayerActionState, LVar3)
|
||||
EVT_SET(LVar4, 0)
|
||||
EVT_IF_EQ(LVar3, ACTION_STATE_IDLE)
|
||||
EVT_ADD(LVar4, 1)
|
||||
EVT_END_IF
|
||||
EVT_IF_EQ(LVar3, ACTION_STATE_WALK)
|
||||
EVT_ADD(LVar4, 1)
|
||||
EVT_END_IF
|
||||
EVT_IF_EQ(LVar3, ACTION_STATE_RUN)
|
||||
EVT_ADD(LVar4, 1)
|
||||
EVT_END_IF
|
||||
EVT_IF_EQ(LVar4, 0)
|
||||
EVT_CALL(DisablePlayerInput, FALSE)
|
||||
EVT_RETURN
|
||||
EVT_END_IF
|
||||
EVT_CALL(N(SetPartnerTetherClose))
|
||||
EVT_CALL(PlaySoundAtCollider, COLLIDER_deilitf, SOUND_2A2, 0)
|
||||
EVT_EXEC_WAIT(N(EVS_FadeInFlowerGateGlowAlpha))
|
||||
EVT_SET(LVar0, 3)
|
||||
EVT_EXEC_GET_TID(N(EVS_ModulateFlowerGateGlowAlpha), LVar2)
|
||||
EVT_CALL(PlayerMoveTo, 300, 370, 15)
|
||||
EVT_CALL(InterpPlayerYaw, -22, 0)
|
||||
EVT_THREAD
|
||||
EVT_CALL(PlaySoundAtCollider, COLLIDER_deilitf, SOUND_1CF, 0)
|
||||
EVT_CALL(MakeLerp, 0, -120, 15, EASING_LINEAR)
|
||||
EVT_LOOP(0)
|
||||
EVT_CALL(UpdateLerp)
|
||||
EVT_CALL(RotateGroup, MODEL_to_flo, LVar0, 0, 1, 0)
|
||||
EVT_WAIT(1)
|
||||
EVT_IF_EQ(LVar1, 0)
|
||||
EVT_BREAK_LOOP
|
||||
EVT_END_IF
|
||||
EVT_END_LOOP
|
||||
EVT_WAIT(45)
|
||||
EVT_CALL(MakeLerp, -120, 0, 15, EASING_LINEAR)
|
||||
EVT_LOOP(0)
|
||||
EVT_CALL(UpdateLerp)
|
||||
EVT_CALL(RotateGroup, MODEL_to_flo, 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_deilitf, SOUND_1D0, 0)
|
||||
EVT_END_THREAD
|
||||
EVT_WAIT(15)
|
||||
EVT_CALL(PlayerMoveTo, 257, 300, 30)
|
||||
EVT_WAIT(60)
|
||||
EVT_CALL(DisablePlayerPhysics, TRUE)
|
||||
EVT_CALL(SetPlayerPos, 0, -500, 0)
|
||||
EVT_CALL(N(ResetPartnerTetherDist))
|
||||
EVT_CALL(DisablePartnerAI, 0)
|
||||
EVT_CALL(SetNpcPos, NPC_PARTNER, 0, -500, 0)
|
||||
EVT_LOOP(0)
|
||||
EVT_WAIT(1)
|
||||
EVT_IS_THREAD_RUNNING(LVar2, LVar0)
|
||||
EVT_IF_EQ(LVar0, 0)
|
||||
EVT_BREAK_LOOP
|
||||
EVT_END_IF
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(PlaySoundAtCollider, COLLIDER_deilitf, SOUND_6A2, 0)
|
||||
EVT_EXEC_WAIT(N(EVS_FadeOutFlowerGateGlowAlpha))
|
||||
EVT_CALL(EnableGroup, MODEL_to_flo, FALSE)
|
||||
EVT_CALL(EnableGroup, MODEL_r_door, TRUE)
|
||||
EVT_CALL(MakeLerp, 180, 360, 20, EASING_LINEAR)
|
||||
EVT_LOOP(0)
|
||||
EVT_CALL(UpdateLerp)
|
||||
EVT_CALL(RotateModel, MODEL_r_door, LVar0, 0, 1, 0)
|
||||
EVT_CALL(RotateModel, MODEL_r_gate, LVar0, 0, 1, 0)
|
||||
EVT_WAIT(1)
|
||||
EVT_IF_EQ(LVar1, 0)
|
||||
EVT_BREAK_LOOP
|
||||
EVT_END_IF
|
||||
EVT_END_LOOP
|
||||
EVT_IF_EQ(GF_StartedChapter6, FALSE)
|
||||
EVT_SET(GF_StartedChapter6, TRUE)
|
||||
EVT_CALL(FadeOutMusic, 0, 1500)
|
||||
EVT_CALL(GotoMapSpecial, EVT_PTR("kmr_22"), kmr_22_ENTRY_6, TRANSITION_6)
|
||||
EVT_WAIT(100)
|
||||
EVT_RETURN
|
||||
EVT_END_IF
|
||||
EVT_CALL(GotoMap, EVT_PTR("flo_00"), flo_00_ENTRY_0)
|
||||
EVT_WAIT(100)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_EnterFlowerGate) = {
|
||||
EVT_CALL(DisablePlayerInput, TRUE)
|
||||
EVT_CALL(InterpPlayerYaw, 180, 2)
|
||||
EVT_CALL(SetPlayerPos, 264, 27, 320)
|
||||
EVT_CALL(DisablePartnerAI, 0)
|
||||
EVT_CALL(SetNpcPos, NPC_PARTNER, 264, 27, 320)
|
||||
EVT_CALL(PlaySoundAtCollider, COLLIDER_deilitf, SOUND_2A2, 0)
|
||||
EVT_EXEC_WAIT(N(EVS_FadeInFlowerGateGlowAlpha))
|
||||
EVT_SET(LVar0, 2)
|
||||
EVT_EXEC_GET_TID(N(EVS_ModulateFlowerGateGlowAlpha), LVar2)
|
||||
EVT_CALL(PlaySoundAtCollider, COLLIDER_deilitf, SOUND_1CF, 0)
|
||||
EVT_CALL(MakeLerp, 0, -120, 15, EASING_LINEAR)
|
||||
EVT_LOOP(0)
|
||||
EVT_CALL(UpdateLerp)
|
||||
EVT_CALL(RotateGroup, MODEL_to_flo, LVar0, 0, 1, 0)
|
||||
EVT_WAIT(1)
|
||||
EVT_IF_EQ(LVar1, 0)
|
||||
EVT_BREAK_LOOP
|
||||
EVT_END_IF
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(EnablePartnerAI)
|
||||
EVT_CALL(N(SetPartnerTetherClose))
|
||||
EVT_CALL(PlayerMoveTo, 264, 407, 30)
|
||||
EVT_CALL(MakeLerp, -120, 0, 15, EASING_LINEAR)
|
||||
EVT_LOOP(0)
|
||||
EVT_CALL(UpdateLerp)
|
||||
EVT_CALL(RotateGroup, MODEL_to_flo, 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_deilitf, SOUND_1D0, 0)
|
||||
EVT_LOOP(0)
|
||||
EVT_WAIT(1)
|
||||
EVT_IS_THREAD_RUNNING(LVar2, LVar0)
|
||||
EVT_IF_EQ(LVar0, 0)
|
||||
EVT_BREAK_LOOP
|
||||
EVT_END_IF
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_stopper, COLLIDER_FLAGS_UPPER_MASK)
|
||||
EVT_CALL(N(ResetPartnerTetherDist))
|
||||
EVT_CALL(DisablePlayerInput, FALSE)
|
||||
EVT_CALL(PlaySoundAtCollider, COLLIDER_deilitf, SOUND_6A2, 0)
|
||||
EVT_EXEC_WAIT(N(EVS_FadeOutFlowerGateGlowAlpha))
|
||||
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_stopper, COLLIDER_FLAGS_UPPER_MASK)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_SetupFlowerModels) = {
|
||||
EVT_IF_EQ(GF_MAC01_Planted_MagicalSeed1, FALSE)
|
||||
EVT_CALL(EnableModel, MODEL_o375, FALSE)
|
||||
EVT_CALL(EnableModel, MODEL_o370, FALSE)
|
||||
EVT_END_IF
|
||||
EVT_IF_EQ(GF_MAC01_Planted_MagicalSeed2, FALSE)
|
||||
EVT_CALL(EnableModel, MODEL_o377, FALSE)
|
||||
EVT_CALL(EnableModel, MODEL_o372, FALSE)
|
||||
EVT_END_IF
|
||||
EVT_IF_EQ(GF_MAC01_Planted_MagicalSeed3, FALSE)
|
||||
EVT_CALL(EnableModel, MODEL_o376, FALSE)
|
||||
EVT_CALL(EnableModel, MODEL_o371, FALSE)
|
||||
EVT_END_IF
|
||||
EVT_IF_EQ(GF_MAC01_Planted_MagicalSeed4, FALSE)
|
||||
EVT_CALL(EnableModel, MODEL_o378, FALSE)
|
||||
EVT_CALL(EnableModel, MODEL_o373, FALSE)
|
||||
EVT_END_IF
|
||||
EVT_IF_LT(GB_StoryProgress, STORY_CH6_FLOWER_GATE_OPEN)
|
||||
EVT_CALL(EnableGroup, MODEL_to_flo, FALSE)
|
||||
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitf, COLLIDER_FLAGS_UPPER_MASK)
|
||||
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_door_ura, COLLIDER_FLAGS_UPPER_MASK)
|
||||
EVT_END_IF
|
||||
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_stopper, COLLIDER_FLAGS_UPPER_MASK)
|
||||
EVT_CALL(EnableModel, MODEL_pica, FALSE)
|
||||
EVT_CALL(EnableModel, MODEL_r_door, FALSE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
477
src/world/area_mac/mac_01/npc/post_office.inc.c
Normal file
477
src/world/area_mac/mac_01/npc/post_office.inc.c
Normal file
@ -0,0 +1,477 @@
|
||||
typedef struct PostOfficeEntry {
|
||||
/* 0x00 */ s32 partnerID;
|
||||
/* 0x04 */ s32 itemID;
|
||||
/* 0x08 */ s32 letterFromMessage;
|
||||
/* 0x0C */ s32 letterDescMessage;
|
||||
/* 0x10 */ s32 letterBodyMessage;
|
||||
} PostOfficeEntry; // size = 0x14
|
||||
|
||||
#define LETTER_MESSAGES(name) \
|
||||
MSG_Document_Letter_##name##_From, \
|
||||
MSG_Document_Letter_##name##_Desc, \
|
||||
MSG_Document_Letter_##name##_Body
|
||||
|
||||
PostOfficeEntry N(PostOfficeLetters)[] = {
|
||||
{ PARTNER_GOOMBARIO, ITEM_LETTER25, LETTER_MESSAGES(Goombario2) },
|
||||
{ PARTNER_GOOMBARIO, ITEM_LETTER25, LETTER_MESSAGES(Goombario1) },
|
||||
{ PARTNER_GOOMBARIO, ITEM_LETTER25, LETTER_MESSAGES(Goombario3) },
|
||||
{ PARTNER_KOOPER, ITEM_LETTER25, LETTER_MESSAGES(Kooper3) },
|
||||
{ PARTNER_KOOPER, ITEM_LETTER25, LETTER_MESSAGES(Kooper2) },
|
||||
{ PARTNER_KOOPER, ITEM_LETTER25, LETTER_MESSAGES(Kooper1) },
|
||||
{ PARTNER_BOMBETTE, ITEM_LETTER25, LETTER_MESSAGES(Bombette2) },
|
||||
{ PARTNER_BOMBETTE, ITEM_LETTER25, LETTER_MESSAGES(Bombette3) },
|
||||
{ PARTNER_BOMBETTE, ITEM_LETTER25, LETTER_MESSAGES(Bombette1) },
|
||||
{ PARTNER_PARAKARRY, ITEM_LETTER25, LETTER_MESSAGES(Parakarry1) },
|
||||
{ PARTNER_PARAKARRY, ITEM_LETTER25, LETTER_MESSAGES(Parakarry2) },
|
||||
{ PARTNER_BOW, ITEM_LETTER25, LETTER_MESSAGES(Bow1) },
|
||||
{ PARTNER_BOW, ITEM_LETTER25, LETTER_MESSAGES(Bow2) },
|
||||
{ PARTNER_WATT, ITEM_LETTER25, LETTER_MESSAGES(Watt1) },
|
||||
{ PARTNER_WATT, ITEM_LETTER25, LETTER_MESSAGES(Watt2) },
|
||||
{ PARTNER_SUSHIE, ITEM_LETTER25, LETTER_MESSAGES(Sushie2) },
|
||||
{ PARTNER_SUSHIE, ITEM_LETTER25, LETTER_MESSAGES(Sushie1) },
|
||||
{ PARTNER_LAKILESTER, ITEM_LETTER25, LETTER_MESSAGES(Lakilester2) },
|
||||
{ PARTNER_LAKILESTER, ITEM_LETTER25, LETTER_MESSAGES(Lakilester1) },
|
||||
};
|
||||
|
||||
API_CALLABLE(N(func_80244E90_805710)) {
|
||||
PlayerData* playerData = &gPlayerData;
|
||||
s32 var_s2 = -1;
|
||||
u32 i;
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(N(PostOfficeLetters)); i++) {
|
||||
if (playerData->partners[N(PostOfficeLetters)[i].partnerID].enabled &&
|
||||
evt_get_variable(NULL, GF_MAC01_UnlockedLetter_00 + i))
|
||||
{
|
||||
if (!evt_get_variable(NULL, GF_MAC01_ReadLetter_00 + i)) {
|
||||
var_s2 = 1;
|
||||
break;
|
||||
} else {
|
||||
var_s2 = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
script->varTable[0] = var_s2;
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
s32 func_80244F5C_8057DC(s32 partner) {
|
||||
s32 ret = 0;
|
||||
u32 i;
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(N(PostOfficeLetters)); i++) {
|
||||
if (N(PostOfficeLetters)[i].partnerID == partner &&
|
||||
evt_get_variable(NULL, GF_MAC01_UnlockedLetter_00 + i))
|
||||
{
|
||||
if (ret == 0) {
|
||||
ret = 1;
|
||||
}
|
||||
if (!evt_get_variable(NULL, GF_MAC01_ReadLetter_00 + i)) {
|
||||
ret = 2;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
API_CALLABLE(N(func_80245018_805898)) {
|
||||
D_80262F68 = 0;
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
API_CALLABLE(N(func_80245028_8058A8)) {
|
||||
PopupMenu* menu = &D_80262C38;
|
||||
PartnerPopupProperties* temp_s2;
|
||||
PlayerData* playerData = &gPlayerData;
|
||||
s32 partnerID;
|
||||
s32 cond;
|
||||
s32 numEntries;
|
||||
s32 i;
|
||||
|
||||
if (isInitialCall) {
|
||||
numEntries = 0;
|
||||
|
||||
for (i = 1; i < 12; i++) {
|
||||
partnerID = D_8008EEC0[i];
|
||||
if (playerData->partners[partnerID].enabled && partnerID != PARTNER_GOOMPA) {
|
||||
temp_s2 = &gPartnerPopupProperties[partnerID];
|
||||
cond = func_80244F5C_8057DC(partnerID);
|
||||
if (cond) {
|
||||
menu->ptrIcon[numEntries] = wPartnerHudScripts[partnerID];
|
||||
menu->userIndex[numEntries] = partnerID;
|
||||
menu->enabled[numEntries] = TRUE;
|
||||
menu->nameMsg[numEntries] = temp_s2->nameMsg;
|
||||
menu->descMsg[numEntries] = temp_s2->worldDescMsg;
|
||||
menu->value[numEntries] = playerData->partners[partnerID].level;
|
||||
if (cond == TRUE) {
|
||||
menu->enabled[numEntries] = FALSE;
|
||||
menu->ptrIcon[numEntries] = wDisabledPartnerHudScripts[partnerID];
|
||||
}
|
||||
numEntries++;
|
||||
}
|
||||
}
|
||||
}
|
||||
menu->popupType = POPUP_MENU_POST_OFFICE;
|
||||
menu->numEntries = numEntries;
|
||||
menu->initialPos = D_80262F68;
|
||||
create_popup_menu(menu);
|
||||
status_menu_respond_to_changes();
|
||||
close_status_menu();
|
||||
script->functionTemp[0] = 0;
|
||||
}
|
||||
|
||||
if (script->functionTemp[0] == 0) {
|
||||
script->functionTemp[1] = menu->result;
|
||||
if (script->functionTemp[1] != 0) {
|
||||
hide_popup_menu();
|
||||
} else {
|
||||
return ApiStatus_BLOCK;
|
||||
}
|
||||
}
|
||||
|
||||
script->functionTemp[0]++;
|
||||
if (script->functionTemp[0] < 20) {
|
||||
return ApiStatus_BLOCK;
|
||||
}
|
||||
|
||||
destroy_popup_menu();
|
||||
if (script->functionTemp[1] == 255) {
|
||||
script->varTable[1] = -1;
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
partnerID = menu->userIndex[script->functionTemp[1] - 1];
|
||||
script->varTable[1] = partnerID; // TODO required to match (use of partnerID temp)
|
||||
D_80262F68 = script->functionTemp[1] - 1;
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
API_CALLABLE(N(func_8024522C_805AAC)) {
|
||||
s32 vt10 = script->varTable[10];
|
||||
PopupMenu* menu = &D_80262C38;
|
||||
IconHudScriptPair* scriptPair;
|
||||
s32 letterIdx;
|
||||
s32 hasRead;
|
||||
s32 isUnlocked;
|
||||
s32 numEntries;
|
||||
u32 i;
|
||||
|
||||
if (isInitialCall) {
|
||||
numEntries = 0;
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(N(PostOfficeLetters)); i++) {
|
||||
isUnlocked = evt_get_variable(NULL, GF_MAC01_UnlockedLetter_00 + i);
|
||||
hasRead = evt_get_variable(NULL, GF_MAC01_ReadLetter_00 + i);
|
||||
if (isUnlocked && vt10 == N(PostOfficeLetters)[i].partnerID) {
|
||||
scriptPair = &gItemHudScripts[gItemTable[84].hudElemID];
|
||||
menu->userIndex[numEntries] = i;
|
||||
menu->nameMsg[numEntries] = N(PostOfficeLetters)[i].letterFromMessage;
|
||||
menu->descMsg[numEntries] = N(PostOfficeLetters)[i].letterDescMessage;
|
||||
menu->value[numEntries] = 0;
|
||||
if (hasRead) {
|
||||
menu->ptrIcon[numEntries] = scriptPair->disabled;
|
||||
menu->enabled[numEntries] = FALSE;
|
||||
} else {
|
||||
menu->ptrIcon[numEntries] = scriptPair->enabled;
|
||||
menu->enabled[numEntries] = TRUE;
|
||||
}
|
||||
numEntries++;
|
||||
}
|
||||
}
|
||||
menu->popupType = 8;
|
||||
menu->numEntries = numEntries;
|
||||
menu->initialPos = 0;
|
||||
create_popup_menu(menu);
|
||||
status_menu_respond_to_changes();
|
||||
close_status_menu();
|
||||
script->functionTemp[0] = 0;
|
||||
}
|
||||
|
||||
if (script->functionTemp[0] == 0) {
|
||||
script->functionTemp[1] = menu->result;
|
||||
if (script->functionTemp[1] != 0) {
|
||||
hide_popup_menu();
|
||||
} else {
|
||||
return ApiStatus_BLOCK;
|
||||
}
|
||||
}
|
||||
|
||||
script->functionTemp[0]++;
|
||||
if (script->functionTemp[0] < 20) {
|
||||
return ApiStatus_BLOCK;
|
||||
}
|
||||
|
||||
destroy_popup_menu();
|
||||
if (script->functionTemp[1] == 255) {
|
||||
script->varTable[1] = -1;
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
letterIdx = menu->userIndex[script->functionTemp[1] - 1];
|
||||
script->varTable[1] = letterIdx;
|
||||
script->varTable[0] = N(PostOfficeLetters)[letterIdx].letterBodyMessage;
|
||||
evt_set_variable(NULL, GF_MAC01_ReadLetter_00 + letterIdx, 1);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
API_CALLABLE(N(func_80245440_805CC0)) {
|
||||
if (gPlayerData.currentPartner == script->varTable[10]) {
|
||||
script->varTable[1] = 0;
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
switch_to_partner(script->varTable[10]);
|
||||
script->varTable[1] = 1;
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
s32 N(ItemList_Mailbag)[] = {
|
||||
ITEM_MAILBAG,
|
||||
ITEM_NONE
|
||||
};
|
||||
|
||||
EvtScript N(EVS_ItemPrompt_Mailbag) = {
|
||||
EVT_CALL(FindKeyItem, ITEM_MAILBAG, LVar0)
|
||||
EVT_IF_EQ(LVar0, -1)
|
||||
EVT_CALL(SpeakToPlayer, NPC_Postmaster, ANIM_Postmaster_Talk, ANIM_Postmaster_Idle, 0, MSG_MAC_Plaza_0060)
|
||||
EVT_ELSE
|
||||
EVT_CALL(SpeakToPlayer, NPC_Postmaster, ANIM_Postmaster_Talk, ANIM_Postmaster_Idle, 0, MSG_MAC_Plaza_0061)
|
||||
EVT_SET(LVar0, EVT_PTR(N(ItemList_Mailbag)))
|
||||
EVT_SET(LVar1, 3)
|
||||
EVT_EXEC_WAIT(N(EVS_ChooseKeyItem))
|
||||
EVT_SWITCH(LVar0)
|
||||
EVT_CASE_EQ(-1)
|
||||
EVT_CALL(SpeakToPlayer, NPC_Postmaster, ANIM_Postmaster_Talk, ANIM_Postmaster_Idle, 0, MSG_MAC_Plaza_0063)
|
||||
EVT_CASE_DEFAULT
|
||||
EVT_CALL(SpeakToPlayer, NPC_Postmaster, ANIM_Postmaster_Talk, ANIM_Postmaster_Idle, 0, MSG_MAC_Plaza_0062)
|
||||
EVT_SET(GF_MAC01_MailbagReturned, TRUE)
|
||||
EVT_WAIT(10)
|
||||
EVT_GIVE_STAR_PIECE()
|
||||
EVT_WAIT(10)
|
||||
EVT_END_SWITCH
|
||||
EVT_END_IF
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInteract_Postmaster) = {
|
||||
EVT_IF_GE(GB_StoryProgress, STORY_CH3_STAR_SPRIT_DEPARTED)
|
||||
EVT_IF_EQ(GF_MAC01_MailbagReturned, FALSE)
|
||||
EVT_EXEC_WAIT(N(EVS_ItemPrompt_Mailbag))
|
||||
EVT_RETURN
|
||||
EVT_END_IF
|
||||
EVT_END_IF
|
||||
EVT_IF_EQ(GF_MAC01_Met_Postmaster, FALSE)
|
||||
EVT_SET(GF_MAC01_Met_Postmaster, TRUE)
|
||||
EVT_CALL(N(func_80244E90_805710))
|
||||
EVT_SWITCH(LVar0)
|
||||
EVT_CASE_EQ(-1)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(1)
|
||||
EVT_CALL(SpeakToPlayer, NPC_Postmaster, ANIM_Postmaster_Talk, ANIM_Postmaster_Idle, 0, MSG_MAC_Plaza_0055)
|
||||
EVT_END_SWITCH
|
||||
EVT_ELSE
|
||||
EVT_CALL(N(func_80244E90_805710))
|
||||
EVT_SWITCH(LVar0)
|
||||
EVT_CASE_EQ(-1)
|
||||
EVT_RETURN
|
||||
EVT_CASE_EQ(0)
|
||||
EVT_CALL(SpeakToPlayer, NPC_Postmaster, ANIM_Postmaster_Talk, ANIM_Postmaster_Idle, 0, MSG_MAC_Plaza_0057)
|
||||
EVT_CASE_EQ(1)
|
||||
EVT_CALL(SpeakToPlayer, NPC_Postmaster, ANIM_Postmaster_Talk, ANIM_Postmaster_Idle, 0, MSG_MAC_Plaza_0056)
|
||||
EVT_END_SWITCH
|
||||
EVT_END_IF
|
||||
EVT_CALL(N(func_80245018_805898))
|
||||
EVT_LABEL(0)
|
||||
EVT_CALL(N(func_80245028_8058A8))
|
||||
EVT_WAIT(5)
|
||||
EVT_IF_EQ(LVar1, -1)
|
||||
EVT_CALL(SpeakToPlayer, NPC_Postmaster, ANIM_Postmaster_Talk, ANIM_Postmaster_Idle, 0, MSG_MAC_Plaza_0059)
|
||||
EVT_CALL(ShowChoice, MSG_Choice_000D)
|
||||
EVT_CALL(CloseMessage)
|
||||
EVT_IF_EQ(LVar0, 0)
|
||||
EVT_GOTO(99)
|
||||
EVT_ELSE
|
||||
EVT_GOTO(0)
|
||||
EVT_END_IF
|
||||
EVT_END_IF
|
||||
EVT_SET(LVarA, LVar1)
|
||||
EVT_CALL(N(func_8024522C_805AAC))
|
||||
EVT_WAIT(5)
|
||||
EVT_IF_EQ(LVar1, -1)
|
||||
EVT_GOTO(0)
|
||||
EVT_END_IF
|
||||
EVT_CALL(N(func_80245440_805CC0))
|
||||
EVT_IF_EQ(LVar1, 1)
|
||||
EVT_WAIT(30)
|
||||
EVT_CALL(InterpNpcYaw, NPC_PARTNER, 90, 1)
|
||||
EVT_END_IF
|
||||
EVT_CALL(SpeakToPlayer, NPC_Postmaster, ANIM_Postmaster_Talk, ANIM_Postmaster_Idle, 0, MSG_MAC_Plaza_005C)
|
||||
EVT_CALL(ShowMessageAtScreenPos, LVar0, 160, 40)
|
||||
EVT_WAIT(5)
|
||||
EVT_IF_LT(GB_StoryProgress, STORY_CH1_DEFEATED_JR_TROOPA)
|
||||
EVT_GOTO(99)
|
||||
EVT_END_IF
|
||||
EVT_CALL(SpeakToPlayer, NPC_Postmaster, ANIM_Postmaster_Talk, ANIM_Postmaster_Idle, 0, MSG_MAC_Plaza_005A)
|
||||
EVT_CALL(ShowChoice, MSG_Choice_000D)
|
||||
EVT_CALL(CloseMessage)
|
||||
EVT_IF_EQ(LVar0, 0)
|
||||
EVT_GOTO(0)
|
||||
EVT_END_IF
|
||||
EVT_LABEL(99)
|
||||
EVT_IF_EQ(GF_MAC01_CheckedForLetters, FALSE)
|
||||
EVT_CALL(SpeakToPlayer, NPC_Postmaster, ANIM_Postmaster_Talk, ANIM_Postmaster_Idle, 0, MSG_MAC_Plaza_005D)
|
||||
EVT_SET(GF_MAC01_CheckedForLetters, TRUE)
|
||||
EVT_ELSE
|
||||
EVT_CALL(SpeakToPlayer, NPC_Postmaster, ANIM_Postmaster_Talk, ANIM_Postmaster_Idle, 0, MSG_MAC_Plaza_005E)
|
||||
EVT_END_IF
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInteract_Postmaster_Epilogue) = {
|
||||
EVT_CALL(SpeakToPlayer, NPC_Postmaster, ANIM_Postmaster_Talk, ANIM_Postmaster_Idle, 0, MSG_Outro_0043)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInit_Postmaster) = {
|
||||
EVT_CALL(SetNpcCollisionSize, NPC_SELF, 36, 42)
|
||||
EVT_SWITCH(GB_StoryProgress)
|
||||
EVT_CASE_GE(STORY_EPILOGUE)
|
||||
EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Postmaster_Epilogue)))
|
||||
EVT_CASE_DEFAULT
|
||||
EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Postmaster)))
|
||||
EVT_END_SWITCH
|
||||
EVT_IF_GE(GB_StoryProgress, STORY_CH3_BOW_JOINED_PARTY)
|
||||
EVT_SET(GF_MAC01_UnlockedLetter_01, TRUE)
|
||||
EVT_END_IF
|
||||
EVT_IF_GE(GB_StoryProgress, STORY_CH5_REACHED_LAVA_LAVA_ISLAND)
|
||||
EVT_SET(GF_MAC01_UnlockedLetter_00, TRUE)
|
||||
EVT_END_IF
|
||||
EVT_SET(GF_MAC01_UnlockedLetter_02, TRUE)
|
||||
EVT_IF_GE(GB_StoryProgress, STORY_CH1_STAR_SPRIT_DEPARTED)
|
||||
EVT_SET(GF_MAC01_UnlockedLetter_05, TRUE)
|
||||
EVT_END_IF
|
||||
EVT_IF_GE(GB_StoryProgress, STORY_CH4_STAR_SPRIT_DEPARTED)
|
||||
EVT_SET(GF_MAC01_UnlockedLetter_04, TRUE)
|
||||
EVT_END_IF
|
||||
EVT_IF_GE(GB_StoryProgress, STORY_CH6_RETURNED_TO_TOAD_TOWN)
|
||||
EVT_SET(GF_MAC01_UnlockedLetter_03, TRUE)
|
||||
EVT_END_IF
|
||||
EVT_IF_GE(GB_StoryProgress, STORY_CH5_RETURNED_TO_TOAD_TOWN)
|
||||
EVT_SET(GF_MAC01_UnlockedLetter_08, TRUE)
|
||||
EVT_END_IF
|
||||
EVT_IF_GE(GB_StoryProgress, STORY_CH2_ARRIVED_AT_DRY_DRY_OUTPOST)
|
||||
EVT_SET(GF_MAC01_UnlockedLetter_06, TRUE)
|
||||
EVT_END_IF
|
||||
EVT_IF_GE(GB_StoryProgress, STORY_CH7_RAISED_FROZEN_STAIRS)
|
||||
EVT_SET(GF_MAC01_UnlockedLetter_07, TRUE)
|
||||
EVT_END_IF
|
||||
EVT_IF_GE(GB_StoryProgress, STORY_CH4_STAR_SPRIT_DEPARTED)
|
||||
EVT_SET(GF_MAC01_UnlockedLetter_09, TRUE)
|
||||
EVT_END_IF
|
||||
EVT_IF_GE(GB_IWA00_Whacka_HitCount, 2)
|
||||
EVT_SET(GF_MAC01_UnlockedLetter_0A, TRUE)
|
||||
EVT_END_IF
|
||||
EVT_IF_GE(GB_StoryProgress, STORY_CH5_RETURNED_TO_TOAD_TOWN)
|
||||
EVT_SET(GF_MAC01_UnlockedLetter_0B, TRUE)
|
||||
EVT_END_IF
|
||||
EVT_IF_GE(GB_StoryProgress, STORY_CH3_STAR_SPRIT_DEPARTED)
|
||||
EVT_SET(GF_MAC01_UnlockedLetter_0C, TRUE)
|
||||
EVT_END_IF
|
||||
EVT_IF_GE(GB_StoryProgress, STORY_CH7_STAR_SPRIT_DEPARTED)
|
||||
EVT_SET(GF_MAC01_UnlockedLetter_0D, TRUE)
|
||||
EVT_END_IF
|
||||
EVT_IF_GE(GB_StoryProgress, STORY_CH5_RETURNED_TO_TOAD_TOWN)
|
||||
EVT_SET(GF_MAC01_UnlockedLetter_0E, TRUE)
|
||||
EVT_END_IF
|
||||
EVT_IF_GE(GB_StoryProgress, STORY_CH6_ARRIVED_AT_FLOWER_FIELDS)
|
||||
EVT_SET(GF_MAC01_UnlockedLetter_10, TRUE)
|
||||
EVT_END_IF
|
||||
EVT_IF_GE(GB_StoryProgress, STORY_CH8_REACHED_STAR_HAVEN)
|
||||
EVT_SET(GF_MAC01_UnlockedLetter_0F, TRUE)
|
||||
EVT_END_IF
|
||||
EVT_IF_GE(GB_StoryProgress, STORY_CH6_RETURNED_TO_TOAD_TOWN)
|
||||
EVT_SET(GF_MAC01_UnlockedLetter_12, TRUE)
|
||||
EVT_END_IF
|
||||
EVT_IF_GE(GB_StoryProgress, STORY_CH7_STAR_SPRIT_DEPARTED)
|
||||
EVT_SET(GF_MAC01_UnlockedLetter_11, TRUE)
|
||||
EVT_END_IF
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInteract_Parakarry) = {
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldParakarry_Talk, ANIM_WorldParakarry_Idle, 0, MSG_MAC_Plaza_0064)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
s32 N(ExtraAnims_Parakarry)[] = {
|
||||
ANIM_WorldParakarry_Still,
|
||||
ANIM_WorldParakarry_Idle,
|
||||
ANIM_WorldParakarry_Talk,
|
||||
-1
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInit_Parakarry) = {
|
||||
EVT_CALL(SetNpcCollisionSize, NPC_SELF, 37, 26)
|
||||
EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Parakarry)))
|
||||
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldParakarry_Idle)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_CarryItem_PostOfficeShyGuy) = {
|
||||
EVT_CALL(GetNpcPos, NPC_PostOfficeShyGuy, LVar2, LVar3, LVar4)
|
||||
EVT_ADD(LVar3, 20)
|
||||
EVT_CALL(MakeItemEntity, ITEM_MAILBAG, LVar2, LVar3, LVar4, ITEM_SPAWN_MODE_DECORATION, 0)
|
||||
EVT_SET(LVar9, LVar0)
|
||||
EVT_WAIT(1)
|
||||
EVT_LOOP(140)
|
||||
EVT_CALL(GetNpcPos, NPC_PostOfficeShyGuy, LVar2, LVar3, LVar4)
|
||||
EVT_ADD(LVar3, 20)
|
||||
EVT_CALL(SetItemPos, LVar9, LVar2, LVar3, LVar4)
|
||||
EVT_WAIT(1)
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(RemoveItemEntity, LVar9)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_PostOfficeShyGuy_Escape) = {
|
||||
EVT_CALL(SetNpcPos, NPC_PostOfficeShyGuy, 357, 20, -440)
|
||||
EVT_CALL(SetNpcAnimation, NPC_PostOfficeShyGuy, ANIM_ShyGuy_Red_Anim04)
|
||||
EVT_EXEC(N(EVS_CarryItem_PostOfficeShyGuy))
|
||||
EVT_CALL(DisablePlayerInput, TRUE)
|
||||
EVT_WAIT(60)
|
||||
EVT_CALL(PlaySoundAtNpc, NPC_PostOfficeShyGuy, SOUND_32C, 0)
|
||||
EVT_CALL(NpcJump0, NPC_PostOfficeShyGuy, 247, 20, -440, 20)
|
||||
EVT_SET(LVar0, 6)
|
||||
EVT_CALL(PlaySoundAtNpc, LVar0, SOUND_203F, 0)
|
||||
EVT_EXEC_GET_TID(N(D_8024E6F8_80EF78), LVarA)
|
||||
EVT_CALL(NpcMoveTo, NPC_PostOfficeShyGuy, 180, -410, 20)
|
||||
EVT_CALL(NpcMoveTo, NPC_PostOfficeShyGuy, 150, -333, 8)
|
||||
EVT_KILL_THREAD(LVarA)
|
||||
EVT_CALL(SetNpcPos, NPC_PostOfficeShyGuy, NPC_DISPOSE_LOCATION)
|
||||
EVT_SET(GF_MAC01_MailbagStolen, TRUE)
|
||||
EVT_CALL(DisablePlayerInput, FALSE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_Scene_MailbagTheft) = {
|
||||
EVT_IF_LT(GB_StoryProgress, STORY_CH3_STAR_SPRIT_DEPARTED)
|
||||
EVT_RETURN
|
||||
EVT_END_IF
|
||||
EVT_IF_GT(GB_StoryProgress, STORY_CH4_STAR_SPIRIT_RESCUED)
|
||||
EVT_RETURN
|
||||
EVT_END_IF
|
||||
EVT_IF_NE(GF_MAC01_MailbagStolen, FALSE)
|
||||
EVT_RETURN
|
||||
EVT_END_IF
|
||||
EVT_CALL(DisablePlayerInput, TRUE)
|
||||
EVT_CALL(SpeakToPlayer, NPC_Postmaster, ANIM_Postmaster_Talk, ANIM_Postmaster_IdleAlt, 0, MSG_MAC_Plaza_005F)
|
||||
EVT_EXEC(N(EVS_PostOfficeShyGuy_Escape))
|
||||
EVT_CALL(DisablePlayerInput, FALSE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
493
src/world/area_mac/mac_01/npc/read_fortune.inc.c
Normal file
493
src/world/area_mac/mac_01/npc/read_fortune.inc.c
Normal file
@ -0,0 +1,493 @@
|
||||
API_CALLABLE(N(func_802440FC_80497C)) {
|
||||
if (isInitialCall) {
|
||||
set_mdl_custom_gfx_set(get_model_from_list_index(get_model_list_index_from_tree_index(MODEL_o283)), -1, 3);
|
||||
set_mdl_custom_gfx_set(get_model_from_list_index(get_model_list_index_from_tree_index(MODEL_o279)), -1, 3);
|
||||
set_mdl_custom_gfx_set(get_model_from_list_index(get_model_list_index_from_tree_index(MODEL_dr_yuka)), -1, 3);
|
||||
set_model_env_color_parameters(255, 255, 255, 0, 0, 0);
|
||||
script->functionTemp[0] = 255;
|
||||
}
|
||||
script->functionTemp[0] -= 4;
|
||||
if (script->functionTemp[0] < 64) {
|
||||
script->functionTemp[0] = 64;
|
||||
}
|
||||
set_model_env_color_parameters(script->functionTemp[0], script->functionTemp[0], script->functionTemp[0], 0, 0, 0);
|
||||
if (script->functionTemp[0] == 64) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
return ApiStatus_BLOCK;
|
||||
}
|
||||
|
||||
API_CALLABLE(N(func_802441EC_804A6C)) {
|
||||
if (isInitialCall) {
|
||||
script->functionTemp[0] = 64;
|
||||
script->functionTemp[2] = 64;
|
||||
script->functionTemp[1] = 0;
|
||||
}
|
||||
if (script->functionTemp[1] == 0) {
|
||||
script->functionTemp[0] += 4;
|
||||
script->functionTemp[2] += 4;
|
||||
if (script->functionTemp[0] > 127) {
|
||||
script->functionTemp[0] = 127;
|
||||
}
|
||||
if (script->functionTemp[2] > 127) {
|
||||
script->functionTemp[2] = 127;
|
||||
}
|
||||
if (script->functionTemp[0] == 127 && (script->functionTemp[2] == script->functionTemp[0])) {
|
||||
script->functionTemp[1] = 1;
|
||||
}
|
||||
} else {
|
||||
script->functionTemp[0] -= 4;
|
||||
script->functionTemp[2] -= 4;
|
||||
if (script->functionTemp[0] < 64) {
|
||||
script->functionTemp[0] = 64;
|
||||
}
|
||||
if (script->functionTemp[2] < 0) {
|
||||
script->functionTemp[2] = 0;
|
||||
}
|
||||
}
|
||||
set_model_env_color_parameters(
|
||||
script->functionTemp[0], script->functionTemp[0], script->functionTemp[0],
|
||||
script->functionTemp[2], script->functionTemp[2], script->functionTemp[2]
|
||||
);
|
||||
if (script->functionTemp[0] == 64 && script->functionTemp[2] == 0) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
return ApiStatus_BLOCK;
|
||||
}
|
||||
|
||||
API_CALLABLE(N(func_80244308_804B88)) {
|
||||
if (isInitialCall) {
|
||||
script->functionTemp[0] = 64;
|
||||
}
|
||||
script->functionTemp[0] += 4;
|
||||
if (script->functionTemp[0] > 255) {
|
||||
script->functionTemp[0] = 255;
|
||||
}
|
||||
set_model_env_color_parameters(script->functionTemp[0], script->functionTemp[0], script->functionTemp[0], 0, 0, 0);
|
||||
if (script->functionTemp[0] == 255) {
|
||||
set_mdl_custom_gfx_set(get_model_from_list_index(get_model_list_index_from_tree_index(MODEL_o283)), -1, 0);
|
||||
set_mdl_custom_gfx_set(get_model_from_list_index(get_model_list_index_from_tree_index(MODEL_o279)), -1, 0);
|
||||
set_mdl_custom_gfx_set(get_model_from_list_index(get_model_list_index_from_tree_index(MODEL_dr_yuka)), -1, 0);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
return ApiStatus_BLOCK;
|
||||
}
|
||||
|
||||
// identical to hos_06 func
|
||||
// TODO may not be motionBlurFlame
|
||||
API_CALLABLE(N(func_802443E0_804C60)) {
|
||||
EffectInstance* effects[3];
|
||||
Matrix4f sp28, sp68;
|
||||
f32 tx;
|
||||
f32 ty;
|
||||
f32 temp_f24;
|
||||
f32 temp_f28;
|
||||
f32 temp_f30;
|
||||
s32 i;
|
||||
|
||||
if (isInitialCall) {
|
||||
script->functionTemp[0] = 180;
|
||||
script->functionTempPtr[1] = (EffectInstance*) evt_get_variable(script, ArrayVar(3));
|
||||
script->functionTempPtr[2] = (EffectInstance*) evt_get_variable(script, ArrayVar(4));
|
||||
script->functionTempPtr[3] = (EffectInstance*) evt_get_variable(script, ArrayVar(5));
|
||||
}
|
||||
|
||||
effects[0] = script->functionTempPtr[1];
|
||||
effects[1] = script->functionTempPtr[2];
|
||||
effects[2] = script->functionTempPtr[3];
|
||||
temp_f30 = (sin_deg(script->functionTemp[0]) * 10.0f) + 10.0f;
|
||||
temp_f28 = (sin_deg(script->functionTemp[0]) * 25.0f) + 10.0f;
|
||||
temp_f24 = script->functionTemp[0] * 10;
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(effects); i++) {
|
||||
guRotateF(sp28, -gCameras[gCurrentCameraID].currentYaw, 0.0f, 1.0f, 0.0f);
|
||||
guRotateF(sp68, i * 120, 0.0f, 0.0f, 1.0f);
|
||||
guMtxCatF(sp68, sp28, sp28);
|
||||
tx = temp_f30 * sin_deg(temp_f24);
|
||||
ty = temp_f28 * cos_deg(temp_f24);
|
||||
guTranslateF(sp68, tx, ty, 0.0f);
|
||||
guMtxCatF(sp68, sp28, sp28);
|
||||
effects[i]->data.motionBlurFlame->pos.x = sp28[3][0];
|
||||
effects[i]->data.motionBlurFlame->pos.y = sp28[3][1];
|
||||
effects[i]->data.motionBlurFlame->pos.z = sp28[3][2];
|
||||
}
|
||||
|
||||
script->functionTemp[0]--;
|
||||
if (script->functionTemp[0] < 16) {
|
||||
for (i = 0; i < ARRAY_COUNT(effects); i++) {
|
||||
effects[i]->data.motionBlurFlame->unk_4C = script->functionTemp[0];
|
||||
}
|
||||
}
|
||||
|
||||
if (script->functionTemp[0] < 0) {
|
||||
for (i = 0; i < ARRAY_COUNT(effects); i++) {
|
||||
remove_effect(effects[i]);
|
||||
}
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
return ApiStatus_BLOCK;
|
||||
}
|
||||
|
||||
// identical to hos_06 func
|
||||
API_CALLABLE(N(func_802446AC_804F2C)) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
EffectInstance* effect = (EffectInstance*) evt_get_variable(script, *args++);
|
||||
|
||||
// TODO effect may be wrong
|
||||
effect->data.energyOrbWave->unk_1C++;
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
EvtScript N(EVS_Merlon_AnimateDiscoBall) = {
|
||||
EVT_CALL(EnableModel, MODEL_mirrorball, TRUE)
|
||||
EVT_SET(LVar0, 328)
|
||||
EVT_SET(LVar1, 0)
|
||||
EVT_LOOP(50)
|
||||
EVT_ADD(LVar0, -2)
|
||||
EVT_CALL(TranslateModel, MODEL_mirrorball, -590, LVar0, -646)
|
||||
EVT_ADD(LVar1, 3)
|
||||
EVT_IF_GE(LVar1, 360)
|
||||
EVT_ADD(LVar1, -360)
|
||||
EVT_END_IF
|
||||
EVT_CALL(RotateModel, MODEL_mirrorball, LVar1, 0, 1, 0)
|
||||
EVT_WAIT(1)
|
||||
EVT_END_LOOP
|
||||
EVT_LOOP(0)
|
||||
EVT_CALL(TranslateModel, MODEL_mirrorball, -590, LVar0, -646)
|
||||
EVT_ADD(LVar1, 3)
|
||||
EVT_IF_GE(LVar1, 360)
|
||||
EVT_ADD(LVar1, -360)
|
||||
EVT_END_IF
|
||||
EVT_CALL(RotateModel, MODEL_mirrorball, LVar1, 0, 1, 0)
|
||||
EVT_WAIT(1)
|
||||
EVT_IF_EQ(ArrayVar(6), 1)
|
||||
EVT_BREAK_LOOP
|
||||
EVT_END_IF
|
||||
EVT_WAIT(1)
|
||||
EVT_END_LOOP
|
||||
EVT_LOOP(150)
|
||||
EVT_ADD(LVar0, 0)
|
||||
EVT_CALL(TranslateModel, MODEL_mirrorball, -590, LVar0, -646)
|
||||
EVT_ADD(LVar1, 6)
|
||||
EVT_IF_GE(LVar1, 360)
|
||||
EVT_ADD(LVar1, -360)
|
||||
EVT_END_IF
|
||||
EVT_CALL(RotateModel, MODEL_mirrorball, LVar1, 0, 1, 0)
|
||||
EVT_WAIT(1)
|
||||
EVT_END_LOOP
|
||||
EVT_LOOP(0)
|
||||
EVT_CALL(TranslateModel, MODEL_mirrorball, -590, LVar0, -646)
|
||||
EVT_ADD(LVar1, 3)
|
||||
EVT_IF_GE(LVar1, 360)
|
||||
EVT_ADD(LVar1, -360)
|
||||
EVT_END_IF
|
||||
EVT_CALL(RotateModel, MODEL_mirrorball, LVar1, 0, 1, 0)
|
||||
EVT_WAIT(1)
|
||||
EVT_IF_EQ(ArrayVar(6), 2)
|
||||
EVT_BREAK_LOOP
|
||||
EVT_END_IF
|
||||
EVT_WAIT(1)
|
||||
EVT_END_LOOP
|
||||
EVT_LOOP(50)
|
||||
EVT_ADD(LVar0, 2)
|
||||
EVT_CALL(TranslateModel, MODEL_mirrorball, -590, LVar0, -646)
|
||||
EVT_ADD(LVar1, 3)
|
||||
EVT_IF_GE(LVar1, 360)
|
||||
EVT_ADD(LVar1, -360)
|
||||
EVT_END_IF
|
||||
EVT_CALL(RotateModel, MODEL_mirrorball, LVar1, 0, 1, 0)
|
||||
EVT_WAIT(1)
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(EnableModel, MODEL_mirrorball, FALSE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_Merlon_ReadFortuneFX) = {
|
||||
EVT_CALL(SetNpcAnimation, NPC_Merlon, ANIM_Merlon_RaiseArms)
|
||||
EVT_CALL(GetModelCenter, MODEL_tama)
|
||||
EVT_CALL(PlaySoundAt, SOUND_207, 0, LVar0, LVar1, LVar2)
|
||||
EVT_PLAY_EFFECT(EFFECT_ENERGY_ORB_WAVE, 0, LVar0, LVar1, LVar2, EVT_FLOAT(1.0), -1)
|
||||
EVT_SET(ArrayVar(1), LVarF)
|
||||
EVT_WAIT(30)
|
||||
EVT_SET(ArrayVar(6), 0)
|
||||
EVT_EXEC(N(EVS_Merlon_AnimateDiscoBall))
|
||||
EVT_WAIT(30)
|
||||
EVT_THREAD
|
||||
EVT_CALL(N(func_802440FC_80497C))
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
|
||||
EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2)
|
||||
EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2)
|
||||
EVT_CALL(GetCamDistance, CAM_DEFAULT, LVar0)
|
||||
EVT_IF_GT(LVar0, 0)
|
||||
EVT_SETF(LVar0, EVT_FLOAT(284.6))
|
||||
EVT_ELSE
|
||||
EVT_SETF(LVar0, EVT_FLOAT(-284.6))
|
||||
EVT_END_IF
|
||||
EVT_CALL(SetCamDistance, CAM_DEFAULT, LVar0)
|
||||
EVT_CALL(GetCamPitch, CAM_DEFAULT, LVar0, LVar1)
|
||||
EVT_SETF(LVar1, EVT_FLOAT(-11.0))
|
||||
EVT_CALL(SetCamPitch, CAM_DEFAULT, LVar0, LVar1)
|
||||
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
|
||||
EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0))
|
||||
EVT_SET(ArrayVar(6), 1)
|
||||
EVT_PLAY_EFFECT(EFFECT_MERLIN_HOUSE_STARS, 0, -298, 21, -330)
|
||||
EVT_SET(ArrayVar(2), LVarF)
|
||||
EVT_CALL(GetModelCenter, MODEL_tama)
|
||||
EVT_PLAY_EFFECT(EFFECT_MOTION_BLUR_FLAME, 0, LVar0, LVar1, LVar2, 1, -1)
|
||||
EVT_SET(ArrayVar(3), LVarF)
|
||||
EVT_PLAY_EFFECT(EFFECT_MOTION_BLUR_FLAME, 0, LVar0, LVar1, LVar2, 1, -1)
|
||||
EVT_SET(ArrayVar(4), LVarF)
|
||||
EVT_PLAY_EFFECT(EFFECT_MOTION_BLUR_FLAME, 0, LVar0, LVar1, LVar2, 1, -1)
|
||||
EVT_SET(ArrayVar(5), LVarF)
|
||||
EVT_THREAD
|
||||
EVT_CALL(N(func_802443E0_804C60))
|
||||
EVT_END_THREAD
|
||||
EVT_WAIT(50)
|
||||
EVT_CALL(GetModelCenter, MODEL_tama)
|
||||
EVT_CALL(PlaySoundAt, SOUND_208, 0, LVar0, LVar1, LVar2)
|
||||
EVT_PLAY_EFFECT(EFFECT_ENERGY_ORB_WAVE, 3, LVar0, LVar1, LVar2, EVT_FLOAT(0.5), 20)
|
||||
EVT_WAIT(30)
|
||||
EVT_CALL(GetModelCenter, MODEL_tama)
|
||||
EVT_CALL(PlaySoundAt, SOUND_208, 0, LVar0, LVar1, LVar2)
|
||||
EVT_PLAY_EFFECT(EFFECT_ENERGY_ORB_WAVE, 3, LVar0, LVar1, LVar2, EVT_FLOAT(0.5), 20)
|
||||
EVT_WAIT(30)
|
||||
EVT_THREAD
|
||||
EVT_CALL(N(func_802441EC_804A6C))
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(GetModelCenter, MODEL_tama)
|
||||
EVT_CALL(PlaySoundAt, SOUND_208, 0, LVar0, LVar1, LVar2)
|
||||
EVT_PLAY_EFFECT(EFFECT_ENERGY_ORB_WAVE, 4, LVar0, LVar1, LVar2, EVT_FLOAT(0.5), 20)
|
||||
EVT_WAIT(70)
|
||||
EVT_CALL(func_802D7B10, ArrayVar(2))
|
||||
EVT_WAIT(40)
|
||||
EVT_CALL(PlaySoundAt, SOUND_607, 0, LVar0, LVar1, LVar2)
|
||||
EVT_CALL(N(func_802446AC_804F2C), ArrayVar(1))
|
||||
EVT_WAIT(15)
|
||||
EVT_CALL(func_802D7B10, ArrayVar(1))
|
||||
EVT_THREAD
|
||||
EVT_CALL(N(func_80244308_804B88))
|
||||
EVT_END_THREAD
|
||||
EVT_WAIT(46)
|
||||
EVT_SET(ArrayVar(6), 2)
|
||||
EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(5.0))
|
||||
EVT_CALL(SetNpcAnimation, NPC_Merlon, ANIM_Merlon_Idle)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_Merlon_GiveHint) = {
|
||||
EVT_CALL(DisablePlayerInput, TRUE)
|
||||
EVT_CALL(SpeakToPlayer, NPC_Merlon, ANIM_Merlon_Talk, ANIM_Merlon_Idle, 0, MSG_MAC_Plaza_0036)
|
||||
EVT_CALL(ShowCoinCounter, TRUE)
|
||||
EVT_CALL(ShowChoice, MSG_Choice_000D)
|
||||
EVT_IF_NE(LVar0, 0)
|
||||
EVT_CALL(ShowCoinCounter, FALSE)
|
||||
EVT_CALL(ContinueSpeech, NPC_Merlon, ANIM_Merlon_Talk, ANIM_Merlon_Idle, 0, MSG_MAC_Plaza_0039)
|
||||
EVT_CALL(DisablePlayerInput, FALSE)
|
||||
EVT_RETURN
|
||||
EVT_END_IF
|
||||
EVT_CALL(N(GetPlayerCoins))
|
||||
EVT_IF_LT(LVar0, 5)
|
||||
EVT_CALL(ShowCoinCounter, FALSE)
|
||||
EVT_CALL(ContinueSpeech, NPC_Merlon, ANIM_Merlon_Talk, ANIM_Merlon_Idle, 0, MSG_MAC_Plaza_003A)
|
||||
EVT_CALL(DisablePlayerInput, FALSE)
|
||||
EVT_RETURN
|
||||
EVT_END_IF
|
||||
EVT_CALL(AddCoin, -5)
|
||||
EVT_CALL(ShowCoinCounter, FALSE)
|
||||
EVT_CALL(ContinueSpeech, NPC_Merlon, ANIM_Merlon_Talk, ANIM_Merlon_Idle, 0, MSG_MAC_Plaza_0037)
|
||||
EVT_CALL(SetNpcAnimation, NPC_Merlon, ANIM_Merlon_Gather1)
|
||||
EVT_WAIT(10)
|
||||
EVT_CALL(SpeakToPlayer, NPC_Merlon, ANIM_Merlon_Gather1, ANIM_Merlon_Gather1, 0, MSG_MAC_Plaza_0038)
|
||||
EVT_EXEC(N(EVS_PlaySpellcastSong))
|
||||
EVT_WAIT(20)
|
||||
EVT_IF_EQ(MV_FortuneFXHandles, 0)
|
||||
EVT_MALLOC_ARRAY(20, MV_FortuneFXHandles)
|
||||
EVT_END_IF
|
||||
EVT_USE_ARRAY(MV_FortuneFXHandles)
|
||||
EVT_EXEC_WAIT(N(EVS_Merlon_ReadFortuneFX))
|
||||
EVT_WAIT(20)
|
||||
EVT_EXEC(N(EVS_ResetMusicAfterFortune))
|
||||
EVT_SWITCH(GB_StoryProgress)
|
||||
EVT_CASE_LT(STORY_CH1_MERLIN_REVEALED_KOOPA_BROS)
|
||||
EVT_SET(LVar0, MSG_MerlonHint_0000)
|
||||
EVT_CASE_LT(STORY_CH1_KNOCKED_SWITCH_FROM_TREE)
|
||||
EVT_SET(LVar0, MSG_MerlonHint_0001)
|
||||
EVT_CASE_LT(STORY_CH1_KOOPER_JOINED_PARTY)
|
||||
EVT_SET(LVar0, MSG_MerlonHint_0002)
|
||||
EVT_CASE_LT(STORY_CH1_SPOTTED_BY_KOOPA_BROS)
|
||||
EVT_SET(LVar0, MSG_MerlonHint_0003)
|
||||
EVT_CASE_LT(STORY_CH1_BOMBETTE_JOINED_PARTY)
|
||||
EVT_SET(LVar0, MSG_MerlonHint_0004)
|
||||
EVT_CASE_LT(STORY_CH1_STAR_SPIRIT_RESCUED)
|
||||
EVT_SET(LVar0, MSG_MerlonHint_0005)
|
||||
EVT_CASE_LT(STORY_CH2_PARAKARRY_JOINED_PARTY)
|
||||
EVT_IF_EQ(GF_MAC03_BombedRock, FALSE)
|
||||
EVT_SET(LVar0, MSG_MerlonHint_0006)
|
||||
EVT_ELSE
|
||||
EVT_SET(LVar0, MSG_MerlonHint_0007)
|
||||
EVT_END_IF
|
||||
EVT_CASE_LT(STORY_CH2_ARRIVED_AT_DRY_DRY_DESERT)
|
||||
EVT_SET(LVar0, MSG_MerlonHint_0008)
|
||||
EVT_CASE_LT(STORY_CH2_ARRIVED_AT_DRY_DRY_OUTPOST)
|
||||
EVT_SET(LVar0, MSG_MerlonHint_0009)
|
||||
EVT_CASE_LT(STORY_CH2_SHADY_MOUSE_ENTERED_SHOP)
|
||||
EVT_SET(LVar0, MSG_MerlonHint_000A)
|
||||
EVT_CASE_LT(STORY_CH2_BOUGHT_SECRET_ITEMS)
|
||||
EVT_SET(LVar0, MSG_MerlonHint_000B)
|
||||
EVT_CASE_LT(STORY_CH2_GOT_PULSE_STONE)
|
||||
EVT_SET(LVar0, MSG_MerlonHint_000C)
|
||||
EVT_CASE_LT(STORY_CH2_UNCOVERED_DRY_DRY_RUINS)
|
||||
EVT_SET(LVar0, MSG_MerlonHint_000D)
|
||||
EVT_CASE_LT(STORY_CH2_SOLVED_ARTIFACT_PUZZLE)
|
||||
EVT_SET(LVar0, MSG_MerlonHint_000E)
|
||||
EVT_CASE_LT(STORY_CH2_STAR_SPIRIT_RESCUED)
|
||||
EVT_SET(LVar0, MSG_MerlonHint_000F)
|
||||
EVT_CASE_LT(STORY_UNUSED_FFFFFFCC)
|
||||
EVT_SET(LVar0, MSG_MerlonHint_0010)
|
||||
EVT_CASE_LT(STORY_CH3_ALLOWED_INTO_FOREVER_FOREST)
|
||||
EVT_SET(LVar0, MSG_MerlonHint_0011)
|
||||
EVT_CASE_LT(STORY_CH3_ARRIVED_AT_BOOS_MANSION)
|
||||
EVT_SET(LVar0, MSG_MerlonHint_0012)
|
||||
EVT_CASE_LT(STORY_CH3_ENTERED_BOOS_MANSION)
|
||||
EVT_SET(LVar0, MSG_MerlonHint_0013)
|
||||
EVT_CASE_LT(STORY_CH3_GOT_WEIGHT)
|
||||
EVT_SET(LVar0, MSG_MerlonHint_0014)
|
||||
EVT_CASE_LT(STORY_CH3_WEIGHED_DOWN_CHANDELIER)
|
||||
EVT_SET(LVar0, MSG_MerlonHint_0015)
|
||||
EVT_CASE_LT(STORY_CH3_GOT_BOO_PORTRAIT)
|
||||
EVT_SET(LVar0, MSG_MerlonHint_0016)
|
||||
EVT_CASE_LT(STORY_CH3_BOW_JOINED_PARTY)
|
||||
EVT_SET(LVar0, MSG_MerlonHint_0017)
|
||||
EVT_CASE_LT(STORY_CH3_ARRIVED_AT_TUBBAS_MANOR)
|
||||
EVT_SET(LVar0, MSG_MerlonHint_0018)
|
||||
EVT_CASE_LT(STORY_CH3_DEFEATED_TUBBA_BLUBBA)
|
||||
EVT_IF_EQ(GF_DGB06_Chest_CastleKey1, FALSE)
|
||||
EVT_SET(LVar0, MSG_MerlonHint_0019)
|
||||
EVT_BREAK_SWITCH
|
||||
EVT_END_IF
|
||||
EVT_IF_EQ(GF_DGB12_Chest_CastleKey1, FALSE)
|
||||
EVT_SET(LVar0, MSG_MerlonHint_001A)
|
||||
EVT_BREAK_SWITCH
|
||||
EVT_END_IF
|
||||
EVT_IF_EQ(GF_DGB16_Item_CastleKey1, FALSE)
|
||||
EVT_SET(LVar0, MSG_MerlonHint_001B)
|
||||
EVT_BREAK_SWITCH
|
||||
EVT_END_IF
|
||||
EVT_SET(LVar0, MSG_MerlonHint_001C)
|
||||
EVT_CASE_LT(STORY_CH3_STAR_SPRIT_DEPARTED)
|
||||
EVT_SET(LVar0, MSG_MerlonHint_001D)
|
||||
EVT_CASE_LT(STORY_CH4_FOUND_HIDDEN_DOOR)
|
||||
EVT_SET(LVar0, MSG_MerlonHint_001E)
|
||||
EVT_CASE_LT(STORY_CH4_GOT_STOREROOM_KEY)
|
||||
EVT_SET(LVar0, MSG_MerlonHint_001F)
|
||||
EVT_CASE_LT(STORY_CH4_GOT_TOY_TRAIN)
|
||||
EVT_SET(LVar0, MSG_MerlonHint_0020)
|
||||
EVT_CASE_LT(STORY_CH4_RETURNED_TOY_TRAIN)
|
||||
EVT_SET(LVar0, MSG_MerlonHint_0021)
|
||||
EVT_CASE_LT(STORY_CH4_GOT_FRYING_PAN)
|
||||
EVT_SET(LVar0, MSG_MerlonHint_0022)
|
||||
EVT_CASE_LT(STORY_CH4_GOT_TAYCE_TS_CAKE)
|
||||
EVT_SET(LVar0, MSG_MerlonHint_0023)
|
||||
EVT_CASE_LT(STORY_CH4_GAVE_CAKE_TO_GOURMET_GUY)
|
||||
EVT_SET(LVar0, MSG_MerlonHint_0024)
|
||||
EVT_CASE_LT(STORY_CH4_SOLVED_COLOR_PUZZLE)
|
||||
EVT_SET(LVar0, MSG_MerlonHint_0025)
|
||||
EVT_CASE_LT(STORY_CH4_DEFEATED_LANTERN_GHOST)
|
||||
EVT_SET(LVar0, MSG_MerlonHint_0026)
|
||||
EVT_CASE_LT(STORY_CH4_WATT_JOINED_PARTY)
|
||||
EVT_SET(LVar0, MSG_MerlonHint_0027)
|
||||
EVT_CASE_LT(STORY_CH4_STAR_SPRIT_DEPARTED)
|
||||
EVT_SET(LVar0, MSG_MerlonHint_0028)
|
||||
EVT_CASE_LT(STORY_CH5_DEFEATED_FUZZIPEDE)
|
||||
EVT_SET(LVar0, MSG_MerlonHint_0029)
|
||||
EVT_CASE_LT(STORY_CH5_REACHED_LAVA_LAVA_ISLAND)
|
||||
EVT_SET(LVar0, MSG_MerlonHint_002A)
|
||||
EVT_CASE_LT(STORY_CH5_YOSHI_CHILDREN_ARE_MISSING)
|
||||
EVT_SET(LVar0, MSG_MerlonHint_002B)
|
||||
EVT_CASE_LT(STORY_CH5_SUSHIE_JOINED_PARTY)
|
||||
EVT_SET(LVar0, MSG_MerlonHint_002C)
|
||||
EVT_CASE_LT(STORY_CH5_ALL_YOSHI_CHILDREN_RESCUED)
|
||||
EVT_SET(LVar0, MSG_MerlonHint_002D)
|
||||
EVT_CASE_LT(STORY_CH5_MOVED_RAVEN_STATUE)
|
||||
EVT_SET(LVar0, MSG_MerlonHint_002E)
|
||||
EVT_CASE_LT(STORY_CH5_RAFAEL_LEFT_NEST)
|
||||
EVT_SET(LVar0, MSG_MerlonHint_002F)
|
||||
EVT_CASE_LT(STORY_CH5_ENTERED_MT_LAVA_LAVA)
|
||||
EVT_SET(LVar0, MSG_MerlonHint_0030)
|
||||
EVT_CASE_LT(STORY_CH5_GOT_ULTRA_HAMMER)
|
||||
EVT_SET(LVar0, MSG_MerlonHint_0031)
|
||||
EVT_CASE_LT(STORY_CH5_STAR_SPRIT_DEPARTED)
|
||||
EVT_SET(LVar0, MSG_MerlonHint_0032)
|
||||
EVT_CASE_LT(STORY_CH5_TRADED_VASE_FOR_SEED)
|
||||
EVT_SET(LVar0, MSG_MerlonHint_0033)
|
||||
EVT_CASE_LT(STORY_CH6_ARRIVED_AT_FLOWER_FIELDS)
|
||||
EVT_SET(LVar0, MSG_MerlonHint_0034)
|
||||
EVT_CASE_LT(STORY_CH6_GOT_MAGICAL_BEAN)
|
||||
EVT_SET(LVar0, MSG_MerlonHint_0035)
|
||||
EVT_CASE_LT(STORY_CH6_GOT_FERTILE_SOIL)
|
||||
EVT_SET(LVar0, MSG_MerlonHint_0036)
|
||||
EVT_CASE_RANGE(STORY_CH6_GOT_FERTILE_SOIL, STORY_CH6_GOT_WATER_STONE)
|
||||
EVT_IF_EQ(GF_FLO07_Item_CrystalBerry, FALSE)
|
||||
EVT_IF_EQ(GF_FLO10_LilyRequestedWaterStone, FALSE)
|
||||
EVT_SET(LVar0, MSG_MerlonHint_0037)
|
||||
EVT_ELSE
|
||||
EVT_SET(LVar0, MSG_MerlonHint_0038)
|
||||
EVT_END_IF
|
||||
EVT_ELSE
|
||||
EVT_SET(LVar0, MSG_MerlonHint_0039)
|
||||
EVT_END_IF
|
||||
EVT_CASE_LT(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE)
|
||||
EVT_SET(LVar0, MSG_MerlonHint_003A)
|
||||
EVT_CASE_LT(STORY_CH6_GREW_MAGIC_BEANSTALK)
|
||||
EVT_SET(LVar0, MSG_MerlonHint_003B)
|
||||
EVT_CASE_LT(STORY_CH6_STAR_SPIRIT_RESCUED)
|
||||
EVT_SET(LVar0, MSG_MerlonHint_003C)
|
||||
EVT_CASE_LT(STORY_CH7_ARRIVED_AT_SHIVER_CITY)
|
||||
EVT_SET(LVar0, MSG_MerlonHint_003D)
|
||||
EVT_CASE_LT(STORY_CH7_MAYOR_MURDER_SOLVED)
|
||||
EVT_SET(LVar0, MSG_MerlonHint_003E)
|
||||
EVT_CASE_LT(STORY_CH7_GOT_SNOWMAN_SCARF)
|
||||
EVT_SET(LVar0, MSG_MerlonHint_003F)
|
||||
EVT_CASE_LT(STORY_CH7_GOT_SNOWMAN_BUCKET)
|
||||
EVT_SET(LVar0, MSG_MerlonHint_0040)
|
||||
EVT_CASE_LT(STORY_CH7_UNLOCKED_SHIVER_MOUNTAIN)
|
||||
EVT_SET(LVar0, MSG_MerlonHint_0041)
|
||||
EVT_CASE_LT(STORY_CH7_GOT_STAR_STONE)
|
||||
EVT_SET(LVar0, MSG_MerlonHint_0042)
|
||||
EVT_CASE_LT(STORY_CH7_ARRIVED_AT_CRYSTAL_PALACE)
|
||||
EVT_SET(LVar0, MSG_MerlonHint_0043)
|
||||
EVT_CASE_LT(STORY_CH7_DEFEATED_MIRROR_DUPLIGHOSTS)
|
||||
EVT_SET(LVar0, MSG_MerlonHint_0044)
|
||||
EVT_CASE_LT(STORY_CH7_DEFEATED_BOMBETTE_DUPLIGHOSTS)
|
||||
EVT_SET(LVar0, MSG_MerlonHint_0045)
|
||||
EVT_CASE_LT(STORY_CH7_FOUND_HIDDEN_ROOM_UNDER_STATUE)
|
||||
EVT_SET(LVar0, MSG_MerlonHint_0046)
|
||||
EVT_CASE_LT(STORY_CH7_SOLVED_ALBINO_DINO_PUZZLE)
|
||||
EVT_SET(LVar0, MSG_MerlonHint_0047)
|
||||
EVT_CASE_LT(STORY_CH7_STAR_SPRIT_DEPARTED)
|
||||
EVT_SET(LVar0, MSG_MerlonHint_0048)
|
||||
EVT_CASE_LT(STORY_CH8_REACHED_STAR_HAVEN)
|
||||
EVT_SET(LVar0, MSG_MerlonHint_0049)
|
||||
EVT_CASE_LT(STORY_CH8_REACHED_BOWSERS_CASTLE)
|
||||
EVT_SET(LVar0, MSG_MerlonHint_004A)
|
||||
EVT_CASE_LT(STORY_CH8_REACHED_PEACHS_CASTLE)
|
||||
EVT_IF_NE(GB_KPA81_BowserDoorState, 2)
|
||||
EVT_SET(LVar0, MSG_MerlonHint_004B)
|
||||
EVT_BREAK_SWITCH
|
||||
EVT_END_IF
|
||||
EVT_IF_NE(GB_KPA82_BowserDoorState, 1)
|
||||
EVT_SET(LVar0, MSG_MerlonHint_004C)
|
||||
EVT_BREAK_SWITCH
|
||||
EVT_END_IF
|
||||
EVT_SET(LVar0, MSG_MerlonHint_004D)
|
||||
EVT_CASE_LT(STORY_EPILOGUE)
|
||||
EVT_SET(LVar0, MSG_MerlonHint_004E)
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(SpeakToPlayer, NPC_Merlon, ANIM_Merlon_Talk, ANIM_Merlon_Idle, 0, LVar0)
|
||||
EVT_CALL(DisablePlayerInput, FALSE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
758
src/world/area_mac/mac_01/npc/rowf_and_rhuff.inc.c
Normal file
758
src/world/area_mac/mac_01/npc/rowf_and_rhuff.inc.c
Normal file
@ -0,0 +1,758 @@
|
||||
API_CALLABLE(N(func_80244984_805204)) {
|
||||
s32 flagBase = GF_MAC01_RowfBadge_00;
|
||||
s32 count = 0;
|
||||
s32 i;
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(N(RowfBadgeInventory)); i++) {
|
||||
if (evt_get_variable(NULL, flagBase + i) == 0) {
|
||||
count++;
|
||||
}
|
||||
}
|
||||
script->varTable[0] = count;
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
API_CALLABLE(N(RhuffUnravelUpdate)) {
|
||||
s32 rugRotAngle = -evt_get_variable(NULL, MV_RowfRugRotateAngle);
|
||||
s32 rugRippleAmt = evt_get_variable(NULL, MV_RowfRugRippleAmount);
|
||||
Npc* npc = script->varTablePtr[7];
|
||||
Enemy* enemy = get_enemy(NPC_Rhuff);
|
||||
f32 theta = (rugRotAngle / 180.0f) * PI;
|
||||
f32 sinTheta = sin_rad(theta);
|
||||
f32 cosTheta = cos_rad(theta);
|
||||
f32 initialPosX = script->varTable[0];
|
||||
f32 initialPosY = script->varTable[1];
|
||||
|
||||
script->varTable[4] = script->varTable[2] + (s32) ((initialPosX * cosTheta) - (initialPosY * sinTheta));
|
||||
script->varTable[5] = script->varTable[3] + (s32) ((initialPosX * sinTheta) + (initialPosY * cosTheta));
|
||||
|
||||
if (rugRotAngle == 0) {
|
||||
npc->currentAnim = ANIM_Rowf_Idle;
|
||||
enemy->flags &= ~ENEMY_FLAGS_8000000;
|
||||
} else {
|
||||
npc->currentAnim = ANIM_Rowf_Walk;
|
||||
enemy->flags |= ENEMY_FLAGS_8000000;
|
||||
}
|
||||
|
||||
if (rugRotAngle == -60) {
|
||||
npc->flags |= NPC_FLAG_2;
|
||||
} else {
|
||||
npc->flags &= ~NPC_FLAG_2;
|
||||
}
|
||||
|
||||
if (rugRippleAmt != 0) {
|
||||
npc->currentAnim = ANIM_Rowf_Think;
|
||||
}
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
void N(gfx_build_rowf_rug_with_ripples)(void) {
|
||||
s32 rippleAmt = evt_get_variable(NULL, MV_RowfRugRippleAmount);
|
||||
Vtx* src;
|
||||
Vtx* copy;
|
||||
Vtx* vtx;
|
||||
s32 numCopied;
|
||||
s32 i;
|
||||
|
||||
mdl_get_copied_vertices(VTX_COPY_0, &src, ©, &numCopied);
|
||||
|
||||
for (i = 0; i < numCopied; i++) {
|
||||
// 5th set of vertices on the rug from the left
|
||||
if (src[i].v.ob[0] == -78) {
|
||||
vtx = ©[i];
|
||||
|
||||
if (src[i].v.ob[1] == 0) {
|
||||
vtx->v.ob[1] = src[i].v.ob[1] - (rippleAmt / 4);
|
||||
} else {
|
||||
vtx->v.ob[1] = src[i].v.ob[1] + (rippleAmt / 4);
|
||||
}
|
||||
// 3rd set of vertices on the rug from the left
|
||||
} else if (src[i].v.ob[0] == -16) {
|
||||
vtx = ©[i];
|
||||
|
||||
if (src[i].v.ob[1] == 0) {
|
||||
vtx->v.ob[1] = src[i].v.ob[1] - (rippleAmt / 4);
|
||||
} else {
|
||||
vtx->v.ob[1] = src[i].v.ob[1] + (rippleAmt / 4);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
gSPDisplayList(gMasterGfxPos++, mdl_get_copied_gfx(VTX_COPY_0));
|
||||
}
|
||||
|
||||
API_CALLABLE(N(RevealRowfBadges)) {
|
||||
if (!evt_get_variable(NULL, GF_MAC01_RowfBadgeAvailableA)) {
|
||||
clear_item_entity_flags(gGameStatusPtr->shopItemEntities[0].index, ITEM_ENTITY_FLAGS_HIDDEN);
|
||||
}
|
||||
if (!evt_get_variable(NULL, GF_MAC01_RowfBadgeAvailableB)) {
|
||||
clear_item_entity_flags(gGameStatusPtr->shopItemEntities[1].index, ITEM_ENTITY_FLAGS_HIDDEN);
|
||||
}
|
||||
if (!evt_get_variable(NULL, GF_MAC01_RowfBadgeAvailableC)) {
|
||||
clear_item_entity_flags(gGameStatusPtr->shopItemEntities[2].index, ITEM_ENTITY_FLAGS_HIDDEN);
|
||||
}
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
API_CALLABLE(N(HideRowfBadges)) {
|
||||
if (!evt_get_variable(NULL, GF_MAC01_RowfBadgeAvailableA)) {
|
||||
set_item_entity_flags(gGameStatusPtr->shopItemEntities[0].index, ITEM_ENTITY_FLAGS_HIDDEN);
|
||||
}
|
||||
if (!evt_get_variable(NULL, GF_MAC01_RowfBadgeAvailableB)) {
|
||||
set_item_entity_flags(gGameStatusPtr->shopItemEntities[1].index, ITEM_ENTITY_FLAGS_HIDDEN);
|
||||
}
|
||||
if (!evt_get_variable(NULL, GF_MAC01_RowfBadgeAvailableC)) {
|
||||
set_item_entity_flags(gGameStatusPtr->shopItemEntities[2].index, ITEM_ENTITY_FLAGS_HIDDEN);
|
||||
}
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
EvtScript N(EVS_NpcInteract_Rowf_A) = {
|
||||
EVT_IF_EQ(GF_MAC01_Met_Rowf_Early, FALSE)
|
||||
EVT_SET(GF_MAC01_Met_Rowf_Early, TRUE)
|
||||
EVT_SET(AF_MAC_41, TRUE)
|
||||
EVT_CALL(SpeakToPlayer, NPC_Rowf, ANIM_Rowf_Talk, ANIM_Rowf_Idle, 0, MSG_MAC_Plaza_0000)
|
||||
EVT_ELSE
|
||||
EVT_IF_EQ(AF_MAC_41, TRUE)
|
||||
EVT_CALL(SpeakToPlayer, NPC_Rowf, ANIM_Rowf_Talk, ANIM_Rowf_Idle, 0, MSG_MAC_Plaza_0001)
|
||||
EVT_ELSE
|
||||
EVT_SET(AF_MAC_41, TRUE)
|
||||
EVT_CALL(SpeakToPlayer, NPC_Rowf, ANIM_Rowf_Talk, ANIM_Rowf_Think, 0, MSG_MAC_Plaza_0002)
|
||||
EVT_END_IF
|
||||
EVT_END_IF
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInteract_Rowf_B) = {
|
||||
EVT_SET(LVar0, GF_MAC01_RowfBadgeAvailableA)
|
||||
EVT_ADD(LVar0, GF_MAC01_RowfBadgeAvailableB)
|
||||
EVT_ADD(LVar0, GF_MAC01_RowfBadgeAvailableC)
|
||||
EVT_IF_EQ(LVar0, 3)
|
||||
EVT_IF_LT(GB_StoryProgress, STORY_CH5_RETURNED_TO_TOAD_TOWN)
|
||||
EVT_SET(LVar1, MSG_MAC_Plaza_0005)
|
||||
EVT_ELSE
|
||||
EVT_CALL(N(func_80244984_805204))
|
||||
EVT_IF_EQ(LVar0, 0)
|
||||
EVT_SET(LVar1, MSG_MAC_Plaza_0006)
|
||||
EVT_ELSE
|
||||
EVT_SET(LVar1, MSG_MAC_Plaza_0005)
|
||||
EVT_END_IF
|
||||
EVT_END_IF
|
||||
EVT_CALL(SpeakToPlayer, NPC_Rowf, ANIM_Rowf_Talk, ANIM_Rowf_Cheer, 0, LVar1)
|
||||
EVT_RETURN
|
||||
EVT_END_IF
|
||||
EVT_IF_EQ(GF_MAC01_Met_Rowf_Late, FALSE)
|
||||
EVT_SET(GF_MAC01_Met_Rowf_Late, TRUE)
|
||||
EVT_CALL(SpeakToPlayer, NPC_Rowf, ANIM_Rowf_Talk, ANIM_Rowf_Cheer, 0, MSG_MAC_Plaza_0003)
|
||||
EVT_ELSE
|
||||
EVT_CALL(SpeakToPlayer, NPC_Rowf, ANIM_Rowf_Talk, ANIM_Rowf_Cheer, 0, MSG_MAC_Plaza_0004)
|
||||
EVT_END_IF
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
s32 N(ItemList_Calculator)[] = {
|
||||
ITEM_CALCULATOR,
|
||||
ITEM_NONE
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInteract_Rowf_C) = {
|
||||
EVT_IF_EQ(GF_MAC01_CalculatorReturned, TRUE)
|
||||
EVT_CALL(SpeakToPlayer, NPC_Rowf, ANIM_Rowf_Talk, ANIM_Rowf_Cheer, 0, MSG_MAC_Plaza_000A)
|
||||
EVT_RETURN
|
||||
EVT_END_IF
|
||||
EVT_CALL(SpeakToPlayer, NPC_Rowf, ANIM_Rowf_Talk, ANIM_Rowf_Cheer, 0, MSG_MAC_Plaza_0008)
|
||||
EVT_SET(LVar0, EVT_PTR(N(ItemList_Calculator)))
|
||||
EVT_SET(LVar1, 1)
|
||||
EVT_EXEC_WAIT(N(EVS_ChooseKeyItem))
|
||||
EVT_SWITCH(LVar0)
|
||||
EVT_CASE_EQ(0)
|
||||
EVT_CASE_EQ(-1)
|
||||
EVT_CALL(SpeakToPlayer, NPC_Rowf, ANIM_Rowf_Talk, ANIM_Rowf_Cheer, 0, MSG_MAC_Plaza_000B)
|
||||
EVT_CASE_DEFAULT
|
||||
EVT_CALL(SpeakToPlayer, NPC_Rowf, ANIM_Rowf_Talk, ANIM_Rowf_Cheer, 0, MSG_MAC_Plaza_0009)
|
||||
EVT_WAIT(10)
|
||||
EVT_SET(LVar0, ITEM_I_SPY)
|
||||
EVT_SET(LVar3, 2)
|
||||
EVT_EXEC_WAIT(N(GiveKeyReward))
|
||||
EVT_CALL(AddBadge, LVar0, LVar1)
|
||||
EVT_SET(GF_MAC01_CalculatorReturned, TRUE)
|
||||
EVT_WAIT(10)
|
||||
EVT_CALL(SpeakToPlayer, NPC_Rhuff, ANIM_Rowf_Talk, ANIM_Rowf_Idle, 0, MSG_MAC_Plaza_0011)
|
||||
EVT_END_SWITCH
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInteract_RhuffChapter1) = {
|
||||
EVT_CALL(SpeakToPlayer, NPC_Rhuff, ANIM_Rowf_Talk, ANIM_Rowf_Idle, 0, MSG_MAC_Plaza_000C)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInteract_Rhuff_B) = {
|
||||
EVT_CALL(SpeakToPlayer, NPC_Rhuff, ANIM_Rowf_Talk, ANIM_Rowf_Idle, 0, MSG_MAC_Plaza_0014)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInteract_Rhuff_C) = {
|
||||
EVT_CALL(N(func_80244984_805204))
|
||||
EVT_IF_EQ(LVar0, 0)
|
||||
EVT_CALL(SpeakToPlayer, NPC_Rhuff, ANIM_Rowf_Talk, ANIM_Rowf_Idle, 0, MSG_MAC_Plaza_000F)
|
||||
EVT_ELSE
|
||||
EVT_SET(LVar0, GF_MAC01_RowfBadgeAvailableA)
|
||||
EVT_ADD(LVar0, GF_MAC01_RowfBadgeAvailableB)
|
||||
EVT_ADD(LVar0, GF_MAC01_RowfBadgeAvailableC)
|
||||
EVT_IF_EQ(LVar0, 3)
|
||||
EVT_CALL(SpeakToPlayer, NPC_Rhuff, ANIM_Rowf_Talk, ANIM_Rowf_Idle, 0, MSG_MAC_Plaza_000E)
|
||||
EVT_ELSE
|
||||
EVT_CALL(SpeakToPlayer, NPC_Rhuff, ANIM_Rowf_Talk, ANIM_Rowf_Idle, 0, MSG_MAC_Plaza_000D)
|
||||
EVT_END_IF
|
||||
EVT_END_IF
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInteract_Rhuff_D) = {
|
||||
EVT_IF_EQ(GF_MAC01_CalculatorReturned, TRUE)
|
||||
EVT_CALL(SpeakToPlayer, NPC_Rhuff, ANIM_Rowf_Talk, ANIM_Rowf_Cheer, 0, MSG_MAC_Plaza_0012)
|
||||
EVT_ELSE
|
||||
EVT_CALL(SpeakToPlayer, NPC_Rhuff, ANIM_Rowf_Talk, ANIM_Rowf_Idle, 0, MSG_MAC_Plaza_0010)
|
||||
EVT_END_IF
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcIdle_Rowf) = {
|
||||
EVT_CALL(SetNpcPos, NPC_Rowf, -250, 0, 295)
|
||||
EVT_LABEL(0)
|
||||
EVT_WAIT(10)
|
||||
EVT_CALL(SetNpcAnimation, NPC_Rowf, ANIM_Rowf_Still)
|
||||
EVT_CALL(NpcMoveTo, NPC_Rowf, -260, 281, 4)
|
||||
EVT_WAIT(5)
|
||||
EVT_CALL(SetNpcAnimation, NPC_Rowf, ANIM_Rowf_Walk)
|
||||
EVT_CALL(NpcMoveTo, NPC_Rowf, -410, 281, 60)
|
||||
EVT_CALL(SetNpcAnimation, NPC_Rowf, ANIM_Rowf_Idle)
|
||||
EVT_CALL(RotateGroup, MODEL_jutan2, 60, 0, 0, 1)
|
||||
EVT_WAIT(1)
|
||||
EVT_CALL(SetNpcPos, NPC_Rowf, -407, 0, 281)
|
||||
EVT_CALL(RotateGroup, MODEL_jutan2, 40, 0, 0, 1)
|
||||
EVT_WAIT(1)
|
||||
EVT_CALL(SetNpcPos, NPC_Rowf, -404, 0, 281)
|
||||
EVT_CALL(RotateGroup, MODEL_jutan2, 20, 0, 0, 1)
|
||||
EVT_WAIT(1)
|
||||
EVT_CALL(SetNpcPos, NPC_Rowf, -401, 0, 281)
|
||||
EVT_CALL(RotateGroup, MODEL_jutan2, 0, 0, 0, 1)
|
||||
EVT_WAIT(1)
|
||||
EVT_CALL(SetNpcAnimation, NPC_Rowf, ANIM_Rowf_Still)
|
||||
EVT_WAIT(5)
|
||||
EVT_CALL(InterpNpcYaw, NPC_Rhuff, 90, 0)
|
||||
EVT_CALL(SetNpcAnimation, NPC_Rowf, ANIM_Rowf_Think)
|
||||
EVT_WAIT(30)
|
||||
EVT_THREAD
|
||||
EVT_LOOP(2)
|
||||
EVT_CALL(SetNpcAnimation, NPC_Rhuff, ANIM_Rowf_WaveOff)
|
||||
EVT_WAIT(1)
|
||||
EVT_CALL(TranslateModel, MODEL_omote2, 0, 1, 0)
|
||||
EVT_WAIT(2)
|
||||
EVT_CALL(TranslateModel, MODEL_omote2, 0, 0, 0)
|
||||
EVT_WAIT(2)
|
||||
EVT_CALL(TranslateModel, MODEL_omote2, 0, 1, 0)
|
||||
EVT_WAIT(2)
|
||||
EVT_CALL(TranslateModel, MODEL_omote2, 0, 0, 0)
|
||||
EVT_WAIT(2)
|
||||
EVT_CALL(SetNpcAnimation, NPC_Rhuff, ANIM_Rowf_Idle)
|
||||
EVT_WAIT(20)
|
||||
EVT_END_LOOP
|
||||
EVT_LOOP(3)
|
||||
EVT_CALL(SetNpcAnimation, NPC_Rhuff, ANIM_Rowf_WaveOff)
|
||||
EVT_WAIT(1)
|
||||
EVT_CALL(TranslateModel, MODEL_omote2, 0, 1, 0)
|
||||
EVT_WAIT(2)
|
||||
EVT_CALL(TranslateModel, MODEL_omote2, 0, 0, 0)
|
||||
EVT_WAIT(2)
|
||||
EVT_CALL(TranslateModel, MODEL_omote2, 0, 1, 0)
|
||||
EVT_WAIT(2)
|
||||
EVT_CALL(TranslateModel, MODEL_omote2, 0, 0, 0)
|
||||
EVT_WAIT(2)
|
||||
EVT_CALL(SetNpcAnimation, NPC_Rhuff, ANIM_Rowf_Idle)
|
||||
EVT_WAIT(2)
|
||||
EVT_END_LOOP
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(SetNpcAnimation, NPC_Rowf, ANIM_Rowf_Still)
|
||||
EVT_WAIT(5)
|
||||
EVT_CALL(SetNpcAnimation, NPC_Rowf, ANIM_Rowf_Idle)
|
||||
EVT_WAIT(20)
|
||||
EVT_CALL(SetNpcAnimation, NPC_Rowf, ANIM_Rowf_Walk)
|
||||
EVT_CALL(NpcMoveTo, NPC_Rowf, -250, 295, 60)
|
||||
EVT_CALL(SetNpcAnimation, NPC_Rowf, ANIM_Rowf_Idle)
|
||||
EVT_WAIT(3)
|
||||
EVT_CALL(SetNpcAnimation, NPC_Rowf, ANIM_Rowf_WaveOff)
|
||||
EVT_WAIT(15)
|
||||
EVT_CALL(SetNpcAnimation, NPC_Rhuff, ANIM_Rowf_Cheer)
|
||||
EVT_WAIT(8)
|
||||
EVT_CALL(SetNpcAnimation, NPC_Rhuff, ANIM_Rowf_Still)
|
||||
EVT_CALL(InterpNpcYaw, NPC_Rhuff, -90, 0)
|
||||
EVT_WAIT(10)
|
||||
EVT_CALL(SetNpcAnimation, NPC_Rowf, ANIM_Rowf_Talk)
|
||||
EVT_CALL(SetNpcAnimation, NPC_Rhuff, ANIM_Rowf_Still)
|
||||
EVT_WAIT(30)
|
||||
EVT_CALL(SetNpcAnimation, NPC_Rowf, ANIM_Rowf_Think)
|
||||
EVT_CALL(SetNpcAnimation, NPC_Rhuff, ANIM_Rowf_Talk)
|
||||
EVT_WAIT(30)
|
||||
EVT_CALL(SetNpcAnimation, NPC_Rowf, ANIM_Rowf_Talk)
|
||||
EVT_CALL(SetNpcAnimation, NPC_Rhuff, ANIM_Rowf_Idle)
|
||||
EVT_WAIT(20)
|
||||
EVT_THREAD
|
||||
EVT_CALL(MakeLerp, 0, 90, 40, EASING_CUBIC_IN)
|
||||
EVT_LABEL(10)
|
||||
EVT_CALL(UpdateLerp)
|
||||
EVT_CALL(RotateGroup, MODEL_jutan2, LVar0, 0, 0, 1)
|
||||
EVT_IF_EQ(LVar1, 1)
|
||||
EVT_WAIT(1)
|
||||
EVT_GOTO(10)
|
||||
EVT_END_IF
|
||||
EVT_END_THREAD
|
||||
EVT_WAIT(15)
|
||||
EVT_CALL(ShowEmote, NPC_Rhuff, EMOTE_SHOCK, -45, 20, TRUE, 0, 0, 0, 0)
|
||||
EVT_CALL(SetNpcAnimation, NPC_Rhuff, ANIM_Rowf_Still)
|
||||
EVT_WAIT(10)
|
||||
EVT_CALL(SetNpcAnimation, NPC_Rowf, ANIM_Rowf_Still)
|
||||
EVT_GOTO(0)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcIdle_Rhuff_C) = {
|
||||
EVT_CALL(SetNpcPos, NPC_SELF, -225, 0, 330)
|
||||
EVT_LOOP(0)
|
||||
EVT_WAIT(1)
|
||||
EVT_SET(LVar0, 0)
|
||||
EVT_CALL(GetPlayerPos, LVar1, LVar2, LVar3)
|
||||
EVT_IF_LT(LVar1, 50)
|
||||
EVT_ADD(LVar0, 1)
|
||||
EVT_END_IF
|
||||
EVT_SWITCH(LVar3)
|
||||
EVT_CASE_RANGE(280, 380)
|
||||
EVT_ADD(LVar0, 1)
|
||||
EVT_END_SWITCH
|
||||
EVT_IF_EQ(LVar0, 2)
|
||||
EVT_BREAK_LOOP
|
||||
EVT_END_IF
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(DisablePlayerInput, TRUE)
|
||||
EVT_CALL(InterpPlayerYaw, 270, 0)
|
||||
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
|
||||
EVT_ADD(LVar0, -25)
|
||||
EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(4.0))
|
||||
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Rowf_Run)
|
||||
EVT_CALL(NpcMoveTo, NPC_SELF, LVar0, LVar2, 0)
|
||||
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Rowf_Idle)
|
||||
EVT_CALL(SpeakToPlayer, NPC_Rhuff, ANIM_Rowf_Talk, ANIM_Rowf_Cheer, 0, MSG_MAC_Plaza_0013)
|
||||
EVT_THREAD
|
||||
EVT_CALL(func_802D1270, -280, 330, EVT_FLOAT(4.0))
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(4.0))
|
||||
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Rowf_Run)
|
||||
EVT_CALL(NpcMoveTo, NPC_SELF, -305, 330, 0)
|
||||
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Rowf_Idle)
|
||||
EVT_WAIT(10)
|
||||
EVT_CALL(SpeakToPlayer, NPC_Rhuff, ANIM_Rowf_Talk, ANIM_Rowf_Cheer, 0, MSG_MAC_Plaza_0014)
|
||||
EVT_SET(GF_MAC01_Met_Rhuff, TRUE)
|
||||
EVT_CALL(DisablePlayerInput, FALSE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_UpdateRhuffAnims) = {
|
||||
EVT_SET(LVar0, EVT_FLOAT(53.0))
|
||||
EVT_SET(LVar1, EVT_FLOAT(-192.0))
|
||||
EVT_SET(LVar2, EVT_FLOAT(-300.0))
|
||||
EVT_SET(LVar3, EVT_FLOAT(425.0))
|
||||
EVT_CALL(GetNpcPointer, NPC_Rhuff, LVar7)
|
||||
EVT_LOOP(0)
|
||||
EVT_CALL(N(RhuffUnravelUpdate))
|
||||
EVT_CALL(SetNpcPos, NPC_Rhuff, LVar4, 0, LVar5)
|
||||
EVT_WAIT(1)
|
||||
EVT_END_LOOP
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
s32 N(D_802555AC_815E2C)[] = {
|
||||
600, 0, 598, 0,
|
||||
595, 0, 590, 0,
|
||||
583, 0, 574, 0,
|
||||
562, 0, 547, 0,
|
||||
529, 0, 509, 0,
|
||||
489, 0, 469, 0,
|
||||
449, 0, 429, 0,
|
||||
409, 0, 389, 0,
|
||||
369, 0, 349, 0,
|
||||
329, 0, 309, 0,
|
||||
289, 0, 269, 0,
|
||||
249, 0, 229, 0,
|
||||
209, 0, 189, 0,
|
||||
169, 0, 149, 0,
|
||||
129, 0, 109, 0,
|
||||
89, 0, 69, 0,
|
||||
49, 0, 29, 0,
|
||||
9, 0, -11, -11,
|
||||
-16, -16, -18, -18,
|
||||
-19, -19, -19, -19,
|
||||
-19, -19, -19, -19,
|
||||
-15, -15, -5, -5,
|
||||
2, 2, 3, 3,
|
||||
1, 1, 0, 0,
|
||||
0, 0, 0, 0,
|
||||
};
|
||||
|
||||
EvtScript N(EVS_Rhuff_RevealBadges) = {
|
||||
EVT_SET(MF_BadgeShopOpen, TRUE)
|
||||
EVT_CALL(SetNpcYaw, NPC_Rowf, 270)
|
||||
EVT_THREAD
|
||||
EVT_CALL(PlaySoundAt, SOUND_A9, 0, -220, 37, 271)
|
||||
EVT_CALL(MakeLerp, 0, -220, 30, EASING_COS_BOUNCE)
|
||||
EVT_LABEL(0)
|
||||
EVT_CALL(UpdateLerp)
|
||||
EVT_CALL(RotateModel, MODEL_omote, LVar0, 1, 0, 0)
|
||||
EVT_IF_EQ(LVar1, 1)
|
||||
EVT_WAIT(1)
|
||||
EVT_GOTO(0)
|
||||
EVT_END_IF
|
||||
EVT_END_THREAD
|
||||
EVT_WAIT(4)
|
||||
EVT_THREAD
|
||||
EVT_CALL(MakeLerp, 0, -120, 10, EASING_COS_SLOW_OVERSHOOT)
|
||||
EVT_LABEL(1)
|
||||
EVT_CALL(UpdateLerp)
|
||||
EVT_DIVF(LVar0, EVT_FLOAT(10.0))
|
||||
EVT_CALL(TranslateModel, MODEL_omote2, 0, LVar0, 0)
|
||||
EVT_IF_EQ(LVar1, 1)
|
||||
EVT_WAIT(1)
|
||||
EVT_GOTO(1)
|
||||
EVT_END_IF
|
||||
EVT_END_THREAD
|
||||
EVT_THREAD
|
||||
EVT_CALL(MakeLerp, 0, 100, 5, EASING_COS_SLOW_OVERSHOOT)
|
||||
EVT_LABEL(2)
|
||||
EVT_CALL(UpdateLerp)
|
||||
EVT_DIVF(LVar0, EVT_FLOAT(10.0))
|
||||
EVT_CALL(TranslateModel, MODEL_ura, 0, 0, LVar0)
|
||||
EVT_IF_EQ(LVar1, 1)
|
||||
EVT_WAIT(1)
|
||||
EVT_GOTO(2)
|
||||
EVT_END_IF
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(EnableModel, MODEL_ju_1, TRUE)
|
||||
EVT_CALL(N(RevealRowfBadges))
|
||||
EVT_CALL(PlaySoundAtCollider, COLLIDER_o295, SOUND_AA, 0)
|
||||
EVT_USE_BUF(EVT_PTR(N(D_802555AC_815E2C)))
|
||||
EVT_LOOP(50)
|
||||
EVT_BUF_READ2(LVar0, MV_RowfRugRippleAmount)
|
||||
EVT_CALL(RotateGroup, MODEL_jutan2, LVar0, 0, 1, 0)
|
||||
EVT_DIVF(LVar0, EVT_FLOAT(10.0))
|
||||
EVT_SET(MV_RowfRugRotateAngle, LVar0)
|
||||
EVT_CALL(RotateGroup, MODEL_jutan1, LVar0, 0, 1, 0)
|
||||
EVT_DIVF(LVar0, EVT_FLOAT(200.0))
|
||||
EVT_ADDF(LVar0, EVT_FLOAT(1.0))
|
||||
EVT_CALL(ScaleGroup, MODEL_jutan2, LVar0, 1, LVar0)
|
||||
EVT_WAIT(1)
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(NpcJump0, NPC_Rowf, -213, 6, 256, 16)
|
||||
EVT_IF_EQ(GF_MAC01_RowfBadgeAvailableA, FALSE)
|
||||
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_b3, COLLIDER_FLAGS_UPPER_MASK)
|
||||
EVT_END_IF
|
||||
EVT_IF_EQ(GF_MAC01_RowfBadgeAvailableB, FALSE)
|
||||
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_b2, COLLIDER_FLAGS_UPPER_MASK)
|
||||
EVT_END_IF
|
||||
EVT_IF_EQ(GF_MAC01_RowfBadgeAvailableC, FALSE)
|
||||
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_b1, COLLIDER_FLAGS_UPPER_MASK)
|
||||
EVT_END_IF
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_Rhuff_HideBadges) = {
|
||||
EVT_SET(MF_BadgeShopOpen, FALSE)
|
||||
EVT_IF_EQ(GF_MAC01_RowfBadgeAvailableA, FALSE)
|
||||
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_b3, COLLIDER_FLAGS_UPPER_MASK)
|
||||
EVT_END_IF
|
||||
EVT_IF_EQ(GF_MAC01_RowfBadgeAvailableB, FALSE)
|
||||
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_b2, COLLIDER_FLAGS_UPPER_MASK)
|
||||
EVT_END_IF
|
||||
EVT_IF_EQ(GF_MAC01_RowfBadgeAvailableC, FALSE)
|
||||
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_b1, COLLIDER_FLAGS_UPPER_MASK)
|
||||
EVT_END_IF
|
||||
EVT_CALL(NpcJump0, NPC_Rowf, -220, -54, 261, 16)
|
||||
EVT_THREAD
|
||||
EVT_CALL(PlaySoundAtCollider, COLLIDER_o295, SOUND_AC, 0)
|
||||
EVT_CALL(MakeLerp, 0, 600, 50, EASING_LINEAR)
|
||||
EVT_LABEL(10)
|
||||
EVT_CALL(UpdateLerp)
|
||||
EVT_CALL(RotateGroup, MODEL_jutan2, LVar0, 0, 1, 0)
|
||||
EVT_DIVF(LVar0, EVT_FLOAT(10.0))
|
||||
EVT_SET(MV_RowfRugRotateAngle, LVar0)
|
||||
EVT_CALL(RotateGroup, MODEL_jutan1, LVar0, 0, 1, 0)
|
||||
EVT_DIVF(LVar0, EVT_FLOAT(200.0))
|
||||
EVT_ADDF(LVar0, EVT_FLOAT(1.0))
|
||||
EVT_CALL(ScaleGroup, MODEL_jutan2, LVar0, 1, LVar0)
|
||||
EVT_IF_EQ(LVar1, 1)
|
||||
EVT_WAIT(1)
|
||||
EVT_GOTO(10)
|
||||
EVT_END_IF
|
||||
EVT_CALL(EnableModel, MODEL_ju_1, FALSE)
|
||||
EVT_CALL(N(HideRowfBadges))
|
||||
EVT_END_THREAD
|
||||
EVT_WAIT(10)
|
||||
EVT_THREAD
|
||||
EVT_CALL(MakeLerp, -220, 0, 20, EASING_QUADRATIC_IN)
|
||||
EVT_LABEL(0)
|
||||
EVT_CALL(UpdateLerp)
|
||||
EVT_CALL(RotateModel, MODEL_omote, LVar0, 1, 0, 0)
|
||||
EVT_IF_EQ(LVar1, 1)
|
||||
EVT_WAIT(1)
|
||||
EVT_GOTO(0)
|
||||
EVT_END_IF
|
||||
EVT_CALL(PlaySoundAt, SOUND_AB, 0, -220, 37, 271)
|
||||
EVT_END_THREAD
|
||||
EVT_WAIT(15)
|
||||
EVT_THREAD
|
||||
EVT_CALL(MakeLerp, -120, 0, 10, EASING_COS_IN_OUT)
|
||||
EVT_LABEL(1)
|
||||
EVT_CALL(UpdateLerp)
|
||||
EVT_DIVF(LVar0, EVT_FLOAT(10.0))
|
||||
EVT_CALL(TranslateModel, MODEL_omote2, 0, LVar0, 0)
|
||||
EVT_IF_EQ(LVar1, 1)
|
||||
EVT_WAIT(1)
|
||||
EVT_GOTO(1)
|
||||
EVT_END_IF
|
||||
EVT_END_THREAD
|
||||
EVT_THREAD
|
||||
EVT_CALL(MakeLerp, 100, 0, 5, EASING_COS_IN_OUT)
|
||||
EVT_LABEL(2)
|
||||
EVT_CALL(UpdateLerp)
|
||||
EVT_DIVF(LVar0, EVT_FLOAT(10.0))
|
||||
EVT_CALL(TranslateModel, MODEL_ura, 0, 0, LVar0)
|
||||
EVT_IF_EQ(LVar1, 1)
|
||||
EVT_WAIT(1)
|
||||
EVT_GOTO(2)
|
||||
EVT_END_IF
|
||||
EVT_END_THREAD
|
||||
EVT_WAIT(31)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
enum BadgeShopStates {
|
||||
BADGE_SHOP_OPEN_READY = 0,
|
||||
BADGE_SHOP_OPENING = 1,
|
||||
BADGE_SHOP_OPEN = 2,
|
||||
BADGE_SHOP_CLOSE_WAITING = 1,
|
||||
BADGE_SHOP_CLOSING = 2,
|
||||
BADGE_SHOP_CLOSE_READY = 0,
|
||||
};
|
||||
|
||||
EvtScript N(EVS_EnterBadgeShop) = {
|
||||
EVT_IF_GE(MV_BadgeShopOpenState, BADGE_SHOP_OPENING)
|
||||
EVT_RETURN
|
||||
EVT_END_IF
|
||||
EVT_IF_GE(MV_BadgeShopCloseState, BADGE_SHOP_CLOSE_WAITING)
|
||||
EVT_RETURN
|
||||
EVT_END_IF
|
||||
EVT_SET(MF_BadgeShopOpen, TRUE)
|
||||
EVT_SET(MV_BadgeShopOpenState, BADGE_SHOP_OPENING)
|
||||
EVT_EXEC_WAIT(N(EVS_Rhuff_RevealBadges))
|
||||
EVT_SET(MV_BadgeShopOpenState, BADGE_SHOP_OPEN)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_ExitBadgeShop) = {
|
||||
EVT_IF_EQ(MV_BadgeShopOpenState, BADGE_SHOP_OPEN_READY)
|
||||
EVT_RETURN
|
||||
EVT_END_IF
|
||||
EVT_SET(MV_BadgeShopCloseState, BADGE_SHOP_CLOSE_WAITING)
|
||||
EVT_SET(MF_BadgeShopOpen, FALSE)
|
||||
EVT_LABEL(10)
|
||||
EVT_IF_EQ(MV_BadgeShopOpenState, BADGE_SHOP_OPENING)
|
||||
EVT_WAIT(1)
|
||||
EVT_GOTO(10)
|
||||
EVT_END_IF
|
||||
EVT_SET(MV_BadgeShopCloseState, BADGE_SHOP_CLOSING)
|
||||
EVT_EXEC_WAIT(N(EVS_Rhuff_HideBadges))
|
||||
EVT_SET(MV_BadgeShopOpenState, BADGE_SHOP_OPEN_READY)
|
||||
EVT_SET(MV_BadgeShopCloseState, BADGE_SHOP_CLOSE_READY)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
API_CALLABLE(N(RowfShop_SetBadgePos)) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 idx = evt_get_variable(script, *args++);
|
||||
|
||||
set_item_entity_position(
|
||||
gGameStatusPtr->shopItemEntities[idx].index,
|
||||
script->varTable[0], script->varTable[1], script->varTable[2] + 6
|
||||
);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
EvtScript N(EVS_NpcInit_Rowf) = {
|
||||
EVT_SET(MV_BadgeShopOpenState, 0)
|
||||
EVT_SET(MV_BadgeShopCloseState, 0)
|
||||
EVT_SET(AF_MAC_40, FALSE)
|
||||
EVT_SWITCH(GB_StoryProgress)
|
||||
EVT_CASE_LT(STORY_CH1_DEFEATED_JR_TROOPA)
|
||||
EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Rowf_A)))
|
||||
EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Rowf)))
|
||||
EVT_CASE_LT(STORY_CH3_STAR_SPRIT_DEPARTED)
|
||||
EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Rowf_B)))
|
||||
EVT_SET(AF_MAC_40, TRUE)
|
||||
EVT_CASE_DEFAULT
|
||||
EVT_IF_EQ(GF_MAC01_CalculatorReturned, TRUE)
|
||||
EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Rowf_B)))
|
||||
EVT_SET(AF_MAC_40, TRUE)
|
||||
EVT_ELSE
|
||||
EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Rowf_C)))
|
||||
EVT_CALL(SetNpcPos, NPC_Rowf, -250, 0, 295)
|
||||
EVT_END_IF
|
||||
EVT_END_SWITCH
|
||||
EVT_SET(AF_MAC_41, FALSE)
|
||||
EVT_CALL(SetModelFlags, MODEL_ju_2, MODEL_FLAGS_FLAG_200, FALSE)
|
||||
EVT_CALL(EnableGroup, MODEL_jutan1, FALSE)
|
||||
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_b1, COLLIDER_FLAGS_UPPER_MASK)
|
||||
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_b2, COLLIDER_FLAGS_UPPER_MASK)
|
||||
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_b3, COLLIDER_FLAGS_UPPER_MASK)
|
||||
EVT_CALL(RotateGroup, MODEL_jutan1, 60, 0, 1, 0)
|
||||
EVT_CALL(RotateGroup, MODEL_jutan2, 0, 0, 1, 0)
|
||||
EVT_CALL(ScaleGroup, MODEL_jutan2, EVT_FLOAT(1.3), 1, EVT_FLOAT(1.3))
|
||||
EVT_SET(MV_RowfRugRotateAngle, 60)
|
||||
EVT_CALL(MakeLocalVertexCopy, VTX_COPY_0, MODEL_ju_1, TRUE)
|
||||
EVT_CALL(SetCustomGfxBuilders, CUSTOM_GFX_0, EVT_PTR(N(gfx_build_rowf_rug_with_ripples)), 0)
|
||||
EVT_CALL(SetModelCustomGfx, MODEL_ju_1, CUSTOM_GFX_0, -1)
|
||||
EVT_IF_EQ(AF_MAC_40, TRUE)
|
||||
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_EnterBadgeShop)), TRIGGER_FLOOR_TOUCH, COLLIDER_roten, 1, 0)
|
||||
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitBadgeShop)), TRIGGER_FLOOR_TOUCH, COLLIDER_o444, 1, 0)
|
||||
EVT_CALL(SetNpcJumpscale, NPC_Rowf, 1)
|
||||
EVT_END_IF
|
||||
EVT_THREAD
|
||||
EVT_WAIT(5)
|
||||
EVT_CALL(SetModelFlags, MODEL_b1, MODEL_FLAGS_FLAG_4, FALSE)
|
||||
EVT_CALL(SetModelFlags, MODEL_b2, MODEL_FLAGS_FLAG_4, FALSE)
|
||||
EVT_CALL(SetModelFlags, MODEL_b3, MODEL_FLAGS_FLAG_4, FALSE)
|
||||
EVT_CALL(N(HideRowfBadges))
|
||||
EVT_LABEL(0)
|
||||
EVT_IF_EQ(GF_MAC01_RowfBadgeAvailableA, FALSE)
|
||||
EVT_CALL(GetModelCenter, MODEL_b3)
|
||||
EVT_CALL(N(RowfShop_SetBadgePos), 0)
|
||||
EVT_END_IF
|
||||
EVT_IF_EQ(GF_MAC01_RowfBadgeAvailableB, FALSE)
|
||||
EVT_CALL(GetModelCenter, MODEL_b2)
|
||||
EVT_CALL(N(RowfShop_SetBadgePos), 1)
|
||||
EVT_END_IF
|
||||
EVT_IF_EQ(GF_MAC01_RowfBadgeAvailableC, FALSE)
|
||||
EVT_CALL(GetModelCenter, MODEL_b1)
|
||||
EVT_CALL(N(RowfShop_SetBadgePos), 2)
|
||||
EVT_END_IF
|
||||
EVT_WAIT(1)
|
||||
EVT_GOTO(0)
|
||||
EVT_END_THREAD
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInit_Rhuff) = {
|
||||
EVT_CALL(SetNpcScale, NPC_Rhuff, EVT_FLOAT(0.75), EVT_FLOAT(0.75), EVT_FLOAT(0.75))
|
||||
EVT_CALL(SetNpcPos, NPC_Rhuff, -230, 0, 320)
|
||||
EVT_CALL(InterpNpcYaw, NPC_Rhuff, -90, 0)
|
||||
EVT_CALL(SetNpcAnimation, NPC_Rhuff, ANIM_Rowf_Idle)
|
||||
EVT_SWITCH(GB_StoryProgress)
|
||||
EVT_CASE_LT(STORY_CH1_DEFEATED_JR_TROOPA)
|
||||
EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_RhuffChapter1)))
|
||||
EVT_CASE_LT(STORY_CH2_BEGAN_PEACH_MISSION)
|
||||
EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Rhuff_B)))
|
||||
EVT_IF_EQ(GF_MAC01_Met_Rhuff, FALSE)
|
||||
EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Rhuff_C)))
|
||||
EVT_ELSE
|
||||
EVT_CALL(SetNpcPos, NPC_SELF, -305, 0, 330)
|
||||
EVT_CALL(SetNpcYaw, NPC_SELF, 90)
|
||||
EVT_END_IF
|
||||
EVT_CASE_LT(STORY_CH3_STAR_SPRIT_DEPARTED)
|
||||
EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Rhuff_C)))
|
||||
EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_UpdateRhuffAnims)))
|
||||
EVT_CASE_DEFAULT
|
||||
EVT_IF_EQ(GF_MAC01_CalculatorReturned, TRUE)
|
||||
EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Rhuff_C)))
|
||||
EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_UpdateRhuffAnims)))
|
||||
EVT_ELSE
|
||||
EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Rhuff_D)))
|
||||
EVT_END_IF
|
||||
EVT_END_SWITCH
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
s32 N(ExtraAnims_Rowf)[] = {
|
||||
ANIM_Rowf_Still,
|
||||
ANIM_Rowf_Idle,
|
||||
ANIM_Rowf_Walk,
|
||||
ANIM_Rowf_Talk,
|
||||
ANIM_Rowf_Cheer,
|
||||
ANIM_Rowf_Think,
|
||||
ANIM_Rowf_WaveOff,
|
||||
-1
|
||||
};
|
||||
|
||||
NpcSettings N(NpcSettings_Rowf) = {
|
||||
.height = 36,
|
||||
.radius = 24,
|
||||
.flags = ENEMY_FLAGS_1,
|
||||
};
|
||||
|
||||
NpcSettings N(NpcSettings_Rhuff) = {
|
||||
.height = 27,
|
||||
.radius = 18,
|
||||
.flags = ENEMY_FLAGS_1,
|
||||
};
|
||||
|
||||
StaticNpc N(NpcData_RowfAndRhuff)[] = {
|
||||
{
|
||||
.id = NPC_Rowf,
|
||||
.settings = &N(NpcSettings_Rowf),
|
||||
.pos = { -213.0f, -54.0f, 256.0f },
|
||||
.yaw = 90,
|
||||
.flags = ENEMY_FLAGS_1 | ENEMY_FLAGS_8 | ENEMY_FLAGS_100 | ENEMY_FLAGS_400 | ENEMY_FLAGS_800 | ENEMY_FLAGS_2000,
|
||||
.init = &N(EVS_NpcInit_Rowf),
|
||||
.drops = {
|
||||
.dropFlags = NPC_DROP_FLAGS_80,
|
||||
.heartDrops = NO_DROPS,
|
||||
.flowerDrops = NO_DROPS,
|
||||
},
|
||||
.animations = {
|
||||
.idle = ANIM_Rowf_Idle,
|
||||
},
|
||||
.extraAnimations = N(ExtraAnims_Rowf),
|
||||
.tattle = MSG_NpcTattle_Rowf,
|
||||
},
|
||||
{
|
||||
.id = NPC_Rhuff,
|
||||
.settings = &N(NpcSettings_Rhuff),
|
||||
.pos = { -250.0f, 0.0f, 263.0f },
|
||||
.yaw = 90,
|
||||
.flags = ENEMY_FLAGS_1 | ENEMY_FLAGS_8 | ENEMY_FLAGS_100 | ENEMY_FLAGS_400 | ENEMY_FLAGS_800 | ENEMY_FLAGS_2000,
|
||||
.init = &N(EVS_NpcInit_Rhuff),
|
||||
.drops = {
|
||||
.dropFlags = NPC_DROP_FLAGS_80,
|
||||
.heartDrops = NO_DROPS,
|
||||
.flowerDrops = NO_DROPS,
|
||||
},
|
||||
.animations = {
|
||||
.idle = ANIM_Rowf_Idle,
|
||||
},
|
||||
.extraAnimations = N(ExtraAnims_Rowf),
|
||||
.tattle = MSG_NpcTattle_Rhuff,
|
||||
},
|
||||
};
|
@ -468,7 +468,7 @@ StaticNpc N(NpcData_PostChapter4)[] = {
|
||||
StaticNpc N(NpcData_GoombaFamily)[] = {
|
||||
{
|
||||
.id = NPC_Goomama,
|
||||
.settings = &N(NpcSettings_Goomba_Family),
|
||||
.settings = &N(NpcSettings_GoombaFamily),
|
||||
.pos = { -126.0f, 0.0f, 329.0f },
|
||||
.yaw = 90,
|
||||
.flags = ENEMY_FLAGS_1 | ENEMY_FLAGS_8 | ENEMY_FLAGS_100 | ENEMY_FLAGS_400 | ENEMY_FLAGS_800 | ENEMY_FLAGS_2000,
|
||||
@ -479,7 +479,7 @@ StaticNpc N(NpcData_GoombaFamily)[] = {
|
||||
},
|
||||
{
|
||||
.id = NPC_Goombaria,
|
||||
.settings = &N(NpcSettings_Goomba_Family),
|
||||
.settings = &N(NpcSettings_GoombaFamily),
|
||||
.pos = { -117.0f, 0.0f, 305.0f },
|
||||
.yaw = 270,
|
||||
.flags = ENEMY_FLAGS_1 | ENEMY_FLAGS_8 | ENEMY_FLAGS_100 | ENEMY_FLAGS_400 | ENEMY_FLAGS_800 | ENEMY_FLAGS_2000,
|
||||
|
@ -22,7 +22,7 @@ Vec3f N(FlightPath_TwinkDepart)[] = {
|
||||
EvtScript N(EVS_NpcIdle_TwinkStartCh4) = {
|
||||
EVT_CALL(WaitForPlayerInputEnabled)
|
||||
EVT_CALL(DisablePlayerInput, TRUE)
|
||||
EVT_CALL(PushSong, 112, 0)
|
||||
EVT_CALL(PushSong, SONG_TWINK_THEME, 0)
|
||||
EVT_CALL(ShowMessageAtScreenPos, MSG_MAC_Bridge_008F, 160, 40)
|
||||
EVT_CALL(GetPlayerPos, LVar4, LVar5, LVar6)
|
||||
EVT_SUBF(LVar4, EVT_FLOAT(50.0))
|
||||
|
@ -129,67 +129,58 @@ EvtScript N(EVS_Kolorado_TryArtifactTrade) = {
|
||||
EVT_END
|
||||
};
|
||||
|
||||
// float stuff
|
||||
#ifdef NON_MATCHING
|
||||
API_CALLABLE(func_80242A90_854C00) {
|
||||
API_CALLABLE(N(func_80242A90_854C00)) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 temp_s1 = evt_get_variable(script, *args++);
|
||||
s32 temp_s3 = *args++;
|
||||
s32 temp_s4 = *args++;
|
||||
s32 temp_s5 = *args++;
|
||||
Npc* npc = get_npc_safe(0);
|
||||
f32 temp_f20;
|
||||
f32 var_f20;
|
||||
f32 var_f22;
|
||||
f32 var_f24;
|
||||
f32 var_f26;
|
||||
s32 mode = evt_get_variable(script, *args++);
|
||||
s32 outVarX = *args++;
|
||||
s32 outVarY = *args++;
|
||||
s32 outVarZ = *args++;
|
||||
Npc* npc = get_npc_safe(NPC_Whale);
|
||||
f32 posX, posY, posZ;
|
||||
f32 radius, angle;
|
||||
|
||||
switch (temp_s1) {
|
||||
switch (mode) {
|
||||
case 0:
|
||||
var_f26 = 55.0f;
|
||||
radius = 55.0f;
|
||||
break;
|
||||
case 1:
|
||||
var_f26 = 85.0f;
|
||||
radius = 85.0f;
|
||||
break;
|
||||
case 2:
|
||||
var_f26 = 25.0f;
|
||||
radius = 25.0f;
|
||||
break;
|
||||
case 3:
|
||||
var_f24 = -295.0f;
|
||||
var_f22 = -10.0f;
|
||||
var_f20 = 400.0f;
|
||||
posX = -295.0f;
|
||||
posY = -10.0f;
|
||||
posZ = 400.0f;
|
||||
break;
|
||||
case 4:
|
||||
var_f24 = -285.0f;
|
||||
var_f22 = -10.0f;
|
||||
var_f20 = 380.0f;
|
||||
posX = -285.0f;
|
||||
posY = -10.0f;
|
||||
posZ = 380.0f;
|
||||
break;
|
||||
default:
|
||||
var_f24 = -295.0f;
|
||||
var_f22 = -10.0f;
|
||||
var_f20 = 420.0f;
|
||||
posX = -295.0f;
|
||||
posY = -10.0f;
|
||||
posZ = 420.0f;
|
||||
break;
|
||||
}
|
||||
if (temp_s1 < 3) {
|
||||
temp_f20 = -npc->yaw;
|
||||
var_f24 = npc->pos.x + 30.0f + (sin_deg(temp_f20) * var_f26);
|
||||
var_f22 = npc->pos.y + 50.0f;
|
||||
var_f20 = npc->pos.z + (cos_deg(temp_f20) * var_f26);
|
||||
if (mode < 3) {
|
||||
angle = -npc->yaw;
|
||||
posX = npc->pos.x + 30.0f + sin_deg(angle) * radius;
|
||||
posZ = npc->pos.z + cos_deg(angle) * radius;
|
||||
posY = npc->pos.y + 50.0f;
|
||||
}
|
||||
evt_set_float_variable(script, temp_s3, var_f24);
|
||||
evt_set_float_variable(script, temp_s4, var_f22);
|
||||
evt_set_float_variable(script, temp_s5, var_f20);
|
||||
evt_set_float_variable(script, outVarX, posX);
|
||||
evt_set_float_variable(script, outVarY, posY);
|
||||
evt_set_float_variable(script, outVarZ, posZ);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
#else
|
||||
API_CALLABLE(func_80242A90_854C00);
|
||||
INCLUDE_ASM(s32, "world/area_mac/mac_05/852170", func_80242A90_854C00);
|
||||
#endif
|
||||
|
||||
// maybe a duplicate, not sure if the NPCs are the same
|
||||
API_CALLABLE(N(func_80242C78_854DE8)) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
Npc* npc0 = get_npc_safe(0);
|
||||
Npc* npc0 = get_npc_safe(NPC_Whale);
|
||||
Npc* npc1;
|
||||
Npc* partner;
|
||||
f32 forward, radius;
|
||||
@ -605,19 +596,19 @@ EvtScript N(EVS_802496FC) = {
|
||||
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt9, COLLIDER_FLAGS_UPPER_MASK)
|
||||
EVT_IF_EQ(GB_StoryProgress, STORY_CH5_TRADED_VASE_FOR_SEED)
|
||||
EVT_CALL(SetNpcAnimation, NPC_Kolorado, ANIM_Kolorado_Run)
|
||||
EVT_CALL(func_80242A90_854C00, 5, LVar0, LVar1, LVar2)
|
||||
EVT_CALL(N(func_80242A90_854C00), 5, LVar0, LVar1, LVar2)
|
||||
EVT_CALL(PlaySoundAtNpc, NPC_Kolorado, SOUND_32C, 0)
|
||||
EVT_CALL(SetNpcJumpscale, NPC_Kolorado, EVT_FLOAT(1.0))
|
||||
EVT_CALL(NpcJump0, NPC_Kolorado, LVar0, LVar1, LVar2, 20)
|
||||
EVT_CALL(SetNpcAnimation, NPC_Kolorado, ANIM_Kolorado_Idle)
|
||||
EVT_END_IF
|
||||
EVT_CALL(func_80242A90_854C00, 3, LVar0, LVar1, LVar2)
|
||||
EVT_CALL(N(func_80242A90_854C00), 3, LVar0, LVar1, LVar2)
|
||||
EVT_EXEC(N(D_802496C0_85B830))
|
||||
EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(1.0))
|
||||
EVT_CALL(PlayerJump, LVar0, LVar1, LVar2, 20)
|
||||
EVT_CALL(SetPlayerAnimation, ANIM_Mario_10002)
|
||||
EVT_CALL(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_TALK)
|
||||
EVT_CALL(func_80242A90_854C00, 4, LVar0, LVar1, LVar2)
|
||||
EVT_CALL(N(func_80242A90_854C00), 4, LVar0, LVar1, LVar2)
|
||||
EVT_CALL(SetNpcJumpscale, NPC_PARTNER, EVT_FLOAT(1.0))
|
||||
EVT_CALL(NpcJump0, NPC_PARTNER, LVar0, LVar1, LVar2, 20)
|
||||
EVT_CALL(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_RUN)
|
||||
@ -1002,7 +993,7 @@ EvtScript N(EVS_NpcInteract_Toad_01) = {
|
||||
EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE)
|
||||
EVT_CALL(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_RUN)
|
||||
EVT_CALL(GetPlayerPos, LVar3, LVar4, LVar5)
|
||||
EVT_CALL(func_80242A90_854C00, 0, LVar0, LVar1, LVar2)
|
||||
EVT_CALL(N(func_80242A90_854C00), 0, LVar0, LVar1, LVar2)
|
||||
EVT_EXEC(N(D_802496C0_85B830))
|
||||
EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(1.0))
|
||||
EVT_CALL(PlayerJump, LVar0, LVar1, LVar2, 20)
|
||||
@ -1013,7 +1004,7 @@ EvtScript N(EVS_NpcInteract_Toad_01) = {
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_TALK)
|
||||
EVT_CALL(NpcMoveTo, NPC_PARTNER, LVar3, LVar5, 10)
|
||||
EVT_CALL(func_80242A90_854C00, 1, LVar0, LVar1, LVar2)
|
||||
EVT_CALL(N(func_80242A90_854C00), 1, LVar0, LVar1, LVar2)
|
||||
EVT_CALL(SetNpcJumpscale, NPC_PARTNER, EVT_FLOAT(1.0))
|
||||
EVT_CALL(NpcJump0, NPC_PARTNER, LVar0, LVar1, LVar2, 20)
|
||||
EVT_CALL(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_RUN)
|
||||
@ -1025,7 +1016,7 @@ EvtScript N(EVS_NpcInteract_Toad_01) = {
|
||||
EVT_CALL(SpeakToPlayer, NPC_Kolorado, ANIM_Kolorado_Talk, ANIM_Kolorado_Talk, 0, MSG_MAC_Port_00AD)
|
||||
EVT_CALL(SetNpcAnimation, NPC_Kolorado, ANIM_Kolorado_Run)
|
||||
EVT_CALL(NpcMoveTo, NPC_Kolorado, LVar3, LVar5, 20)
|
||||
EVT_CALL(func_80242A90_854C00, 2, LVar0, LVar1, LVar2)
|
||||
EVT_CALL(N(func_80242A90_854C00), 2, LVar0, LVar1, LVar2)
|
||||
EVT_CALL(PlaySoundAtNpc, NPC_Kolorado, SOUND_32C, 0)
|
||||
EVT_CALL(SetNpcJumpscale, NPC_Kolorado, EVT_FLOAT(1.0))
|
||||
EVT_CALL(NpcJump0, NPC_Kolorado, LVar0, LVar1, LVar2, 20)
|
||||
|
@ -228,12 +228,12 @@ EvtScript N(D_802516CC_86383C) = {
|
||||
|
||||
EvtScript N(EVS_8025194C) = {
|
||||
EVT_SET_GROUP(EVT_GROUP_00)
|
||||
EVT_CALL(MakeLocalVertexCopy, 1, MODEL_karada, TRUE)
|
||||
EVT_CALL(SetCustomGfxBuilders, 1, EVT_PTR(N(unkAngleFunc002)), 0)
|
||||
EVT_CALL(SetModelCustomGfx, MODEL_karada, 1, -1)
|
||||
EVT_CALL(MakeLocalVertexCopy, 2, MODEL_onaka, TRUE)
|
||||
EVT_CALL(SetCustomGfxBuilders, 2, EVT_PTR(N(unkAngleFunc003)), 0)
|
||||
EVT_CALL(SetModelCustomGfx, MODEL_onaka, 2, -1)
|
||||
EVT_CALL(MakeLocalVertexCopy, VTX_COPY_1, MODEL_karada, TRUE)
|
||||
EVT_CALL(SetCustomGfxBuilders, CUSTOM_GFX_1, EVT_PTR(N(unkAngleFunc002)), 0)
|
||||
EVT_CALL(SetModelCustomGfx, MODEL_karada, CUSTOM_GFX_1, -1)
|
||||
EVT_CALL(MakeLocalVertexCopy, VTX_COPY_2, MODEL_onaka, TRUE)
|
||||
EVT_CALL(SetCustomGfxBuilders, CUSTOM_GFX_2, EVT_PTR(N(unkAngleFunc003)), 0)
|
||||
EVT_CALL(SetModelCustomGfx, MODEL_onaka, CUSTOM_GFX_2, -1)
|
||||
EVT_THREAD
|
||||
EVT_LABEL(0)
|
||||
EVT_CALL(N(UnkAngleFunc001), 0, LVar0, LVar1, LVar2)
|
||||
|
@ -4,76 +4,64 @@ s32 N(UnusedInt) = 0;
|
||||
|
||||
f32 N(Club64SignAlphaModulus) = 0.0f;
|
||||
|
||||
// ordering
|
||||
#ifdef NON_MATCHING
|
||||
void func_80243DB0_855F20(f32 arg0, f32 arg1, f32 arg2, f32* arg3, f32* arg4, f32* arg5) {
|
||||
f32 temp_f0;
|
||||
f32 temp_f0_2;
|
||||
f32 temp_f12;
|
||||
f32 temp_f2_2;
|
||||
f32 temp_f4;
|
||||
f32 temp_f8;
|
||||
f32 var_f6;
|
||||
s32 temp_f10;
|
||||
f64 temp_f2;
|
||||
void N(hsl_to_rgb)(f32 hue, f32 saturation, f32 lightness, f32* outR, f32* outG, f32* outB) {
|
||||
f32 hueSector;
|
||||
f32 p, q, m;
|
||||
f32 s, t;
|
||||
|
||||
if (arg2 <= 0.5f) {
|
||||
temp_f2 = (f64) arg2;
|
||||
var_f6 = (arg1 * temp_f2) + temp_f2;
|
||||
if (lightness <= 0.5f) {
|
||||
q = lightness * (1.0 + saturation);
|
||||
} else {
|
||||
var_f6 = (arg2 + arg1) - (arg2 * arg1);
|
||||
q = (lightness + saturation) - (lightness * saturation);
|
||||
}
|
||||
|
||||
if (var_f6 == 0.0f) {
|
||||
*arg5 = 0.0f;
|
||||
*arg4 = 0.0f;
|
||||
*arg3 = 0.0f;
|
||||
if (q == 0.0f) {
|
||||
*outB = 0.0f;
|
||||
*outG = 0.0f;
|
||||
*outR = 0.0f;
|
||||
return;
|
||||
}
|
||||
temp_f12 = arg0 * 6.0f;
|
||||
temp_f8 = (2.0f * arg2) - var_f6;
|
||||
temp_f4 = (s32) temp_f12;
|
||||
temp_f0 = var_f6 * ((var_f6 - temp_f8) / var_f6) * (temp_f12 - temp_f4);
|
||||
temp_f2_2 = temp_f8 + temp_f0;
|
||||
temp_f0_2 = var_f6 - temp_f0;
|
||||
temp_f10 = (s32) temp_f4;
|
||||
switch (temp_f10) {
|
||||
|
||||
hue *= 6.0f;
|
||||
hueSector = (s32) hue;
|
||||
p = (2 * lightness) - q;
|
||||
m = q * ((q - p) / q) * (hue - hueSector);
|
||||
s = p + m;
|
||||
t = q - m;
|
||||
|
||||
switch ((s32) hueSector) {
|
||||
case 0:
|
||||
*arg3 = var_f6;
|
||||
*arg4 = temp_f2_2;
|
||||
*arg5 = temp_f8;
|
||||
*outR = q;
|
||||
*outG = s;
|
||||
*outB = p;
|
||||
break;
|
||||
case 1:
|
||||
*arg3 = temp_f0_2;
|
||||
*arg4 = var_f6;
|
||||
*arg5 = temp_f8;
|
||||
*outR = t;
|
||||
*outG = q;
|
||||
*outB = p;
|
||||
break;
|
||||
case 2:
|
||||
*arg3 = temp_f8;
|
||||
*arg4 = var_f6;
|
||||
*arg5 = temp_f2_2;
|
||||
*outR = p;
|
||||
*outG = q;
|
||||
*outB = s;
|
||||
break;
|
||||
case 3:
|
||||
*arg3 = temp_f8;
|
||||
*arg4 = temp_f0_2;
|
||||
*arg5 = var_f6;
|
||||
*outR = p;
|
||||
*outG = t;
|
||||
*outB = q;
|
||||
break;
|
||||
case 4:
|
||||
*arg3 = temp_f2_2;
|
||||
*arg4 = temp_f8;
|
||||
*arg5 = var_f6;
|
||||
*outR = s;
|
||||
*outG = p;
|
||||
*outB = q;
|
||||
break;
|
||||
case 5:
|
||||
*arg3 = var_f6;
|
||||
*arg4 = temp_f8;
|
||||
*arg5 = temp_f0_2;
|
||||
*outR = q;
|
||||
*outG = p;
|
||||
*outB = t;
|
||||
break;
|
||||
}
|
||||
}
|
||||
#else
|
||||
void func_80243DB0_855F20(f32 arg0, f32 arg1, f32 arg2, f32* arg3, f32* arg4, f32* arg5);
|
||||
INCLUDE_ASM(s32, "world/area_mac/mac_05/855F20", func_80243DB0_855F20);
|
||||
#endif
|
||||
|
||||
void N(gfx_build_club_64)(s32 index) {
|
||||
Vtx* first;
|
||||
@ -82,22 +70,22 @@ void N(gfx_build_club_64)(s32 index) {
|
||||
s32 i;
|
||||
f32 colR, colG, colB;
|
||||
|
||||
mdl_get_copied_vertices(3, &first, &copied, &numCopied);
|
||||
mdl_get_copied_vertices(VTX_COPY_3, &first, &copied, &numCopied);
|
||||
|
||||
for (i = 0; i < numCopied; i++) {
|
||||
u8* colors = copied[i].v.cn;
|
||||
f32 alpha = N(Club64SignAlphaModulus) + (f32)i / (f32)numCopied;
|
||||
if (alpha > 1.0) {
|
||||
alpha -= 1.0;
|
||||
f32 hue = N(Club64SignAlphaModulus) + (f32)i / (f32)numCopied;
|
||||
if (hue > 1.0) {
|
||||
hue -= 1.0;
|
||||
}
|
||||
func_80243DB0_855F20(alpha, 1.0f, 0.5f, &colR, &colG, &colB);
|
||||
N(hsl_to_rgb)(hue, 1.0f, 0.5f, &colR, &colG, &colB);
|
||||
|
||||
colors[0] = colR * 255.0f;
|
||||
colors[1] = colG * 255.0f;
|
||||
colors[2] = colB * 255.0f;
|
||||
}
|
||||
|
||||
gSPDisplayList(gMasterGfxPos++, mdl_get_copied_gfx(3));
|
||||
gSPDisplayList(gMasterGfxPos++, mdl_get_copied_gfx(VTX_COPY_3));
|
||||
N(Club64SignAlphaModulus) += 0.01;
|
||||
if (N(Club64SignAlphaModulus) > 1.0) {
|
||||
N(Club64SignAlphaModulus) -= 1.0f;
|
||||
@ -105,9 +93,9 @@ void N(gfx_build_club_64)(s32 index) {
|
||||
}
|
||||
|
||||
EvtScript N(EVS_AnimateClub64Sign) = {
|
||||
EVT_CALL(MakeLocalVertexCopy, 3, MODEL_o187, TRUE)
|
||||
EVT_CALL(SetCustomGfxBuilders, 3, EVT_PTR(N(gfx_build_club_64)), 0)
|
||||
EVT_CALL(SetModelCustomGfx, MODEL_o187, 3, -1)
|
||||
EVT_CALL(MakeLocalVertexCopy, VTX_COPY_3, MODEL_o187, TRUE)
|
||||
EVT_CALL(SetCustomGfxBuilders, CUSTOM_GFX_3, EVT_PTR(N(gfx_build_club_64)), 0)
|
||||
EVT_CALL(SetModelCustomGfx, MODEL_o187, CUSTOM_GFX_3, -1)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
@ -224,12 +224,12 @@ EvtScript N(EVS_WhaleState_Walk) = {
|
||||
|
||||
EvtScript N(EVS_WhaleMain) = {
|
||||
EVT_SET_GROUP(EVT_GROUP_00)
|
||||
EVT_CALL(MakeLocalVertexCopy, 1, MODEL_karada, TRUE)
|
||||
EVT_CALL(SetCustomGfxBuilders, 1, EVT_PTR(N(unkAngleFunc002)), 0)
|
||||
EVT_CALL(SetModelCustomGfx, MODEL_karada, 1, -1)
|
||||
EVT_CALL(MakeLocalVertexCopy, 2, MODEL_onaka, TRUE)
|
||||
EVT_CALL(SetCustomGfxBuilders, 2, EVT_PTR(N(unkAngleFunc003)), 0)
|
||||
EVT_CALL(SetModelCustomGfx, MODEL_onaka, 2, -1)
|
||||
EVT_CALL(MakeLocalVertexCopy, VTX_COPY_1, MODEL_karada, TRUE)
|
||||
EVT_CALL(SetCustomGfxBuilders, CUSTOM_GFX_1, EVT_PTR(N(unkAngleFunc002)), 0)
|
||||
EVT_CALL(SetModelCustomGfx, MODEL_karada, CUSTOM_GFX_1, -1)
|
||||
EVT_CALL(MakeLocalVertexCopy, VTX_COPY_2, MODEL_onaka, TRUE)
|
||||
EVT_CALL(SetCustomGfxBuilders, CUSTOM_GFX_2, EVT_PTR(N(unkAngleFunc003)), 0)
|
||||
EVT_CALL(SetModelCustomGfx, MODEL_onaka, CUSTOM_GFX_2, -1)
|
||||
EVT_CALL(SetNpcVar, NPC_Whale, 0, 0)
|
||||
EVT_THREAD
|
||||
EVT_LABEL(0)
|
||||
|
@ -67,8 +67,8 @@ EvtScript N(EVS_ManageEvilTree) = {
|
||||
};
|
||||
|
||||
EvtScript N(EVS_SetupExitHint) = {
|
||||
EVT_CALL(SetCustomGfxBuilders, 1, EVT_PTR(N(gfx_build_evil_tree_face)), 0)
|
||||
EVT_CALL(SetModelCustomGfx, MODEL_kao, 1, -1)
|
||||
EVT_CALL(SetCustomGfxBuilders, CUSTOM_GFX_1, EVT_PTR(N(gfx_build_evil_tree_face)), 0)
|
||||
EVT_CALL(SetModelCustomGfx, MODEL_kao, CUSTOM_GFX_1, -1)
|
||||
EVT_CALL(SetModelFlags, MODEL_kao, 16, TRUE)
|
||||
EVT_WAIT(20)
|
||||
EVT_EXEC(N(EVS_ManageEvilTree))
|
||||
|
@ -111,8 +111,8 @@ EvtScript N(EVS_OnInspectEvilRock) = {
|
||||
};
|
||||
|
||||
EvtScript N(EVS_SetupExitHint) = {
|
||||
EVT_CALL(SetCustomGfxBuilders, 1, EVT_PTR(N(gfx_build_evil_rock_face)), 0)
|
||||
EVT_CALL(SetModelCustomGfx, MODEL_o440, 1, -1)
|
||||
EVT_CALL(SetCustomGfxBuilders, CUSTOM_GFX_1, EVT_PTR(N(gfx_build_evil_rock_face)), 0)
|
||||
EVT_CALL(SetModelCustomGfx, MODEL_o440, CUSTOM_GFX_1, -1)
|
||||
EVT_CALL(SetModelFlags, MODEL_o440, 16, TRUE)
|
||||
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OnInspectEvilRock)), TRIGGER_WALL_PRESS_A, COLLIDER_o491, 1, 0)
|
||||
EVT_CALL(SetTexPanner, MODEL_o440, TEX_PANNER_0)
|
||||
|
@ -1,94 +1,10 @@
|
||||
#include "obk_08.h"
|
||||
|
||||
#include "world/common/todo/UnkFoldFunc.inc.c"
|
||||
#define KNOCK_DOWN_MAP_VAR MapVar(10)
|
||||
#include "world/common/complete/KnockDownPlayer.inc.c"
|
||||
|
||||
ApiStatus func_802403DC_BD3C4C(Evt* script) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 spriteIndex = evt_get_variable(script, *args++);
|
||||
s32 rasterIndex = evt_get_variable(script, *args++);
|
||||
UnkEntityStruct* temp_v0 = heap_malloc(sizeof(*temp_v0));
|
||||
|
||||
temp_v0->spriteIndex = spriteIndex;
|
||||
temp_v0->rasterIndex = rasterIndex;
|
||||
temp_v0->unk_34 = gPlayerStatus.colliderHeight;
|
||||
temp_v0->unk_38 = gPlayerStatus.colliderDiameter;
|
||||
temp_v0->pos.x = gPlayerStatus.position.x;
|
||||
temp_v0->pos.y = gPlayerStatus.position.y;
|
||||
temp_v0->pos.z = gPlayerStatus.position.z;
|
||||
temp_v0->rot.x = 0.0f;
|
||||
temp_v0->rot.y = 0.0f;
|
||||
temp_v0->rot.z = 0.0f;
|
||||
temp_v0->scale.x = SPRITE_WORLD_SCALE_F;
|
||||
temp_v0->scale.y = SPRITE_WORLD_SCALE_F;
|
||||
temp_v0->scale.z = SPRITE_WORLD_SCALE_F;
|
||||
temp_v0->foldID = func_8013A704(1);
|
||||
temp_v0->entityID = create_worker_world(0, obk_08_UnkFoldFunc);
|
||||
evt_set_variable(script, MapVar(10), (s32) temp_v0);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus func_802404F0_BD3D60(Evt* script, s32 isInitialCall) {
|
||||
UnkEntityStruct* temp_v0 = (UnkEntityStruct*) evt_get_variable(NULL, MapVar(10));
|
||||
|
||||
func_8013A854(temp_v0->foldID);
|
||||
free_worker(temp_v0->entityID);
|
||||
heap_free(temp_v0);
|
||||
evt_set_variable(script, MapVar(10), NULL);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus func_8024055C_BD3DCC(Evt* script, s32 isInitialCall) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 x = evt_get_float_variable(script, *args++);
|
||||
s32 y = evt_get_float_variable(script, *args++);
|
||||
s32 z = evt_get_float_variable(script, *args++);
|
||||
UnkEntityStruct* temp_v0 = (UnkEntityStruct*) evt_get_variable(NULL, MapVar(10));
|
||||
|
||||
temp_v0->pos.x = x;
|
||||
temp_v0->pos.y = y;
|
||||
temp_v0->pos.z = z;
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus func_8024061C_BD3E8C(Evt* script, s32 isInitialCall) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 x = evt_get_float_variable(script, *args++);
|
||||
s32 y = evt_get_float_variable(script, *args++);
|
||||
s32 z = evt_get_float_variable(script, *args++);
|
||||
UnkEntityStruct* temp_v0 = (UnkEntityStruct*) evt_get_variable(NULL, MapVar(10));
|
||||
|
||||
temp_v0->rot.x = x;
|
||||
temp_v0->rot.y = y;
|
||||
temp_v0->rot.z = z;
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus func_802406DC_BD3F4C(Evt* script, s32 isInitialCall) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 x = evt_get_float_variable(script, *args++);
|
||||
s32 y = evt_get_float_variable(script, *args++);
|
||||
s32 z = evt_get_float_variable(script, *args++);
|
||||
UnkEntityStruct* temp_v0 = (UnkEntityStruct*) evt_get_variable(NULL, MapVar(10));
|
||||
|
||||
temp_v0->scale.x = x;
|
||||
temp_v0->scale.y = y;
|
||||
temp_v0->scale.z = z;
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus func_8024079C_BD400C(Evt* script, s32 isInitialCall) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 spriteIndex = evt_get_variable(script, *args++);
|
||||
s32 rasterIndex = evt_get_variable(script, *args++);
|
||||
UnkEntityStruct* temp_v0 = (UnkEntityStruct*) evt_get_variable(NULL, MapVar(10));
|
||||
|
||||
temp_v0->spriteIndex = spriteIndex;
|
||||
temp_v0->rasterIndex = rasterIndex;
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus func_80240808_BD4078(Evt* script, s32 isInitialCall) {
|
||||
if (gPlayerData.curHP < 2) {
|
||||
API_CALLABLE(N(func_80240808_BD4078)) {
|
||||
if (gPlayerData.curHP <= 1) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
gPlayerData.curHP--;
|
||||
|
@ -217,7 +217,7 @@ EvtScript N(EVS_NpcInteract_TradingToad) = {
|
||||
EVT_RETURN
|
||||
EVT_END_IF
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toad_Pink_Talk, ANIM_Toad_Pink_Idle, 0, MSG_CH2_00F0)
|
||||
EVT_CHOOSE_ANY_CONSUMABLE()
|
||||
EVT_CHOOSE_ANY_CONSUMABLE(2)
|
||||
EVT_SWITCH(LVar0)
|
||||
EVT_CASE_EQ(-1)
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toad_Pink_Talk, ANIM_Toad_Pink_Idle, 0, MSG_CH2_00F4)
|
||||
@ -241,7 +241,7 @@ EvtScript N(EVS_NpcInteract_TradingToad) = {
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInit_Toad) = {
|
||||
EvtScript N(EVS_NpcInit_TradingToad) = {
|
||||
EVT_IF_NE(GF_TradingEvent2_Active, FALSE)
|
||||
EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_TradingToad)))
|
||||
EVT_ELSE
|
||||
@ -268,7 +268,7 @@ StaticNpc N(NpcData_TradingToad) = {
|
||||
.pos = { 0.0f, 2.0f, 150.0f },
|
||||
.yaw = 90,
|
||||
.flags = ENEMY_FLAGS_1 | ENEMY_FLAGS_8 | ENEMY_FLAGS_100 | ENEMY_FLAGS_400 | ENEMY_FLAGS_800 | ENEMY_FLAGS_2000 | ENEMY_FLAGS_10000 | ENEMY_FLAGS_100000,
|
||||
.init = &N(EVS_NpcInit_Toad),
|
||||
.init = &N(EVS_NpcInit_TradingToad),
|
||||
.drops = {
|
||||
.dropFlags = NPC_DROP_FLAGS_80,
|
||||
.heartDrops = NO_DROPS,
|
||||
|
@ -65,6 +65,8 @@ EvtScript N(EVS_Scene_RuinsRising) = {
|
||||
EVT_END
|
||||
};
|
||||
|
||||
MAP_RODATA_PAD(1, unk) // can be fixed with subalign 16 for this map
|
||||
|
||||
EvtScript N(EVS_Main) = {
|
||||
EVT_SET(GB_WorldLocation, LOCATION_DRY_DRY_DESERT)
|
||||
EVT_CALL(SetSpriteShading, SHADING_NONE)
|
||||
|
@ -23,7 +23,7 @@ NpcSettings N(NpcSettings_Archeologist_01) = {
|
||||
|
||||
#include "world/common/complete/GiveReward.inc.c"
|
||||
#include "world/common/complete/KeyItemChoice.inc.c"
|
||||
MAP_STATIC_PAD(1,key_item);
|
||||
MAP_STATIC_PAD(1,normal_item);
|
||||
#include "world/common/complete/NormalItemChoice.inc.c"
|
||||
|
||||
#include "world/common/atomic/LetterChoice.inc.c"
|
||||
|
@ -15,6 +15,8 @@ extern EvtScript N(EVS_Scene_ImprisonedKoopaBros);
|
||||
EvtScript N(EVS_ExitDoors_trd_04_5) = EVT_EXIT_DOUBLE_DOOR(trd_06_ENTRY_1, "trd_04", trd_04_ENTRY_5,
|
||||
COLLIDER_ttw, MODEL_o93, MODEL_o94);
|
||||
|
||||
MAP_RODATA_PAD(1,unk) // fixed if map uses subalign 16
|
||||
|
||||
EvtScript N(EVS_EnterMap) = {
|
||||
EVT_CALL(GetEntryID, LVar0)
|
||||
EVT_SWITCH(LVar0)
|
||||
|
@ -495,8 +495,8 @@ EvtScript N(EVS_Main) = {
|
||||
EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs)))
|
||||
EVT_SET(LVar0, EVT_PTR(N(D_80242BFC_B2035C)))
|
||||
EVT_EXEC(N(D_80240600_B1DD60))
|
||||
EVT_CALL(SetModelCustomGfx, MODEL_o152, 0, -1)
|
||||
EVT_CALL(SetCustomGfxBuilders, 0, 0, EVT_PTR(N(func_8024013C_B1D89C)))
|
||||
EVT_CALL(SetModelCustomGfx, MODEL_o152, CUSTOM_GFX_0, -1)
|
||||
EVT_CALL(SetCustomGfxBuilders, CUSTOM_GFX_0, 0, EVT_PTR(N(func_8024013C_B1D89C)))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
@ -36,7 +36,7 @@ EvtScript N(8024AC8C) = {
|
||||
|
||||
EvtScript N(EVS_NpcInteract_ToadHouseKeeper) = {
|
||||
EVT_CALL(N(ToadHouse_InitScreenOverlay), 0, 0, 0)
|
||||
EVT_EXEC_WAIT(N(EVS_SetToadHouseDialogue))
|
||||
EVT_EXEC_WAIT(N(EVS_ToadHouse_SetDialogue))
|
||||
EVT_IF_EQ(LVar0, 0)
|
||||
EVT_RETURN
|
||||
EVT_END_IF
|
||||
|
@ -108,10 +108,10 @@ void N(unkAngleFunc002)(void) {
|
||||
Vtx* copiedVertices;
|
||||
s32 numVertices;
|
||||
|
||||
mdl_get_copied_vertices(1, &firstVertex, &copiedVertices, &numVertices);
|
||||
mdl_get_copied_vertices(VTX_COPY_1, &firstVertex, &copiedVertices, &numVertices);
|
||||
N(unkVtxFunc001)(firstVertex, copiedVertices, numVertices, &N(unkAngle2));
|
||||
|
||||
gSPDisplayList(gMasterGfxPos++, mdl_get_copied_gfx(1));
|
||||
gSPDisplayList(gMasterGfxPos++, mdl_get_copied_gfx(VTX_COPY_1));
|
||||
if (N(unkAngle2) >= 0) {
|
||||
N(unkAngle2) += 4;
|
||||
}
|
||||
@ -125,10 +125,10 @@ void N(unkAngleFunc003)(void) {
|
||||
Vtx* copiedVertices;
|
||||
s32 numVertices;
|
||||
|
||||
mdl_get_copied_vertices(2, &firstVertex, &copiedVertices, &numVertices);
|
||||
mdl_get_copied_vertices(VTX_COPY_2, &firstVertex, &copiedVertices, &numVertices);
|
||||
N(unkVtxFunc001)(firstVertex, copiedVertices, numVertices, &N(unkAngle3));
|
||||
|
||||
gSPDisplayList(gMasterGfxPos++, mdl_get_copied_gfx(2));
|
||||
gSPDisplayList(gMasterGfxPos++, mdl_get_copied_gfx(VTX_COPY_2));
|
||||
if (N(unkAngle3) >= 0) {
|
||||
N(unkAngle3) += 4;
|
||||
}
|
||||
|
140
src/world/common/complete/KnockDownPlayer.inc.c
Normal file
140
src/world/common/complete/KnockDownPlayer.inc.c
Normal file
@ -0,0 +1,140 @@
|
||||
#include "common.h"
|
||||
#include "sprite.h"
|
||||
|
||||
#ifndef KNOCK_DOWN_MAP_VAR
|
||||
#warning KNOCK_DOWN_MAP_VAR must be defined!
|
||||
#endif
|
||||
|
||||
void N(gfx_build_knocked_down_player)(void) {
|
||||
UnkEntityStruct* temp_v0 = (UnkEntityStruct*) evt_get_variable(NULL, KNOCK_DOWN_MAP_VAR);
|
||||
FoldImageRecPart part;
|
||||
SpriteRasterInfo rasterInfo;
|
||||
Matrix4f sp40, sp80;
|
||||
|
||||
gDPPipeSync(gMasterGfxPos++);
|
||||
gDPSetCycleType(gMasterGfxPos++, G_CYC_1CYCLE);
|
||||
gSPClearGeometryMode(gMasterGfxPos++,
|
||||
G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD |
|
||||
G_SHADING_SMOOTH);
|
||||
gSPSetGeometryMode(gMasterGfxPos++, G_ZBUFFER | G_SHADE | G_SHADING_SMOOTH);
|
||||
gSPTexture(gMasterGfxPos++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON);
|
||||
gDPSetTextureLOD(gMasterGfxPos++, G_TL_TILE);
|
||||
gDPSetTexturePersp(gMasterGfxPos++, G_TP_PERSP);
|
||||
gDPSetTextureFilter(gMasterGfxPos++, G_TF_BILERP);
|
||||
gDPSetColorDither(gMasterGfxPos++, G_CD_DISABLE);
|
||||
gDPSetTextureDetail(gMasterGfxPos++, G_TD_CLAMP);
|
||||
gDPSetTextureConvert(gMasterGfxPos++, G_TC_FILT);
|
||||
gDPSetCombineKey(gMasterGfxPos++, G_CK_NONE);
|
||||
gDPSetAlphaCompare(gMasterGfxPos++, G_AC_NONE);
|
||||
|
||||
guTranslateF(sp40, temp_v0->pos.x, temp_v0->pos.y, temp_v0->pos.z);
|
||||
guRotateF(sp80, temp_v0->rot.y, 0.0f, 1.0f, 0.0f);
|
||||
guMtxCatF(sp80, sp40, sp40);
|
||||
guRotateF(sp80, temp_v0->rot.z, 0.0f, 0.0f, 1.0f);
|
||||
guMtxCatF(sp80, sp40, sp40);
|
||||
guRotateF(sp80, temp_v0->rot.x, 1.0f, 0.0f, 0.0f);
|
||||
guMtxCatF(sp80, sp40, sp40);
|
||||
guScaleF(sp80, temp_v0->scale.x, temp_v0->scale.y, temp_v0->scale.z);
|
||||
guMtxCatF(sp80, sp40, sp40);
|
||||
guMtxF2L(sp40, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||
gSPMatrix(gMasterGfxPos++,
|
||||
OS_K0_TO_PHYSICAL(&gDisplayContext->matrixStack[gMatrixListPos++]),
|
||||
G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
|
||||
spr_get_player_raster_info(&rasterInfo, temp_v0->spriteIndex, temp_v0->rasterIndex);
|
||||
part.raster = rasterInfo.raster;
|
||||
part.palette = rasterInfo.defaultPal;
|
||||
temp_v0->unk_34 = part.width = rasterInfo.width;
|
||||
temp_v0->unk_38 = part.height = rasterInfo.height;
|
||||
part.xOffset = -(s32) (rasterInfo.width * 0.5f);
|
||||
part.yOffset = rasterInfo.height;
|
||||
part.opacity = 255;
|
||||
|
||||
fold_appendGfx_component(temp_v0->foldID, &part, 0.0f, sp40);
|
||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
||||
}
|
||||
|
||||
ApiStatus N(KnockDownPlayerB)(Evt* script) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 spriteIndex = evt_get_variable(script, *args++);
|
||||
s32 rasterIndex = evt_get_variable(script, *args++);
|
||||
UnkEntityStruct* temp_v0 = heap_malloc(sizeof(*temp_v0));
|
||||
|
||||
temp_v0->spriteIndex = spriteIndex;
|
||||
temp_v0->rasterIndex = rasterIndex;
|
||||
temp_v0->unk_34 = gPlayerStatus.colliderHeight;
|
||||
temp_v0->unk_38 = gPlayerStatus.colliderDiameter;
|
||||
temp_v0->pos.x = gPlayerStatus.position.x;
|
||||
temp_v0->pos.y = gPlayerStatus.position.y;
|
||||
temp_v0->pos.z = gPlayerStatus.position.z;
|
||||
temp_v0->rot.x = 0.0f;
|
||||
temp_v0->rot.y = 0.0f;
|
||||
temp_v0->rot.z = 0.0f;
|
||||
temp_v0->scale.x = SPRITE_WORLD_SCALE_F;
|
||||
temp_v0->scale.y = SPRITE_WORLD_SCALE_F;
|
||||
temp_v0->scale.z = SPRITE_WORLD_SCALE_F;
|
||||
temp_v0->foldID = func_8013A704(1);
|
||||
temp_v0->entityID = create_worker_world(0, N(gfx_build_knocked_down_player));
|
||||
evt_set_variable(script, KNOCK_DOWN_MAP_VAR, (s32) temp_v0);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
API_CALLABLE(N(KnockDownPlayerC)) {
|
||||
UnkEntityStruct* temp_v0 = (UnkEntityStruct*) evt_get_variable(NULL,KNOCK_DOWN_MAP_VAR);
|
||||
|
||||
func_8013A854(temp_v0->foldID);
|
||||
free_worker(temp_v0->entityID);
|
||||
heap_free(temp_v0);
|
||||
evt_set_variable(script, KNOCK_DOWN_MAP_VAR, NULL);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
API_CALLABLE(N(KnockDownPlayerD)) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 x = evt_get_float_variable(script, *args++);
|
||||
s32 y = evt_get_float_variable(script, *args++);
|
||||
s32 z = evt_get_float_variable(script, *args++);
|
||||
UnkEntityStruct* temp_v0 = (UnkEntityStruct*) evt_get_variable(NULL, KNOCK_DOWN_MAP_VAR);
|
||||
|
||||
temp_v0->pos.x = x;
|
||||
temp_v0->pos.y = y;
|
||||
temp_v0->pos.z = z;
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
API_CALLABLE(N(KnockDownPlayerE)) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 x = evt_get_float_variable(script, *args++);
|
||||
s32 y = evt_get_float_variable(script, *args++);
|
||||
s32 z = evt_get_float_variable(script, *args++);
|
||||
UnkEntityStruct* temp_v0 = (UnkEntityStruct*) evt_get_variable(NULL, KNOCK_DOWN_MAP_VAR);
|
||||
|
||||
temp_v0->rot.x = x;
|
||||
temp_v0->rot.y = y;
|
||||
temp_v0->rot.z = z;
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
API_CALLABLE(N(KnockDownPlayerF)) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 x = evt_get_float_variable(script, *args++);
|
||||
s32 y = evt_get_float_variable(script, *args++);
|
||||
s32 z = evt_get_float_variable(script, *args++);
|
||||
UnkEntityStruct* temp_v0 = (UnkEntityStruct*) evt_get_variable(NULL, KNOCK_DOWN_MAP_VAR);
|
||||
|
||||
temp_v0->scale.x = x;
|
||||
temp_v0->scale.y = y;
|
||||
temp_v0->scale.z = z;
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
API_CALLABLE(N(KnockDownPlayerG)) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 spriteIndex = evt_get_variable(script, *args++);
|
||||
s32 rasterIndex = evt_get_variable(script, *args++);
|
||||
UnkEntityStruct* temp_v0 = (UnkEntityStruct*) evt_get_variable(NULL, KNOCK_DOWN_MAP_VAR);
|
||||
|
||||
temp_v0->spriteIndex = spriteIndex;
|
||||
temp_v0->rasterIndex = rasterIndex;
|
||||
return ApiStatus_DONE2;
|
||||
}
|
@ -197,7 +197,7 @@ EvtScript N(EVS_DoLetterDelivery) = {
|
||||
EvtScript N(EVS_##npcName##_LetterReward) = { \
|
||||
EVT_IF_EQ(LVarC, 2) \
|
||||
EVT_SET(LVar0, ITEM_STAR_PIECE) \
|
||||
EVT_SET(LVar1, 3) \
|
||||
EVT_SET(LVar1, ITEM_TYPE_STAR_PIECE) \
|
||||
EVT_EXEC_WAIT(N(GiveKeyReward)) \
|
||||
EVT_CALL(AddStarPieces, 1) \
|
||||
EVT_END_IF \
|
||||
|
@ -91,9 +91,9 @@ EvtScript N(EVS_ChooseItem) = {
|
||||
EVT_END
|
||||
};
|
||||
|
||||
#define EVT_CHOOSE_ANY_CONSUMABLE() \
|
||||
#define EVT_CHOOSE_ANY_CONSUMABLE(unkMode) \
|
||||
EVT_SET(LVar0, 0) \
|
||||
EVT_SET(LVar1, 2) \
|
||||
EVT_SET(LVar1, unkMode) \
|
||||
EVT_EXEC_WAIT(N(EVS_ChooseItem))
|
||||
|
||||
#define EVT_CHOOSE_CONSUMABLE_FROM(itemList, unkMode) \
|
||||
|
@ -62,6 +62,8 @@ enum {
|
||||
|
||||
enum {
|
||||
// area_mac
|
||||
QUIZ_MAP_MAC_00 = 0,
|
||||
QUIZ_MAP_MAC_01 = 1,
|
||||
QUIZ_MAP_MAC_04 = 4,
|
||||
QUIZ_MAP_MAC_05 = 5,
|
||||
QUIZ_COUNT_MAC = 6,
|
||||
|
250
src/world/common/complete/ToadHouseBlanketAnim.inc.c
Normal file
250
src/world/common/complete/ToadHouseBlanketAnim.inc.c
Normal file
@ -0,0 +1,250 @@
|
||||
#include "animation_script.h"
|
||||
|
||||
extern Gfx N(toad_house_blanket_gfx)[];
|
||||
extern Vtx N(toad_house_blanket_vtx)[];
|
||||
extern IMG_BIN N(toad_house_blanket_img)[];
|
||||
|
||||
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,
|
||||
};
|
||||
|
||||
#include "world/toad_house/blanket.vtx.inc.c"
|
||||
#include "world/toad_house/blanket.gfx.inc.c"
|
||||
#include "world/toad_house/blanket.png.inc.c"
|
||||
|
||||
AnimScript N(ANS_ToadHouseBlanket) = {
|
||||
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,
|
||||
};
|
29
src/world/common/enemy/complete/ShyGuy.h
Normal file
29
src/world/common/enemy/complete/ShyGuy.h
Normal file
@ -0,0 +1,29 @@
|
||||
#include "common.h"
|
||||
#include "sprite/npc/ShyGuy.h"
|
||||
|
||||
#define SHY_GUY_NO_DROPS \
|
||||
{ \
|
||||
.dropFlags = NPC_DROP_FLAGS_80, \
|
||||
.heartDrops = NO_DROPS, \
|
||||
.flowerDrops = NO_DROPS, \
|
||||
}
|
||||
|
||||
#define SHY_GUY_ANIMS \
|
||||
{ \
|
||||
.idle = ANIM_ShyGuy_Red_Anim01, \
|
||||
.walk = ANIM_ShyGuy_Red_Anim02, \
|
||||
.run = ANIM_ShyGuy_Red_Anim03, \
|
||||
.chase = ANIM_ShyGuy_Red_Anim03, \
|
||||
.anim_4 = ANIM_ShyGuy_Red_Anim01, \
|
||||
.anim_5 = ANIM_ShyGuy_Red_Anim01, \
|
||||
.death = ANIM_ShyGuy_Red_Anim0C, \
|
||||
.hit = ANIM_ShyGuy_Red_Anim0C, \
|
||||
.anim_8 = ANIM_ShyGuy_Red_Anim15, \
|
||||
.anim_9 = ANIM_ShyGuy_Red_Anim12, \
|
||||
.anim_A = ANIM_ShyGuy_Red_Anim11, \
|
||||
.anim_B = ANIM_ShyGuy_Red_Anim10, \
|
||||
.anim_C = ANIM_ShyGuy_Red_Anim05, \
|
||||
.anim_D = ANIM_ShyGuy_Red_Anim01, \
|
||||
.anim_E = ANIM_ShyGuy_Red_Anim01, \
|
||||
.anim_F = ANIM_ShyGuy_Red_Anim01, \
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user