Santas Super Blocks (#677)

* misc msg etc

* super blocks 1

* super blocks 2

* super block dedupe

* super blocks x

* super block isolated

* one dead super block func left

* dead maps fixed

* remove unnecessary funcs

* merged includes for pipes

* pipe data and EVT_GROUP enum

* fixed dead

* fix warnings

Co-authored-by: HailSanta <Hail2Santa@gmail.com>
Co-authored-by: Ethan Roseman <eroseman@basistech.com>
This commit is contained in:
HailSanta 2022-04-08 15:10:12 -04:00 committed by GitHub
parent 9c5f34a61e
commit 42355f53c2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
257 changed files with 2205 additions and 7135 deletions

View File

@ -1778,45 +1778,6 @@ typedef struct DecorationTable {
/* 0x8C6 */ DecorationUnk unk_8C6[2];
} DecorationTable; // size = 0x8E8
typedef struct PopupMenu {
/* 0x000 */ struct HudScript* ptrIcon[32];
/* 0x080 */ char unk_80[0x4];
/* 0x084 */ s32 nameMsg[32];
/* 0x104 */ char unk_104[0x4];
/* 0x108 */ s32 userIndex[32]; // used to map menu order to a user-ID for each item
/* 0x188 */ char unk_188[0x4];
/* 0x18C */ s32 enabled[32];
/* 0x20C */ char unk_20C[0x4];
/* 0x210 */ s32 value[32]; // sale price, etc
/* 0x290 */ char unk_290[0x4];
/* 0x294 */ s32 descMsg[32];
/* 0x314 */ char unk_314[0x4];
/* 0x318 */ s32 popupType; // C = keys
/* 0x31C */ s32 unk_31C;
/* 0x320 */ s32 unk_320;
/* 0x324 */ s32 numEntries;
/* 0x328 */ s32 initialPos;
/* 0x32C */ s16 result;
/* 0x32E */ char unk_32E[0x2];
} PopupMenu; // size = 0x330
typedef struct Shop {
/* 0x000 */ s16 flags;
/* 0x002 */ s16 numItems;
/* 0x004 */ s16 numSpecialPrices;
/* 0x006 */ char unk_06[0x2];
/* 0x008 */ s32 currentItemSlot;
/* 0x00C */ s32 selectedStoreItemSlot;
/* 0x010 */ ShopOwner* owner;
/* 0x014 */ ShopItemLocation* ItemDataPositions;
/* 0x018 */ ShopItemData* staticInventory;
/* 0x01C */ ShopSellPriceData* staticPriceList;
/* 0x020 */ s32 costIconID;
/* 0x024 */ s32 inventoryItemFlags;
/* 0x028 */ PopupMenu itemSelectMenu;
/* 0x358 */ s32 unk_358;
} Shop; // size = 0x35C
typedef struct Encounter {
/* 0x00 */ s32 count;
/* 0x04 */ struct Enemy* enemy[16];

View File

@ -103,5 +103,12 @@
#define func_8004A3E8 func_8004E808
#define gCurrentEncounter dead_gCurrentEncounter
#define fx_motion_blur_flame dead_fx_motion_blur_flame
#define wPartnerHudScripts dead_wPartnerHudScripts
#define wDisabledPartnerHudScripts dead_wDisabledPartnerHudScripts
#define create_popup_menu dead_create_popup_menu
#define hide_popup_menu dead_hide_popup_menu
#define destroy_popup_menu dead_destroy_popup_menu
#define heap_free dead_heap_free
#define entity_upgrade_block_hide_content dead_entity_upgrade_block_hide_content
#endif

View File

@ -675,6 +675,8 @@ enum SoundIDs {
SOUND_2118 = 0x00002118,
SOUND_2119 = 0x00002119,
SOUND_211A = 0x0000211A,
SOUND_212D = 0x0000212D,
SOUND_212E = 0x0000212E,
};
enum Cams {
@ -1715,7 +1717,10 @@ enum TriggerFlags {
};
enum ItemEntityFlags {
ITEM_ENTITY_FLAGS_TINY = 0x00004000,
ITEM_ENTITY_FLAGS_40 = 0x00000040,
ITEM_ENTITY_FLAGS_TINY = 0x00004000,
ITEM_ENTITY_FLAGS_TRANSPARENT = 0x00080000,
ITEM_ENTITY_FLAGS_100000 = 0x00100000,
};
enum Buttons {
@ -1960,7 +1965,7 @@ enum PlayerStatusAnimFlags {
PLAYER_STATUS_ANIM_FLAGS_20000 = 0x00020000,
PLAYER_STATUS_ANIM_FLAGS_40000 = 0x00040000,
PLAYER_STATUS_ANIM_FLAGS_80000 = 0x00080000,
PLAYER_STATUS_ANIM_FLAGS_100000 = 0x00100000,
PLAYER_STATUS_ANIM_FLAGS_100000 = 0x00100000, ///< set when using pipes
PLAYER_STATUS_ANIM_FLAGS_200000 = 0x00200000,
PLAYER_STATUS_ANIM_FLAGS_400000 = 0x00400000,
PLAYER_STATUS_ANIM_FLAGS_800000 = 0x00800000,
@ -1974,6 +1979,22 @@ enum PlayerStatusAnimFlags {
PLAYER_STATUS_ANIM_FLAGS_80000000 = 0x80000000,
};
enum PopupType {
POPUP_MENU_USE_ITEM = 0x0,
POPUP_MENU_SWITCH_PARTNER = 0x1,
POPUP_MENU_THROW_AWAY_ITEM = 0x2,
POPUP_MENU_TRADE_FOR_BADGE = 0x3,
POPUP_MENU_UPGRADE_PARTNER = 0x4,
POPUP_MENU_SELL_ITEM = 0x5,
POPUP_MENU_CHECK_ITEM = 0x6,
POPUP_MENU_CLAIM_ITEM = 0x7,
POPUP_MENU_READ_LETTER = 0x8,
POPUP_MENU_TAKE_FROM_CHEST = 0x9,
POPUP_MENU_READ_DIARY_PAGE = 0xA,
POPUP_MENU_READ_POSTCARD = 0xB,
POPUP_MENU_USEKEY = 0xC
};
/// not really
enum RenderMode {
RENDER_MODE_SURF_SOLID_AA_ZB_LAYER0 = 0x00000000,

View File

@ -139,4 +139,11 @@ typedef s32 ApiStatus;
#define ApiStatus_REPEAT 3 /* Call again immediately */
#define ApiStatus_FINISH 255 /* Corresponds to EVT_FINISH */
typedef enum EventGroup {
EVT_GROUP_0 = 0x00,
EVT_GROUP_B = 0x0B,
EVT_GROUP_1B = 0x1B,
EVT_GROUP_EF = 0xEF
} EventGroup;
#endif

View File

@ -215,7 +215,6 @@ void phys_init_integrator_for_current_state(void);
void phys_player_land(void);
void phys_main_collision_below(void);
void create_popup_menu(PopupMenu*);
s32 npc_test_move_simple_without_slipping(s32, f32*, f32*, f32*, f32, f32, f32, f32);
void update_collider_transform(s16 colliderID);

View File

@ -161,7 +161,6 @@ ApiStatus SwitchMessage(Evt* script, s32 isInitialCall);
ApiStatus ShowChoice(Evt* script, s32 isInitialCall);
ApiStatus CloseChoice(Evt* script, s32 isInitialCall);
ApiStatus CancelMessage(Evt* script, s32 isInitialCall);
ApiStatus CancelMessageAndBlock(void); // ???
ApiStatus SetMessageImages(Evt* script, s32 isInitialCall);
ApiStatus SetMessageMsg(Evt* script, s32 isInitialCall);
ApiStatus SetMessageValue(Evt* script, s32 isInitialCall);

View File

@ -520,7 +520,7 @@
#define EXIT_WALK_SCRIPT(walkDistance, exitIdx, map, entryIdx) \
{ \
EVT_SET_GROUP(0x1B) \
EVT_SET_GROUP(EVT_GROUP_1B) \
EVT_CALL(UseExitHeading, walkDistance, exitIdx) \
EVT_EXEC(ExitWalk) \
EVT_CALL(GotoMap, EVT_PTR(map), entryIdx) \

View File

@ -107,7 +107,7 @@ ApiStatus func_802C03E8(Evt* script, s32 isInitialCall) {
}
EvtScript D_802C0410 = {
EVT_SET_GROUP(0)
EVT_SET_GROUP(EVT_GROUP_0)
EVT_CALL(SetPlayerAnimation, ANIM_GOT_ITEM)
EVT_CALL(GetPlayerPos, LW(0), LW(1), LW(2))
EVT_ADD(LW(1), 45)
@ -149,7 +149,7 @@ EvtScript D_802C0560 = {
};
EvtScript D_802C05CC_32579C = {
EVT_SET_GROUP(0)
EVT_SET_GROUP(EVT_GROUP_0)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(GetCurrentPartner, LW(0))
EVT_IF_NE(LW(0), 0)

View File

@ -195,7 +195,7 @@ void update_item_entities(void) {
s32 coin;
s32 i;
if (!(gOverrideFlags & 0xC00)) {
if (!(gOverrideFlags & (GLOBAL_OVERRIDES_400 | GLOBAL_OVERRIDES_800))) {
for (i = 0; i < 0x100; i++) {
entity = D_801565A0[i];
@ -287,11 +287,11 @@ void draw_item_entities(void) {
for (i = 0; i < MAX_ITEM_ENTITIES; i++) {
ItemEntity* itemEntity = D_801565A0[i];
if (itemEntity != NULL && itemEntity->flags != 0 && !(itemEntity->flags & 0x40) &&
(itemEntity->flags & (1 << gCurrentCamID)) && !(itemEntity->flags & 0x100000) &&
if (itemEntity != NULL && itemEntity->flags != 0 && !(itemEntity->flags & ITEM_ENTITY_FLAGS_40) &&
(itemEntity->flags & (1 << gCurrentCamID)) && !(itemEntity->flags & ITEM_ENTITY_FLAGS_100000) &&
!(itemEntity->unk_1D != -1 && D_80155D88 != itemEntity->unk_1D))
{
if (!(itemEntity->flags & 0x80000)) {
if (!(itemEntity->flags & ITEM_ENTITY_FLAGS_TRANSPARENT)) {
rtPtr->renderMode = RENDER_MODE_ALPHATEST;
} else {
rtPtr->renderMode = RENDER_MODE_SURFACE_XLU_LAYER1;

View File

@ -7,35 +7,4 @@
#define gPartnerActionStatus dead_gPartnerActionStatus2
#include "world/common/SetOverrideFlags_40.inc.c"
#include "world/common/UnkFunc17.inc.c"
ApiStatus func_8024003C_EC9D3C(Evt* script, s32 isInitialCall) {
func_802F3B00(evt_get_variable(script, *script->ptrReadPos));
return ApiStatus_DONE2;
}
#include "world/common/UnkFunc18.inc.c"
INCLUDE_ASM(s32, "EC9D00", func_802401CC_EC9ECC);
#include "world/common/SwitchToPartner.inc.c"
#include "world/common/UnkFunc19.inc.c"
#include "world/common/UnkFunc20.inc.c"
#include "world/common/UnkFunc39.inc.c"
#include "world/common/UnkFunc21.inc.c"
#include "world/common/UnkFunc22.inc.c"
#include "world/common/UnkFunc60.inc.c"
#include "world/common/UnkFunc23.inc.c"
#include "world/common/UnkPartnerPosFuncs.inc.c"
#include "world/common/UnkFunc40.inc.c"
#include "world/common/atomic/SuperBlock.inc.c"

View File

@ -5,16 +5,19 @@
#define NAMESPACE ED8E20
#include "world/common/SetPlayerStatusAnimFlags100000.inc.c"
ApiStatus N(DeadPipe_SetAnimFlag)(Evt* script, s32 isInitialCall) {
gPlayerStatusPtr->animFlags |= PLAYER_STATUS_ANIM_FLAGS_100000;
return ApiStatus_DONE2;
}
// Variation of GetCurrentFloor that is non-equivalent
ApiStatus N(DeadGetCurrentFloor)(Evt* script, s32 isInitialCall) {
// Variation of Pipe_GetCurrentFloor that is non-equivalent
ApiStatus N(DeadPipe_GetCurrentFloor)(Evt* script, s32 isInitialCall) {
script->varTable[0] = dead_gCollisionStatus.pushingAgainstWall;
return ApiStatus_DONE2;
}
// Variation of UnkFunc25 that is non-equivalent
ApiStatus N(DeadUnkFunc25)(Evt* script, s32 isInitialCall) {
// Variation of Pipe_AwaitDownInput that is non-equivalent
ApiStatus N(DeadPipe_AwaitDownInput)(Evt* script, s32 isInitialCall) {
CollisionStatus* collisionStatus = &gCollisionStatus;
s32 stickX, stickY;
@ -36,8 +39,8 @@ ApiStatus N(DeadUnkFunc25)(Evt* script, s32 isInitialCall) {
return ApiStatus_BLOCK;
}
// Variation of GetEntryPos with a debug print at the end
ApiStatus N(DeadGetEntryPos)(Evt* script, s32 isInitialCall) {
// Variation of Pipe_GetEntryPos with a debug print at the end
ApiStatus N(DeadPipe_GetEntryPos)(Evt* script, s32 isInitialCall) {
MapConfig* mapConfig = get_current_map_header();
s32 index = evt_get_variable(script, EVT_VAR(0));
@ -49,9 +52,25 @@ ApiStatus N(DeadGetEntryPos)(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2;
}
#include "world/common/GetCurrentCameraYawClamped180.inc.c"
ApiStatus N(DeadPipe_GetCameraYaw)(Evt* script, s32 isInitialCall) {
script->varTable[0] = clamp_angle(gCameras[gCurrentCameraID].currentYaw + 180.0f);
return ApiStatus_DONE2;
}
#include "world/common/SomeXYZFunc2.inc.c"
ApiStatus N(DeadPipe_GetPointAheadOfPlayer)(Evt* script, s32 isInitialStatus) {
PlayerStatus* playerStatus = &gPlayerStatus;
f32 r = evt_get_float_variable(script, *script->ptrReadPos);
f32 x = playerStatus->position.x;
f32 y = playerStatus->position.y;
f32 z = playerStatus->position.z;
add_vec2D_polar(&x, &z, r, playerStatus->targetYaw);
evt_set_float_variable(script, EVT_VAR(0), x);
evt_set_float_variable(script, EVT_VAR(1), y);
evt_set_float_variable(script, EVT_VAR(2), z);
return ApiStatus_DONE2;
}
ApiStatus func_80240318_ED9138(Evt* script, s32 isInitialCall) {
dead_fx_sun(0, 0, 0, 0, 0, 0);

View File

@ -7,37 +7,6 @@
#define gPartnerActionStatus dead_gPartnerActionStatus2
#include "world/common/SetOverrideFlags_40.inc.c"
#include "world/common/UnkFunc17.inc.c"
ApiStatus func_8024011C_EED21C(Evt* script, s32 isInitialCall) {
func_802F3B00(evt_get_variable(script, *script->ptrReadPos));
return ApiStatus_DONE2;
}
#include "world/common/UnkFunc18.inc.c"
INCLUDE_ASM(s32, "EED1E0", func_802402AC_EED3AC);
#include "world/common/SwitchToPartner.inc.c"
#include "world/common/UnkFunc19.inc.c"
#include "world/common/UnkFunc20.inc.c"
#include "world/common/UnkFunc39.inc.c"
#include "world/common/UnkFunc21.inc.c"
#include "world/common/UnkFunc22.inc.c"
#include "world/common/UnkFunc60.inc.c"
#include "world/common/UnkFunc23.inc.c"
#include "world/common/UnkPartnerPosFuncs.inc.c"
#include "world/common/UnkFunc40.inc.c"
#include "world/common/atomic/SuperBlock.inc.c"
#include "world/common/UnkFunc44.inc.c"

View File

@ -405,7 +405,7 @@ EvtScript N(8021B0E4) = {
EVT_USE_ARRAY(D_80235FC0)
EVT_CALL(N(StartRumbleWithParams), 256, 30)
EVT_THREAD
EVT_SET_GROUP(0)
EVT_SET_GROUP(EVT_GROUP_0)
EVT_CALL(ShakeCam, 1, 0, 20, EVT_FLOAT(3.0))
EVT_END_THREAD
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 5, ACTOR_PART_FLAG_100000, 1)
@ -431,35 +431,35 @@ EvtScript N(8021B0E4) = {
EVT_WAIT_FRAMES(30)
EVT_CALL(PlaySoundAtModel, 15, 482, 0)
EVT_THREAD
EVT_SET_GROUP(0)
EVT_SET_GROUP(EVT_GROUP_0)
EVT_CALL(ShakeCam, 1, 0, 5, EVT_FLOAT(1.0))
EVT_END_THREAD
EVT_CALL(N(StartRumbleWithParams), 100, 20)
EVT_WAIT_FRAMES(20)
EVT_CALL(PlaySoundAtModel, 11, 482, 0)
EVT_THREAD
EVT_SET_GROUP(0)
EVT_SET_GROUP(EVT_GROUP_0)
EVT_CALL(ShakeCam, 1, 0, 10, EVT_FLOAT(1.5))
EVT_END_THREAD
EVT_CALL(N(StartRumbleWithParams), 150, 20)
EVT_WAIT_FRAMES(30)
EVT_CALL(PlaySoundAtModel, 9, 482, 0)
EVT_THREAD
EVT_SET_GROUP(0)
EVT_SET_GROUP(EVT_GROUP_0)
EVT_CALL(ShakeCam, 1, 0, 10, EVT_FLOAT(1.0))
EVT_END_THREAD
EVT_CALL(N(StartRumbleWithParams), 100, 20)
EVT_WAIT_FRAMES(30)
EVT_CALL(PlaySoundAtModel, 31, 482, 0)
EVT_THREAD
EVT_SET_GROUP(0)
EVT_SET_GROUP(EVT_GROUP_0)
EVT_CALL(ShakeCam, 1, 0, 5, EVT_FLOAT(0.7))
EVT_END_THREAD
EVT_CALL(N(StartRumbleWithParams), 70, 20)
EVT_WAIT_FRAMES(20)
EVT_CALL(PlaySoundAtModel, 25, 482, 0)
EVT_THREAD
EVT_SET_GROUP(0)
EVT_SET_GROUP(EVT_GROUP_0)
EVT_CALL(ShakeCam, 1, 0, 10, EVT_FLOAT(1.0))
EVT_END_THREAD
EVT_CALL(N(StartRumbleWithParams), 100, 20)
@ -467,12 +467,12 @@ EvtScript N(8021B0E4) = {
EVT_CALL(PlaySoundAtModel, 43, 482, 0)
EVT_CALL(N(StartRumbleWithParams), 60, 20)
EVT_THREAD
EVT_SET_GROUP(0)
EVT_SET_GROUP(EVT_GROUP_0)
EVT_CALL(ShakeCam, 1, 0, 5, EVT_FLOAT(0.6))
EVT_END_THREAD
EVT_WAIT_FRAMES(20)
EVT_THREAD
EVT_SET_GROUP(0)
EVT_SET_GROUP(EVT_GROUP_0)
EVT_CALL(ShakeCam, 1, 0, 5, EVT_FLOAT(0.3))
EVT_END_THREAD
EVT_CALL(N(StartRumbleWithParams), 30, 20)

View File

@ -2,14 +2,14 @@
#include "camera.h"
EvtScript ShakeCam1 = {
EVT_SET_GROUP(0)
EVT_SET_GROUP(EVT_GROUP_0)
EVT_CALL(ShakeCam, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), EVT_FIXED(1.0))
EVT_RETURN
EVT_END
};
EvtScript ShakeCamX = {
EVT_SET_GROUP(0)
EVT_SET_GROUP(EVT_GROUP_0)
EVT_CALL(ShakeCam, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), EVT_VAR(3))
EVT_RETURN
EVT_END

View File

@ -143,10 +143,9 @@ ApiStatus CancelMessage(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2;
}
// XXX: possibly not an api function and should be renamed accordingly
ApiStatus CancelMessageAndBlock(void) {
s32 cancel_current_message(void) {
cancel_message(gCurrentPrintContext);
return ApiStatus_BLOCK;
return 0;
}
ApiStatus SetMessageImages(Evt* script, s32 isInitialCall) {

View File

@ -105,6 +105,45 @@ enum {
HUD_ELEMENT_DRAW_FIRST_WITHOUT_CLIPPING = 2,
};
typedef struct PopupMenu {
/* 0x000 */ HudScript* ptrIcon[32];
/* 0x080 */ char unk_80[0x4];
/* 0x084 */ s32 nameMsg[32];
/* 0x104 */ char unk_104[0x4];
/* 0x108 */ s32 userIndex[32]; // used to map menu order to a user-ID for each item
/* 0x188 */ char unk_188[0x4];
/* 0x18C */ s32 enabled[32];
/* 0x20C */ char unk_20C[0x4];
/* 0x210 */ s32 value[32]; // sale price, etc
/* 0x290 */ char unk_290[0x4];
/* 0x294 */ s32 descMsg[32];
/* 0x314 */ char unk_314[0x4];
/* 0x318 */ s32 popupType; // C = keys
/* 0x31C */ s32 unk_31C;
/* 0x320 */ s32 unk_320;
/* 0x324 */ s32 numEntries;
/* 0x328 */ s32 initialPos;
/* 0x32C */ s16 result;
/* 0x32E */ char unk_32E[0x2];
} PopupMenu; // size = 0x330
typedef struct Shop {
/* 0x000 */ s16 flags;
/* 0x002 */ s16 numItems;
/* 0x004 */ s16 numSpecialPrices;
/* 0x006 */ char unk_06[0x2];
/* 0x008 */ s32 currentItemSlot;
/* 0x00C */ s32 selectedStoreItemSlot;
/* 0x010 */ ShopOwner* owner;
/* 0x014 */ ShopItemLocation* ItemDataPositions;
/* 0x018 */ ShopItemData* staticInventory;
/* 0x01C */ ShopSellPriceData* staticPriceList;
/* 0x020 */ s32 costIconID;
/* 0x024 */ s32 inventoryItemFlags;
/* 0x028 */ PopupMenu itemSelectMenu;
/* 0x358 */ s32 unk_358;
} Shop; // size = 0x35C
typedef struct HudScriptPair {
/* 0x00 */ HudScript* enabled;
/* 0x04 */ HudScript* disabled;
@ -284,4 +323,7 @@ void copy_world_hud_element_ref_to_battle(s32 worldID, s32 battleID);
void hud_element_set_aux_cache(void* base, s32 size);
void create_popup_menu(PopupMenu*);
#endif

View File

@ -703,51 +703,51 @@ MessagePrintState* msg_get_printer_for_msg(s32 msgID, s32* donePrintingWriteback
return _msg_get_printer_for_msg(msgID, donePrintingWriteback, 0);
}
#ifdef NON_EQUIVALENT
MessagePrintState* _msg_get_printer_for_msg(s32 msgID, s32* donePrintingWriteback, s32 arg2) {
if (msgID != 0) {
s8* srcBuffer = (s8*) msgID;
s32 i;
MessagePrintState* printer;
s8* srcBuffer;
s32 height;
s32 width;
s32 maxLineChars;
s32 numLines;
s32 maxLinesPerPage;
s32 i;
if (msgID >= 0) {
srcBuffer = load_message_to_buffer(srcBuffer);
}
if (msgID == 0) {
return NULL;
}
srcBuffer = (s8*) msgID;
if (msgID >= 0) {
srcBuffer = load_message_to_buffer((s32)srcBuffer);
}
for (i = 0; i < ARRAY_COUNT(gMessagePrinters); i++) {
MessagePrintState* printer = &gMessagePrinters[i];
for (i = 0; i < ARRAY_COUNT(gMessagePrinters); i++) {
printer = &gMessagePrinters[i];
if (!(printer->stateFlags & 2)) {
s32 height;
s32 width;
s32 maxLineChars;
s32 numLines;
s32 maxLinesPerPage;
if (!(printer->stateFlags & MSG_STATE_FLAG_2)) {
initialize_printer(printer, 1, arg2);
printer->windowState = MSG_WINDOW_STATE_INIT;
printer->srcBuffer = srcBuffer;
printer->msgID = msgID;
printer->stateFlags |= MSG_STATE_FLAG_2;
get_msg_properties(msgID, &height, &width, &maxLineChars, &numLines, &maxLinesPerPage, NULL, 0);
printer->msgHeight = height;
printer->msgWidth = width;
printer->maxLineChars = maxLineChars;
printer->numLines = numLines;
printer->maxLinesPerPage = maxLinesPerPage;
printer->closedWritebackBool = donePrintingWriteback;
initialize_printer(printer, 1, arg2);
printer->windowState = MSG_WINDOW_STATE_INIT;
printer->srcBuffer = srcBuffer;
printer->msgID = msgID;
printer->stateFlags |= 2;
get_msg_properties(msgID, &height, &width, &maxLineChars, &numLines, &maxLinesPerPage, NULL, 0);
printer->msgHeight = height;
printer->msgWidth = width;
printer->maxLineChars = maxLineChars;
printer->numLines = numLines;
printer->maxLinesPerPage = maxLinesPerPage;
printer->closedWritebackBool = donePrintingWriteback;
if (donePrintingWriteback != NULL) {
*donePrintingWriteback = FALSE;
}
return printer;
if (donePrintingWriteback != NULL) {
*donePrintingWriteback = FALSE;
}
return printer;
}
}
return NULL;
}
#else
INCLUDE_ASM(MessagePrintState*, "msg", _msg_get_printer_for_msg, s32 msgID, s32* donePrintingWriteback, s32 arg2);
#endif
s32 msg_printer_load_msg(s32 msgID, MessagePrintState* printer) {
s8* buffer;
@ -1042,7 +1042,25 @@ void msg_draw_rewind_arrow(s32 printerIndex) {
INCLUDE_ASM(s32, "msg", msg_draw_choice_pointer);
INCLUDE_ASM(s32, "msg", draw_digit);
void draw_digit(u32 img, s32 charset, s32 posX, s32 posY) {
MessageNumber* num = &gMsgNumbers[charset];
gDPLoadTextureTile_4b(gMasterGfxPos++,
img, G_IM_FMT_CI,
num->texWidth , num->texHeight,
0, 0,
num->texWidth - 1, num->texHeight - 1,
0,
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP,
G_TX_NOMASK, G_TX_NOMASK,
G_TX_NOLOD, G_TX_NOLOD);
gSPTextureRectangle(gMasterGfxPos++,
4 * posX, 4 * posY,
4 * (posX + num->texWidth), 4 * (posY + num->texHeight),
G_TX_RENDERTILE,
0, 0,
1 << 10, 1 << 10);
}
INCLUDE_ASM(void, "msg", draw_number, s32 value, s32 x, s32 y, s32 arg3, s32 palette, s32 opacity, s32 style);

View File

@ -148,7 +148,7 @@ EvtScript N(80242498) = {
};
EvtScript N(exitSingleDoor_802428D4) = {
EVT_SET_GROUP(27)
EVT_SET_GROUP(EVT_GROUP_1B)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_SET(EVT_VAR(0), 0)
EVT_SET(EVT_VAR(1), 10)

View File

@ -51,7 +51,7 @@ EvtScript N(802437AC) = {
};
EvtScript N(802439B0) = {
EVT_SET_GROUP(0)
EVT_SET_GROUP(EVT_GROUP_0)
EVT_CALL(SetTimeFreezeMode, 1)
EVT_CALL(ShowKeyChoicePopup)
EVT_IF_EQ(EVT_VAR(0), 0)

View File

@ -11,7 +11,7 @@ enum {
};
EvtScript N(802403B0) = {
EVT_SET_GROUP(27)
EVT_SET_GROUP(EVT_GROUP_1B)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(ClearDefeatedEnemies)
EVT_SET(EVT_VAR(0), 0)

View File

@ -4,7 +4,7 @@
extern s32 D_000001E4;
EvtScript N(80240140) = {
EVT_SET_GROUP(27)
EVT_SET_GROUP(EVT_GROUP_1B)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_SET(EVT_VAR(0), 0)
EVT_SET(EVT_VAR(1), 5)

View File

@ -3,7 +3,7 @@
#include "sprite/npc/goomba.h"
EvtScript N(exitSingleDoor_80240100) = {
EVT_SET_GROUP(27)
EVT_SET_GROUP(EVT_GROUP_1B)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_SET(EVT_VAR(0), 0)
EVT_SET(EVT_VAR(1), 6)
@ -18,7 +18,7 @@ EvtScript N(exitSingleDoor_80240100) = {
};
EvtScript N(exitSingleDoor_802401A4) = {
EVT_SET_GROUP(27)
EVT_SET_GROUP(EVT_GROUP_1B)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_SET(EVT_VAR(0), 1)
EVT_SET(EVT_VAR(1), 11)

View File

@ -56,7 +56,7 @@ EvtScript N(802401BC) = {
};
EvtScript N(exitSingleDoor_80240428) = {
EVT_SET_GROUP(27)
EVT_SET_GROUP(EVT_GROUP_1B)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_SET(EVT_VAR(0), 0)
EVT_SET(EVT_VAR(1), 2)

View File

@ -3,7 +3,7 @@
#include "sprite/npc/goomba.h"
EvtScript N(exitSingleDoor_80240100) = {
EVT_SET_GROUP(27)
EVT_SET_GROUP(EVT_GROUP_1B)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_SET(EVT_VAR(0), 0)
EVT_SET(EVT_VAR(1), 2)
@ -18,7 +18,7 @@ EvtScript N(exitSingleDoor_80240100) = {
};
EvtScript N(exitSingleDoor_802401A4) = {
EVT_SET_GROUP(27)
EVT_SET_GROUP(EVT_GROUP_1B)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_SET(EVT_VAR(0), 1)
EVT_SET(EVT_VAR(1), 7)

View File

@ -3,7 +3,7 @@
#include "sprite/npc/tubbas_heart.h"
EvtScript N(exitSingleDoor_80240100) = {
EVT_SET_GROUP(27)
EVT_SET_GROUP(EVT_GROUP_1B)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_SET(EVT_VAR(0), 0)
EVT_SET(EVT_VAR(1), 2)
@ -18,7 +18,7 @@ EvtScript N(exitSingleDoor_80240100) = {
};
EvtScript N(exitSingleDoor_802401A4) = {
EVT_SET_GROUP(27)
EVT_SET_GROUP(EVT_GROUP_1B)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_SET(EVT_VAR(0), 1)
EVT_SET(EVT_VAR(1), 7)

View File

@ -42,7 +42,7 @@ static s32 N(pad_1B8)[] = {
EvtScript N(exitWalk_802401C0) = EXIT_WALK_SCRIPT(60, 0, "arn_04", 1);
EvtScript N(exitDoubleDoor_8024021C) = {
EVT_SET_GROUP(27)
EVT_SET_GROUP(EVT_GROUP_1B)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(UseDoorSounds, 3)
EVT_SET(EVT_VAR(0), 1)

View File

@ -216,7 +216,7 @@ EvtScript N(80240DDC) = {
};
EvtScript N(80240F50) = {
EVT_SET_GROUP(239)
EVT_SET_GROUP(EVT_GROUP_EF)
EVT_LOOP(0)
EVT_CALL(RandInt, 50, EVT_VAR(0))
EVT_ADD(EVT_VAR(0), 80)

View File

@ -41,7 +41,7 @@ static s32 N(pad_3548)[] = {
};
EvtScript N(exitDoubleDoor_80243550) = {
EVT_SET_GROUP(27)
EVT_SET_GROUP(EVT_GROUP_1B)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(UseDoorSounds, 3)
EVT_SET(EVT_VAR(0), 0)
@ -57,7 +57,7 @@ EvtScript N(exitDoubleDoor_80243550) = {
};
EvtScript N(exitDoubleDoor_80243604) = {
EVT_SET_GROUP(27)
EVT_SET_GROUP(EVT_GROUP_1B)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(UseDoorSounds, 3)
EVT_SET(EVT_VAR(0), 1)
@ -73,7 +73,7 @@ EvtScript N(exitDoubleDoor_80243604) = {
};
EvtScript N(exitDoubleDoor_802436B8) = {
EVT_SET_GROUP(27)
EVT_SET_GROUP(EVT_GROUP_1B)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(UseDoorSounds, 3)
EVT_SET(EVT_VAR(0), 2)
@ -89,7 +89,7 @@ EvtScript N(exitDoubleDoor_802436B8) = {
};
EvtScript N(exitDoubleDoor_8024376C) = {
EVT_SET_GROUP(27)
EVT_SET_GROUP(EVT_GROUP_1B)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(UseDoorSounds, 3)
EVT_SET(EVT_VAR(0), 3)
@ -105,7 +105,7 @@ EvtScript N(exitDoubleDoor_8024376C) = {
};
EvtScript N(exitDoubleDoor_80243820) = {
EVT_SET_GROUP(27)
EVT_SET_GROUP(EVT_GROUP_1B)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(UseDoorSounds, 3)
EVT_SET(EVT_VAR(0), 4)
@ -121,7 +121,7 @@ EvtScript N(exitDoubleDoor_80243820) = {
};
EvtScript N(exitDoubleDoor_802438D4) = {
EVT_SET_GROUP(27)
EVT_SET_GROUP(EVT_GROUP_1B)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(UseDoorSounds, 3)
EVT_SET(EVT_VAR(0), 5)
@ -137,7 +137,7 @@ EvtScript N(exitDoubleDoor_802438D4) = {
};
EvtScript N(exitDoubleDoor_80243988) = {
EVT_SET_GROUP(27)
EVT_SET_GROUP(EVT_GROUP_1B)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(UseDoorSounds, 3)
EVT_SET(EVT_VAR(0), 6)
@ -434,7 +434,7 @@ EvtScript N(802449C4) = {
};
EvtScript N(80244AD0) = {
EVT_SET_GROUP(0)
EVT_SET_GROUP(EVT_GROUP_0)
EVT_SUSPEND_GROUP(1)
EVT_CALL(ShowKeyChoicePopup)
EVT_IF_EQ(EVT_VAR(0), 0)
@ -861,7 +861,7 @@ EvtScript N(npcAI_80244D54) = {
EVT_CALL(DisablePlayerPhysics, TRUE)
EVT_CALL(func_802D2B6C)
EVT_CALL(DisablePartnerAI, 0)
EVT_SET_GROUP(0)
EVT_SET_GROUP(EVT_GROUP_0)
EVT_CALL(SetTimeFreezeMode, 1)
EVT_CALL(GetPlayerPos, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2))
EVT_ADD(EVT_VAR(1), 20)

View File

@ -43,7 +43,7 @@ static s32 N(pad_1548)[] = {
};
EvtScript N(exitDoubleDoor_80241550) = {
EVT_SET_GROUP(27)
EVT_SET_GROUP(EVT_GROUP_1B)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(UseDoorSounds, 3)
EVT_SET(EVT_VAR(0), 0)
@ -59,7 +59,7 @@ EvtScript N(exitDoubleDoor_80241550) = {
};
EvtScript N(exitDoubleDoor_80241604) = {
EVT_SET_GROUP(27)
EVT_SET_GROUP(EVT_GROUP_1B)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(UseDoorSounds, 3)
EVT_SET(EVT_VAR(0), 1)
@ -75,7 +75,7 @@ EvtScript N(exitDoubleDoor_80241604) = {
};
EvtScript N(exitSingleDoor_802416B8) = {
EVT_SET_GROUP(27)
EVT_SET_GROUP(EVT_GROUP_1B)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(UseDoorSounds, 0)
EVT_SET(EVT_VAR(0), 2)
@ -91,7 +91,7 @@ EvtScript N(exitSingleDoor_802416B8) = {
};
EvtScript N(exitSingleDoor_8024176C) = {
EVT_SET_GROUP(27)
EVT_SET_GROUP(EVT_GROUP_1B)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(UseDoorSounds, 0)
EVT_SET(EVT_VAR(0), 3)

View File

@ -47,7 +47,7 @@ static s32 N(pad_2908)[] = {
};
EvtScript N(exitDoubleDoor_80242910) = {
EVT_SET_GROUP(27)
EVT_SET_GROUP(EVT_GROUP_1B)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(UseDoorSounds, 3)
EVT_SET(EVT_VAR(0), 1)
@ -63,7 +63,7 @@ EvtScript N(exitDoubleDoor_80242910) = {
};
EvtScript N(exitDoubleDoor_802429C4) = {
EVT_SET_GROUP(27)
EVT_SET_GROUP(EVT_GROUP_1B)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(UseDoorSounds, 3)
EVT_SET(EVT_VAR(0), 4)
@ -79,7 +79,7 @@ EvtScript N(exitDoubleDoor_802429C4) = {
};
EvtScript N(exitDoubleDoor_80242A78) = {
EVT_SET_GROUP(27)
EVT_SET_GROUP(EVT_GROUP_1B)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(UseDoorSounds, 3)
EVT_SET(EVT_VAR(0), 0)
@ -97,7 +97,7 @@ EvtScript N(exitDoubleDoor_80242A78) = {
EvtScript N(exitWalk_80242B2C) = EXIT_WALK_SCRIPT(26, 2, "dgb_13", 0);
EvtScript N(exitSingleDoor_80242B88) = {
EVT_SET_GROUP(27)
EVT_SET_GROUP(EVT_GROUP_1B)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(UseDoorSounds, 0)
EVT_SET(EVT_VAR(0), 2)
@ -113,7 +113,7 @@ EvtScript N(exitSingleDoor_80242B88) = {
};
EvtScript N(exitDoubleDoor_80242C3C) = {
EVT_SET_GROUP(27)
EVT_SET_GROUP(EVT_GROUP_1B)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(UseDoorSounds, 3)
EVT_SET(EVT_VAR(0), 3)
@ -212,7 +212,7 @@ static s32 N(pad_30D8)[] = {
};
EvtScript N(802430E0) = {
EVT_SET_GROUP(0)
EVT_SET_GROUP(EVT_GROUP_0)
EVT_LOOP(20)
EVT_CALL(GetCurrentPartner, EVT_VAR(10))
EVT_IF_NE(EVT_VAR(10), 0)
@ -345,7 +345,7 @@ static s32 N(pad_3738)[] = {
};
EvtScript N(80243740) = {
EVT_SET_GROUP(0)
EVT_SET_GROUP(EVT_GROUP_0)
EVT_SUSPEND_GROUP(1)
EVT_CALL(ShowKeyChoicePopup)
EVT_IF_EQ(EVT_VAR(0), 0)

View File

@ -4,9 +4,6 @@
#include "sprite/npc/sentinel.h"
#include "message_ids.h"
extern s32 wPartnerHudScripts[];
extern s32 wDisabledPartnerHudScripts[];
enum {
NPC_SENTINEL,
};
@ -41,7 +38,7 @@ static s32 N(pad_3208)[] = {
};
EvtScript N(exitSingleDoor_80243210) = {
EVT_SET_GROUP(27)
EVT_SET_GROUP(EVT_GROUP_1B)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(UseDoorSounds, 0)
EVT_SET(EVT_VAR(0), 0)
@ -57,7 +54,7 @@ EvtScript N(exitSingleDoor_80243210) = {
};
EvtScript N(exitDoubleDoor_802432C4) = {
EVT_SET_GROUP(27)
EVT_SET_GROUP(EVT_GROUP_1B)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(UseDoorSounds, 3)
EVT_SET(EVT_VAR(0), 1)
@ -160,7 +157,7 @@ EvtScript N(npcAI_802435E4) = {
EVT_CALL(DisablePlayerPhysics, TRUE)
EVT_CALL(func_802D2B6C)
EVT_CALL(DisablePartnerAI, 0)
EVT_SET_GROUP(0)
EVT_SET_GROUP(EVT_GROUP_0)
EVT_CALL(SetTimeFreezeMode, 1)
EVT_CALL(GetPlayerPos, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2))
EVT_ADD(EVT_VAR(1), 20)
@ -272,147 +269,13 @@ NpcGroupList N(npcGroupList_80243D18) = {
{},
};
s32 N(D_80243D30_C3A260)[] = {
0x001D00F0, 0x001D00F1,
};
s16 N(D_80243D38_C3A268)[] = {
0x0001, 0x0002, 0x0003, 0x0004,
0x0009, 0x0006, 0x0007, 0x0008
};
s32 N(D_80243D48_C3A278)[8][2] = {
{ 0x001D00E0, 0x001D00E1 }, { 0x001D00E2, 0x001D00E3 },
{ 0x001D00E4, 0x001D00E5 }, { 0x001D00E6, 0x001D00E7 },
{ 0x001D00E8, 0x001D00E9 }, { 0x001D00EA, 0x001D00EB },
{ 0x001D00EC, 0x001D00ED }, { 0x001D00EE, 0x001D00EF }
};
f32 N(bigFuncFloats)[] = {
140.0f, 180.0f, 220.0f
};
EvtScript N(80243D94) = {
EVT_WAIT_FRAMES(10)
EVT_CALL(PlaySound, 0x212D)
EVT_CALL(N(UnkFunc21), EVT_MAP_VAR(0))
EVT_WAIT_FRAMES(85)
EVT_THREAD
EVT_CALL(PlaySound, 0x212E)
EVT_CALL(N(func_80242F08_C39438), 70, 70)
EVT_WAIT_FRAMES(27)
EVT_CALL(PlaySound, SOUND_208E)
EVT_CALL(N(func_80242F08_C39438), 50, 50)
EVT_END_THREAD
EVT_THREAD
EVT_WAIT_FRAMES(3)
EVT_CALL(N(func_8024240C_C3893C), EVT_MAP_VAR(0))
EVT_END_THREAD
EVT_THREAD
EVT_WAIT_FRAMES(47)
EVT_CALL(N(UnkFunc22))
EVT_CALL(N(UnkPartnerPosFunc))
EVT_WAIT_FRAMES(5)
EVT_CALL(N(UnkPartnerPosFunc2))
EVT_WAIT_FRAMES(5)
EVT_CALL(N(UnkPartnerPosFunc))
EVT_END_THREAD
EVT_WAIT_FRAMES(3)
EVT_CALL(N(UnkFunc60), EVT_MAP_VAR(0))
EVT_WAIT_FRAMES(30)
EVT_RETURN
EVT_END
};
EvtScript N(80243EF8) = {
EVT_IF_EQ(EVT_SAVE_FLAG(1046), 1)
EVT_RETURN
EVT_END_IF
EVT_CALL(IsStartingConversation, EVT_VAR(0))
EVT_IF_EQ(EVT_VAR(0), 1)
EVT_RETURN
EVT_END_IF
EVT_CALL(N(UnkFunc24))
EVT_IF_EQ(EVT_VAR(0), 1)
EVT_RETURN
EVT_END_IF
EVT_CALL(ModifyGlobalOverrideFlags, 1, 2097152)
EVT_CALL(N(SetOverrideFlags_40))
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(DisablePartnerAI, 0)
EVT_CALL(SetNpcFlagBits, NPC_PARTNER, ((NPC_FLAG_100)), TRUE)
EVT_CALL(N(UnkFunc20), EVT_MAP_VAR(0), EVT_VAR(9))
EVT_CALL(FindKeyItem, ITEM_ULTRA_STONE, EVT_VAR(12))
EVT_CALL(N(UnkFunc38))
EVT_IF_EQ(EVT_VAR(0), -1)
EVT_CALL(ShowMessageAtScreenPos, MESSAGE_ID(0x1D, 0x00DC), 160, 40)
EVT_WAIT_FRAMES(10)
EVT_CALL(N(UnkFunc39), EVT_VAR(9))
EVT_CALL(DisablePlayerInput, FALSE)
EVT_CALL(EnablePartnerAI)
EVT_CALL(ModifyGlobalOverrideFlags, 0, 2097152)
EVT_CALL(N(UnkFunc17))
EVT_RETURN
EVT_END_IF
EVT_IF_EQ(EVT_SAVE_FLAG(438), 0)
EVT_SET(EVT_SAVE_FLAG(438), 1)
EVT_CALL(ShowMessageAtScreenPos, MESSAGE_ID(0x1D, 0x00DA), 160, 40)
EVT_ELSE
EVT_CALL(ShowMessageAtScreenPos, MESSAGE_ID(0x1D, 0x00DB), 160, 40)
EVT_END_IF
EVT_CALL(N(func_8024259C_C38ACC))
EVT_IF_EQ(EVT_VAR(0), -1)
EVT_CALL(N(UnkFunc39), EVT_VAR(9))
EVT_CALL(DisablePlayerInput, FALSE)
EVT_CALL(EnablePartnerAI)
EVT_CALL(ModifyGlobalOverrideFlags, 0, 2097152)
EVT_CALL(N(UnkFunc17))
EVT_RETURN
EVT_END_IF
EVT_SET(EVT_VAR(10), EVT_VAR(0))
EVT_SET(EVT_VAR(11), EVT_VAR(1))
EVT_CALL(EnablePartnerAI)
EVT_CALL(GetCurrentPartnerID, EVT_VAR(0))
EVT_IF_NE(EVT_VAR(0), EVT_VAR(11))
EVT_CALL(N(SwitchToPartner), EVT_VAR(11))
EVT_ELSE
EVT_CALL(func_802CF56C, 2)
EVT_END_IF
EVT_WAIT_FRAMES(10)
EVT_CALL(ShowMessageAtScreenPos, MESSAGE_ID(0x1D, 0x00DF), 160, 40)
EVT_CALL(ShowChoice, MESSAGE_ID(0x1E, 0x000D))
EVT_CALL(CloseMessage)
EVT_IF_NE(EVT_VAR(0), 0)
EVT_CALL(N(UnkFunc39), EVT_VAR(9))
EVT_CALL(DisablePlayerInput, FALSE)
EVT_CALL(EnablePartnerAI)
EVT_CALL(ModifyGlobalOverrideFlags, 0, 2097152)
EVT_CALL(N(UnkFunc17))
EVT_RETURN
EVT_END_IF
EVT_EXEC_WAIT(N(80243D94))
EVT_CALL(N(UnkFunc18), EVT_VAR(11), EVT_VAR(13))
EVT_SET(EVT_SAVE_FLAG(1046), 1)
EVT_CALL(N(UnkFunc39), EVT_VAR(9))
EVT_CALL(N(UnkFunc19))
EVT_IF_EQ(EVT_VAR(13), 1)
EVT_CALL(ShowMessageAtScreenPos, MESSAGE_ID(0x1D, 0x00DD), 160, 40)
EVT_ELSE
EVT_CALL(ShowMessageAtScreenPos, MESSAGE_ID(0x1D, 0x00DE), 160, 40)
EVT_END_IF
EVT_CALL(DisablePlayerInput, FALSE)
EVT_CALL(EnablePartnerAI)
EVT_CALL(ModifyGlobalOverrideFlags, 0, 2097152)
EVT_CALL(N(UnkFunc17))
EVT_RETURN
EVT_END
};
#define SUPER_BLOCK_MAPVAR EVT_MAP_VAR(0)
#define SUPER_BLOCK_GAMEFLAG EVT_SAVE_FLAG(1046)
#include "world/common/atomic/SuperBlockData.inc.c"
EvtScript N(makeEntities) = {
EVT_CALL(MakeEntity, 0x802EA910, 500, -360, 110, 0, MAKE_ENTITY_END)
EVT_SET(EVT_MAP_VAR(0), EVT_VAR(0))
EVT_CALL(AssignBlockFlag, EVT_SAVE_FLAG(1046))
EVT_CALL(AssignScript, EVT_PTR(N(80243EF8)))
EVT_SETUP_SUPER_BLOCK(SUPER_BLOCK_MAPVAR, SUPER_BLOCK_GAMEFLAG)
EVT_RETURN
EVT_END
};
@ -744,177 +607,6 @@ ApiStatus N(func_80242154_C38684)(Evt* script, s32 isInitialCall) {
return (script->functionTemp[0] == 100) * ApiStatus_DONE2;
}
#include "world/common/SetOverrideFlags_40.inc.c"
#include "world/common/UnkFunc17.inc.c"
ApiStatus N(func_8024240C_C3893C)(Evt* script, s32 isInitialCall) {
entity_upgrade_block_hide_content(evt_get_variable(script, *script->ptrReadPos));
return ApiStatus_DONE2;
}
#include "world/common/UnkFunc18.inc.c"
#ifdef NON_EQUIVALENT
typedef struct {
s32 unk_00[8];
char unk_20[0x64];
s32 unk_84[8];
char unk_A4[0x64];
s32 unk_108[8];
char unk_128[0x64];
s32 unk_18C[8];
char unk_1AC[0x64];
s32 unk_210[8];
char unk_230[0x64];
s32 unk_294[8];
char unk_2B4[0x64];
s32 unk_318;
char unk_31C[8];
s32 unk_324;
s32 unk_328;
s16 unk_32C;
} N(UnkStruct);
ApiStatus N(func_8024259C_C38ACC)(Evt* script, s32 isInitialCall) {
PlayerData* playerData = &gPlayerData;
N(UnkStruct)* ptr;
s32 i;
s32 partnerLevel;
s32 var, partnerActiveCount;
s32 idx;
if (isInitialCall) {
script->functionTemp[2] = heap_malloc(0x330);
ptr = script->functionTemp[2];
partnerActiveCount = 0;
var = script->varTable[12] >= 0;
for (i = 0; i < 8; i++) {
idx = N(D_80243D38_C3A268)[i];
if (playerData->partners[idx].enabled) {
ptr->unk_108[i] = idx;
ptr->unk_84[i] = *gPartnerPopupProperties[idx];
partnerLevel = N(UnkFunc37)(idx, var);
if (partnerLevel >= 0) {
ptr->unk_00[i] = wPartnerHudScripts[idx];
ptr->unk_18C[i] = 1;
ptr->unk_294[i] = N(D_80243D48_C3A278)[i][partnerLevel];
} else {
ptr->unk_00[i] = wDisabledPartnerHudScripts[idx];
ptr->unk_18C[i] = 0;
ptr->unk_294[i] = N(D_80243D30_C3A260)[var];
}
ptr->unk_210[i] = playerData->partners[idx].level;
partnerActiveCount++;
}
}
ptr->unk_318 = 4;
ptr->unk_324 = partnerActiveCount;
ptr->unk_328 = 0;
create_popup_menu(ptr);
script->functionTemp[0] = 0;
}
ptr = script->functionTemp[2];
if (script->functionTemp[0] == 0) {
script->functionTemp[1] = ptr->unk_32C;
if (script->functionTemp[1] != 0) {
hide_popup_menu();
} else {
return ApiStatus_BLOCK;
}
}
script->functionTemp[0]++;
if (script->functionTemp[0] < 15) {
return ApiStatus_BLOCK;
}
destroy_popup_menu();
if (script->functionTemp[1] != 0xFF) {
script->varTable[0] = gPartnerPopupProperties[ptr->unk_108[script->functionTemp[1] - 1]][0];
script->varTable[1] = ptr->unk_108[script->functionTemp[1] - 1];
} else {
script->varTable[0] = -1;
}
heap_free(script->functionTemp[2]);
return ApiStatus_DONE2;
}
#else
INCLUDE_ASM(ApiStatus, "world/area_dgb/dgb_04/C36530", dgb_04_func_8024259C_C38ACC, Evt* script,
s32 isInitialCall)
#endif
#include "world/common/SwitchToPartner.inc.c"
#include "world/common/UnkFunc19.inc.c"
#include "world/common/UnkFunc20.inc.c"
#include "world/common/UnkFunc39.inc.c"
#include "world/common/UnkFunc21.inc.c"
#include "world/common/UnkFunc22.inc.c"
#include "world/common/UnkFunc60.inc.c"
s32 N(func_80242F08_C39438)(Evt* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
s32 ret = 0;
if (isInitialCall) {
script->varTable[0] = evt_get_variable(script, *args++);
script->varTable[1] = evt_get_variable(script, *args++);
script->functionTemp[0] = 0;
script->functionTemp[1] = 0;
set_screen_overlay_color(0, 0xD0, 0xD0, 0xD0);
}
switch (script->functionTemp[0]) {
case 0:
if (script->functionTemp[1] == 0xFF) {
script->functionTemp[0] = 1;
script->functionTemp[2] = 0;
}
script->functionTemp[1] += script->varTable[0];
if (script->functionTemp[1] >= 0x100) {
script->functionTemp[1] = 0xFF;
}
break;
case 1:
script->functionTemp[2]++;
if (script->functionTemp[2] >= 2) {
script->functionTemp[0] = 2;
}
break;
case 2:
if (script->functionTemp[1] == 0) {
ret = 1;
}
script->functionTemp[1] -= script->varTable[1];
if (script->functionTemp[1] < 0) {
script->functionTemp[1] = 0;
}
break;
}
set_screen_overlay_params_front(1, script->functionTemp[1]);
return ret;
}
#include "world/common/UnkPartnerPosFuncs.inc.c"
#include "world/common/UnkFunc24.inc.c"
#include "world/common/atomic/SuperBlock.inc.c"
const char N(dgb_00_name_hack)[] = "dgb_00";

View File

@ -6,24 +6,7 @@
#define NAMESPACE dgb_04
ApiStatus N(SetOverrideFlags_40)(Evt* script, s32 isInitialCall);
ApiStatus N(UnkPartnerPosFunc)(Evt* script, s32 isInitialCall);
ApiStatus N(UnkPartnerPosFunc2)(Evt* script, s32 isInitialCall);
ApiStatus N(func_80242154_C38684)(Evt* script, s32 isInitialCall);
ApiStatus N(UnkFunc17)(Evt* script, s32 isInitialCall);
ApiStatus N(func_8024240C_C3893C)(Evt *script, s32 isInitialCall);
ApiStatus N(UnkFunc18)(Evt* script, s32 isInitialCall);
ApiStatus N(UnkFunc38)(Evt* script, s32 isInitialCall);
ApiStatus N(func_8024259C_C38ACC)(Evt* script, s32 isInitialCall);
ApiStatus N(SwitchToPartner)(Evt* script, s32 isInitialCall);
ApiStatus N(UnkFunc19)(Evt* script, s32 isInitialCall);
ApiStatus N(UnkFunc20)(Evt* script, s32 isInitialCall);
ApiStatus N(UnkFunc39)(Evt* script, s32 isInitialCall);
ApiStatus N(UnkFunc21)(Evt* script, s32 isInitialCall);
ApiStatus N(UnkFunc22)(Evt* script, s32 isInitialCall);
ApiStatus N(UnkFunc60)(Evt* script, s32 isInitialCall);
ApiStatus N(func_80242F08_C39438)(Evt* script, s32 isInitialCall);
ApiStatus N(UnkFunc24)(Evt* script, s32 isInitialCall);
extern NpcGroupList N(npcGroupList_80243D18);
extern EvtScript N(main);

View File

@ -40,7 +40,7 @@ static s32 N(pad_1578)[] = {
};
EvtScript N(exitSingleDoor_80241580) = {
EVT_SET_GROUP(27)
EVT_SET_GROUP(EVT_GROUP_1B)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(UseDoorSounds, 0)
EVT_SET(EVT_VAR(0), 0)

View File

@ -36,7 +36,7 @@ static s32 N(pad_3B8)[] = {
};
EvtScript N(exitSingleDoor_802403C0) = {
EVT_SET_GROUP(27)
EVT_SET_GROUP(EVT_GROUP_1B)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(UseDoorSounds, 0)
EVT_SET(EVT_VAR(0), 0)
@ -89,7 +89,7 @@ static s32** N(varTable) = NULL;
#include "world/common/StashVars.inc.c"
EvtScript N(80240624) = {
EVT_SET_GROUP(0)
EVT_SET_GROUP(EVT_GROUP_0)
EVT_CALL(SetTimeFreezeMode, 2)
EVT_WAIT_FRAMES(40)
EVT_CALL(ShowGotItem, EVT_VAR(0), 0, 0)

View File

@ -39,7 +39,7 @@ static s32 N(pad_1528)[] = {
};
EvtScript N(exitSingleDoor_80241530) = {
EVT_SET_GROUP(27)
EVT_SET_GROUP(EVT_GROUP_1B)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(UseDoorSounds, 0)
EVT_SET(EVT_VAR(0), 0)

View File

@ -50,7 +50,7 @@ static s32 N(pad_3D88)[] = {
};
EvtScript N(exitDoubleDoor_80243D90) = {
EVT_SET_GROUP(27)
EVT_SET_GROUP(EVT_GROUP_1B)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(UseDoorSounds, 3)
EVT_SET(EVT_VAR(0), 0)
@ -66,7 +66,7 @@ EvtScript N(exitDoubleDoor_80243D90) = {
};
EvtScript N(exitDoubleDoor_80243E44) = {
EVT_SET_GROUP(27)
EVT_SET_GROUP(EVT_GROUP_1B)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(UseDoorSounds, 3)
EVT_SET(EVT_VAR(0), 1)
@ -308,7 +308,7 @@ EvtScript N(npcAI_802444E4) = {
EVT_CALL(DisablePlayerPhysics, TRUE)
EVT_CALL(func_802D2B6C)
EVT_CALL(DisablePartnerAI, 0)
EVT_SET_GROUP(0)
EVT_SET_GROUP(EVT_GROUP_0)
EVT_CALL(SetTimeFreezeMode, 1)
EVT_CALL(GetPlayerPos, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2))
EVT_ADD(EVT_VAR(1), 20)

View File

@ -45,7 +45,7 @@ static s32 N(pad_3918)[] = {
};
EvtScript N(exitDoubleDoor_80243920) = {
EVT_SET_GROUP(27)
EVT_SET_GROUP(EVT_GROUP_1B)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(UseDoorSounds, 3)
EVT_SET(EVT_VAR(0), 0)
@ -61,7 +61,7 @@ EvtScript N(exitDoubleDoor_80243920) = {
};
EvtScript N(exitDoubleDoor_802439D4) = {
EVT_SET_GROUP(27)
EVT_SET_GROUP(EVT_GROUP_1B)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(UseDoorSounds, 3)
EVT_SET(EVT_VAR(0), 1)
@ -77,7 +77,7 @@ EvtScript N(exitDoubleDoor_802439D4) = {
};
EvtScript N(exitSingleDoor_80243A88) = {
EVT_SET_GROUP(27)
EVT_SET_GROUP(EVT_GROUP_1B)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(UseDoorSounds, 0)
EVT_SET(EVT_VAR(0), 2)
@ -360,7 +360,7 @@ EvtScript N(npcAI_802443DC) = {
EVT_CALL(DisablePlayerPhysics, TRUE)
EVT_CALL(func_802D2B6C)
EVT_CALL(DisablePartnerAI, 0)
EVT_SET_GROUP(0)
EVT_SET_GROUP(EVT_GROUP_0)
EVT_CALL(SetTimeFreezeMode, 1)
EVT_CALL(GetPlayerPos, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2))
EVT_ADD(EVT_VAR(1), 20)

View File

@ -35,7 +35,7 @@ static s32 N(pad_168)[] = {
};
EvtScript N(exitSingleDoor_80240170) = {
EVT_SET_GROUP(27)
EVT_SET_GROUP(EVT_GROUP_1B)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(UseDoorSounds, 0)
EVT_SET(EVT_VAR(0), 0)

View File

@ -31,7 +31,7 @@ static s32 N(pad_3A8)[] = {
};
EvtScript N(exitSingleDoor_802403B0) = {
EVT_SET_GROUP(27)
EVT_SET_GROUP(EVT_GROUP_1B)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(UseDoorSounds, 0)
EVT_SET(EVT_VAR(0), 0)
@ -80,7 +80,7 @@ s32 N(lavaResetList_802405C0)[] = {
};
EvtScript N(802405E0) = {
EVT_SET_GROUP(239)
EVT_SET_GROUP(EVT_GROUP_EF)
EVT_CALL(ModifyColliderFlags, 3, 12, 0x00000002)
EVT_CALL(ModifyColliderFlags, 3, 0, 0x00000002)
EVT_CALL(ModifyColliderFlags, 3, 14, 0x00000002)
@ -134,7 +134,7 @@ static s32** N(varTable) = NULL;
#include "world/common/StashVars.inc.c"
EvtScript N(80240874) = {
EVT_SET_GROUP(0)
EVT_SET_GROUP(EVT_GROUP_0)
EVT_CALL(SetTimeFreezeMode, 2)
EVT_WAIT_FRAMES(40)
EVT_CALL(ShowGotItem, EVT_VAR(0), 0, 0)

View File

@ -31,7 +31,7 @@ static s32 N(pad_F8)[] = {
};
EvtScript N(exitDoubleDoor_80240100) = {
EVT_SET_GROUP(27)
EVT_SET_GROUP(EVT_GROUP_1B)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(UseDoorSounds, 3)
EVT_SET(EVT_VAR(0), 1)
@ -47,7 +47,7 @@ EvtScript N(exitDoubleDoor_80240100) = {
};
EvtScript N(exitDoubleDoor_802401B4) = {
EVT_SET_GROUP(27)
EVT_SET_GROUP(EVT_GROUP_1B)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(UseDoorSounds, 3)
EVT_SET(EVT_VAR(0), 0)

View File

@ -46,7 +46,7 @@ s32 N(itemList_802419C0)[] = {
};
EvtScript N(exitDoubleDoor_802419C8) = {
EVT_SET_GROUP(27)
EVT_SET_GROUP(EVT_GROUP_1B)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(UseDoorSounds, 3)
EVT_SET(EVT_VAR(0), 0)
@ -62,7 +62,7 @@ EvtScript N(exitDoubleDoor_802419C8) = {
};
EvtScript N(exitDoubleDoor_80241A7C) = {
EVT_SET_GROUP(27)
EVT_SET_GROUP(EVT_GROUP_1B)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(UseDoorSounds, 3)
EVT_SET(EVT_VAR(0), 1)
@ -78,7 +78,7 @@ EvtScript N(exitDoubleDoor_80241A7C) = {
};
EvtScript N(exitSingleDoor_80241B30) = {
EVT_SET_GROUP(27)
EVT_SET_GROUP(EVT_GROUP_1B)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(UseDoorSounds, 0)
EVT_SET(EVT_VAR(0), 2)
@ -420,7 +420,7 @@ static s32 N(pad_2AC8)[] = {
};
EvtScript N(80242AD0) = {
EVT_SET_GROUP(0)
EVT_SET_GROUP(EVT_GROUP_0)
EVT_SUSPEND_GROUP(1)
EVT_CALL(ShowKeyChoicePopup)
EVT_IF_EQ(EVT_VAR(0), 0)

View File

@ -48,7 +48,7 @@ static s32 N(pad_1518)[] = {
};
EvtScript N(exitSingleDoor_80241520) = {
EVT_SET_GROUP(27)
EVT_SET_GROUP(EVT_GROUP_1B)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(UseDoorSounds, 0)
EVT_SET(EVT_VAR(0), 0)

View File

@ -31,7 +31,7 @@ static s32 N(pad_F8)[] = {
};
EvtScript N(exitDoubleDoor_80240100) = {
EVT_SET_GROUP(27)
EVT_SET_GROUP(EVT_GROUP_1B)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(UseDoorSounds, 3)
EVT_SET(EVT_VAR(0), 0)
@ -47,7 +47,7 @@ EvtScript N(exitDoubleDoor_80240100) = {
};
EvtScript N(exitDoubleDoor_802401B4) = {
EVT_SET_GROUP(27)
EVT_SET_GROUP(EVT_GROUP_1B)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(UseDoorSounds, 3)
EVT_SET(EVT_VAR(0), 1)

View File

@ -42,7 +42,7 @@ static s32 N(pad_1358)[] = {
};
EvtScript N(exitDoubleDoor_80241360) = {
EVT_SET_GROUP(27)
EVT_SET_GROUP(EVT_GROUP_1B)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(UseDoorSounds, 3)
EVT_SET(EVT_VAR(0), 0)
@ -386,7 +386,7 @@ EvtScript N(idle_80242494) = {
};
EvtScript N(npcAI_802426B0) = {
EVT_SET_GROUP(11)
EVT_SET_GROUP(EVT_GROUP_B)
EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_2039, 0)
EVT_CALL(ShowSleepBubble, 0, 0, 50, 2, 552, 111, 128, 30, EVT_VAR(0))
EVT_WAIT_FRAMES(360)
@ -411,7 +411,7 @@ EvtScript N(npcAI_802426B0) = {
};
EvtScript N(npcAI_80242834) = {
EVT_SET_GROUP(11)
EVT_SET_GROUP(EVT_GROUP_B)
EVT_CALL(SetNpcAnimation, 0, NPC_ANIM_world_tubba_Palette_00_Anim_D)
EVT_THREAD
EVT_LOOP(0)
@ -654,7 +654,7 @@ static s32 N(pad_36D8)[] = {
s32** N(varTable) = NULL; // StashVars.inc.c data
EvtScript N(802436E4) = {
EVT_SET_GROUP(0)
EVT_SET_GROUP(EVT_GROUP_0)
EVT_CALL(SetTimeFreezeMode, 2)
EVT_WAIT_FRAMES(40)
EVT_CALL(ShowGotItem, EVT_VAR(0), 0, 0)

View File

@ -1,16 +1,6 @@
#include "dro_01.h"
#include "world/common/SetPlayerStatusAnimFlags100000.inc.c"
#include "world/common/GetCurrentFloor.inc.c"
#include "world/common/UnkFunc25.inc.c"
#include "world/common/GetEntryPos.inc.c"
#include "world/common/GetCurrentCameraYawClamped180.inc.c"
#include "world/common/SomeXYZFunc2.inc.c"
#include "world/common/atomic/Pipe.inc.c"
#include "world/common/UnkFunc27.inc.c"

View File

@ -108,245 +108,10 @@ EvtScript N(80243BB0) = {
EVT_END
};
EvtScript N(80243C30) = {
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(DisablePlayerPhysics, TRUE)
EVT_CALL(DisablePartnerAI, 0)
EVT_CALL(HidePlayerShadow, TRUE)
EVT_CALL(SetPlayerAnimation, ANIM_STAND_STILL)
EVT_CALL(GetCurrentPartnerID, EVT_VAR(0))
EVT_IF_NE(EVT_VAR(0), 0)
EVT_CALL(EnableNpcShadow, NPC_PARTNER, FALSE)
EVT_CALL(SetNpcPos, NPC_PARTNER, 0, -1000, 0)
EVT_END_IF
EVT_CALL(GetEntryID, EVT_VAR(0))
EVT_CALL(N(GetEntryPos))
EVT_SUB(EVT_VAR(2), 40)
EVT_CALL(SetPlayerPos, EVT_VAR(1), EVT_VAR(2), EVT_VAR(3))
EVT_CALL(InterpPlayerYaw, EVT_VAR(4), 0)
EVT_CALL(PlaySound, 355)
EVT_CALL(func_802D286C, 256)
EVT_CALL(func_802D2520, ANIM_STAND_STILL, 5, 2, 1, 1, 0)
EVT_CALL(GetPlayerPos, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2))
EVT_LOOP(40)
EVT_ADD(EVT_VAR(1), 1)
EVT_CALL(SetPlayerPos, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2))
EVT_WAIT_FRAMES(1)
EVT_END_LOOP
EVT_WAIT_FRAMES(3)
EVT_CALL(GetCurrentPartnerID, EVT_VAR(0))
EVT_IF_NE(EVT_VAR(0), 0)
EVT_THREAD
EVT_CALL(DisablePartnerAI, 0)
EVT_CALL(GetPlayerPos, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2))
EVT_SUB(EVT_VAR(2), 3)
EVT_CALL(SetNpcPos, NPC_PARTNER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2))
EVT_CALL(SetNpcFlagBits, NPC_PARTNER, ((NPC_FLAG_2)), FALSE)
EVT_CALL(EnablePartnerAI)
EVT_CALL(EnableNpcShadow, NPC_PARTNER, TRUE)
EVT_END_THREAD
EVT_END_IF
EVT_WAIT_FRAMES(2)
EVT_CALL(func_802D2520, ANIM_STAND_STILL, 0, 0, 0, 0, 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(SetPlayerAnimation, ANIM_10002)
EVT_CALL(DisablePlayerPhysics, FALSE)
EVT_CALL(DisablePlayerInput, FALSE)
EVT_CALL(HidePlayerShadow, FALSE)
EVT_LABEL(0)
EVT_CALL(N(GetCurrentFloor))
EVT_WAIT_FRAMES(1)
EVT_IF_NE(EVT_VAR(0), -1)
EVT_GOTO(0)
EVT_END_IF
EVT_EXEC(EVT_VAR(10))
EVT_RETURN
EVT_END
};
EvtScript N(80243F84) = {
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(DisablePlayerPhysics, TRUE)
EVT_CALL(HidePlayerShadow, TRUE)
EVT_CALL(ModifyColliderFlags, 0, EVT_VAR(11), 0x7FFFFE00)
EVT_CALL(GetEntryID, EVT_VAR(0))
EVT_CALL(N(GetEntryPos))
EVT_SET(EVT_VAR(5), EVT_VAR(1))
EVT_SET(EVT_VAR(6), EVT_VAR(2))
EVT_SET(EVT_VAR(7), EVT_VAR(3))
EVT_ADD(EVT_VAR(2), 2)
EVT_CALL(SetPlayerPos, EVT_VAR(1), EVT_VAR(2), EVT_VAR(3))
EVT_CALL(InterpPlayerYaw, EVT_VAR(4), 0)
EVT_IF_EQ(EVT_VAR(4), 90)
EVT_ADD(EVT_VAR(5), 40)
EVT_ELSE
EVT_SUB(EVT_VAR(5), 40)
EVT_END_IF
EVT_CALL(UseSettingsFrom, 0, EVT_VAR(5), EVT_VAR(6), EVT_VAR(7))
EVT_CALL(SetPanTarget, 0, EVT_VAR(5), EVT_VAR(6), EVT_VAR(7))
EVT_CALL(SetCamSpeed, 0, EVT_FIXED(90.0))
EVT_CALL(PanToTarget, 0, 0, 1)
EVT_CALL(GetCurrentPartnerID, EVT_VAR(0))
EVT_IF_NE(EVT_VAR(0), 0)
EVT_CALL(DisablePartnerAI, 0)
EVT_CALL(EnableNpcShadow, NPC_PARTNER, FALSE)
EVT_CALL(SetNpcPos, NPC_PARTNER, 0, -1000, 0)
EVT_CALL(InterpNpcYaw, NPC_PARTNER, EVT_VAR(0), 0)
EVT_END_IF
EVT_WAIT_FRAMES(1)
EVT_CALL(PlaySound, 355)
EVT_THREAD
EVT_WAIT_FRAMES(25)
EVT_CALL(HidePlayerShadow, FALSE)
EVT_END_THREAD
EVT_CALL(func_802D286C, 2304)
EVT_CALL(func_802D2520, ANIM_10002, 5, 3, 1, 1, 0)
EVT_LOOP(40)
EVT_CALL(N(SomeXYZFunc2), EVT_FIXED(1.0))
EVT_CALL(SetPlayerPos, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2))
EVT_WAIT_FRAMES(1)
EVT_END_LOOP
EVT_CALL(GetCurrentPartnerID, EVT_VAR(0))
EVT_IF_NE(EVT_VAR(0), 0)
EVT_THREAD
EVT_CALL(GetPlayerPos, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2))
EVT_SUB(EVT_VAR(2), 3)
EVT_CALL(SetNpcPos, NPC_PARTNER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2))
EVT_CALL(EnableNpcShadow, NPC_PARTNER, TRUE)
EVT_CALL(EnablePartnerAI)
EVT_END_THREAD
EVT_END_IF
EVT_WAIT_FRAMES(5)
EVT_CALL(func_802D2520, ANIM_10002, 0, 0, 0, 0, 0)
EVT_CALL(ModifyColliderFlags, 1, EVT_VAR(11), 0x7FFFFE00)
EVT_CALL(DisablePlayerInput, FALSE)
EVT_CALL(DisablePlayerPhysics, FALSE)
EVT_CALL(PanToTarget, 0, 0, 0)
EVT_EXEC(EVT_VAR(10))
EVT_RETURN
EVT_END
};
EvtScript N(80244374) = {
EVT_CALL(N(UnkFunc25))
EVT_IF_EQ(EVT_VAR(0), 0)
EVT_RETURN
EVT_END_IF
EVT_CALL(GetCurrentPartner, EVT_VAR(0))
EVT_IF_NE(EVT_VAR(0), 0)
EVT_CALL(GetCurrentPartnerID, EVT_VAR(1))
EVT_IF_NE(EVT_VAR(1), 6)
EVT_RETURN
EVT_ELSE
EVT_CALL(func_802D2B6C)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_END_IF
EVT_ELSE
EVT_CALL(DisablePlayerInput, TRUE)
EVT_END_IF
EVT_EXEC_WAIT(N(80244450))
EVT_RETURN
EVT_END
};
EvtScript N(80244450) = {
EVT_CALL(N(SetPlayerStatusAnimFlags100000))
EVT_SET_GROUP(27)
EVT_CALL(DisablePlayerPhysics, TRUE)
EVT_CALL(HidePlayerShadow, TRUE)
EVT_SET(EVT_VAR(0), EVT_VAR(10))
EVT_CALL(N(GetEntryPos))
EVT_CALL(PlayerMoveTo, EVT_VAR(1), EVT_VAR(3), 3)
EVT_SET(EVT_VAR(0), EVT_VAR(10))
EVT_CALL(N(GetEntryPos))
EVT_CALL(SetPlayerPos, EVT_VAR(1), EVT_VAR(2), EVT_VAR(3))
EVT_CALL(SetPlayerFlagBits, 2097152, 1)
EVT_CALL(N(GetCurrentCameraYawClamped180))
EVT_CALL(InterpPlayerYaw, EVT_VAR(0), 0)
EVT_WAIT_FRAMES(2)
EVT_CALL(SetPlayerFlagBits, 2097152, 0)
EVT_CALL(PlaySound, 355)
EVT_CALL(GetPlayerPos, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2))
EVT_THREAD
EVT_WAIT_FRAMES(4)
EVT_LOOP(40)
EVT_SUB(EVT_VAR(1), 1)
EVT_CALL(SetPlayerPos, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2))
EVT_WAIT_FRAMES(1)
EVT_END_LOOP
EVT_END_THREAD
EVT_CALL(func_802D286C, 2048)
EVT_CALL(func_802D2520, ANIM_10002, 5, 2, 1, 1, 0)
EVT_WAIT_FRAMES(25)
EVT_EXEC_WAIT(EVT_VAR(12))
EVT_RETURN
EVT_END
};
EvtScript N(8024462C) = {
EVT_CALL(IsPlayerOnValidFloor, EVT_VAR(0))
EVT_IF_EQ(EVT_VAR(0), 0)
EVT_RETURN
EVT_END_IF
EVT_CALL(GetPlayerActionState, EVT_VAR(0))
EVT_IF_EQ(EVT_VAR(0), 26)
EVT_RETURN
EVT_END_IF
EVT_CALL(GetCurrentPartner, EVT_VAR(0))
EVT_IF_NE(EVT_VAR(0), 0)
EVT_CALL(GetCurrentPartnerID, EVT_VAR(1))
EVT_IF_NE(EVT_VAR(1), 6)
EVT_RETURN
EVT_ELSE
EVT_CALL(func_802D2B6C)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_END_IF
EVT_ELSE
EVT_CALL(DisablePlayerInput, TRUE)
EVT_END_IF
EVT_SET_GROUP(27)
EVT_CALL(N(SetPlayerStatusAnimFlags100000))
EVT_CALL(DisablePlayerPhysics, TRUE)
EVT_CALL(ModifyColliderFlags, 0, EVT_VAR(11), 0x7FFFFE00)
EVT_SET(EVT_VAR(0), EVT_VAR(10))
EVT_CALL(N(GetEntryPos))
EVT_SET(EVT_VAR(5), EVT_VAR(1))
EVT_SET(EVT_VAR(6), EVT_VAR(2))
EVT_ADD(EVT_VAR(6), 2)
EVT_SET(EVT_VAR(7), EVT_VAR(3))
EVT_SET(EVT_VAR(8), EVT_VAR(4))
EVT_ADD(EVT_VAR(8), 180)
EVT_IF_GE(EVT_VAR(4), 360)
EVT_SUB(EVT_VAR(4), 360)
EVT_END_IF
EVT_CALL(InterpPlayerYaw, EVT_VAR(8), 1)
EVT_WAIT_FRAMES(1)
EVT_CALL(PlaySound, 355)
EVT_CALL(GetPlayerPos, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2))
EVT_CALL(SetPlayerPos, EVT_VAR(0), EVT_VAR(6), EVT_VAR(7))
EVT_CALL(SetPlayerAnimation, ANIM_STAND_STILL)
EVT_CALL(func_802D286C, 2048)
EVT_CALL(func_802D2520, ANIM_STAND_STILL, 5, 3, 1, 1, 0)
EVT_THREAD
EVT_WAIT_FRAMES(8)
EVT_CALL(HidePlayerShadow, TRUE)
EVT_END_THREAD
EVT_THREAD
EVT_WAIT_FRAMES(3)
EVT_LOOP(40)
EVT_CALL(N(SomeXYZFunc2), EVT_FIXED(1.0))
EVT_CALL(SetPlayerPos, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2))
EVT_WAIT_FRAMES(1)
EVT_END_LOOP
EVT_END_THREAD
EVT_WAIT_FRAMES(25)
EVT_EXEC_WAIT(EVT_VAR(12))
EVT_RETURN
EVT_END
};
#include "world/common/atomic/PipeData.inc.c"
EvtScript N(exitWalk_80244960) = {
EVT_SET_GROUP(27)
EVT_SET_GROUP(EVT_GROUP_1B)
EVT_SET(EVT_SAVE_FLAG(761), 0)
EVT_CALL(UseExitHeading, 60, 0)
EVT_EXEC(ExitWalk)
@ -419,7 +184,7 @@ EvtScript N(enterWalk_80244C14) = {
EVT_CALL(DisablePlayerInput, FALSE)
EVT_END_IF
EVT_SET(EVT_VAR(10), EVT_PTR(N(80244A28)))
EVT_EXEC_WAIT(N(80243C30))
EVT_EXEC_WAIT(N(Pipe_EnterVertical))
EVT_CASE_OR_EQ(3)
EVT_CASE_OR_EQ(4)
EVT_EXEC_WAIT(N(80244A70))
@ -2684,7 +2449,7 @@ EvtScript N(8024C580) = {
EVT_CALL(SetNpcPos, NPC_PARTNER, 0, -1000, 0)
EVT_END_IF
EVT_CALL(GetEntryID, EVT_VAR(0))
EVT_CALL(N(dup_GetEntryPos))
EVT_CALL(N(dup_Pipe_GetEntryPos))
EVT_SUB(EVT_VAR(2), 40)
EVT_CALL(SetPlayerPos, EVT_VAR(1), EVT_VAR(2), EVT_VAR(3))
EVT_CALL(InterpPlayerYaw, EVT_VAR(4), 0)
@ -2718,7 +2483,7 @@ EvtScript N(8024C580) = {
EVT_CALL(DisablePlayerInput, FALSE)
EVT_CALL(HidePlayerShadow, FALSE)
EVT_LABEL(0)
EVT_CALL(N(dup_GetCurrentFloor))
EVT_CALL(N(dup_Pipe_GetCurrentFloor))
EVT_WAIT_FRAMES(1)
EVT_IF_NE(EVT_VAR(0), -1)
EVT_GOTO(0)
@ -2734,7 +2499,7 @@ EvtScript N(8024C8D4) = {
EVT_CALL(HidePlayerShadow, TRUE)
EVT_CALL(ModifyColliderFlags, 0, EVT_VAR(11), 0x7FFFFE00)
EVT_CALL(GetEntryID, EVT_VAR(0))
EVT_CALL(N(dup_GetEntryPos))
EVT_CALL(N(dup_Pipe_GetEntryPos))
EVT_SET(EVT_VAR(5), EVT_VAR(1))
EVT_SET(EVT_VAR(6), EVT_VAR(2))
EVT_SET(EVT_VAR(7), EVT_VAR(3))
@ -2766,7 +2531,7 @@ EvtScript N(8024C8D4) = {
EVT_CALL(func_802D286C, 2304)
EVT_CALL(func_802D2520, ANIM_10002, 5, 3, 1, 1, 0)
EVT_LOOP(40)
EVT_CALL(N(dup_SomeXYZFunc2), EVT_FIXED(1.0))
EVT_CALL(N(dup_Pipe_GetPointAheadOfPlayer), EVT_FIXED(1.0))
EVT_CALL(SetPlayerPos, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2))
EVT_WAIT_FRAMES(1)
EVT_END_LOOP
@ -2792,7 +2557,7 @@ EvtScript N(8024C8D4) = {
};
EvtScript N(8024CCC4) = {
EVT_CALL(N(dup_UnkFunc25))
EVT_CALL(N(dup_Pipe_AwaitDownInput))
EVT_IF_EQ(EVT_VAR(0), 0)
EVT_RETURN
EVT_END_IF
@ -2814,18 +2579,18 @@ EvtScript N(8024CCC4) = {
};
EvtScript N(8024CDA0) = {
EVT_CALL(N(dup_SetPlayerStatusAnimFlags100000))
EVT_SET_GROUP(27)
EVT_CALL(N(dup_Pipe_SetAnimFlag))
EVT_SET_GROUP(EVT_GROUP_1B)
EVT_CALL(DisablePlayerPhysics, TRUE)
EVT_CALL(HidePlayerShadow, TRUE)
EVT_SET(EVT_VAR(0), EVT_VAR(10))
EVT_CALL(N(dup_GetEntryPos))
EVT_CALL(N(dup_Pipe_GetEntryPos))
EVT_CALL(PlayerMoveTo, EVT_VAR(1), EVT_VAR(3), 3)
EVT_SET(EVT_VAR(0), EVT_VAR(10))
EVT_CALL(N(dup_GetEntryPos))
EVT_CALL(N(dup_Pipe_GetEntryPos))
EVT_CALL(SetPlayerPos, EVT_VAR(1), EVT_VAR(2), EVT_VAR(3))
EVT_CALL(SetPlayerFlagBits, 2097152, 1)
EVT_CALL(N(dup_GetCurrentCameraYawClamped180))
EVT_CALL(N(dup_Pipe_GetCameraYaw))
EVT_CALL(InterpPlayerYaw, EVT_VAR(0), 0)
EVT_WAIT_FRAMES(2)
EVT_CALL(SetPlayerFlagBits, 2097152, 0)
@ -2868,12 +2633,12 @@ EvtScript N(8024CF7C) = {
EVT_ELSE
EVT_CALL(DisablePlayerInput, TRUE)
EVT_END_IF
EVT_SET_GROUP(27)
EVT_CALL(N(dup_SetPlayerStatusAnimFlags100000))
EVT_SET_GROUP(EVT_GROUP_1B)
EVT_CALL(N(dup_Pipe_SetAnimFlag))
EVT_CALL(DisablePlayerPhysics, TRUE)
EVT_CALL(ModifyColliderFlags, 0, EVT_VAR(11), 0x7FFFFE00)
EVT_SET(EVT_VAR(0), EVT_VAR(10))
EVT_CALL(N(dup_GetEntryPos))
EVT_CALL(N(dup_Pipe_GetEntryPos))
EVT_SET(EVT_VAR(5), EVT_VAR(1))
EVT_SET(EVT_VAR(6), EVT_VAR(2))
EVT_ADD(EVT_VAR(6), 2)
@ -2898,7 +2663,7 @@ EvtScript N(8024CF7C) = {
EVT_THREAD
EVT_WAIT_FRAMES(3)
EVT_LOOP(40)
EVT_CALL(N(dup_SomeXYZFunc2), EVT_FIXED(1.0))
EVT_CALL(N(dup_Pipe_GetPointAheadOfPlayer), EVT_FIXED(1.0))
EVT_CALL(SetPlayerPos, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2))
EVT_WAIT_FRAMES(1)
EVT_END_LOOP

View File

@ -1,27 +1,7 @@
#include "dro_01.h"
#define NAMESPACE dro_01_dup
#include "world/common/SetPlayerStatusAnimFlags100000.inc.c"
#define NAMESPACE dro_01
#define NAMESPACE dro_01_dup
#include "world/common/GetCurrentFloor.inc.c"
#define NAMESPACE dro_01
#define NAMESPACE dro_01_dup
#include "world/common/UnkFunc25.inc.c"
#define NAMESPACE dro_01
#define NAMESPACE dro_01_dup
#include "world/common/GetEntryPos.inc.c"
#define NAMESPACE dro_01
#define NAMESPACE dro_01_dup
#include "world/common/GetCurrentCameraYawClamped180.inc.c"
#define NAMESPACE dro_01
#define NAMESPACE dro_01_dup
#include "world/common/SomeXYZFunc2.inc.c"
#include "world/common/atomic/Pipe.inc.c"
#define NAMESPACE dro_01
#include "common/foliage.inc.c"

View File

@ -19,18 +19,13 @@ typedef struct {
} N(shopPrice);
ApiStatus N(GetCamVfov)(Evt* script, s32 isInitialCall);
ApiStatus N(GetCurrentCameraYawClamped180)(Evt* script, s32 isInitialCall);
ApiStatus N(GetCurrentFloor)(Evt* script, s32 isInitialCall);
ApiStatus N(GetEntryPos)(Evt* script, s32 isInitialCall);
ApiStatus N(GetGameStatus75)(Evt* script, s32 isInitialCall);
ApiStatus N(GetNpcUnsafeOwner2)(Evt* script, s32 isInitialCall);
ApiStatus N(Set80151310_0)(Evt* script, s32 isInitialCall);
ApiStatus N(Set80151310_1)(Evt* script, s32 isInitialCall);
ApiStatus N(SetCamVfov)(Evt* script, s32 isInitialCall);
ApiStatus N(SetManyVars)(Evt* script, s32 isInitialCall);
ApiStatus N(SetPlayerStatusAnimFlags100000)(Evt* script, s32 isInitialCall);
ApiStatus N(TransformFoliage)(Evt* script, s32 isInitialCall);
ApiStatus N(SomeXYZFunc2)(Evt* script, s32 isInitialCall);
ApiStatus N(AddPlayerHandsOffset)(Evt* script, s32 isInitialCall);
ApiStatus N(UnkAlphaFunc)(Evt* script, s32 isInitialCall);
ApiStatus N(UnkCameraFunc)(Evt* script, s32 isInitialCall);
@ -38,7 +33,6 @@ ApiStatus N(UnkMovePartner)(Evt* script, s32 isInitialCall);
ApiStatus N(UnkRotatePartner)(Evt* script, s32 isInitialCall);
ApiStatus N(UnkRotatePlayer)(Evt* script, s32 isInitialCall);
ApiStatus N(UnkYawFunc)(Evt* script, s32 isInitialCall);
ApiStatus N(UnkFunc25)(Evt* script, s32 isInitialCall);
ApiStatus N(UnkFunc27)(Evt* script, s32 isInitialCall);
ApiStatus N(UnkFunc26)(Evt* script, s32 isInitialCall);
ApiStatus N(UnkNpcAIMainFunc)(Evt* script, s32 isInitialCall);
@ -66,12 +60,12 @@ ApiStatus N(func_802431B4_95E3B4)(Evt* script, s32 isInitialCall);
ApiStatus N(func_802431FC_95E3FC)(Evt* script, s32 isInitialCall);
ApiStatus N(func_80243350_95E550)(Evt* script, s32 isInitialCall);
ApiStatus N(func_80243578_95E778)(Evt* script, s32 isInitialCall);
ApiStatus N(dup_UnkFunc25)(Evt* script, s32 isInitialCall);
ApiStatus N(dup_GetCurrentCameraYawClamped180)(Evt* script, s32 isInitialCall);
ApiStatus N(dup_GetCurrentFloor)(Evt* script, s32 isInitialCall);
ApiStatus N(dup_GetEntryPos)(Evt* script, s32 isInitialCall);
ApiStatus N(dup_SetPlayerStatusAnimFlags100000)(Evt* script, s32 isInitialCall);
ApiStatus N(dup_SomeXYZFunc2)(Evt* script, s32 isInitialCall);
ApiStatus N(dup_Pipe_AwaitDownInput)(Evt* script, s32 isInitialCall);
ApiStatus N(dup_Pipe_GetCameraYaw)(Evt* script, s32 isInitialCall);
ApiStatus N(dup_Pipe_GetCurrentFloor)(Evt* script, s32 isInitialCall);
ApiStatus N(dup_Pipe_GetEntryPos)(Evt* script, s32 isInitialCall);
ApiStatus N(dup_Pipe_SetAnimFlag)(Evt* script, s32 isInitialCall);
ApiStatus N(dup_Pipe_GetPointAheadOfPlayer)(Evt* script, s32 isInitialCall);
extern s32** N(varTable);
extern N(shopInventory) N(shopInventory_8024B4FC)[];

View File

@ -367,7 +367,7 @@ EvtScript N(toggleVis_8024468C) = {
};
EvtScript N(8024486C) = {
EVT_SET_GROUP(0)
EVT_SET_GROUP(EVT_GROUP_0)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(func_802D2C14, 1)
EVT_CALL(PlayerMoveTo, 230, 10, 20)
@ -401,7 +401,7 @@ EvtScript N(8024486C) = {
};
EvtScript N(80244A68) = {
EVT_SET_GROUP(0)
EVT_SET_GROUP(EVT_GROUP_0)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(func_802D2C14, 1)
EVT_CALL(PlayerMoveTo, 230, -70, 20)

View File

@ -72,7 +72,7 @@ EvtScript N(80240814) = {
};
EvtScript N(80240880) = {
EVT_SET_GROUP(11)
EVT_SET_GROUP(EVT_GROUP_B)
EVT_SET(EVT_VAR(10), EVT_VAR(0))
EVT_SET(EVT_VAR(11), EVT_VAR(1))
EVT_SET(EVT_VAR(12), EVT_VAR(2))

View File

@ -55,7 +55,7 @@ static s32 N(pad_8CC) = {
};
EvtScript N(updateTexturePan_802408D0) = {
EVT_SET_GROUP(0)
EVT_SET_GROUP(EVT_GROUP_0)
EVT_IF_EQ(EVT_VAR(5), 1)
EVT_IF_EQ(EVT_VAR(6), 1)
EVT_IF_EQ(EVT_VAR(7), 1)
@ -72,7 +72,7 @@ EvtScript N(updateTexturePan_802408D0) = {
};
EvtScript N(8024096C) = {
EVT_SET_GROUP(11)
EVT_SET_GROUP(EVT_GROUP_B)
EVT_SET(EVT_VAR(10), EVT_VAR(0))
EVT_SET(EVT_VAR(11), EVT_VAR(1))
EVT_SET(EVT_VAR(12), EVT_VAR(2))

View File

@ -1,133 +1,3 @@
#include "flo_08.h"
extern s32 wPartnerHudScripts[];
extern s32 wDisabledPartnerHudScripts[];
extern s32 gPartnerPopupProperties[11][4];
#include "world/common/SetOverrideFlags_40.inc.c"
#include "world/common/UnkFunc17.inc.c"
ApiStatus N(func_8024003C_CAED7C)(Evt* script, s32 isInitialCall) {
entity_upgrade_block_hide_content(evt_get_variable(script, *script->ptrReadPos));
return ApiStatus_DONE2;
}
#include "world/common/UnkFunc18.inc.c"
#ifdef NON_EQUIVALENT
typedef struct {
s32 unk_00[8];
char unk_20[0x64];
s32 unk_84[8];
char unk_A4[0x64];
s32 unk_108[8];
char unk_128[0x64];
s32 unk_18C[8];
char unk_1AC[0x64];
s32 unk_210[8];
char unk_230[0x64];
s32 unk_294[8];
char unk_2B4[0x64];
s32 unk_318;
char unk_31C[8];
s32 unk_324;
s32 unk_328;
s16 unk_32C;
} N(UnkStruct);
ApiStatus N(func_802401CC_CAEF0C)(Evt* script, s32 isInitialCall) {
PlayerData* playerData = &gPlayerData;
N(UnkStruct)* ptr;
s32 i;
s32 partnerLevel;
s32 var, partnerActiveCount;
s32 idx;
if (isInitialCall) {
script->functionTemp[2] = heap_malloc(0x330);
ptr = script->functionTemp[2];
partnerActiveCount = 0;
var = script->varTable[12] >= 0;
for (i = 0; i < 8; i++) {
idx = N(D_80241FB8_CB0CF8)[i];
if (playerData->partners[idx].enabled) {
ptr->unk_108[i] = idx;
ptr->unk_84[i] = *gPartnerPopupProperties[idx];
partnerLevel = N(UnkFunc37)(idx, var);
if (partnerLevel >= 0) {
ptr->unk_00[i] = wPartnerHudScripts[idx];
ptr->unk_18C[i] = 1;
ptr->unk_294[i] = N(D_80241FC8_CB0D08)[i][partnerLevel];
} else {
ptr->unk_00[i] = wDisabledPartnerHudScripts[idx];
ptr->unk_18C[i] = 0;
ptr->unk_294[i] = N(D_80241FB0_CB0CF0)[var];
}
ptr->unk_210[i] = playerData->partners[idx].level;
partnerActiveCount++;
}
}
ptr->unk_318 = 4;
ptr->unk_324 = partnerActiveCount;
ptr->unk_328 = 0;
create_popup_menu(ptr);
script->functionTemp[0] = 0;
}
ptr = script->functionTemp[2];
if (script->functionTemp[0] == 0) {
script->functionTemp[1] = ptr->unk_32C;
if (script->functionTemp[1] != 0) {
hide_popup_menu();
} else {
return ApiStatus_BLOCK;
}
}
script->functionTemp[0]++;
if (script->functionTemp[0] < 15) {
return ApiStatus_BLOCK;
}
destroy_popup_menu();
if (script->functionTemp[1] != 0xFF) {
script->varTable[0] = gPartnerPopupProperties[ptr->unk_108[script->functionTemp[1] - 1]][0];
script->varTable[1] = ptr->unk_108[script->functionTemp[1] - 1];
} else {
script->varTable[0] = -1;
}
heap_free(script->functionTemp[2]);
return ApiStatus_DONE2;
}
#else
INCLUDE_ASM(ApiStatus, "world/area_flo/flo_08/CAED40", flo_08_func_802401CC_CAEF0C, Evt* script,
s32 isInitialCall);
#endif
#include "world/common/SwitchToPartner.inc.c"
#include "world/common/UnkFunc19.inc.c"
#include "world/common/UnkFunc20.inc.c"
#include "world/common/UnkFunc39.inc.c"
#include "world/common/UnkFunc21.inc.c"
#include "world/common/UnkFunc22.inc.c"
#include "world/common/UnkFunc60.inc.c"
#include "world/common/UnkFunc23.inc.c"
#include "world/common/UnkPartnerPosFuncs.inc.c"
#include "world/common/UnkFunc40.inc.c"
#include "world/common/atomic/SuperBlock.inc.c"

View File

@ -47,154 +47,20 @@ EvtScript N(80241F40) = {
EVT_END
};
s32 N(D_80241FB0_CB0CF0)[] = {
0x001D00F0, 0x001D00F1,
};
s16 N(D_80241FB8_CB0CF8)[] = {
0x0001, 0x0002, 0x0003, 0x0004,
0x0009, 0x0006, 0x0007, 0x0008
};
s32 N(D_80241FC8_CB0D08)[8][2] = {
{ 0x001D00E0, 0x001D00E1 }, { 0x001D00E2, 0x001D00E3 },
{ 0x001D00E4, 0x001D00E5 }, { 0x001D00E6, 0x001D00E7 },
{ 0x001D00E8, 0x001D00E9 }, { 0x001D00EA, 0x001D00EB },
{ 0x001D00EC, 0x001D00ED }, { 0x001D00EE, 0x001D00EF }
};
f32 N(bigFuncFloats)[3] = {
140.0f, 180.0f, 220.0f
};
EvtScript N(80242014) = {
EVT_WAIT_FRAMES(10)
EVT_CALL(PlaySound, 0x212D)
EVT_CALL(N(UnkFunc21), EVT_MAP_VAR(0))
EVT_WAIT_FRAMES(85)
EVT_THREAD
EVT_CALL(PlaySound, 0x212E)
EVT_CALL(N(UnkFunc23), 70, 70)
EVT_WAIT_FRAMES(27)
EVT_CALL(PlaySound, SOUND_208E)
EVT_CALL(N(UnkFunc23), 50, 50)
EVT_END_THREAD
EVT_THREAD
EVT_WAIT_FRAMES(3)
EVT_CALL(N(func_8024003C_CAED7C), EVT_MAP_VAR(0))
EVT_END_THREAD
EVT_THREAD
EVT_WAIT_FRAMES(47)
EVT_CALL(N(UnkFunc22))
EVT_CALL(N(UnkPartnerPosFunc))
EVT_WAIT_FRAMES(5)
EVT_CALL(N(UnkPartnerPosFunc2))
EVT_WAIT_FRAMES(5)
EVT_CALL(N(UnkPartnerPosFunc))
EVT_END_THREAD
EVT_WAIT_FRAMES(3)
EVT_CALL(N(UnkFunc60), EVT_MAP_VAR(0))
EVT_WAIT_FRAMES(30)
EVT_RETURN
EVT_END
};
EvtScript N(80242178) = {
EVT_IF_EQ(EVT_SAVE_FLAG(1402), 1)
EVT_RETURN
EVT_END_IF
EVT_CALL(IsStartingConversation, EVT_VAR(0))
EVT_IF_EQ(EVT_VAR(0), 1)
EVT_RETURN
EVT_END_IF
EVT_CALL(N(UnkFunc40))
EVT_IF_EQ(EVT_VAR(0), 1)
EVT_RETURN
EVT_END_IF
EVT_CALL(ModifyGlobalOverrideFlags, 1, 2097152)
EVT_CALL(N(SetOverrideFlags_40))
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(DisablePartnerAI, 0)
EVT_CALL(SetNpcFlagBits, NPC_PARTNER, ((NPC_FLAG_100)), TRUE)
EVT_CALL(N(UnkFunc20), EVT_MAP_VAR(0), EVT_VAR(9))
EVT_CALL(FindKeyItem, ITEM_ULTRA_STONE, EVT_VAR(12))
EVT_CALL(N(UnkFunc38))
EVT_IF_EQ(EVT_VAR(0), -1)
EVT_CALL(ShowMessageAtScreenPos, MESSAGE_ID(0x1D, 0x00DC), 160, 40)
EVT_WAIT_FRAMES(10)
EVT_CALL(N(UnkFunc39), EVT_VAR(9))
EVT_CALL(DisablePlayerInput, FALSE)
EVT_CALL(EnablePartnerAI)
EVT_CALL(ModifyGlobalOverrideFlags, 0, 2097152)
EVT_CALL(N(UnkFunc17))
EVT_RETURN
EVT_END_IF
EVT_IF_EQ(EVT_SAVE_FLAG(438), 0)
EVT_SET(EVT_SAVE_FLAG(438), 1)
EVT_CALL(ShowMessageAtScreenPos, MESSAGE_ID(0x1D, 0x00DA), 160, 40)
EVT_ELSE
EVT_CALL(ShowMessageAtScreenPos, MESSAGE_ID(0x1D, 0x00DB), 160, 40)
EVT_END_IF
EVT_CALL(N(func_802401CC_CAEF0C))
EVT_IF_EQ(EVT_VAR(0), -1)
EVT_CALL(N(UnkFunc39), EVT_VAR(9))
EVT_CALL(DisablePlayerInput, FALSE)
EVT_CALL(EnablePartnerAI)
EVT_CALL(ModifyGlobalOverrideFlags, 0, 2097152)
EVT_CALL(N(UnkFunc17))
EVT_RETURN
EVT_END_IF
EVT_SET(EVT_VAR(10), EVT_VAR(0))
EVT_SET(EVT_VAR(11), EVT_VAR(1))
EVT_CALL(EnablePartnerAI)
EVT_CALL(GetCurrentPartnerID, EVT_VAR(0))
EVT_IF_NE(EVT_VAR(0), EVT_VAR(11))
EVT_CALL(N(SwitchToPartner), EVT_VAR(11))
EVT_ELSE
EVT_CALL(func_802CF56C, 2)
EVT_END_IF
EVT_WAIT_FRAMES(10)
EVT_CALL(ShowMessageAtScreenPos, MESSAGE_ID(0x1D, 0x00DF), 160, 40)
EVT_CALL(ShowChoice, MESSAGE_ID(0x1E, 0x000D))
EVT_CALL(CloseMessage)
EVT_IF_NE(EVT_VAR(0), 0)
EVT_CALL(N(UnkFunc39), EVT_VAR(9))
EVT_CALL(DisablePlayerInput, FALSE)
EVT_CALL(EnablePartnerAI)
EVT_CALL(ModifyGlobalOverrideFlags, 0, 2097152)
EVT_CALL(N(UnkFunc17))
EVT_RETURN
EVT_END_IF
EVT_EXEC_WAIT(N(80242014))
EVT_CALL(N(UnkFunc18), EVT_VAR(11), EVT_VAR(13))
EVT_SET(EVT_SAVE_FLAG(1402), 1)
EVT_CALL(N(UnkFunc39), EVT_VAR(9))
EVT_CALL(N(UnkFunc19))
EVT_IF_EQ(EVT_VAR(13), 1)
EVT_CALL(ShowMessageAtScreenPos, MESSAGE_ID(0x1D, 0x00DD), 160, 40)
EVT_ELSE
EVT_CALL(ShowMessageAtScreenPos, MESSAGE_ID(0x1D, 0x00DE), 160, 40)
EVT_END_IF
EVT_CALL(DisablePlayerInput, FALSE)
EVT_CALL(EnablePartnerAI)
EVT_CALL(ModifyGlobalOverrideFlags, 0, 2097152)
EVT_CALL(N(UnkFunc17))
EVT_RETURN
EVT_END
};
#define SUPER_BLOCK_MAPVAR EVT_MAP_VAR(0)
#define SUPER_BLOCK_GAMEFLAG EVT_SAVE_FLAG(1402)
#include "world/common/atomic/SuperBlockData.inc.c"
EvtScript N(makeEntities) = {
EVT_CALL(MakeEntity, 0x802EA910, -780, 120, -110, 0, MAKE_ENTITY_END)
EVT_SET(EVT_MAP_VAR(0), EVT_VAR(0))
EVT_CALL(AssignBlockFlag, EVT_SAVE_FLAG(1402))
EVT_CALL(AssignScript, EVT_PTR(N(80242178)))
EVT_SETUP_SUPER_BLOCK(SUPER_BLOCK_MAPVAR, SUPER_BLOCK_GAMEFLAG)
EVT_CALL(MakeItemEntity, ITEM_STAR_PIECE, 510, 0, -90, 17, EVT_SAVE_FLAG(1381))
EVT_RETURN
EVT_END
};
EvtScript N(80242680) = {
EVT_SET_GROUP(11)
EVT_SET_GROUP(EVT_GROUP_B)
EVT_SET(EVT_VAR(10), EVT_VAR(0))
EVT_SET(EVT_VAR(11), EVT_VAR(1))
EVT_SET(EVT_VAR(12), EVT_VAR(2))
@ -1205,7 +1071,7 @@ ApiStatus N(func_802419C4_CB0704)(Evt* script, s32 isInitialCall) {
ApiStatus N(func_802419FC_CB073C)(Evt* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
s32* ptr = evt_get_variable(script, *args);
s32* ptr = (s32*)evt_get_variable(script, *args);
s32 i;
if (ptr != NULL) {
@ -1316,7 +1182,7 @@ static s32 N(pad_598C) = {
};
EvtScript N(80245990) = {
EVT_SET_GROUP(11)
EVT_SET_GROUP(EVT_GROUP_B)
EVT_SET(EVT_VAR(10), EVT_VAR(0))
EVT_SET(EVT_VAR(11), EVT_VAR(1))
EVT_SET(EVT_VAR(12), EVT_VAR(2))

View File

@ -7,24 +7,7 @@
#define NAMESPACE flo_08
ApiStatus N(AddPlayerHandsOffset)(Evt* script, s32 isInitialCall);
ApiStatus N(SetOverrideFlags_40)(Evt* script, s32 isInitialCall);
ApiStatus N(TransformFoliage)(Evt* script, s32 isInitialCall);
ApiStatus N(UnkFunc17)(Evt* script, s32 isInitialCall);
ApiStatus N(UnkFunc18)(Evt* script, s32 isInitialCall);
ApiStatus N(UnkFunc19)(Evt* script, s32 isInitialCall);
ApiStatus N(UnkFunc20)(Evt* script, s32 isInitialCall);
ApiStatus N(UnkFunc21)(Evt* script, s32 isInitialCall);
ApiStatus N(UnkFunc22)(Evt* script, s32 isInitialCall);
ApiStatus N(UnkFunc23)(Evt* script, s32 isInitialCall);
ApiStatus N(UnkPartnerPosFunc)(Evt* script, s32 isInitialCall);
ApiStatus N(UnkPartnerPosFunc2)(Evt* script, s32 isInitialCall);
ApiStatus N(func_8024003C_CAED7C)(Evt* script, s32 isInitialCall);
ApiStatus N(UnkFunc38)(Evt* script, s32 isInitialCall);
ApiStatus N(func_802401CC_CAEF0C)(Evt* script, s32 isInitialCall);
ApiStatus N(SwitchToPartner)(Evt* script, s32 isInitialCall);
ApiStatus N(UnkFunc39)(Evt* script, s32 isInitialCall);
ApiStatus N(UnkFunc60)(Evt* script, s32 isInitialCall);
ApiStatus N(UnkFunc40)(Evt* script, s32 isInitialCall);
ApiStatus N(func_80240D40_CAFA80)(Evt* script, s32 isInitialCall);
ApiStatus N(func_8024150C_CB024C)(Evt* script, s32 isInitialCall);
ApiStatus N(func_80241970_CB06B0)(Evt* script, s32 isInitialCall);
@ -39,8 +22,4 @@ extern NpcGroupList N(npcGroupList_80244EC4);
extern EvtScript N(80245914);
extern EvtScript N(80245F5C);
extern EvtScript N(main);
extern s32 N(D_80241FB0_CB0CF0)[];
extern s16 N(D_80241FB8_CB0CF8)[];
extern s32 N(D_80241FC8_CB0D08)[8][2];
extern f32 N(bigFuncFloats)[3];
extern s32 D_802462C0_B4AA30;

View File

@ -35,7 +35,7 @@ EvtScript N(80241880) = {
};
EvtScript N(802418F0) = {
EVT_SET_GROUP(11)
EVT_SET_GROUP(EVT_GROUP_B)
EVT_SET(EVT_VAR(10), EVT_VAR(0))
EVT_SET(EVT_VAR(11), EVT_VAR(1))
EVT_SET(EVT_VAR(12), EVT_VAR(2))
@ -149,7 +149,7 @@ static s32 N(pad_2004)[] = {
};
EvtScript N(80242010) = {
EVT_SET_GROUP(11)
EVT_SET_GROUP(EVT_GROUP_B)
EVT_SET(EVT_VAR(10), EVT_VAR(0))
EVT_SET(EVT_VAR(11), EVT_VAR(1))
EVT_SET(EVT_VAR(12), EVT_VAR(2))

View File

@ -38,7 +38,7 @@ EvtScript N(802403E0) = {
};
EvtScript N(80240450) = {
EVT_SET_GROUP(11)
EVT_SET_GROUP(EVT_GROUP_B)
EVT_SET(EVT_VAR(10), EVT_VAR(0))
EVT_SET(EVT_VAR(11), EVT_VAR(1))
EVT_SET(EVT_VAR(12), EVT_VAR(2))
@ -78,249 +78,14 @@ EvtScript N(80240450) = {
EVT_END
};
EvtScript N(802406FC) = {
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(DisablePlayerPhysics, TRUE)
EVT_CALL(DisablePartnerAI, 0)
EVT_CALL(HidePlayerShadow, TRUE)
EVT_CALL(SetPlayerAnimation, ANIM_STAND_STILL)
EVT_CALL(GetCurrentPartnerID, EVT_VAR(0))
EVT_IF_NE(EVT_VAR(0), 0)
EVT_CALL(EnableNpcShadow, NPC_PARTNER, FALSE)
EVT_CALL(SetNpcPos, NPC_PARTNER, 0, -1000, 0)
EVT_END_IF
EVT_CALL(GetEntryID, EVT_VAR(0))
EVT_CALL(N(GetEntryPos))
EVT_SUB(EVT_VAR(2), 40)
EVT_CALL(SetPlayerPos, EVT_VAR(1), EVT_VAR(2), EVT_VAR(3))
EVT_CALL(InterpPlayerYaw, EVT_VAR(4), 0)
EVT_CALL(PlaySound, 0x163)
EVT_CALL(func_802D286C, 256)
EVT_CALL(func_802D2520, ANIM_STAND_STILL, 5, 2, 1, 1, 0)
EVT_CALL(GetPlayerPos, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2))
EVT_LOOP(40)
EVT_ADD(EVT_VAR(1), 1)
EVT_CALL(SetPlayerPos, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2))
EVT_WAIT_FRAMES(1)
EVT_END_LOOP
EVT_WAIT_FRAMES(3)
EVT_CALL(GetCurrentPartnerID, EVT_VAR(0))
EVT_IF_NE(EVT_VAR(0), 0)
EVT_THREAD
EVT_CALL(DisablePartnerAI, 0)
EVT_CALL(GetPlayerPos, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2))
EVT_SUB(EVT_VAR(2), 3)
EVT_CALL(SetNpcPos, NPC_PARTNER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2))
EVT_CALL(SetNpcFlagBits, NPC_PARTNER, ((NPC_FLAG_2)), FALSE)
EVT_CALL(EnablePartnerAI)
EVT_CALL(EnableNpcShadow, NPC_PARTNER, TRUE)
EVT_END_THREAD
EVT_END_IF
EVT_WAIT_FRAMES(2)
EVT_CALL(func_802D2520, ANIM_STAND_STILL, 0, 0, 0, 0, 0)
EVT_WAIT_FRAMES(1)
EVT_CALL(SetPlayerAnimation, ANIM_10002)
EVT_CALL(DisablePlayerPhysics, FALSE)
EVT_CALL(DisablePlayerInput, FALSE)
EVT_CALL(HidePlayerShadow, FALSE)
EVT_LABEL(0)
EVT_CALL(N(GetCurrentFloor))
EVT_WAIT_FRAMES(1)
EVT_IF_NE(EVT_VAR(0), -1)
EVT_GOTO(0)
EVT_END_IF
EVT_EXEC(EVT_VAR(10))
EVT_RETURN
EVT_END
};
EvtScript N(80240A50) = {
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(DisablePlayerPhysics, TRUE)
EVT_CALL(HidePlayerShadow, TRUE)
EVT_CALL(ModifyColliderFlags, 0, EVT_VAR(11), 0x7FFFFE00)
EVT_CALL(GetEntryID, EVT_VAR(0))
EVT_CALL(N(GetEntryPos))
EVT_SET(EVT_VAR(5), EVT_VAR(1))
EVT_SET(EVT_VAR(6), EVT_VAR(2))
EVT_SET(EVT_VAR(7), EVT_VAR(3))
EVT_ADD(EVT_VAR(2), 2)
EVT_CALL(SetPlayerPos, EVT_VAR(1), EVT_VAR(2), EVT_VAR(3))
EVT_CALL(InterpPlayerYaw, EVT_VAR(4), 0)
EVT_IF_EQ(EVT_VAR(4), 90)
EVT_ADD(EVT_VAR(5), 40)
EVT_ELSE
EVT_SUB(EVT_VAR(5), 40)
EVT_END_IF
EVT_CALL(UseSettingsFrom, 0, EVT_VAR(5), EVT_VAR(6), EVT_VAR(7))
EVT_CALL(SetPanTarget, 0, EVT_VAR(5), EVT_VAR(6), EVT_VAR(7))
EVT_CALL(SetCamSpeed, 0, EVT_FIXED(90.0))
EVT_CALL(PanToTarget, 0, 0, 1)
EVT_CALL(GetCurrentPartnerID, EVT_VAR(0))
EVT_IF_NE(EVT_VAR(0), 0)
EVT_CALL(DisablePartnerAI, 0)
EVT_CALL(EnableNpcShadow, NPC_PARTNER, FALSE)
EVT_CALL(SetNpcPos, NPC_PARTNER, 0, -1000, 0)
EVT_CALL(InterpNpcYaw, NPC_PARTNER, EVT_VAR(0), 0)
EVT_END_IF
EVT_WAIT_FRAMES(1)
EVT_CALL(PlaySound, 0x163)
EVT_THREAD
EVT_WAIT_FRAMES(25)
EVT_CALL(HidePlayerShadow, FALSE)
EVT_END_THREAD
EVT_CALL(func_802D286C, 2304)
EVT_CALL(func_802D2520, ANIM_10002, 5, 3, 1, 1, 0)
EVT_LOOP(40)
EVT_CALL(N(SomeXYZFunc2), EVT_FIXED(1.0))
EVT_CALL(SetPlayerPos, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2))
EVT_WAIT_FRAMES(1)
EVT_END_LOOP
EVT_CALL(GetCurrentPartnerID, EVT_VAR(0))
EVT_IF_NE(EVT_VAR(0), 0)
EVT_THREAD
EVT_CALL(GetPlayerPos, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2))
EVT_SUB(EVT_VAR(2), 3)
EVT_CALL(SetNpcPos, NPC_PARTNER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2))
EVT_CALL(EnableNpcShadow, NPC_PARTNER, TRUE)
EVT_CALL(EnablePartnerAI)
EVT_END_THREAD
EVT_END_IF
EVT_WAIT_FRAMES(5)
EVT_CALL(func_802D2520, ANIM_10002, 0, 0, 0, 0, 0)
EVT_CALL(ModifyColliderFlags, 1, EVT_VAR(11), 0x7FFFFE00)
EVT_CALL(DisablePlayerInput, FALSE)
EVT_CALL(DisablePlayerPhysics, FALSE)
EVT_CALL(PanToTarget, 0, 0, 0)
EVT_EXEC(EVT_VAR(10))
EVT_RETURN
EVT_END
};
EvtScript N(80240E40) = {
EVT_CALL(N(UnkFunc25))
EVT_IF_EQ(EVT_VAR(0), 0)
EVT_RETURN
EVT_END_IF
EVT_CALL(GetCurrentPartner, EVT_VAR(0))
EVT_IF_NE(EVT_VAR(0), 0)
EVT_CALL(GetCurrentPartnerID, EVT_VAR(1))
EVT_IF_NE(EVT_VAR(1), 6)
EVT_RETURN
EVT_ELSE
EVT_CALL(func_802D2B6C)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_END_IF
EVT_ELSE
EVT_CALL(DisablePlayerInput, TRUE)
EVT_END_IF
EVT_EXEC_WAIT(N(80240F1C))
EVT_RETURN
EVT_END
};
EvtScript N(80240F1C) = {
EVT_CALL(N(SetPlayerStatusAnimFlags100000))
EVT_SET_GROUP(27)
EVT_CALL(DisablePlayerPhysics, TRUE)
EVT_CALL(HidePlayerShadow, TRUE)
EVT_SET(EVT_VAR(0), EVT_VAR(10))
EVT_CALL(N(GetEntryPos))
EVT_CALL(PlayerMoveTo, EVT_VAR(1), EVT_VAR(3), 3)
EVT_SET(EVT_VAR(0), EVT_VAR(10))
EVT_CALL(N(GetEntryPos))
EVT_CALL(SetPlayerPos, EVT_VAR(1), EVT_VAR(2), EVT_VAR(3))
EVT_CALL(SetPlayerFlagBits, 2097152, 1)
EVT_CALL(N(GetCurrentCameraYawClamped180))
EVT_CALL(InterpPlayerYaw, EVT_VAR(0), 0)
EVT_WAIT_FRAMES(2)
EVT_CALL(SetPlayerFlagBits, 2097152, 0)
EVT_CALL(PlaySound, 0x163)
EVT_CALL(GetPlayerPos, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2))
EVT_THREAD
EVT_WAIT_FRAMES(4)
EVT_LOOP(40)
EVT_SUB(EVT_VAR(1), 1)
EVT_CALL(SetPlayerPos, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2))
EVT_WAIT_FRAMES(1)
EVT_END_LOOP
EVT_END_THREAD
EVT_CALL(func_802D286C, 2048)
EVT_CALL(func_802D2520, ANIM_10002, 5, 2, 1, 1, 0)
EVT_WAIT_FRAMES(25)
EVT_EXEC_WAIT(EVT_VAR(12))
EVT_RETURN
EVT_END
};
EvtScript N(802410F8) = {
EVT_CALL(IsPlayerOnValidFloor, EVT_VAR(0))
EVT_IF_EQ(EVT_VAR(0), 0)
EVT_RETURN
EVT_END_IF
EVT_CALL(GetPlayerActionState, EVT_VAR(0))
EVT_IF_EQ(EVT_VAR(0), 26)
EVT_RETURN
EVT_END_IF
EVT_CALL(GetCurrentPartner, EVT_VAR(0))
EVT_IF_NE(EVT_VAR(0), 0)
EVT_CALL(GetCurrentPartnerID, EVT_VAR(1))
EVT_IF_NE(EVT_VAR(1), 6)
EVT_RETURN
EVT_ELSE
EVT_CALL(func_802D2B6C)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_END_IF
EVT_ELSE
EVT_CALL(DisablePlayerInput, TRUE)
EVT_END_IF
EVT_SET_GROUP(27)
EVT_CALL(N(SetPlayerStatusAnimFlags100000))
EVT_CALL(DisablePlayerPhysics, TRUE)
EVT_CALL(ModifyColliderFlags, 0, EVT_VAR(11), 0x7FFFFE00)
EVT_SET(EVT_VAR(0), EVT_VAR(10))
EVT_CALL(N(GetEntryPos))
EVT_SET(EVT_VAR(5), EVT_VAR(1))
EVT_SET(EVT_VAR(6), EVT_VAR(2))
EVT_ADD(EVT_VAR(6), 2)
EVT_SET(EVT_VAR(7), EVT_VAR(3))
EVT_SET(EVT_VAR(8), EVT_VAR(4))
EVT_ADD(EVT_VAR(8), 180)
EVT_IF_GE(EVT_VAR(4), 360)
EVT_SUB(EVT_VAR(4), 360)
EVT_END_IF
EVT_CALL(InterpPlayerYaw, EVT_VAR(8), 1)
EVT_WAIT_FRAMES(1)
EVT_CALL(PlaySound, 0x163)
EVT_CALL(GetPlayerPos, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2))
EVT_CALL(SetPlayerPos, EVT_VAR(0), EVT_VAR(6), EVT_VAR(7))
EVT_CALL(SetPlayerAnimation, ANIM_STAND_STILL)
EVT_CALL(func_802D286C, 2048)
EVT_CALL(func_802D2520, ANIM_STAND_STILL, 5, 3, 1, 1, 0)
EVT_THREAD
EVT_WAIT_FRAMES(8)
EVT_CALL(HidePlayerShadow, TRUE)
EVT_END_THREAD
EVT_THREAD
EVT_WAIT_FRAMES(3)
EVT_LOOP(40)
EVT_CALL(N(SomeXYZFunc2), EVT_FIXED(1.0))
EVT_CALL(SetPlayerPos, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2))
EVT_WAIT_FRAMES(1)
EVT_END_LOOP
EVT_END_THREAD
EVT_WAIT_FRAMES(25)
EVT_EXEC_WAIT(EVT_VAR(12))
EVT_RETURN
EVT_END
};
#include "world/common/atomic/PipeData.inc.c"
EvtScript N(exitWalk_8024142C) = EXIT_WALK_SCRIPT(60, 0, "flo_23", 1);
EvtScript N(exitWalk_80241488) = EXIT_WALK_SCRIPT(60, 1, "flo_12", 0);
EvtScript N(802414E4) = {
EVT_SET_GROUP(27)
EVT_SET_GROUP(EVT_GROUP_1B)
EVT_CALL(GotoMap, EVT_PTR("flo_11"), 5)
EVT_WAIT_FRAMES(100)
EVT_RETURN
@ -328,7 +93,7 @@ EvtScript N(802414E4) = {
};
EvtScript N(80241520) = {
EVT_SET_GROUP(27)
EVT_SET_GROUP(EVT_GROUP_1B)
EVT_CALL(GotoMap, EVT_PTR("flo_11"), 6)
EVT_WAIT_FRAMES(100)
EVT_RETURN
@ -336,7 +101,7 @@ EvtScript N(80241520) = {
};
EvtScript N(8024155C) = {
EVT_SET_GROUP(27)
EVT_SET_GROUP(EVT_GROUP_1B)
EVT_CALL(GotoMap, EVT_PTR("flo_11"), 7)
EVT_WAIT_FRAMES(100)
EVT_RETURN
@ -344,7 +109,7 @@ EvtScript N(8024155C) = {
};
EvtScript N(80241598) = {
EVT_SET_GROUP(27)
EVT_SET_GROUP(EVT_GROUP_1B)
EVT_CALL(GotoMap, EVT_PTR("flo_11"), 2)
EVT_WAIT_FRAMES(100)
EVT_RETURN
@ -352,7 +117,7 @@ EvtScript N(80241598) = {
};
EvtScript N(802415D4) = {
EVT_SET_GROUP(27)
EVT_SET_GROUP(EVT_GROUP_1B)
EVT_CALL(GotoMap, EVT_PTR("flo_11"), 3)
EVT_WAIT_FRAMES(100)
EVT_RETURN
@ -360,7 +125,7 @@ EvtScript N(802415D4) = {
};
EvtScript N(80241610) = {
EVT_SET_GROUP(27)
EVT_SET_GROUP(EVT_GROUP_1B)
EVT_CALL(GotoMap, EVT_PTR("flo_11"), 4)
EVT_WAIT_FRAMES(100)
EVT_RETURN
@ -371,7 +136,7 @@ EvtScript N(8024164C) = {
EVT_SET(EVT_VAR(10), EVT_VAR(0))
EVT_SET(EVT_VAR(11), EVT_VAR(1))
EVT_SET(EVT_VAR(12), EVT_VAR(2))
EVT_EXEC_WAIT(N(80240E40))
EVT_EXEC_WAIT(N(Pipe_ExitVertical))
EVT_RETURN
EVT_END
};
@ -427,7 +192,7 @@ EvtScript N(main) = {
EVT_WAIT_FRAMES(1)
EVT_ELSE
EVT_SET(EVT_VAR(10), EVT_PTR(N(80241698)))
EVT_EXEC(N(802406FC))
EVT_EXEC(N(Pipe_EnterVertical))
EVT_WAIT_FRAMES(1)
EVT_END_IF
EVT_EXEC_WAIT(N(802403E0))
@ -885,17 +650,7 @@ EvtScript N(makeEntities) = {
EVT_END
};
#include "world/common/SetPlayerStatusAnimFlags100000.inc.c"
#include "world/common/GetCurrentFloor.inc.c"
#include "world/common/UnkFunc25.inc.c"
#include "world/common/GetEntryPos.inc.c"
#include "world/common/GetCurrentCameraYawClamped180.inc.c"
#include "world/common/SomeXYZFunc2.inc.c"
#include "world/common/atomic/Pipe.inc.c"
void fx_sun();

View File

@ -6,12 +6,6 @@
#define NAMESPACE flo_11
ApiStatus N(GetCurrentCameraYawClamped180)(Evt* script, s32 isInitialCall);
ApiStatus N(GetCurrentFloor)(Evt* script, s32 isInitialCall);
ApiStatus N(GetEntryPos)(Evt* script, s32 isInitialCall);
ApiStatus N(SetPlayerStatusAnimFlags100000)(Evt* script, s32 isInitialCall);
ApiStatus N(SomeXYZFunc2)(Evt* script, s32 isInitialCall);
ApiStatus N(UnkFunc25)(Evt* script, s32 isInitialCall);
ApiStatus N(func_802402E0_CBDFB0)(Evt* script, s32 isInitialCall);
extern NpcGroupList N(npcGroupList_802430D4);

View File

@ -57,7 +57,7 @@ static s32 N(pad_86C) = {
};
EvtScript N(80240870) = {
EVT_SET_GROUP(11)
EVT_SET_GROUP(EVT_GROUP_B)
EVT_SET(EVT_VAR(10), EVT_VAR(0))
EVT_SET(EVT_VAR(11), EVT_VAR(1))
EVT_SET(EVT_VAR(12), EVT_VAR(2))

View File

@ -118,7 +118,7 @@ static s32 N(pad_3A3C) = {
};
EvtScript N(80243A40) = {
EVT_SET_GROUP(11)
EVT_SET_GROUP(EVT_GROUP_B)
EVT_SET(EVT_VAR(10), EVT_VAR(0))
EVT_SET(EVT_VAR(11), EVT_VAR(1))
EVT_SET(EVT_VAR(12), EVT_VAR(2))

View File

@ -26,7 +26,7 @@ EvtScript N(802423F0) = {
};
EvtScript N(updateTexturePan_80242460) = {
EVT_SET_GROUP(0)
EVT_SET_GROUP(EVT_GROUP_0)
EVT_IF_EQ(EVT_VAR(5), 1)
EVT_IF_EQ(EVT_VAR(6), 1)
EVT_IF_EQ(EVT_VAR(7), 1)
@ -150,7 +150,7 @@ static s32 N(pad_2BF4)[] = {
};
EvtScript N(80242C00) = {
EVT_SET_GROUP(11)
EVT_SET_GROUP(EVT_GROUP_B)
EVT_SET(EVT_VAR(10), EVT_VAR(0))
EVT_SET(EVT_VAR(11), EVT_VAR(1))
EVT_SET(EVT_VAR(12), EVT_VAR(2))
@ -417,7 +417,7 @@ s32 N(D_80243B18_CCEE28) = {
};
EvtScript N(80243B1C) = {
EVT_SET_GROUP(0)
EVT_SET_GROUP(EVT_GROUP_0)
EVT_SET(EVT_VAR(15), EVT_VAR(0))
EVT_LABEL(0)
EVT_IF_EQ(EVT_AREA_FLAG(35), 1)

View File

@ -1,10 +1,6 @@
#include "flo_16.h"
#include "message_ids.h"
extern s32 wPartnerHudScripts[];
extern s32 wDisabledPartnerHudScripts[];
extern s32 gPartnerPopupProperties[11][4];
EntryList N(entryList) = {
{ -720.0f, 0.0f, 0.0f, 90.0f },
{ 710.0f, 100.0f, 0.0f, 270.0f },
@ -99,7 +95,7 @@ EvtScript N(main) = {
};
EvtScript N(80242EA0) = {
EVT_SET_GROUP(11)
EVT_SET_GROUP(EVT_GROUP_B)
EVT_SET(EVT_VAR(10), EVT_VAR(0))
EVT_SET(EVT_VAR(11), EVT_VAR(1))
EVT_SET(EVT_VAR(12), EVT_VAR(2))
@ -241,141 +237,9 @@ static s32 N(pad_36FC) = {
0x00000000,
};
s32 N(D_80243700_CD5530)[] = {
0x001D00F0, 0x001D00F1,
};
s16 N(D_80243708_CD5538)[] = {
0x0001, 0x0002, 0x0003, 0x0004,
0x0009, 0x0006, 0x0007, 0x0008
};
s32 N(D_80243718_CD5548)[8][2] = {
{ 0x001D00E0, 0x001D00E1 }, { 0x001D00E2, 0x001D00E3 },
{ 0x001D00E4, 0x001D00E5 }, { 0x001D00E6, 0x001D00E7 },
{ 0x001D00E8, 0x001D00E9 }, { 0x001D00EA, 0x001D00EB },
{ 0x001D00EC, 0x001D00ED }, { 0x001D00EE, 0x001D00EF }
};
f32 N(bigFuncFloats)[] = {
140.0f, 180.0f, 220.0f,
};
EvtScript N(80243764) = {
EVT_WAIT_FRAMES(10)
EVT_CALL(PlaySound, 0x212D)
EVT_CALL(N(UnkFunc21), EVT_MAP_VAR(0))
EVT_WAIT_FRAMES(85)
EVT_THREAD
EVT_CALL(PlaySound, 0x212E)
EVT_CALL(N(UnkFunc23), 70, 70)
EVT_WAIT_FRAMES(27)
EVT_CALL(PlaySound, SOUND_208E)
EVT_CALL(N(UnkFunc23), 50, 50)
EVT_END_THREAD
EVT_THREAD
EVT_WAIT_FRAMES(3)
EVT_CALL(N(func_8024011C_CD1F4C), EVT_MAP_VAR(0))
EVT_END_THREAD
EVT_THREAD
EVT_WAIT_FRAMES(47)
EVT_CALL(N(UnkFunc22))
EVT_CALL(N(UnkPartnerPosFunc))
EVT_WAIT_FRAMES(5)
EVT_CALL(N(UnkPartnerPosFunc2))
EVT_WAIT_FRAMES(5)
EVT_CALL(N(UnkPartnerPosFunc))
EVT_END_THREAD
EVT_WAIT_FRAMES(3)
EVT_CALL(N(UnkFunc60), EVT_MAP_VAR(0))
EVT_WAIT_FRAMES(30)
EVT_RETURN
EVT_END
};
EvtScript N(802438C8) = {
EVT_IF_EQ(EVT_SAVE_FLAG(1403), 1)
EVT_RETURN
EVT_END_IF
EVT_CALL(IsStartingConversation, EVT_VAR(0))
EVT_IF_EQ(EVT_VAR(0), 1)
EVT_RETURN
EVT_END_IF
EVT_CALL(N(UnkFunc24))
EVT_IF_EQ(EVT_VAR(0), 1)
EVT_RETURN
EVT_END_IF
EVT_CALL(ModifyGlobalOverrideFlags, 1, 2097152)
EVT_CALL(N(SetOverrideFlags_40))
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(DisablePartnerAI, 0)
EVT_CALL(SetNpcFlagBits, NPC_PARTNER, ((NPC_FLAG_100)), TRUE)
EVT_CALL(N(UnkFunc20), EVT_MAP_VAR(0), EVT_VAR(9))
EVT_CALL(FindKeyItem, ITEM_ULTRA_STONE, EVT_VAR(12))
EVT_CALL(N(UnkFunc38))
EVT_IF_EQ(EVT_VAR(0), -1)
EVT_CALL(ShowMessageAtScreenPos, MESSAGE_ID(0x1D, 0x00DC), 160, 40)
EVT_WAIT_FRAMES(10)
EVT_CALL(N(UnkFunc39), EVT_VAR(9))
EVT_CALL(DisablePlayerInput, FALSE)
EVT_CALL(EnablePartnerAI)
EVT_CALL(ModifyGlobalOverrideFlags, 0, 2097152)
EVT_CALL(N(UnkFunc17))
EVT_RETURN
EVT_END_IF
EVT_IF_EQ(EVT_SAVE_FLAG(438), 0)
EVT_SET(EVT_SAVE_FLAG(438), 1)
EVT_CALL(ShowMessageAtScreenPos, MESSAGE_ID(0x1D, 0x00DA), 160, 40)
EVT_ELSE
EVT_CALL(ShowMessageAtScreenPos, MESSAGE_ID(0x1D, 0x00DB), 160, 40)
EVT_END_IF
EVT_CALL(N(func_802402AC_CD20DC))
EVT_IF_EQ(EVT_VAR(0), -1)
EVT_CALL(N(UnkFunc39), EVT_VAR(9))
EVT_CALL(DisablePlayerInput, FALSE)
EVT_CALL(EnablePartnerAI)
EVT_CALL(ModifyGlobalOverrideFlags, 0, 2097152)
EVT_CALL(N(UnkFunc17))
EVT_RETURN
EVT_END_IF
EVT_SET(EVT_VAR(10), EVT_VAR(0))
EVT_SET(EVT_VAR(11), EVT_VAR(1))
EVT_CALL(EnablePartnerAI)
EVT_CALL(GetCurrentPartnerID, EVT_VAR(0))
EVT_IF_NE(EVT_VAR(0), EVT_VAR(11))
EVT_CALL(N(SwitchToPartner), EVT_VAR(11))
EVT_ELSE
EVT_CALL(func_802CF56C, 2)
EVT_END_IF
EVT_WAIT_FRAMES(10)
EVT_CALL(ShowMessageAtScreenPos, MESSAGE_ID(0x1D, 0x00DF), 160, 40)
EVT_CALL(ShowChoice, MESSAGE_ID(0x1E, 0x000D))
EVT_CALL(CloseMessage)
EVT_IF_NE(EVT_VAR(0), 0)
EVT_CALL(N(UnkFunc39), EVT_VAR(9))
EVT_CALL(DisablePlayerInput, FALSE)
EVT_CALL(EnablePartnerAI)
EVT_CALL(ModifyGlobalOverrideFlags, 0, 2097152)
EVT_CALL(N(UnkFunc17))
EVT_RETURN
EVT_END_IF
EVT_EXEC_WAIT(N(80243764))
EVT_CALL(N(UnkFunc18), EVT_VAR(11), EVT_VAR(13))
EVT_SET(EVT_SAVE_FLAG(1403), 1)
EVT_CALL(N(UnkFunc39), EVT_VAR(9))
EVT_CALL(N(UnkFunc19))
EVT_IF_EQ(EVT_VAR(13), 1)
EVT_CALL(ShowMessageAtScreenPos, MESSAGE_ID(0x1D, 0x00DD), 160, 40)
EVT_ELSE
EVT_CALL(ShowMessageAtScreenPos, MESSAGE_ID(0x1D, 0x00DE), 160, 40)
EVT_END_IF
EVT_CALL(DisablePlayerInput, FALSE)
EVT_CALL(EnablePartnerAI)
EVT_CALL(ModifyGlobalOverrideFlags, 0, 2097152)
EVT_CALL(N(UnkFunc17))
EVT_RETURN
EVT_END
};
#define SUPER_BLOCK_MAPVAR EVT_MAP_VAR(0)
#define SUPER_BLOCK_GAMEFLAG EVT_SAVE_FLAG(1403)
#include "world/common/atomic/SuperBlockData.inc.c"
EvtScript N(80243D48) = {
EVT_LABEL(0)
@ -424,141 +288,13 @@ EvtScript N(makeEntities) = {
EVT_SET(EVT_AREA_FLAG(39), 0)
EVT_BIND_TRIGGER(N(80243E80), TRIGGER_FLOOR_TOUCH, 20, 1, 0)
EVT_CALL(MakeEntity, 0x802EA910, 350, 240, -100, 0, MAKE_ENTITY_END)
EVT_SET(EVT_MAP_VAR(0), EVT_VAR(0))
EVT_CALL(AssignBlockFlag, EVT_SAVE_FLAG(1403))
EVT_CALL(AssignScript, EVT_PTR(N(802438C8)))
EVT_SETUP_SUPER_BLOCK(SUPER_BLOCK_MAPVAR, SUPER_BLOCK_GAMEFLAG)
EVT_CALL(MakeEntity, 0x802EAA30, 472, 100, -100, 0, MAKE_ENTITY_END)
EVT_CALL(AssignScript, EVT_PTR(N(80243DB0)))
EVT_RETURN
EVT_END
};
#include "world/common/SetOverrideFlags_40.inc.c"
#include "world/common/UnkFunc17.inc.c"
ApiStatus N(func_8024011C_CD1F4C)(Evt* script, s32 isInitialCall) {
entity_upgrade_block_hide_content(evt_get_variable(script, *script->ptrReadPos));
return ApiStatus_DONE2;
}
#include "world/common/UnkFunc18.inc.c"
#ifdef NON_EQUIVALENT
typedef struct {
s32 unk_00[8];
char unk_20[0x64];
s32 unk_84[8];
char unk_A4[0x64];
s32 unk_108[8];
char unk_128[0x64];
s32 unk_18C[8];
char unk_1AC[0x64];
s32 unk_210[8];
char unk_230[0x64];
s32 unk_294[8];
char unk_2B4[0x64];
s32 unk_318;
char unk_31C[8];
s32 unk_324;
s32 unk_328;
s16 unk_32C;
} N(UnkStruct);
ApiStatus N(func_802402AC_CD20DC)(Evt* script, s32 isInitialCall) {
PlayerData* playerData = &gPlayerData;
N(UnkStruct)* ptr;
s32 i;
s32 partnerLevel;
s32 var, partnerActiveCount;
s32 idx;
if (isInitialCall) {
script->functionTemp[2] = heap_malloc(0x330);
ptr = script->functionTemp[2];
partnerActiveCount = 0;
var = script->varTable[12] >= 0;
for (i = 0; i < 8; i++) {
idx = N(D_80243708_CD5538)[i];
if (playerData->partners[idx].enabled) {
ptr->unk_108[i] = idx;
ptr->unk_84[i] = *gPartnerPopupProperties[idx];
partnerLevel = N(UnkFunc37)(idx, var);
if (partnerLevel >= 0) {
ptr->unk_00[i] = wPartnerHudScripts[idx];
ptr->unk_18C[i] = 1;
ptr->unk_294[i] = N(D_80243718_CD5548)[i][partnerLevel];
} else {
ptr->unk_00[i] = wDisabledPartnerHudScripts[idx];
ptr->unk_18C[i] = 0;
ptr->unk_294[i] = N(D_80243700_CD5530)[var];
}
ptr->unk_210[i] = playerData->partners[idx].level;
partnerActiveCount++;
}
}
ptr->unk_318 = 4;
ptr->unk_324 = partnerActiveCount;
ptr->unk_328 = 0;
create_popup_menu(ptr);
script->functionTemp[0] = 0;
}
ptr = script->functionTemp[2];
if (script->functionTemp[0] == 0) {
script->functionTemp[1] = ptr->unk_32C;
if (script->functionTemp[1] != 0) {
hide_popup_menu();
} else {
return ApiStatus_BLOCK;
}
}
script->functionTemp[0]++;
if (script->functionTemp[0] < 15) {
return ApiStatus_BLOCK;
}
destroy_popup_menu();
if (script->functionTemp[1] != 0xFF) {
script->varTable[0] = gPartnerPopupProperties[ptr->unk_108[script->functionTemp[1] - 1]][0];
script->varTable[1] = ptr->unk_108[script->functionTemp[1] - 1];
} else {
script->varTable[0] = -1;
}
heap_free(script->functionTemp[2]);
return ApiStatus_DONE2;
}
#else
INCLUDE_ASM(ApiStatus, "world/area_flo/flo_16/CD1F10", flo_16_func_802402AC_CD20DC, Evt* script,
s32 isInitialCall);
#endif
#include "world/common/SwitchToPartner.inc.c"
#include "world/common/UnkFunc19.inc.c"
#include "world/common/UnkFunc20.inc.c"
#include "world/common/UnkFunc39.inc.c"
#include "world/common/UnkFunc21.inc.c"
#include "world/common/UnkFunc22.inc.c"
#include "world/common/UnkFunc60.inc.c"
#include "world/common/UnkFunc23.inc.c"
#include "world/common/UnkPartnerPosFuncs.inc.c"
#include "world/common/UnkFunc24.inc.c"
#include "world/common/atomic/SuperBlock.inc.c"
#include "world/common/UnkFunc44.inc.c"

View File

@ -6,25 +6,8 @@
#define NAMESPACE flo_16
ApiStatus N(SetOverrideFlags_40)(Evt* script, s32 isInitialCall);
ApiStatus N(UnkFunc17)(Evt* script, s32 isInitialCall);
ApiStatus N(UnkFunc18)(Evt* script, s32 isInitialCall);
ApiStatus N(UnkFunc19)(Evt* script, s32 isInitialCall);
ApiStatus N(UnkFunc20)(Evt* script, s32 isInitialCall);
ApiStatus N(UnkFunc21)(Evt* script, s32 isInitialCall);
ApiStatus N(UnkFunc22)(Evt* script, s32 isInitialCall);
ApiStatus N(UnkFunc23)(Evt* script, s32 isInitialCall);
ApiStatus N(UnkFunc24)(Evt* script, s32 isInitialCall);
ApiStatus N(UnkFunc38)(Evt* script, s32 isInitialCall);
ApiStatus N(UnkFunc39)(Evt* script, s32 isInitialCall);
ApiStatus N(UnkFunc43)(Evt* script, s32 isInitialCall);
ApiStatus N(UnkPartnerPosFunc)(Evt* script, s32 isInitialCall);
ApiStatus N(UnkPartnerPosFunc2)(Evt* script, s32 isInitialCall);
ApiStatus N(func_80240000_CD1E30)(Evt* script, s32 isInitialCall);
ApiStatus N(func_8024011C_CD1F4C)(Evt* script, s32 isInitialCall);
ApiStatus N(func_802402AC_CD20DC)(Evt* script, s32 isInitialCall);
ApiStatus N(SwitchToPartner)(Evt* script, s32 isInitialCall);
ApiStatus N(UnkFunc60)(Evt* script, s32 isInitialCall);
ApiStatus N(UnkFunc44)(Evt* script, s32 isInitialCall);
ApiStatus N(UnkNpcAIMainFunc10)(Evt* script, s32 isInitialCall);
ApiStatus N(func_80242940_CD4770)(Evt* script, s32 isInitialCall);

View File

@ -37,7 +37,7 @@ EvtScript N(80243280) = {
};
EvtScript N(802432F0) = {
EVT_SET_GROUP(11)
EVT_SET_GROUP(EVT_GROUP_B)
EVT_SET(EVT_VAR(10), EVT_VAR(0))
EVT_SET(EVT_VAR(11), EVT_VAR(1))
EVT_SET(EVT_VAR(12), EVT_VAR(2))

View File

@ -43,7 +43,7 @@ static s32 N(pad_8B8)[] = {
};
EvtScript N(updateTexturePan_802408C0) = {
EVT_SET_GROUP(0)
EVT_SET_GROUP(EVT_GROUP_0)
EVT_IF_EQ(EVT_VAR(5), 1)
EVT_IF_EQ(EVT_VAR(6), 1)
EVT_IF_EQ(EVT_VAR(7), 1)
@ -152,7 +152,7 @@ static s32 N(pad_E88)[] = {
};
EvtScript N(80240E90) = {
EVT_SET_GROUP(11)
EVT_SET_GROUP(EVT_GROUP_B)
EVT_LOOP(0)
EVT_CALL(PlayEffect, 0x5E, 0, EVT_FIXED(-16.0), EVT_FIXED(102.0), EVT_FIXED(-4.1), EVT_FIXED(80.9), EVT_FIXED(102.0), EVT_FIXED(-4.1), EVT_FIXED(0.5), 6, 0, 0, 0, 0)
EVT_CALL(N(func_80240340_CDC9E0))

View File

@ -78,7 +78,7 @@ static s32 N(pad_AF4)[] = {
};
EvtScript N(updateTexturePan_80240B00) = {
EVT_SET_GROUP(0)
EVT_SET_GROUP(EVT_GROUP_0)
EVT_IF_EQ(EVT_VAR(5), 1)
EVT_IF_EQ(EVT_VAR(6), 1)
EVT_IF_EQ(EVT_VAR(7), 1)
@ -181,7 +181,7 @@ static s32 N(pad_1044)[] = {
};
EvtScript N(80241050) = {
EVT_SET_GROUP(239)
EVT_SET_GROUP(EVT_GROUP_EF)
EVT_SET(EVT_VAR(15), 0)
EVT_LABEL(0)
EVT_SETF(EVT_VAR(0), EVT_FIXED(-215.4375))

View File

@ -49,7 +49,7 @@ EvtScript N(80240D40) = {
#include "world/common/StarSpiritEffectFunc.inc.c"
EvtScript N(80240DA0) = {
EVT_SET_GROUP(0)
EVT_SET_GROUP(EVT_GROUP_0)
EVT_IF_EQ(EVT_VAR(5), 1)
EVT_IF_EQ(EVT_VAR(6), 1)
EVT_IF_EQ(EVT_VAR(7), 1)

View File

@ -40,7 +40,7 @@ EvtScript N(80240D30) = {
};
EvtScript N(80240DA0) = {
EVT_SET_GROUP(11)
EVT_SET_GROUP(EVT_GROUP_B)
EVT_SET(EVT_VAR(10), EVT_VAR(0))
EVT_SET(EVT_VAR(11), EVT_VAR(1))
EVT_SET(EVT_VAR(12), EVT_VAR(2))

View File

@ -29,7 +29,7 @@ EvtScript N(80240600) = {
};
EvtScript N(80240690) = {
EVT_SET_GROUP(11)
EVT_SET_GROUP(EVT_GROUP_B)
EVT_SET(EVT_VAR(10), EVT_VAR(0))
EVT_SET(EVT_VAR(11), EVT_VAR(1))
EVT_SET(EVT_VAR(12), EVT_VAR(2))
@ -182,7 +182,7 @@ EvtScript N(80241728) = {
};
EvtScript N(updateTexturePan_802417A0) = {
EVT_SET_GROUP(0)
EVT_SET_GROUP(EVT_GROUP_0)
EVT_IF_EQ(EVT_VAR(5), 1)
EVT_IF_EQ(EVT_VAR(6), 1)
EVT_IF_EQ(EVT_VAR(7), 1)

View File

@ -40,7 +40,7 @@ EvtScript N(80242330) = {
};
EvtScript N(802423A0) = {
EVT_SET_GROUP(11)
EVT_SET_GROUP(EVT_GROUP_B)
EVT_SET(EVT_VAR(10), EVT_VAR(0))
EVT_SET(EVT_VAR(11), EVT_VAR(1))
EVT_SET(EVT_VAR(12), EVT_VAR(2))

View File

@ -53,7 +53,7 @@ static s32 N(pad_4734)[] = {
};
EvtScript N(80244740) = {
EVT_SET_GROUP(11)
EVT_SET_GROUP(EVT_GROUP_B)
EVT_SET(EVT_VAR(10), EVT_VAR(0))
EVT_SET(EVT_VAR(11), EVT_VAR(1))
EVT_SET(EVT_VAR(12), EVT_VAR(2))

View File

@ -2,17 +2,7 @@
#include "sprite.h"
#include "hud_element.h"
#include "world/common/SetPlayerStatusAnimFlags100000.inc.c"
#include "world/common/GetCurrentFloor.inc.c"
#include "world/common/UnkFunc25.inc.c"
#include "world/common/GetEntryPos.inc.c"
#include "world/common/GetCurrentCameraYawClamped180.inc.c"
#include "world/common/SomeXYZFunc2.inc.c"
#include "world/common/atomic/Pipe.inc.c"
#include "world/common/UpdateTexturePan.inc.c"

View File

@ -5,34 +5,6 @@ static char* N(exit_str_1) = "isk_14";
static char* N(exit_str_2) = "isk_18";
static char* N(exit_str_3) = "";
#include "world/common/SetOverrideFlags_40.inc.c"
#include "world/common/UnkFunc17.inc.c"
INCLUDE_ASM(s32, "world/area_isk/isk_10/988B60", func_8024003C_988B9C);
#include "world/common/UnkFunc18.inc.c"
INCLUDE_ASM(s32, "world/area_isk/isk_10/988B60", func_802401CC_988D2C);
#include "world/common/SwitchToPartner.inc.c"
#include "world/common/UnkFunc19.inc.c"
#include "world/common/UnkFunc20.inc.c"
#include "world/common/UnkFunc39.inc.c"
#include "world/common/UnkFunc21.inc.c"
#include "world/common/UnkFunc22.inc.c"
#include "world/common/UnkFunc60.inc.c"
#include "world/common/UnkFunc23.inc.c"
#include "world/common/UnkPartnerPosFuncs.inc.c"
#include "world/common/UnkFunc24.inc.c"
#include "world/common/atomic/SuperBlock.inc.c"
INCLUDE_ASM(s32, "world/area_isk/isk_10/988B60", func_80240D38_989898);

View File

@ -2,32 +2,4 @@
#include "common/UnkFloatFunc.inc.c"
#include "world/common/SetOverrideFlags_40.inc.c"
#include "world/common/UnkFunc17.inc.c"
INCLUDE_ASM(s32, "world/area_iwa/iwa_10/91E6D0", func_8024032C_91E89C);
#include "world/common/UnkFunc18.inc.c"
INCLUDE_ASM(s32, "world/area_iwa/iwa_10/91E6D0", func_802404BC_91EA2C);
#include "world/common/SwitchToPartner.inc.c"
#include "world/common/UnkFunc19.inc.c"
#include "world/common/UnkFunc20.inc.c"
#include "world/common/UnkFunc39.inc.c"
#include "world/common/UnkFunc21.inc.c"
#include "world/common/UnkFunc22.inc.c"
#include "world/common/UnkFunc60.inc.c"
#include "world/common/UnkFunc23.inc.c"
#include "world/common/UnkPartnerPosFuncs.inc.c"
#include "world/common/UnkFunc40.inc.c"
#include "world/common/atomic/SuperBlock.inc.c"

View File

@ -7,17 +7,7 @@ static char* N(exit_str_3) = "";
#define UNK_ALPHA_FUNC_NPC 17
#include "world/common/SetPlayerStatusAnimFlags100000.inc.c"
#include "world/common/GetCurrentFloor.inc.c"
#include "world/common/UnkFunc25.inc.c"
#include "world/common/GetEntryPos.inc.c"
#include "world/common/GetCurrentCameraYawClamped180.inc.c"
#include "world/common/SomeXYZFunc2.inc.c"
#include "world/common/atomic/Pipe.inc.c"
#include "world/common/UpdateTexturePan.inc.c"

View File

@ -1,31 +1,3 @@
#include "jan_08.h"
#include "world/common/SetOverrideFlags_40.inc.c"
#include "world/common/UnkFunc17.inc.c"
INCLUDE_ASM(s32, "world/area_jan/jan_08/B5E910", func_8024069C_B5E94C);
#include "world/common/UnkFunc18.inc.c"
INCLUDE_ASM(s32, "world/area_jan/jan_08/B5E910", func_8024082C_B5EADC);
#include "world/common/SwitchToPartner.inc.c"
#include "world/common/UnkFunc19.inc.c"
#include "world/common/UnkFunc20.inc.c"
#include "world/common/UnkFunc39.inc.c"
#include "world/common/UnkFunc21.inc.c"
#include "world/common/UnkFunc22.inc.c"
#include "world/common/UnkFunc60.inc.c"
#include "world/common/UnkFunc23.inc.c"
#include "world/common/UnkPartnerPosFuncs.inc.c"
#include "world/common/UnkFunc40.inc.c"
#include "world/common/atomic/SuperBlock.inc.c"

View File

@ -5,17 +5,7 @@ static char* N(exit_str_1) = "jan_08";
static char* N(exit_str_2) = "jan_06";
static char* N(exit_str_3) = "jan_11";
#include "world/common/SetPlayerStatusAnimFlags100000.inc.c"
#include "world/common/GetCurrentFloor.inc.c"
#include "world/common/UnkFunc25.inc.c"
#include "world/common/GetEntryPos.inc.c"
#include "world/common/GetCurrentCameraYawClamped180.inc.c"
#include "world/common/SomeXYZFunc2.inc.c"
#include "world/common/atomic/Pipe.inc.c"
#include "world/common/UpdateTexturePan.inc.c"

View File

@ -5,16 +5,6 @@ static char* N(exit_str_1) = "";
#include "world/common/DarkRoom.inc.c"
#include "world/common/SetPlayerStatusAnimFlags100000.inc.c"
#include "world/common/GetCurrentFloor.inc.c"
#include "world/common/UnkFunc25.inc.c"
#include "world/common/GetEntryPos.inc.c"
#include "world/common/GetCurrentCameraYawClamped180.inc.c"
#include "world/common/SomeXYZFunc2.inc.c"
#include "world/common/atomic/Pipe.inc.c"
#include "world/common/UnkPosFunc2.inc.c"

View File

@ -7,17 +7,7 @@ static char* N(exit_str_3) = "";
#define UNK_ALPHA_FUNC_NPC 8
#include "world/common/SetPlayerStatusAnimFlags100000.inc.c"
#include "world/common/GetCurrentFloor.inc.c"
#include "world/common/UnkFunc25.inc.c"
#include "world/common/GetEntryPos.inc.c"
#include "world/common/GetCurrentCameraYawClamped180.inc.c"
#include "world/common/SomeXYZFunc2.inc.c"
#include "world/common/atomic/Pipe.inc.c"
INCLUDE_ASM(s32, "world/area_kmr/kmr_02/8B0070", func_802402E0_8B0350);

View File

@ -61,7 +61,7 @@ NpcSettings N(goombaNpcSettings) = {
/// @bug Never returns
EvtScript N(ReadWestSign) = {
EVT_SET_GROUP(0)
EVT_SET_GROUP(EVT_GROUP_0)
// "Eat a Mushroom to regain your energy!"
EVT_SUSPEND_GROUP(1)
@ -208,7 +208,7 @@ EvtScript N(ReadEastSign) = {
EVT_IF_EQ(LW(0), 1)
EVT_RETURN
EVT_END_IF
EVT_SET_GROUP(0)
EVT_SET_GROUP(EVT_GROUP_0)
EVT_CALL(SetTimeFreezeMode, 1)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(ShowMessageAtScreenPos, MSG_kmr_12_sign_to_fortress, 160, 40)

View File

@ -1,16 +1,6 @@
#include "kmr_20.h"
#include "world/common/SetPlayerStatusAnimFlags100000.inc.c"
#include "world/common/GetCurrentFloor.inc.c"
#include "world/common/UnkFunc25.inc.c"
#include "world/common/GetEntryPos.inc.c"
#include "world/common/GetCurrentCameraYawClamped180.inc.c"
#include "world/common/SomeXYZFunc2.inc.c"
#include "world/common/atomic/Pipe.inc.c"
INCLUDE_ASM(s32, "world/area_kmr/kmr_20/8EBE50", func_80240310_8EC130);

View File

@ -24,4 +24,4 @@ INCLUDE_ASM(s32, "world/area_kmr/kmr_20/8ED0C0", func_8024159C_8ED3BC);
INCLUDE_ASM(s32, "world/area_kmr/kmr_20/8ED0C0", func_802415C4_8ED3E4);
#include "world/common/UnkFunc40.inc.c"
#include "world/common/WaitForPlayerToLand.inc.c"

View File

@ -1,27 +1,7 @@
#include "kmr_20.h"
#define NAMESPACE dup_kmr_20
#include "world/common/SetPlayerStatusAnimFlags100000.inc.c"
#define NAMESPACE kmr_20
#define NAMESPACE dup_kmr_20
#include "world/common/GetCurrentFloor.inc.c"
#define NAMESPACE kmr_20
#define NAMESPACE dup_kmr_20
#include "world/common/UnkFunc25.inc.c"
#define NAMESPACE kmr_20
#define NAMESPACE dup_kmr_20
#include "world/common/GetEntryPos.inc.c"
#define NAMESPACE kmr_20
#define NAMESPACE dup_kmr_20
#include "world/common/GetCurrentCameraYawClamped180.inc.c"
#define NAMESPACE kmr_20
#define NAMESPACE dup_kmr_20
#include "world/common/SomeXYZFunc2.inc.c"
#include "world/common/atomic/Pipe.inc.c"
#define NAMESPACE kmr_20
#define NAMESPACE dup3_kmr_20

View File

@ -1,27 +1,7 @@
#include "kmr_20.h"
#define NAMESPACE dup2_kmr_20
#include "world/common/SetPlayerStatusAnimFlags100000.inc.c"
#define NAMESPACE kmr_20
#define NAMESPACE dup2_kmr_20
#include "world/common/GetCurrentFloor.inc.c"
#define NAMESPACE kmr_20
#define NAMESPACE dup2_kmr_20
#include "world/common/UnkFunc25.inc.c"
#define NAMESPACE kmr_20
#define NAMESPACE dup2_kmr_20
#include "world/common/GetEntryPos.inc.c"
#define NAMESPACE kmr_20
#define NAMESPACE dup2_kmr_20
#include "world/common/GetCurrentCameraYawClamped180.inc.c"
#define NAMESPACE kmr_20
#define NAMESPACE dup2_kmr_20
#include "world/common/SomeXYZFunc2.inc.c"
#include "world/common/atomic/Pipe.inc.c"
#define NAMESPACE kmr_20
INCLUDE_ASM(s32, "world/area_kmr/kmr_20/8EDB70", func_80242030_8EDE50);

View File

@ -1,31 +1,4 @@
#include "kzn_04.h"
#include "world/common/SetOverrideFlags_40.inc.c"
#include "world/common/atomic/SuperBlock.inc.c"
#include "world/common/UnkFunc17.inc.c"
INCLUDE_ASM(s32, "world/area_kzn/kzn_04/C68440", func_8024034C_C6847C);
#include "world/common/UnkFunc18.inc.c"
INCLUDE_ASM(s32, "world/area_kzn/kzn_04/C68440", func_802404DC_C6860C);
#include "world/common/SwitchToPartner.inc.c"
#include "world/common/UnkFunc19.inc.c"
#include "world/common/UnkFunc20.inc.c"
#include "world/common/UnkFunc39.inc.c"
#include "world/common/UnkFunc21.inc.c"
#include "world/common/UnkFunc22.inc.c"
#include "world/common/UnkFunc60.inc.c"
#include "world/common/UnkFunc23.inc.c"
#include "world/common/UnkPartnerPosFuncs.inc.c"
#include "world/common/UnkFunc40.inc.c"

View File

@ -1,3 +1,4 @@
#include "kzn_06.h"
// push block gravity
INCLUDE_ASM(s32, "world/area_kzn/kzn_06/C6CC30", func_80240310_C6CC30);

View File

@ -1,5 +1,6 @@
#include "kzn_07.h"
// push block gravity
INCLUDE_ASM(s32, "world/area_kzn/kzn_07/C6EA50", func_80240720_C6EA50);
INCLUDE_ASM(s32, "world/area_kzn/kzn_07/C6EA50", func_802407F4_C6EB24);

View File

@ -3,32 +3,5 @@
static char* N(exit_str_0) = "kzn_03";
static char* N(exit_str_1) = "kzn_10";
#include "world/common/SetOverrideFlags_40.inc.c"
#include "world/common/atomic/SuperBlock.inc.c"
#include "world/common/UnkFunc17.inc.c"
INCLUDE_ASM(s32, "world/area_kzn/kzn_09/C76CE0", func_8024003C_C76D1C);
#include "world/common/UnkFunc18.inc.c"
INCLUDE_ASM(s32, "world/area_kzn/kzn_09/C76CE0", func_802401CC_C76EAC);
#include "world/common/SwitchToPartner.inc.c"
#include "world/common/UnkFunc19.inc.c"
#include "world/common/UnkFunc20.inc.c"
#include "world/common/UnkFunc39.inc.c"
#include "world/common/UnkFunc21.inc.c"
#include "world/common/UnkFunc22.inc.c"
#include "world/common/UnkFunc60.inc.c"
#include "world/common/UnkFunc23.inc.c"
#include "world/common/UnkPartnerPosFuncs.inc.c"
#include "world/common/UnkFunc40.inc.c"

View File

@ -7,17 +7,7 @@ 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/SetPlayerStatusAnimFlags100000.inc.c"
#include "world/common/GetCurrentFloor.inc.c"
#include "world/common/UnkFunc25.inc.c"
#include "world/common/GetEntryPos.inc.c"
#include "world/common/GetCurrentCameraYawClamped180.inc.c"
#include "world/common/SomeXYZFunc2.inc.c"
#include "world/common/atomic/Pipe.inc.c"
#include "world/common/UpdateTexturePan.inc.c"

View File

@ -7,17 +7,7 @@ static char* N(exit_str_3) = "mac_03";
static char* N(exit_str_4) = "tik_06";
static char* N(exit_str_5) = "tik_15";
#include "world/common/SetPlayerStatusAnimFlags100000.inc.c"
#include "world/common/GetCurrentFloor.inc.c"
#include "world/common/UnkFunc25.inc.c"
#include "world/common/GetEntryPos.inc.c"
#include "world/common/GetCurrentCameraYawClamped180.inc.c"
#include "world/common/SomeXYZFunc2.inc.c"
#include "world/common/atomic/Pipe.inc.c"
#include "world/common/UpdateTexturePan.inc.c"

View File

@ -5,16 +5,6 @@ static char* N(exit_str_1) = "mgm_00";
static char* N(exit_str_2) = "iwa_11";
static char* N(exit_str_3) = "mac_03";
#include "world/common/SetPlayerStatusAnimFlags100000.inc.c"
#include "world/common/GetCurrentFloor.inc.c"
#include "world/common/UnkFunc25.inc.c"
#include "world/common/GetEntryPos.inc.c"
#include "world/common/GetCurrentCameraYawClamped180.inc.c"
#include "world/common/SomeXYZFunc2.inc.c"
#include "world/common/atomic/Pipe.inc.c"
INCLUDE_ASM(s32, "world/area_mac/mac_03/831800", func_802402E0_831AE0);

View File

@ -5,17 +5,7 @@ static char* N(exit_str_1) = "mgm_01";
static char* N(exit_str_2) = "mgm_02";
static char* N(exit_str_3) = "";
#include "world/common/SetPlayerStatusAnimFlags100000.inc.c"
#include "world/common/GetCurrentFloor.inc.c"
#include "world/common/UnkFunc25.inc.c"
#include "world/common/GetEntryPos.inc.c"
#include "world/common/GetCurrentCameraYawClamped180.inc.c"
#include "world/common/SomeXYZFunc2.inc.c"
#include "world/common/atomic/Pipe.inc.c"
#include "world/common/UnkNpcAIFunc24.inc.c"

View File

@ -7,17 +7,7 @@ static char* N(exit_str_3) = "obk_01";
static char* N(exit_str_4) = "tik_09";
static char* N(exit_str_5) = "";
#include "world/common/SetPlayerStatusAnimFlags100000.inc.c"
#include "world/common/GetCurrentFloor.inc.c"
#include "world/common/UnkFunc25.inc.c"
#include "world/common/GetEntryPos.inc.c"
#include "world/common/GetCurrentCameraYawClamped180.inc.c"
#include "world/common/SomeXYZFunc2.inc.c"
#include "world/common/atomic/Pipe.inc.c"
#include "world/common/UpdateTexturePan.inc.c"

View File

@ -5,17 +5,7 @@ static char* N(exit_str_1) = "nok_03";
static char* N(exit_str_2) = "tik_01";
static char* N(exit_str_3) = "";
#include "world/common/SetPlayerStatusAnimFlags100000.inc.c"
#include "world/common/GetCurrentFloor.inc.c"
#include "world/common/UnkFunc25.inc.c"
#include "world/common/GetEntryPos.inc.c"
#include "world/common/GetCurrentCameraYawClamped180.inc.c"
#include "world/common/SomeXYZFunc2.inc.c"
#include "world/common/atomic/Pipe.inc.c"
#include "world/common/StashVars.inc.c"

View File

@ -5,17 +5,7 @@ static char* N(exit_str_1) = "trd_00";
static char* N(exit_str_2) = "nok_15";
static char* N(exit_str_3) = "";
#include "world/common/SetPlayerStatusAnimFlags100000.inc.c"
#include "world/common/GetCurrentFloor.inc.c"
#include "world/common/UnkFunc25.inc.c"
#include "world/common/GetEntryPos.inc.c"
#include "world/common/GetCurrentCameraYawClamped180.inc.c"
#include "world/common/SomeXYZFunc2.inc.c"
#include "world/common/atomic/Pipe.inc.c"
#include "world/common/set_script_owner_npc_anim.inc.c"

View File

@ -1,31 +1,3 @@
#include "omo_11.h"
#include "world/common/SetOverrideFlags_40.inc.c"
#include "world/common/UnkFunc17.inc.c"
INCLUDE_ASM(s32, "world/area_omo/omo_11/DDCFC0", func_802407CC_DDCFFC);
#include "world/common/UnkFunc18.inc.c"
INCLUDE_ASM(s32, "world/area_omo/omo_11/DDCFC0", func_8024095C_DDD18C);
#include "world/common/SwitchToPartner.inc.c"
#include "world/common/UnkFunc19.inc.c"
#include "world/common/UnkFunc20.inc.c"
#include "world/common/UnkFunc39.inc.c"
#include "world/common/UnkFunc21.inc.c"
#include "world/common/UnkFunc22.inc.c"
#include "world/common/UnkFunc60.inc.c"
#include "world/common/UnkFunc23.inc.c"
#include "world/common/UnkPartnerPosFuncs.inc.c"
#include "world/common/UnkFunc40.inc.c"
#include "world/common/atomic/SuperBlock.inc.c"

View File

@ -1,6 +1,6 @@
#include "pra_01.h"
#include "world/common/reflection.inc.c"
#include "world/common/atomic/Reflection.inc.c"
#include "common/UnkFogFunc.inc.c"

View File

@ -1,6 +1,6 @@
#include "pra_02.h"
#include "world/common/reflection.inc.c"
#include "world/common/atomic/Reflection.inc.c"
#include "world/common/GetNpcCollisionHeight.inc.c"

View File

@ -1,6 +1,6 @@
#include "pra_05.h"
#include "world/common/reflection.inc.c"
#include "world/common/atomic/Reflection.inc.c"
#include "world/common/StashVars.inc.c"

View File

@ -2,4 +2,4 @@
INCLUDE_ASM(s32, "world/area_pra/pra_06/D57430", func_80240000_D57430);
#include "world/common/reflection.inc.c"
#include "world/common/atomic/Reflection.inc.c"

View File

@ -1,6 +1,6 @@
#include "pra_09.h"
#include "world/common/reflection.inc.c"
#include "world/common/atomic/Reflection.inc.c"
#include "world/common/GetNpcCollisionHeight.inc.c"

Some files were not shown because too many files have changed in this diff Show More